Blender
V3.3
|
Rigid Body constraint editing operators. More...
#include <stdlib.h>
#include <string.h>
#include "DNA_collection_types.h"
#include "DNA_object_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_scene_types.h"
#include "BKE_collection.h"
#include "BKE_context.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_rigidbody.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_object.h"
#include "ED_physics.h"
#include "ED_screen.h"
#include "physics_intern.h"
Go to the source code of this file.
Functions | |
static bool | operator_rigidbody_constraints_editable_poll (Scene *scene) |
static bool | ED_operator_rigidbody_con_active_poll (bContext *C) |
static bool | ED_operator_rigidbody_con_add_poll (bContext *C) |
bool | ED_rigidbody_constraint_add (Main *bmain, Scene *scene, Object *ob, int type, ReportList *reports) |
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_add (wmOperatorType *ot) |
static int | rigidbody_con_remove_exec (bContext *C, wmOperator *op) |
void | RIGIDBODY_OT_constraint_remove (wmOperatorType *ot) |
Rigid Body constraint editing operators.
Definition in file rigidbody_constraint.c.
Definition at line 54 of file rigidbody_constraint.c.
References C, CTX_data_scene(), ED_object_active_context(), ED_operator_object_active_editable(), operator_rigidbody_constraints_editable_poll(), Object::rigidbody_constraint, and scene.
Referenced by RIGIDBODY_OT_constraint_remove().
Definition at line 68 of file rigidbody_constraint.c.
References C, CTX_data_scene(), ED_operator_object_active_editable(), operator_rigidbody_constraints_editable_poll(), and scene.
Referenced by RIGIDBODY_OT_constraint_add().
bool ED_rigidbody_constraint_add | ( | Main * | bmain, |
Scene * | scene, | ||
Object * | ob, | ||
int | type, | ||
ReportList * | reports | ||
) |
Definition at line 77 of file rigidbody_constraint.c.
References BKE_collection_add(), BKE_collection_object_add(), BKE_reportf(), BKE_rigidbody_create_constraint(), BKE_rigidbody_get_world(), RigidBodyWorld::constraints, DEG_id_tag_update(), DEG_relations_tag_update(), Collection::id, Object::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_TRANSFORM, id_us_plus(), ID::name, NULL, Object::rigidbody_constraint, RPT_INFO, scene, and type.
Referenced by rigidbody_con_add_exec().
Definition at line 106 of file rigidbody_constraint.c.
References BKE_rigidbody_remove_constraint(), DEG_id_tag_update(), DEG_relations_tag_update(), Object::id, ID_RECALC_TRANSFORM, and scene.
Referenced by rigidbody_con_remove_exec().
Definition at line 43 of file rigidbody_constraint.c.
References RigidBodyWorld::constraints, ID_IS_LINKED, ID_IS_OVERRIDE_LIBRARY, NULL, Scene::rigidbody_world, and scene.
Referenced by ED_operator_rigidbody_con_active_poll(), and ED_operator_rigidbody_con_add_poll().
|
static |
Definition at line 119 of file rigidbody_constraint.c.
References BKE_report(), BKE_rigidbody_get_world(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), ED_rigidbody_constraint_add(), ELEM, NC_OBJECT, ND_TRANSFORM, NULL, OBACT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, scene, type, and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_constraint_add().
|
static |
Definition at line 172 of file rigidbody_constraint.c.
References BKE_report(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), ED_rigidbody_constraint_remove(), ELEM, NC_OBJECT, ND_TRANSFORM, NULL, OBACT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, Object::rigidbody_constraint, RPT_ERROR, scene, and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_constraint_remove().
void RIGIDBODY_OT_constraint_add | ( | wmOperatorType * | ot | ) |
Definition at line 147 of file rigidbody_constraint.c.
References wmOperatorType::description, ED_operator_rigidbody_con_add_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RBC_TYPE_FIXED, rigidbody_con_add_exec(), RNA_def_enum(), rna_enum_rigidbody_constraint_type_items, and wmOperatorType::srna.
Referenced by operatortypes_particle().
void RIGIDBODY_OT_constraint_remove | ( | wmOperatorType * | ot | ) |
Definition at line 193 of file rigidbody_constraint.c.
References wmOperatorType::description, ED_operator_rigidbody_con_active_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and rigidbody_con_remove_exec().
Referenced by operatortypes_particle().