27#define MESH_DM_INFO_STR_MAX 16384
35 "The pose space of a bone (its armature's object space)"},
40 "The rest pose local space of a bone (this matrix includes parent transforms)"},
42 {0,
nullptr, 0,
nullptr,
nullptr},
89static Base *find_view_layer_base_with_synced_ensure(
96 if (*view_layer_ptr) {
97 scene = id_cast<Scene *>(view_layer_ptr->owner_id);
98 view_layer =
static_cast<ViewLayer *
>(view_layer_ptr->data);
104 if (r_scene !=
nullptr) {
107 if (r_view_layer !=
nullptr) {
108 *r_view_layer = view_layer;
115static void rna_Object_select_set(
120 Base *base = find_view_layer_base_with_synced_ensure(ob,
C, view_layer_ptr, &scene, &view_layer);
126 "Object '%s' cannot be selected because it is not in View Layer '%s'!",
142 Base *base = find_view_layer_base_with_synced_ensure(ob,
C, view_layer_ptr,
nullptr,
nullptr);
150static void rna_Object_hide_set(
155 Base *base = find_view_layer_base_with_synced_ensure(ob,
C, view_layer_ptr, &scene, &view_layer);
160 "Object '%s' cannot be hidden because it is not in View Layer '%s'!",
181 Base *base = find_view_layer_base_with_synced_ensure(ob,
C, view_layer_ptr,
nullptr,
nullptr);
189static bool rna_Object_visible_get(
Object *ob,
194 Base *base = find_view_layer_base_with_synced_ensure(ob,
C, view_layer_ptr,
nullptr,
nullptr);
195 if (v3d ==
nullptr) {
208 Base *base = find_view_layer_base_with_synced_ensure(ob,
C, view_layer_ptr,
nullptr,
nullptr);
218 Base *base = find_view_layer_base_with_synced_ensure(ob,
C, view_layer_ptr,
nullptr,
nullptr);
226static Base *rna_Object_local_view_property_helper(
bScreen *screen,
234 if (v3d->localvd ==
nullptr) {
239 if (view_layer ==
nullptr) {
249 if (base ==
nullptr) {
251 reports,
RPT_WARNING,
"Object %s not in view layer %s", ob->id.
name + 2, view_layer->name);
253 if (r_scene !=
nullptr && win !=
nullptr) {
254 *r_scene = win->scene;
261 if (v3d->localvd ==
nullptr) {
266 return ((ob->base_local_view_bits & v3d->local_view_uid) != 0);
269static void rna_Object_local_view_set(
Object *ob,
274 bScreen *screen = id_cast<bScreen *>(v3d_ptr->owner_id);
277 Base *base = rna_Object_local_view_property_helper(screen, v3d,
nullptr, ob, reports, &scene);
278 if (base ==
nullptr) {
281 const short local_view_bits_prev = base->local_view_bits;
283 if (local_view_bits_prev != base->local_view_bits) {
286 screen,
reinterpret_cast<SpaceLink *
>(v3d),
true);
293static bool rna_Object_visible_in_viewport_get(
Object *ob,
View3D *v3d)
300static void rna_Object_mat_convert_space(
Object *ob,
308 copy_m4_m4(
reinterpret_cast<float (*)[4]
>(mat_ret),
309 reinterpret_cast<float (*)[4]
>(
const_cast<float *
>(mat)));
315 if (pchan ==
nullptr) {
317 const char *identifier =
nullptr;
321 "'from_space' '%s' is invalid when no pose bone is given!",
326 const char *identifier =
nullptr;
330 "'to_space' '%s' is invalid when no pose bone is given!",
337 const char *identifier =
nullptr;
341 "'from_space' '%s' is invalid when no custom space is given!",
346 const char *identifier =
nullptr;
350 "'to_space' '%s' is invalid when no custom space is given!",
356 ob, pchan,
nullptr,
reinterpret_cast<float (*)[4]
>(mat_ret), from, to,
false);
359static void rna_Object_calc_matrix_camera(
Object *ob,
360 Depsgraph *depsgraph,
378 copy_m4_m4(
reinterpret_cast<float (*)[4]
>(mat_ret), params.winmat);
381static void rna_Object_camera_fit_coords(
Object *ob,
382 Depsgraph *depsgraph,
389 depsgraph,
reinterpret_cast<const float (*)[3]
>(
cos), cos_num / 3, ob, co_ret, scale_ret);
392static void rna_Object_crazyspace_eval(
Object *
object,
394 Depsgraph *depsgraph,
400static void rna_Object_crazyspace_displacement_to_deformed(
Object *
object,
402 const int vertex_index,
403 const float displacement[3],
404 float r_displacement_deformed[3])
407 object, reports, vertex_index, displacement, r_displacement_deformed);
410static void rna_Object_crazyspace_displacement_to_original(
Object *
object,
412 const int vertex_index,
413 const float displacement_deformed[3],
414 float r_displacement[3])
417 object, reports, vertex_index, displacement_deformed, r_displacement);
420static void rna_Object_crazyspace_eval_clear(
Object *
object)
426static Mesh *rna_Object_to_mesh(
Object *
object,
428 bool preserve_all_data_layers,
429 Depsgraph *depsgraph)
448static void rna_Object_to_mesh_clear(
Object *
object)
455 Depsgraph *depsgraph,
456 bool apply_modifiers)
463 if (depsgraph ==
nullptr) {
471static void rna_Object_to_curve_clear(
Object *
object)
485 CLAMP(kb->curval, kb->slidermin, kb->slidermax);
502static void rna_Object_shape_key_remove(
Object *ob,
510 if ((key ==
nullptr) ||
BLI_findindex(&key->block, kb) == -1) {
523 kb_ptr->invalidate();
526static void rna_Object_shape_key_clear(
Object *ob,
Main *bmain)
537 if (key ==
nullptr) {
547 return selected_keys;
551static void rna_Mesh_assign_verts_to_group(
552 Object *ob,
bDeformGroup *group,
int *indices,
int totindex,
float weight,
int assignmode)
561 if (group_index == -1) {
573 create_dverts(&
mesh->id);
577 for (i = 0; i < totindex; i++) {
578 if (i < 0 || i >=
mesh->verts_num) {
583 add_vert_defnr(ob, group_index, i, weight, assignmode);
589static int mesh_corner_tri_to_face_index(
Mesh *mesh_eval,
const int tri_index)
591 const Span<int> tri_faces = mesh_eval->corner_tri_faces();
592 const int face_i = tri_faces[tri_index];
593 const int *index_face_to_orig =
static_cast<const int *
>(
595 return index_face_to_orig ? index_face_to_orig[face_i] : face_i;
605 if (ob->runtime->data_eval ==
nullptr) {
607 Depsgraph *depsgraph = rnaptr_depsgraph !=
nullptr ?
608 static_cast<Depsgraph *
>(rnaptr_depsgraph->data) :
610 if (depsgraph ==
nullptr) {
613 if (depsgraph !=
nullptr) {
618 reports,
RPT_ERROR,
"Object '%s' has no evaluated mesh data", ob_orig->id.
name + 2);
625static void rna_Object_ray_cast(
Object *ob,
628 const float origin[3],
629 const float direction[3],
637 bool success =
false;
641 if ((ob = eval_object_ensure(ob,
C, reports, rnaptr_depsgraph)) ==
nullptr) {
648 const std::optional<Bounds<float3>>
bounds = mesh_eval->bounds_min_max();
655 float direction_unit[3];
659 origin, direction_unit,
bounds->min,
bounds->max, &distmin,
nullptr) &&
666 if (
const std::optional<bke::bvh::RayHit> hit = bvh_tree.ray_intersect(ray)) {
668 *r_success = success =
true;
672 *r_index = mesh_corner_tri_to_face_index(mesh_eval, hit->index);
676 if (success ==
false) {
685static void rna_Object_closest_point_on_mesh(
Object *ob,
688 const float origin[3],
697 if ((ob = eval_object_ensure(ob,
C, reports, rnaptr_depsgraph)) ==
nullptr) {
703 if (mesh_eval->faces_num != 0) {
705 if (
const std::optional<bke::bvh::ClosestPointResult> nearest = bvh_tree.closest_point(
711 const Span<float3> positions = mesh_eval->vert_positions();
712 const Span<int> corner_verts = mesh_eval->corner_verts();
713 const Span<int3> corner_tris = mesh_eval->corner_tris();
715 positions[corner_verts[corner_tris[nearest->index][0]]],
716 positions[corner_verts[corner_tris[nearest->index][1]]],
717 positions[corner_verts[corner_tris[nearest->index][2]]]);
719 *r_index = mesh_corner_tri_to_face_index(mesh_eval, nearest->index);
730static bool rna_Object_is_modified(
Object *ob,
Scene *scene,
int settings)
735static bool rna_Object_is_deform_modified(
Object *ob,
Scene *scene,
int settings)
744void rna_Object_me_eval_info(
747 const Mesh *mesh_eval =
nullptr;
755 if ((ob = eval_object_ensure(ob,
C,
nullptr, rnaptr_depsgraph)) ==
nullptr) {
763 mesh_eval = id_cast<Mesh *>(ob->data);
783void rna_Object_me_eval_info(
Object * ,
793static bool rna_Object_update_from_editmode(
Object *ob,
Main *bmain)
819 {0,
nullptr, 0,
nullptr,
nullptr},
824 {0,
"SOURCE", 0,
"Source",
"Source mesh"},
825 {1,
"DEFORM", 0,
"Deform",
"Objects deform mesh"},
826 {2,
"FINAL", 0,
"Final",
"Objects final mesh"},
827 {0,
nullptr, 0,
nullptr,
nullptr},
834 func,
"Test if the object is selected. The selection state is per view layer.");
837 func,
"view_layer",
"ViewLayer",
"",
"Use this instead of the active view layer");
844 func,
"Select or deselect the object. The selection state is per view layer.");
846 parm =
RNA_def_boolean(func,
"state",
false,
"",
"Selection state to define");
849 func,
"view_layer",
"ViewLayer",
"",
"Use this instead of the active view layer");
855 "Test if the object is hidden for viewport editing. This hiding state is per view layer.");
858 func,
"view_layer",
"ViewLayer",
"",
"Use this instead of the active view layer");
865 func,
"Hide the object for viewport editing. This hiding state is per view layer.");
867 parm =
RNA_def_boolean(func,
"state",
false,
"",
"Hide state to define");
870 func,
"view_layer",
"ViewLayer",
"",
"Use this instead of the active view layer");
875 "Test if the object is visible in the 3D viewport, taking into "
876 "account all visibility settings");
879 func,
"view_layer",
"ViewLayer",
"",
"Use this instead of the active view layer");
882 func,
"viewport",
"SpaceView3D",
"",
"Use this instead of the active 3D viewport");
890 func,
"view_layer",
"ViewLayer",
"",
"Use this instead of the active view layer");
895 func =
RNA_def_function(srna,
"indirect_only_get",
"rna_Object_indirect_only_get");
897 "Test if object is set to contribute only indirectly (through "
898 "shadows and reflections) in the view layer");
901 func,
"view_layer",
"ViewLayer",
"",
"Use this instead of the active view layer");
903 parm =
RNA_def_boolean(func,
"result",
false,
"",
"Object indirect only");
907 func =
RNA_def_function(srna,
"local_view_get",
"rna_Object_local_view_get");
910 parm =
RNA_def_pointer(func,
"viewport",
"SpaceView3D",
"",
"Viewport in local view");
912 parm =
RNA_def_boolean(func,
"result",
false,
"",
"Object local view state");
915 func =
RNA_def_function(srna,
"local_view_set",
"rna_Object_local_view_set");
918 parm =
RNA_def_pointer(func,
"viewport",
"SpaceView3D",
"",
"Viewport in local view");
920 parm =
RNA_def_boolean(func,
"state",
false,
"",
"Local view state to define");
924 func =
RNA_def_function(srna,
"visible_in_viewport_get",
"rna_Object_visible_in_viewport_get");
926 func,
"Check for local view and local collections for this viewport and object");
927 parm =
RNA_def_pointer(func,
"viewport",
"SpaceView3D",
"",
"Viewport in local collections");
929 parm =
RNA_def_boolean(func,
"result",
false,
"",
"Object viewport visibility");
933 func =
RNA_def_function(srna,
"convert_space",
"rna_Object_mat_convert_space");
935 func,
"Convert (transform) the given matrix from one space to another");
942 "Bone to use to define spaces (may be None, in which case only the two 'WORLD' and "
943 "'LOCAL' spaces are usable)");
956 "The space in which 'matrix' is currently");
962 "The space to which you want to transform 'matrix'");
965 func =
RNA_def_function(srna,
"calc_matrix_camera",
"rna_Object_calc_matrix_camera");
967 "Generate the camera projection matrix of this object "
968 "(mostly useful for Camera and Light types)");
970 func,
"depsgraph",
"Depsgraph",
"",
"Depsgraph to get evaluated data from");
976 parm =
RNA_def_int(func,
"x", 1, 0,
INT_MAX,
"",
"Width of the render area", 0, 10000);
977 parm =
RNA_def_int(func,
"y", 1, 0,
INT_MAX,
"",
"Height of the render area", 0, 10000);
979 func,
"scale_x", 1.0f, 1.0e-6f,
FLT_MAX,
"",
"Width scaling factor", 1.0e-2f, 100.0f);
981 func,
"scale_y", 1.0f, 1.0e-6f,
FLT_MAX,
"",
"Height scaling factor", 1.0e-2f, 100.0f);
983 func =
RNA_def_function(srna,
"camera_fit_coords",
"rna_Object_camera_fit_coords");
985 "Compute the coordinate (and scale for ortho cameras) "
986 "given object should be to 'see' all given coordinates");
988 func,
"depsgraph",
"Depsgraph",
"",
"Depsgraph to get evaluated data from");
997 "Coordinates to fit in",
1007 parm,
"",
"The ortho scale to aim to be able to see all given points (if relevant)");
1012 func =
RNA_def_function(srna,
"crazyspace_eval",
"rna_Object_crazyspace_eval");
1015 "Compute orientation mapping between vertices of an original object and object with shape "
1016 "keys and deforming modifiers applied."
1017 "The evaluation is to be freed with the crazyspace_eval_free function");
1020 func,
"depsgraph",
"Depsgraph",
"Dependency Graph",
"Evaluated dependency graph");
1022 parm =
RNA_def_pointer(func,
"scene",
"Scene",
"Scene",
"Scene of the object");
1026 "crazyspace_displacement_to_deformed",
1027 "rna_Object_crazyspace_displacement_to_deformed");
1029 func,
"Convert displacement vector from non-deformed object space to deformed object space");
1040 "crazyspace_displacement_to_original",
1041 "rna_Object_crazyspace_displacement_to_original");
1043 func,
"Convert displacement vector from deformed object space to non-deformed object space");
1053 RNA_def_function(srna,
"crazyspace_eval_clear",
"rna_Object_crazyspace_eval_clear");
1060 "Create a Mesh data-block from the current state of the object. The object owns the "
1061 "data-block. To force free it use to_mesh_clear(). "
1062 "The result is temporary and cannot be used by objects from the main database.");
1065 "preserve_all_data_layers",
1068 "Preserve all data layers in the mesh, like UV maps and vertex groups. "
1069 "By default Blender only computes the subset of data layers needed for viewport "
1070 "display and rendering, for better performance.");
1076 "Evaluated dependency graph which is required when preserve_all_data_layers is true");
1077 parm =
RNA_def_pointer(func,
"mesh",
"Mesh",
"",
"Mesh created from object");
1080 func =
RNA_def_function(srna,
"to_mesh_clear",
"rna_Object_to_mesh_clear");
1087 "Create a Curve data-block from the current state of the object. This only works for curve "
1088 "and text objects. The object owns the data-block. To force free it, use to_curve_clear(). "
1089 "The result is temporary and cannot be used by objects from the main database.");
1092 func,
"depsgraph",
"Depsgraph",
"Dependency Graph",
"Evaluated dependency graph");
1098 "Apply the deform modifiers on the control points of the curve. This is only "
1099 "supported for curve objects.");
1100 parm =
RNA_def_pointer(func,
"curve",
"Curve",
"",
"Curve created from object");
1104 func =
RNA_def_function(srna,
"to_curve_clear",
"rna_Object_to_curve_clear");
1108 func =
RNA_def_function(srna,
"find_armature",
"BKE_modifiers_is_deformed_by_armature");
1110 func,
"Find armature influencing this object as a parent or via a modifier");
1112 func,
"ob_arm",
"Object",
"",
"Armature object influencing this object or None");
1116 func =
RNA_def_function(srna,
"shape_key_add",
"rna_Object_shape_key_add");
1119 RNA_def_string(func,
"name",
"Key", 0,
"",
"Unique name for the new key-block");
1120 RNA_def_boolean(func,
"from_mix",
true,
"",
"Create new shape from existing mix of shapes");
1121 parm =
RNA_def_pointer(func,
"key",
"ShapeKey",
"",
"New shape key-block");
1125 func =
RNA_def_function(srna,
"shape_key_remove",
"rna_Object_shape_key_remove");
1128 parm =
RNA_def_pointer(func,
"key",
"ShapeKey",
"",
"Key-block to be removed");
1132 func =
RNA_def_function(srna,
"shape_key_clear",
"rna_Object_shape_key_clear");
1136 func =
RNA_def_function(srna,
"shape_keys_selected",
"rna_Object_shape_keys_selected");
1147 "Cast a ray onto evaluated geometry, in object space "
1148 "(using context's or provided depsgraph to get evaluated mesh if needed)");
1159 "Origin of the ray, in object space",
1170 "Direction of the ray, in object space",
1188 "Depsgraph to use to get evaluated data, when called from original object "
1189 "(only needed if current Context's depsgraph is not suitable)");
1194 func,
"result",
false,
"",
"Whether the ray successfully hit the geometry");
1203 "The hit location of this ray cast",
1215 "The face normal at the ray cast hit location",
1221 func,
"index", 0, 0, 0,
"",
"The face index, -1 when original data isn't available", 0, 0);
1225 func =
RNA_def_function(srna,
"closest_point_on_mesh",
"rna_Object_closest_point_on_mesh");
1228 "Find the nearest point on evaluated geometry, in object space "
1229 "(using context's or provided depsgraph to get evaluated mesh if needed)");
1240 "Point to find closest geometry from (in object space)",
1246 func,
"distance", 1.844674352395373e+19, 0.0,
FLT_MAX,
"",
"Maximum distance", 0.0,
FLT_MAX);
1252 "Depsgraph to use to get evaluated data, when called from original object "
1253 "(only needed if current Context's depsgraph is not suitable)");
1257 parm =
RNA_def_boolean(func,
"result",
false,
"",
"Whether closest point on geometry was found");
1266 "The location on the object closest to the point",
1278 "The face normal at the closest point",
1285 func,
"index", 0, 0, 0,
"",
"The face index, -1 when original data isn't available", 0, 0);
1293 "Determine if this object is modified from the base mesh data");
1294 parm =
RNA_def_pointer(func,
"scene",
"Scene",
"",
"Scene in which to check the object");
1296 parm =
RNA_def_enum(func,
"settings", mesh_type_items, 0,
"",
"Modifier settings to apply");
1298 parm =
RNA_def_boolean(func,
"result",
false,
"",
"Whether the object is modified");
1301 func =
RNA_def_function(srna,
"is_deform_modified",
"rna_Object_is_deform_modified");
1303 func,
"Determine if this object is modified by a deformation from the base mesh data");
1304 parm =
RNA_def_pointer(func,
"scene",
"Scene",
"",
"Scene in which to check the object");
1306 parm =
RNA_def_enum(func,
"settings", mesh_type_items, 0,
"",
"Modifier settings to apply");
1308 parm =
RNA_def_boolean(func,
"result",
false,
"",
"Whether the object is deform-modified");
1316 "Returns a string for original/evaluated mesh data (debug builds only, "
1317 "using context's or provided depsgraph to get evaluated mesh if needed)");
1320 parm =
RNA_def_enum(func,
"type", mesh_dm_info_items, 0,
"",
"Modifier settings to apply");
1327 "Depsgraph to use to get evaluated data, when called from original object "
1328 "(only needed if current Context's depsgraph is not suitable)");
1338 func =
RNA_def_function(srna,
"update_from_editmode",
"rna_Object_update_from_editmode");
1346 "Release memory used by caches associated with this object. "
1347 "Intended to be used by render engines only.");
Camera data-block and utility functions.
CustomData interface, see also DNA_customdata_types.h.
General operations, lookup, etc. for blender objects.
#define BVH_RAYCAST_DIST_MAX
#define BASE_VISIBLE(v3d, base)
Read Blender memory allocation and freeing.
#define SET_FLAG_FROM_TEST(value, test, flag)
float distance(float, float) RET
void base_select(Base *base, eObjectSelect_Mode mode)
bool editmode_load(Main *bmain, Object *obedit)
VecBase< T, 3 > normal_tri(const VecBase< T, 3 > &v1, const VecBase< T, 3 > &v2, const VecBase< T, 3 > &v3)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
void WM_main_add_notifier(uint type, void *reference)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_api_object(StructRNA *srna)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
static const EnumPropertyItem space_items[]
MINLINE void copy_v3_v3(float r[3], const float a[3])
PropertyRNA * RNA_def_float_array(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
int BKE_object_is_modified(Scene *scene, Object *ob)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void BKE_camera_params_compute_viewplane(CameraParams *params, int winx, int winy, float aspx, float aspy)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
bool isect_ray_aabb_v3_simple(const float orig[3], const float dir[3], const float bb_min[3], const float bb_max[3], float *tmin, float *tmax)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
@ CONSTRAINT_SPACE_OWNLOCAL
@ CONSTRAINT_SPACE_PARLOCAL
@ CONSTRAINT_SPACE_CUSTOM
void BKE_view_layer_need_resync_tag(ViewLayer *view_layer)
ViewLayer * CTX_data_view_layer(const bContext *C)
void ED_outliner_select_sync_from_object_tag(bContext *C)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void BKE_camera_params_compute_matrix(CameraParams *params)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
void BKE_crazyspace_api_displacement_to_original(Object *object, ReportList *reports, int vertex_index, const float displacement_deformed[3], float r_displacement[3])
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BKE_constraint_mat_convertspace(struct Object *ob, struct bPoseChannel *pchan, struct bConstraintOb *cob, float mat[4][4], short from, short to, bool keep_scale)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Scene * WM_window_get_active_scene(const wmWindow *win)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Curve * BKE_object_to_curve(Object *object, Depsgraph *depsgraph, bool apply_modifiers)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
int BKE_object_is_deform_modified(Scene *scene, Object *ob)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
void BKE_camera_params_from_object(CameraParams *params, const struct Object *cam_ob)
bool BKE_object_shapekey_free(Main *bmain, Object *ob)
void BKE_crazyspace_api_eval(Depsgraph *depsgraph, Scene *scene, Object *object, ReportList *reports)
char * BKE_mesh_debug_info(const Mesh *mesh) ATTR_NONNULL(1) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BKE_crazyspace_api_displacement_to_deformed(Object *object, ReportList *reports, int vertex_index, const float displacement[3], float r_displacement_deformed[3])
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
const void * CustomData_get_layer(const CustomData *data, eCustomDataType type)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
KeyBlock * BKE_object_shapekey_insert(Main *bmain, Object *ob, const char *name, bool from_mix)
MINLINE void zero_v3(float r[3])
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool BKE_object_is_visible_in_viewport(const View3D *v3d, const Object *ob)
MINLINE float normalize_v3_v3(float r[3], const float a[3])
void RNA_def_function_flag(FunctionRNA *func, FunctionFlag flag)
bool BKE_object_shapekey_remove(Main *bmain, Object *ob, KeyBlock *kb)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
Main * CTX_data_main(const bContext *C)
Mesh * BKE_object_to_mesh(Depsgraph *depsgraph, Object *object, bool preserve_all_data_layers)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
void DEG_relations_tag_update(Main *bmain)
Scene * CTX_data_scene(const bContext *C)
void BKE_crazyspace_api_eval_clear(Object *object)
bool BKE_camera_view_frame_fit_to_coords(const struct Depsgraph *depsgraph, const float(*cos)[3], int num_cos, struct Object *camera_ob, float r_co[3], float *r_scale)
bool RNA_enum_identifier(const EnumPropertyItem *item, const int value, const char **r_identifier)
void copy_m4_m4(float m1[4][4], const float m2[4][4])
VecBase< float, 3 > float3
Key * BKE_key_from_object(Object *ob)
void BKE_camera_params_init(CameraParams *params)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
ScrArea * ED_screen_area_find_with_spacedata(const bScreen *screen, const SpaceLink *sl, bool only_visible)
void BKE_object_to_curve_clear(Object *object)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_array(PropertyRNA *prop, int length)
const int rna_matrix_dimsize_4x4[]
wmWindow * ED_screen_window_find(const bScreen *screen, const wmWindowManager *wm)
View3D * CTX_wm_view3d(const bContext *C)
const Mesh * BKE_object_get_mesh_deform_eval(const Object *object)
Mesh * BKE_object_get_evaluated_mesh(const Object *object_eval)
void ED_area_tag_redraw(ScrArea *area)
void BKE_object_to_mesh_clear(Object *object)
#define MESH_DM_INFO_STR_MAX