|
Blender V5.0
|
Rigid Body object editing operators. More...
#include <cstdlib>#include <cstring>#include "DNA_object_types.h"#include "DNA_rigidbody_types.h"#include "DNA_scene_types.h"#include "BLT_translation.hh"#include "BKE_context.hh"#include "BKE_library.hh"#include "BKE_report.hh"#include "BKE_rigidbody.h"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_build.hh"#include "DEG_depsgraph_query.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_enum_types.hh"#include "RNA_prototypes.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.
Classes | |
| struct | rbMaterialDensityItem |
Variables | |
| static rbMaterialDensityItem | RB_MATERIAL_DENSITY_TABLE [] |
| static const int | NUM_RB_MATERIAL_PRESETS |
Rigid Body object editing operators.
Definition in file rigidbody_object.cc.
| bool ED_rigidbody_object_add | ( | Main * | bmain, |
| Scene * | scene, | ||
| Object * | ob, | ||
| int | type, | ||
| ReportList * | reports ) |
Definition at line 89 of file rigidbody_object.cc.
References BKE_rigidbody_add_object().
Referenced by rigidbody_object_add_exec(), and rigidbody_objects_add_exec().
Definition at line 94 of file rigidbody_object.cc.
References BKE_rigidbody_remove_object().
Referenced by blender::ed::object::convert_mesh_to_curves_legacy(), blender::ed::object::convert_mesh_to_pointcloud(), blender::ed::object::convert_pointcloud_to_mesh(), rigidbody_object_remove_exec(), and rigidbody_objects_remove_exec().
|
static |
Definition at line 509 of file rigidbody_object.cc.
References PROP_EDITABLE, wmOperator::ptr, RNA_def_property_clear_flag(), RNA_def_property_flag(), RNA_enum_get(), RNA_property_identifier(), and STREQ.
Referenced by RIGIDBODY_OT_mass_calculate().
|
static |
Definition at line 57 of file rigidbody_object.cc.
References C, blender::ed::object::context_active_object(), CTX_data_scene(), ED_operator_object_active_editable(), operator_rigidbody_editable_poll(), and Object::rigidbody_object.
Referenced by RIGIDBODY_OT_mass_calculate(), RIGIDBODY_OT_object_remove(), RIGIDBODY_OT_objects_remove(), and RIGIDBODY_OT_shape_change().
|
static |
Definition at line 72 of file rigidbody_object.cc.
References C, blender::ed::object::context_active_object(), CTX_data_scene(), ED_operator_object_active_editable(), OB_MESH, operator_rigidbody_editable_poll(), and Object::type.
Referenced by RIGIDBODY_OT_object_add(), and RIGIDBODY_OT_objects_add().
|
static |
Definition at line 45 of file rigidbody_object.cc.
References RigidBodyWorld::group, ID_IS_EDITABLE, ID_IS_OVERRIDE_LIBRARY, and Scene::rigidbody_world.
Referenced by operator_rigidbody_active_poll(), and operator_rigidbody_add_poll().
|
static |
Definition at line 416 of file rigidbody_object.cc.
References i, EnumPropertyItem::identifier, IFACE_, EnumPropertyItem::name, rbMaterialDensityItem::name, NUM_RB_MATERIAL_PRESETS, RB_MATERIAL_DENSITY_TABLE, RNA_enum_item_add(), RNA_enum_item_end(), and EnumPropertyItem::value.
Referenced by RIGIDBODY_OT_mass_calculate().
|
static |
Definition at line 104 of file rigidbody_object.cc.
References C, blender::ed::object::context_active_object(), CTX_data_main(), CTX_data_scene(), ED_rigidbody_object_add(), NC_OBJECT, ND_POINTCACHE, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_object_add().
|
static |
Definition at line 151 of file rigidbody_object.cc.
References BKE_report(), C, blender::ed::object::context_active_object(), CTX_data_main(), CTX_data_scene(), ED_rigidbody_object_remove(), ELEM, NC_OBJECT, ND_POINTCACHE, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, Object::rigidbody_object, RPT_ERROR, and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_object_remove().
|
static |
Definition at line 197 of file rigidbody_object.cc.
References C, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), ED_rigidbody_object_add(), NC_OBJECT, ND_POINTCACHE, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_objects_add().
|
static |
Definition at line 452 of file rigidbody_object.cc.
References BKE_rigidbody_calc_volume(), C, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_ensure_evaluated_depsgraph(), DEG_get_evaluated(), DEG_id_tag_update(), depsgraph, ID_RECALC_TRANSFORM, NC_OBJECT, ND_POINTCACHE, NUM_RB_MATERIAL_PRESETS, OPERATOR_CANCELLED, OPERATOR_FINISHED, ptr, wmOperator::ptr, RB_MATERIAL_DENSITY_TABLE, RNA_enum_get(), RNA_float_get(), RNA_float_set(), RNA_pointer_create_discrete(), and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_mass_calculate().
|
static |
Definition at line 246 of file rigidbody_object.cc.
References C, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), ED_rigidbody_object_remove(), NC_OBJECT, ND_POINTCACHE, ND_TRANSFORM, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_objects_remove().
|
static |
Definition at line 292 of file rigidbody_object.cc.
References C, CTX_DATA_BEGIN, CTX_DATA_END, DEG_id_tag_update(), ID_RECALC_TRANSFORM, NC_OBJECT, NC_SPACE, ND_POINTCACHE, ND_SPACE_VIEW3D, OPERATOR_CANCELLED, OPERATOR_FINISHED, ptr, wmOperator::ptr, RNA_enum_get(), RNA_enum_set(), RNA_pointer_create_discrete(), and WM_event_add_notifier().
Referenced by RIGIDBODY_OT_shape_change().
| void RIGIDBODY_OT_mass_calculate | ( | wmOperatorType * | ot | ) |
Definition at line 529 of file rigidbody_object.cc.
References FLT_MAX, mass_calculate_poll_property(), operator_rigidbody_active_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, PROP_ENUM_NO_TRANSLATE, rigidbody_materials_itemf(), rigidbody_objects_calc_mass_exec(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_float(), RNA_def_property_flag(), rna_enum_dummy_DEFAULT_items, and WM_menu_invoke().
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_object_add | ( | wmOperatorType * | ot | ) |
Definition at line 126 of file rigidbody_object.cc.
References operator_rigidbody_add_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RBO_TYPE_ACTIVE, rigidbody_object_add_exec(), RNA_def_enum(), and rna_enum_rigidbody_object_type_items.
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_object_remove | ( | wmOperatorType * | ot | ) |
Definition at line 177 of file rigidbody_object.cc.
References operator_rigidbody_active_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and rigidbody_object_remove_exec().
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_objects_add | ( | wmOperatorType * | ot | ) |
Definition at line 221 of file rigidbody_object.cc.
References operator_rigidbody_add_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RBO_TYPE_ACTIVE, rigidbody_objects_add_exec(), RNA_def_enum(), and rna_enum_rigidbody_object_type_items.
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_objects_remove | ( | wmOperatorType * | ot | ) |
Definition at line 272 of file rigidbody_object.cc.
References operator_rigidbody_active_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and rigidbody_objects_remove_exec().
Referenced by operatortypes_particle().
| void RIGIDBODY_OT_shape_change | ( | wmOperatorType * | ot | ) |
Definition at line 323 of file rigidbody_object.cc.
References operator_rigidbody_active_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, RB_SHAPE_TRIMESH, rigidbody_objects_shape_change_exec(), RNA_def_enum(), rna_enum_rigidbody_object_shape_items, and WM_menu_invoke().
Referenced by operatortypes_particle().
|
static |
Definition at line 409 of file rigidbody_object.cc.
Referenced by rigidbody_materials_itemf(), and rigidbody_objects_calc_mass_exec().
|
static |
Definition at line 361 of file rigidbody_object.cc.
Referenced by rigidbody_materials_itemf(), and rigidbody_objects_calc_mass_exec().