47 (scene->rigidbody_world !=
nullptr && scene->rigidbody_world->constraints !=
nullptr &&
87 reports,
RPT_INFO,
"Object '%s' already has a Rigid Body Constraint", ob->
id.
name + 2);
133 if (
ELEM(
nullptr, scene, rbw)) {
153 ot->
idname =
"RIGIDBODY_OT_constraint_add";
154 ot->
name =
"Add Rigid Body Constraint";
155 ot->
description =
"Add Rigid Body Constraint to active object";
169 "Rigid Body Constraint Type",
200 ot->
idname =
"RIGIDBODY_OT_constraint_remove";
201 ot->
name =
"Remove Rigid Body Constraint";
202 ot->
description =
"Remove Rigid Body Constraint from Object";
Collection * BKE_collection_add(Main *bmain, Collection *collection_parent, const char *name_custom)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
API for Blender-side Rigid Body stuff.
void BKE_rigidbody_remove_constraint(struct Main *bmain, struct Scene *scene, struct Object *ob, bool free_us)
struct RigidBodyCon * BKE_rigidbody_create_constraint(struct Scene *scene, struct Object *ob, short type)
struct RigidBodyWorld * BKE_rigidbody_get_world(struct Scene *scene)
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
#define ID_IS_EDITABLE(_id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
Object groups, one object can be in many groups at once.
Object is a sort of wrapper for general info.
Types and defines for representing Rigid Body entities.
bool ED_operator_object_active_editable(bContext *C)
Object * context_active_object(const bContext *C)
static bool ED_operator_rigidbody_con_active_poll(bContext *C)
void ED_rigidbody_constraint_remove(Main *bmain, Scene *scene, Object *ob)
static int rigidbody_con_add_exec(bContext *C, wmOperator *op)
void RIGIDBODY_OT_constraint_remove(wmOperatorType *ot)
static bool ED_operator_rigidbody_con_add_poll(bContext *C)
static int rigidbody_con_remove_exec(bContext *C, wmOperator *op)
bool ED_rigidbody_constraint_add(Main *bmain, Scene *scene, Object *ob, int type, ReportList *reports)
static bool operator_rigidbody_constraints_editable_poll(Scene *scene)
void RIGIDBODY_OT_constraint_add(wmOperatorType *ot)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem rna_enum_rigidbody_constraint_type_items[]
struct RigidBodyCon * rigidbody_constraint
struct Collection * constraints
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)