|
Blender V4.3
|
Rigid Body constraint editing operators. More...
#include <cstdlib>#include <cstring>#include "DNA_collection_types.h"#include "DNA_object_types.h"#include "DNA_rigidbody_types.h"#include "DNA_scene_types.h"#include "BKE_collection.hh"#include "BKE_context.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "BKE_report.hh"#include "BKE_rigidbody.h"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_build.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_enum_types.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_object.hh"#include "ED_physics.hh"#include "ED_screen.hh"#include "physics_intern.hh"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.cc.
|
static |
Definition at line 56 of file rigidbody_constraint.cc.
References blender::ed::object::context_active_object(), CTX_data_scene(), ED_operator_object_active_editable(), operator_rigidbody_constraints_editable_poll(), and Object::rigidbody_constraint.
Referenced by RIGIDBODY_OT_constraint_remove().
|
static |
Definition at line 70 of file rigidbody_constraint.cc.
References CTX_data_scene(), ED_operator_object_active_editable(), and operator_rigidbody_constraints_editable_poll().
Referenced by RIGIDBODY_OT_constraint_add().
| bool ED_rigidbody_constraint_add | ( | Main * | bmain, |
| Scene * | scene, | ||
| Object * | ob, | ||
| int | type, | ||
| ReportList * | reports ) |
Definition at line 79 of file rigidbody_constraint.cc.
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_SYNC_TO_EVAL, ID_RECALC_TRANSFORM, id_us_plus(), ID::name, Object::rigidbody_constraint, and RPT_INFO.
Referenced by rigidbody_con_add_exec().
Definition at line 108 of file rigidbody_constraint.cc.
References BKE_rigidbody_remove_constraint(), DEG_id_tag_update(), DEG_relations_tag_update(), Object::id, and ID_RECALC_TRANSFORM.
Referenced by rigidbody_con_remove_exec().
|
static |
Definition at line 44 of file rigidbody_constraint.cc.
References ID_IS_EDITABLE, and ID_IS_OVERRIDE_LIBRARY.
Referenced by ED_operator_rigidbody_con_active_poll(), and ED_operator_rigidbody_con_add_poll().
|
static |
Definition at line 121 of file rigidbody_constraint.cc.
References BKE_report(), BKE_rigidbody_get_world(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), ED_rigidbody_constraint_add(), ELEM, NC_OBJECT, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_constraint_add().
|
static |
Definition at line 175 of file rigidbody_constraint.cc.
References BKE_report(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), ED_rigidbody_constraint_remove(), ELEM, NC_OBJECT, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, Object::rigidbody_constraint, RPT_ERROR, and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_constraint_remove().
| void RIGIDBODY_OT_constraint_add | ( | wmOperatorType * | ot | ) |
Definition at line 150 of file rigidbody_constraint.cc.
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 197 of file rigidbody_constraint.cc.
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().