Blender  V3.3
BKE_object.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
10 #include "BLI_compiler_attrs.h"
11 #include "BLI_sys_types.h"
12 
13 #include "DNA_object_enums.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 struct Base;
20 struct BoundBox;
21 struct Curve;
22 struct Depsgraph;
23 struct GeometrySet;
24 struct GpencilModifierData;
26 struct HookModifierData;
27 struct ID;
28 struct Main;
29 struct Mesh;
30 struct ModifierData;
31 struct MovieClip;
32 struct Object;
33 struct RegionView3D;
34 struct RigidBodyWorld;
35 struct Scene;
36 struct ShaderFxData;
37 struct SubsurfModifierData;
38 struct View3D;
39 struct ViewLayer;
40 
41 void BKE_object_workob_clear(struct Object *workob);
51  struct Scene *scene,
52  struct Object *ob,
53  struct Object *workob);
54 
55 void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src);
56 void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src, int flag);
58 void BKE_object_copy_particlesystems(struct Object *ob_dst, const struct Object *ob_src, int flag);
60 void BKE_object_free_softbody(struct Object *ob);
61 void BKE_object_free_curve_cache(struct Object *ob);
62 
66 void BKE_object_free_derived_caches(struct Object *ob);
67 void BKE_object_free_caches(struct Object *object);
68 
69 void BKE_object_modifier_hook_reset(struct Object *ob, struct HookModifierData *hmd);
71  struct HookGpencilModifierData *hmd);
72 
76 bool BKE_object_supports_modifiers(const struct Object *ob);
77 bool BKE_object_support_modifier_type_check(const struct Object *ob, int modifier_type);
78 
79 /* Active modifier. */
80 
87 void BKE_object_modifier_set_active(struct Object *ob, struct ModifierData *md);
89 
101 bool BKE_object_copy_modifier(struct Main *bmain,
102  struct Scene *scene,
103  struct Object *ob_dst,
104  const struct Object *ob_src,
105  struct ModifierData *md);
112 bool BKE_object_copy_gpencil_modifier(struct Object *ob_dst, struct GpencilModifierData *gmd_src);
123  const struct Object *ob_src,
124  bool do_copy_all,
125  int flag_subdata);
126 void BKE_object_link_modifiers(struct Object *ob_dst, const struct Object *ob_src);
127 void BKE_object_free_modifiers(struct Object *ob, int flag);
128 void BKE_object_free_shaderfx(struct Object *ob, int flag);
129 
130 bool BKE_object_exists_check(struct Main *bmain, const struct Object *obtest);
134 bool BKE_object_is_in_editmode(const struct Object *ob);
137 bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode);
138 bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode);
139 
140 bool BKE_object_data_is_in_editmode(const struct Object *ob, const struct ID *id);
141 
143 
147 void BKE_object_update_select_id(struct Main *bmain);
148 
155 
159 int BKE_object_visibility(const struct Object *ob, int dag_eval_mode);
160 
166 struct Object *BKE_object_add_only_object(struct Main *bmain,
167  int type,
168  const char *name) ATTR_RETURNS_NONNULL;
177 struct Object *BKE_object_add(struct Main *bmain,
178  struct ViewLayer *view_layer,
179  int type,
186 struct Object *BKE_object_add_from(struct Main *bmain,
187  struct Scene *scene,
188  struct ViewLayer *view_layer,
189  int type,
190  const char *name,
191  struct Object *ob_src)
202 struct Object *BKE_object_add_for_data(struct Main *bmain,
203  struct ViewLayer *view_layer,
204  int type,
205  const char *name,
206  struct ID *data,
207  bool do_id_user) ATTR_RETURNS_NONNULL;
208 void *BKE_object_obdata_add_from_type(struct Main *bmain, int type, const char *name)
209  ATTR_NONNULL(1);
213 int BKE_object_obdata_to_type(const struct ID *id) ATTR_NONNULL(1);
214 
218 bool BKE_object_is_libdata(const struct Object *ob);
222 bool BKE_object_obdata_is_libdata(const struct Object *ob);
223 
235 struct Object *BKE_object_duplicate(struct Main *bmain,
236  struct Object *ob,
237  uint dupflag,
238  uint duplicate_options);
239 
243 void BKE_object_obdata_size_init(struct Object *ob, float size);
244 
245 void BKE_object_scale_to_mat3(struct Object *ob, float r_mat[3][3]);
246 void BKE_object_rot_to_mat3(const struct Object *ob, float r_mat[3][3], bool use_drot);
247 void BKE_object_mat3_to_rot(struct Object *ob, float r_mat[3][3], bool use_compat);
248 void BKE_object_to_mat3(struct Object *ob, float r_mat[3][3]);
249 void BKE_object_to_mat4(struct Object *ob, float r_mat[4][4]);
260 void BKE_object_apply_mat4_ex(struct Object *ob,
261  const float mat[4][4],
262  struct Object *parent,
263  const float parentinv[4][4],
264  bool use_compat);
266 void BKE_object_apply_mat4(struct Object *ob,
267  const float mat[4][4],
268  bool use_compat,
269  bool use_parent);
270 
279 void BKE_object_apply_parent_inverse(struct Object *ob);
280 
281 void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4]);
282 
283 bool BKE_object_pose_context_check(const struct Object *ob);
284 
285 struct Object *BKE_object_pose_armature_get(struct Object *ob);
296  struct ViewLayer *view_layer,
297  struct View3D *v3d);
298 
302 struct Object **BKE_object_pose_array_get_ex(struct ViewLayer *view_layer,
303  struct View3D *v3d,
304  unsigned int *r_objects_len,
305  bool unique);
306 struct Object **BKE_object_pose_array_get_unique(struct ViewLayer *view_layer,
307  struct View3D *v3d,
308  unsigned int *r_objects_len);
309 struct Object **BKE_object_pose_array_get(struct ViewLayer *view_layer,
310  struct View3D *v3d,
311  unsigned int *r_objects_len);
312 
313 struct Base **BKE_object_pose_base_array_get_ex(struct ViewLayer *view_layer,
314  struct View3D *v3d,
315  unsigned int *r_bases_len,
316  bool unique);
317 struct Base **BKE_object_pose_base_array_get_unique(struct ViewLayer *view_layer,
318  struct View3D *v3d,
319  unsigned int *r_bases_len);
320 struct Base **BKE_object_pose_base_array_get(struct ViewLayer *view_layer,
321  struct View3D *v3d,
322  unsigned int *r_bases_len);
323 
324 void BKE_object_get_parent_matrix(struct Object *ob, struct Object *par, float r_parentmat[4][4]);
325 
329 void BKE_object_where_is_calc(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
331  struct Scene *scene,
332  struct RigidBodyWorld *rbw,
333  struct Object *ob,
334  float r_originmat[3][3]);
336  struct Scene *scene,
337  struct Object *ob,
338  float ctime);
345 void BKE_object_where_is_calc_mat4(struct Object *ob, float r_obmat[4][4]);
346 
347 /* Possibly belong in own module? */
348 
349 struct BoundBox *BKE_boundbox_alloc_unit(void);
350 void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3]);
351 void BKE_boundbox_calc_center_aabb(const struct BoundBox *bb, float r_cent[3]);
352 void BKE_boundbox_calc_size_aabb(const struct BoundBox *bb, float r_size[3]);
353 void BKE_boundbox_minmax(const struct BoundBox *bb,
354  const float obmat[4][4],
355  float r_min[3],
356  float r_max[3]);
357 
358 const struct BoundBox *BKE_object_boundbox_get(struct Object *ob);
359 void BKE_object_dimensions_get(struct Object *ob, float r_vec[3]);
368 void BKE_object_dimensions_set_ex(struct Object *ob,
369  const float value[3],
370  int axis_mask,
371  const float ob_scale_orig[3],
372  const float ob_obmat_orig[4][4]);
373 void BKE_object_dimensions_set(struct Object *ob, const float value[3], int axis_mask);
374 
375 void BKE_object_empty_draw_type_set(struct Object *ob, int value);
376 
377 void BKE_object_boundbox_calc_from_mesh(struct Object *ob, const struct Mesh *me_eval);
379 void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3], bool use_hidden);
381  struct Scene *scene,
382  struct Object *ob,
383  float r_min[3],
384  float r_max[3],
385  bool use_hidden);
392 bool BKE_object_minmax_empty_drawtype(const struct Object *ob, float r_min[3], float r_max[3]);
393 
398  const float obmat[4][4],
399  void (*func_cb)(const float[3], void *),
400  void *user_data);
402  void (*func_cb)(const float[3], void *),
403  void *user_data);
404 
405 bool BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob);
406 
407 void *BKE_object_tfm_backup(struct Object *ob);
408 void BKE_object_tfm_restore(struct Object *ob, void *obtfm_pt);
409 
411  float loc[3], dloc[3];
412  float scale[3], dscale[3];
413  float rot[3], drot[3];
414  float quat[4], dquat[4];
415  float rotAxis[3], drotAxis[3];
418 
420 
422  const ObjectTfmProtectedChannels *obtfm,
423  short protectflag);
424 
425 void BKE_object_tfm_copy(struct Object *object_dst, const struct Object *object_src);
426 
435 void BKE_object_eval_reset(struct Object *ob_eval);
436 
437 /* Dependency graph evaluation callbacks. */
438 
440 void BKE_object_eval_parent(struct Depsgraph *depsgraph, struct Object *ob);
442  struct Scene *scene,
443  struct Object *ob);
445 
448  struct Scene *scene,
449  struct Object *ob);
453 void BKE_object_eval_assign_data(struct Object *object, struct ID *data, bool is_owned);
454 
455 void BKE_object_sync_to_original(struct Depsgraph *depsgraph, struct Object *object);
456 
458  struct Scene *scene,
459  struct Object *object);
460 
462  struct Scene *scene,
463  struct Object *object);
464 
465 void BKE_object_data_select_update(struct Depsgraph *depsgraph, struct ID *object_data);
466 void BKE_object_select_update(struct Depsgraph *depsgraph, struct Object *object);
467 
469  struct Scene *scene,
470  int view_layer_index,
471  struct Object *object,
472  int base_index,
473  bool is_from_set);
474 
476  struct Scene *scene,
477  struct Object *ob);
485 void BKE_object_handle_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
494  struct Scene *scene,
495  struct Object *ob,
496  struct RigidBodyWorld *rbw);
497 
498 void BKE_object_sculpt_data_create(struct Object *ob);
499 
500 bool BKE_object_obdata_texspace_get(struct Object *ob,
501  char **r_texflag,
502  float **r_loc,
503  float **r_size);
504 
507 struct Mesh *BKE_object_get_evaluated_mesh(const struct Object *object);
515 struct Mesh *BKE_object_get_pre_modified_mesh(const struct Object *object);
522 struct Mesh *BKE_object_get_original_mesh(const struct Object *object);
523 
524 struct Mesh *BKE_object_get_editmesh_eval_final(const struct Object *object);
525 struct Mesh *BKE_object_get_editmesh_eval_cage(const struct Object *object);
526 
527 /* Lattice accessors.
528  * These functions return either the regular lattice, or the edit-mode lattice,
529  * whichever is currently in use. */
530 
531 struct Lattice *BKE_object_get_lattice(const struct Object *object);
532 struct Lattice *BKE_object_get_evaluated_lattice(const struct Object *object);
533 
534 int BKE_object_insert_ptcache(struct Object *ob);
535 void BKE_object_delete_ptcache(struct Object *ob, int index);
536 struct KeyBlock *BKE_object_shapekey_insert(struct Main *bmain,
537  struct Object *ob,
538  const char *name,
539  bool from_mix);
540 bool BKE_object_shapekey_remove(struct Main *bmain, struct Object *ob, struct KeyBlock *kb);
541 bool BKE_object_shapekey_free(struct Main *bmain, struct Object *ob);
542 
543 bool BKE_object_flag_test_recursive(const struct Object *ob, short flag);
544 
545 bool BKE_object_is_child_recursive(const struct Object *ob_parent, const struct Object *ob_child);
546 
553 int BKE_object_is_modified(struct Scene *scene, struct Object *ob);
559 int BKE_object_is_deform_modified(struct Scene *scene, struct Object *ob);
560 
576 bool BKE_object_moves_in_time(const struct Object *object, bool recurse_parent);
577 
579 int BKE_object_scenes_users_get(struct Main *bmain, struct Object *ob);
580 
582  struct Object *ob,
583  bool use_default);
584 
585 void BKE_object_runtime_reset(struct Object *object);
589 void BKE_object_runtime_reset_on_copy(struct Object *object, int flag);
596 void BKE_object_runtime_free_data(struct Object *object);
597 
599 void BKE_object_data_batch_cache_dirty_tag(struct ID *object_data);
600 
601 /* this function returns a superset of the scenes selection based on relationships */
602 
603 typedef enum eObRelationTypes {
604  OB_REL_NONE = 0, /* Just the selection as is. */
605  OB_REL_PARENT = (1 << 0), /* Immediate parent. */
606  OB_REL_PARENT_RECURSIVE = (1 << 1), /* Parents up to root of selection tree. */
607  OB_REL_CHILDREN = (1 << 2), /* Immediate children. */
608  OB_REL_CHILDREN_RECURSIVE = (1 << 3), /* All children. */
609  OB_REL_MOD_ARMATURE = (1 << 4), /* Armatures related to the selected objects. */
610  // OB_REL_SCENE_CAMERA = (1 << 5), /* You might want the scene camera too even if unselected? */
612 
613 typedef enum eObjectSet {
614  OB_SET_SELECTED, /* Selected Objects. */
615  OB_SET_VISIBLE, /* Visible Objects. */
616  OB_SET_ALL, /* All Objects. */
618 
626 struct LinkNode *BKE_object_relational_superset(struct ViewLayer *view_layer,
627  eObjectSet objectSet,
628  eObRelationTypes includeFilter);
632 struct LinkNode *BKE_object_groups(struct Main *bmain, struct Scene *scene, struct Object *ob);
633 void BKE_object_groups_clear(struct Main *bmain, struct Scene *scene, struct Object *object);
634 
644 struct KDTree_3d *BKE_object_as_kdtree(struct Object *ob, int *r_tot);
645 
651  struct Scene *scene,
652  struct Object *ob,
653  bool update_mesh,
654  int parent_recursion,
655  float frame,
656  int type);
657 
659  const struct RegionView3D *rv3d);
661  const struct RegionView3D *rv3d);
662 
676  struct Object *object,
677  bool preserve_all_data_layers);
678 
679 void BKE_object_to_mesh_clear(struct Object *object);
680 
691 struct Curve *BKE_object_to_curve(struct Object *object,
692  struct Depsgraph *depsgraph,
693  bool apply_modifiers);
694 
695 void BKE_object_to_curve_clear(struct Object *object);
696 
698 
699 void BKE_object_modifiers_lib_link_common(void *userData,
700  struct Object *ob,
701  struct ID **idpoin,
702  int cb_flag);
703 
712 
713 void BKE_object_replace_data_on_shallow_copy(struct Object *ob, struct ID *new_data);
714 
715 struct PartEff;
717 
719 
720 #ifdef __cplusplus
721 }
722 #endif
void BKE_object_empty_draw_type_set(struct Object *ob, int value)
Definition: object.cc:3937
bool BKE_object_empty_image_data_is_visible_in_view3d(const struct Object *ob, const struct RegionView3D *rv3d)
eObRelationTypes
Definition: BKE_object.h:603
@ OB_REL_MOD_ARMATURE
Definition: BKE_object.h:609
@ OB_REL_PARENT
Definition: BKE_object.h:605
@ OB_REL_CHILDREN_RECURSIVE
Definition: BKE_object.h:608
@ OB_REL_NONE
Definition: BKE_object.h:604
@ OB_REL_PARENT_RECURSIVE
Definition: BKE_object.h:606
@ OB_REL_CHILDREN
Definition: BKE_object.h:607
void BKE_object_handle_update_ex(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct RigidBodyWorld *rbw)
Definition: object.cc:4269
void BKE_object_dimensions_set(struct Object *ob, const float value[3], int axis_mask)
Definition: object.cc:3834
void BKE_object_batch_cache_dirty_tag(struct Object *ob)
int BKE_object_insert_ptcache(struct Object *ob)
Definition: object.cc:4524
bool BKE_object_copy_gpencil_modifier(struct Object *ob_dst, struct GpencilModifierData *gmd_src)
Definition: object.cc:1581
bool BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob)
void BKE_object_free_softbody(struct Object *ob)
Definition: object.cc:1270
bool BKE_object_is_libdata(const struct Object *ob)
void BKE_object_free_modifiers(struct Object *ob, int flag)
Definition: object.cc:1289
bool BKE_object_minmax_dupli(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3], bool use_hidden)
Definition: object.cc:4075
void BKE_object_eval_transform_final(struct Depsgraph *depsgraph, struct Object *ob)
struct MovieClip * BKE_object_movieclip_get(struct Scene *scene, struct Object *ob, bool use_default)
Definition: object.cc:5042
void BKE_object_dimensions_get(struct Object *ob, float r_vec[3])
Definition: object.cc:3786
void BKE_object_to_mesh_clear(struct Object *object)
Definition: object.cc:5529
struct Base ** BKE_object_pose_base_array_get(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_bases_len)
Definition: object.cc:2645
struct Mesh * BKE_object_get_pre_modified_mesh(const struct Object *object)
bool BKE_object_support_modifier_type_check(const struct Object *ob, int modifier_type)
void BKE_object_tfm_restore(struct Object *ob, void *obtfm_pt)
Definition: object.cc:4242
void BKE_boundbox_calc_size_aabb(const struct BoundBox *bb, float r_size[3])
void BKE_object_delete_ptcache(struct Object *ob, int index)
Definition: object.cc:4567
struct Object * BKE_object_pose_armature_get_with_wpaint_check(struct Object *ob)
Definition: object.cc:2531
void BKE_object_eval_constraints(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: object_update.c:99
void BKE_object_select_update(struct Depsgraph *depsgraph, struct Object *object)
void BKE_object_where_is_calc_time(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float ctime)
Definition: object.cc:3467
void BKE_object_modifiers_lib_link_common(void *userData, struct Object *ob, struct ID **idpoin, int cb_flag)
Definition: object.cc:5562
void BKE_object_eval_local_transform(struct Depsgraph *depsgraph, struct Object *ob)
Definition: object_update.c:59
void BKE_object_tfm_protected_restore(struct Object *ob, const ObjectTfmProtectedChannels *obtfm, short protectflag)
Definition: object.cc:3007
struct SubsurfModifierData * BKE_object_get_last_subsurf_modifier(const struct Object *ob)
void BKE_object_eval_parent(struct Depsgraph *depsgraph, struct Object *ob)
Definition: object_update.c:67
struct PartEff * BKE_object_do_version_give_parteff_245(struct Object *ob)
Definition: object.cc:1026
void BKE_object_update_select_id(struct Main *bmain)
Definition: object.cc:5504
bool BKE_object_is_child_recursive(const struct Object *ob_parent, const struct Object *ob_child)
void BKE_object_mat3_to_rot(struct Object *ob, float r_mat[3][3], bool use_compat)
Definition: object.cc:2934
struct Object * BKE_object_pose_armature_get_visible(struct Object *ob, struct ViewLayer *view_layer, struct View3D *v3d)
Definition: object.cc:2553
void * BKE_object_tfm_backup(struct Object *ob)
Definition: object.cc:4219
void * BKE_object_obdata_add_from_type(struct Main *bmain, int type, const char *name) ATTR_NONNULL(1)
Definition: object.cc:2161
void BKE_object_get_parent_matrix(struct Object *ob, struct Object *par, float r_parentmat[4][4])
Definition: object.cc:3342
bool BKE_object_obdata_is_libdata(const struct Object *ob)
int BKE_object_is_deform_modified(struct Scene *scene, struct Object *ob)
Definition: object.cc:4982
void BKE_object_where_is_calc(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: object.cc:3495
struct Mesh * BKE_object_get_editmesh_eval_final(const struct Object *object)
void BKE_object_modifier_hook_reset(struct Object *ob, struct HookModifierData *hmd)
Definition: object.cc:1320
struct Base ** BKE_object_pose_base_array_get_ex(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_bases_len, bool unique)
Definition: object.cc:2603
bool BKE_object_supports_material_slots(struct Object *ob)
Definition: object.cc:5070
void BKE_object_obdata_size_init(struct Object *ob, float size)
Definition: object.cc:2842
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3])
Definition: object.cc:3645
struct Object * BKE_object_pose_armature_get(struct Object *ob)
Definition: object.cc:2511
bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode)
Definition: object.cc:2034
struct Lattice * BKE_object_get_lattice(const struct Object *object)
bool BKE_object_is_in_wpaint_select_vert(const struct Object *ob)
void BKE_object_handle_data_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
struct Mesh * BKE_object_get_evaluated_mesh(const struct Object *object)
bool BKE_object_is_in_editmode_vgroup(const struct Object *ob)
void BKE_object_modifier_set_active(struct Object *ob, struct ModifierData *md)
Definition: object.cc:1367
void BKE_object_link_modifiers(struct Object *ob_dst, const struct Object *ob_src)
struct Object * BKE_object_add(struct Main *bmain, struct ViewLayer *view_layer, int type, const char *name) ATTR_NONNULL(1
eObjectVisibilityResult
Definition: BKE_object.h:149
@ OB_VISIBLE_INSTANCES
Definition: BKE_object.h:152
@ OB_VISIBLE_SELF
Definition: BKE_object.h:150
@ OB_VISIBLE_PARTICLES
Definition: BKE_object.h:151
@ OB_VISIBLE_ALL
Definition: BKE_object.h:153
void BKE_object_replace_data_on_shallow_copy(struct Object *ob, struct ID *new_data)
Definition: object.cc:5590
eObjectSet
Definition: BKE_object.h:613
@ OB_SET_SELECTED
Definition: BKE_object.h:614
@ OB_SET_VISIBLE
Definition: BKE_object.h:615
@ OB_SET_ALL
Definition: BKE_object.h:616
struct Object ** BKE_object_pose_array_get(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len)
Definition: object.cc:2598
bool BKE_object_modifier_stack_copy(struct Object *ob_dst, const struct Object *ob_src, bool do_copy_all, int flag_subdata)
struct LinkNode * BKE_object_groups(struct Main *bmain, struct Scene *scene, struct Object *ob)
Definition: object.cc:5234
void BKE_object_groups_clear(struct Main *bmain, struct Scene *scene, struct Object *object)
Definition: object.cc:5245
void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src)
struct Curve * BKE_object_to_curve(struct Object *object, struct Depsgraph *depsgraph, bool apply_modifiers)
Definition: object.cc:5538
void BKE_object_where_is_calc_mat4(struct Object *ob, float r_obmat[4][4])
Definition: object.cc:3478
void BKE_object_apply_parent_inverse(struct Object *ob)
Definition: object.cc:3583
struct KeyBlock * BKE_object_shapekey_insert(struct Main *bmain, struct Object *ob, const char *name, bool from_mix)
Definition: object.cc:4697
void BKE_object_data_select_update(struct Depsgraph *depsgraph, struct ID *object_data)
void BKE_object_workob_clear(struct Object *workob)
Definition: object.cc:1252
void BKE_object_runtime_reset_on_copy(struct Object *object, int flag)
bool BKE_object_exists_check(struct Main *bmain, const struct Object *obtest)
bool BKE_object_minmax_empty_drawtype(const struct Object *ob, float r_min[3], float r_max[3])
Definition: object.cc:4011
void BKE_object_check_uuids_unique_and_report(const struct Object *object)
void BKE_boundbox_calc_center_aabb(const struct BoundBox *bb, float r_cent[3])
void BKE_object_apply_mat4_ex(struct Object *ob, const float mat[4][4], struct Object *parent, const float parentinv[4][4], bool use_compat)
Definition: object.cc:3532
void BKE_object_rot_to_mat3(const struct Object *ob, float r_mat[3][3], bool use_drot)
void BKE_object_to_mat3(struct Object *ob, float r_mat[3][3])
Definition: object.cc:3069
void BKE_object_where_is_calc_ex(struct Depsgraph *depsgraph, struct Scene *scene, struct RigidBodyWorld *rbw, struct Object *ob, float r_originmat[3][3])
Definition: object.cc:3489
void BKE_object_to_mat4(struct Object *ob, float r_mat[4][4])
Definition: object.cc:3082
void BKE_scene_foreach_display_point(struct Depsgraph *depsgraph, void(*func_cb)(const float[3], void *), void *user_data)
Definition: object.cc:4182
void BKE_object_apply_mat4(struct Object *ob, const float mat[4][4], bool use_compat, bool use_parent)
Definition: object.cc:3575
void BKE_object_workob_calc_parent(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Object *workob)
Definition: object.cc:3501
void BKE_object_free_derived_caches(struct Object *ob)
Definition: object.cc:1774
struct Lattice * BKE_object_get_evaluated_lattice(const struct Object *object)
void BKE_object_free_particlesystems(struct Object *ob)
Definition: object.cc:1261
struct Mesh * BKE_object_get_original_mesh(const struct Object *object)
struct KDTree_3d * BKE_object_as_kdtree(struct Object *ob, int *r_tot)
Definition: object.cc:5260
struct Object * BKE_object_add_from(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, int type, const char *name, struct Object *ob_src) ATTR_NONNULL(1
void BKE_object_runtime_free_data(struct Object *object)
Definition: object.cc:5110
char * BKE_object_data_editmode_flush_ptr_get(struct ID *id)
Definition: object.cc:1941
bool BKE_object_data_is_in_editmode(const struct Object *ob, const struct ID *id)
bool BKE_object_supports_modifiers(const struct Object *ob)
void BKE_object_free_curve_cache(struct Object *ob)
Definition: object.cc:1275
struct Mesh * BKE_object_get_evaluated_mesh_no_subsurf(const struct Object *object)
struct Object ATTR_RETURNS_NONNULL
Definition: BKE_object.h:180
void BKE_object_free_caches(struct Object *object)
Definition: object.cc:1832
void BKE_object_scale_to_mat3(struct Object *ob, float r_mat[3][3])
Definition: object.cc:2887
int BKE_object_scenes_users_get(struct Main *bmain, struct Object *ob)
Definition: object.cc:5031
struct Mesh * BKE_object_to_mesh(struct Depsgraph *depsgraph, struct Object *object, bool preserve_all_data_layers)
Definition: object.cc:5520
struct ObjectTfmProtectedChannels ObjectTfmProtectedChannels
bool BKE_object_obdata_texspace_get(struct Object *ob, char **r_texflag, float **r_loc, float **r_size)
Definition: object.cc:4328
void BKE_object_free_shaderfx(struct Object *ob, int flag)
Definition: object.cc:1311
void BKE_object_eval_ptcache_reset(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
void BKE_object_eval_transform_all(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
bool BKE_object_boundbox_calc_from_evaluated_geometry(struct Object *ob)
Definition: object.cc:3743
const struct BoundBox * BKE_object_boundbox_get(struct Object *ob)
Definition: object.cc:3684
void BKE_object_modifier_gpencil_hook_reset(struct Object *ob, struct HookGpencilModifierData *hmd)
Definition: object.cc:1343
int BKE_object_visibility(const struct Object *ob, int dag_eval_mode)
void BKE_object_runtime_reset(struct Object *object)
Definition: object.cc:5090
void BKE_object_eval_uber_data(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
bool BKE_object_modifier_update_subframe(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, bool update_mesh, int parent_recursion, float frame, int type)
Definition: object.cc:5405
void BKE_object_eval_eval_base_flags(struct Depsgraph *depsgraph, struct Scene *scene, int view_layer_index, struct Object *object, int base_index, bool is_from_set)
bool BKE_object_copy_modifier(struct Main *bmain, struct Scene *scene, struct Object *ob_dst, const struct Object *ob_src, struct ModifierData *md)
void BKE_object_to_curve_clear(struct Object *object)
Definition: object.cc:5547
void BKE_object_boundbox_calc_from_mesh(struct Object *ob, const struct Mesh *me_eval)
void BKE_object_sculpt_data_create(struct Object *ob)
Definition: object.cc:4321
int BKE_object_is_modified(struct Scene *scene, struct Object *ob)
Definition: object.cc:4854
void BKE_object_eval_assign_data(struct Object *object, struct ID *data, bool is_owned)
Definition: object.cc:1745
struct Object ** BKE_object_pose_array_get_ex(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len, bool unique)
Definition: object.cc:2567
bool BKE_object_shapekey_remove(struct Main *bmain, struct Object *ob, struct KeyBlock *kb)
Definition: object.cc:4746
bool BKE_object_flag_test_recursive(const struct Object *ob, short flag)
void BKE_object_eval_uber_transform(struct Depsgraph *depsgraph, struct Object *object)
void BKE_object_tfm_protected_backup(const struct Object *ob, ObjectTfmProtectedChannels *obtfm)
struct Mesh * BKE_object_get_editmesh_eval_cage(const struct Object *object)
void BKE_object_handle_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: object.cc:4316
void BKE_object_sync_to_original(struct Depsgraph *depsgraph, struct Object *object)
int BKE_object_obdata_to_type(const struct ID *id) ATTR_NONNULL(1)
bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode)
Definition: object.cc:2004
struct ModifierData * BKE_object_active_modifier(const struct Object *ob)
struct ParticleSystem * BKE_object_copy_particlesystem(struct ParticleSystem *psys, int flag)
Definition: object.cc:2379
struct Object * BKE_object_duplicate(struct Main *bmain, struct Object *ob, uint dupflag, uint duplicate_options)
Definition: object.cc:2661
struct Object * BKE_object_add_only_object(struct Main *bmain, int type, const char *name) ATTR_RETURNS_NONNULL
Definition: object.cc:2241
void BKE_object_dimensions_set_ex(struct Object *ob, const float value[3], int axis_mask, const float ob_scale_orig[3], const float ob_obmat_orig[4][4])
Definition: object.cc:3802
void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4])
Definition: object.cc:3093
void BKE_object_tfm_copy(struct Object *object_dst, const struct Object *object_src)
bool BKE_object_shapekey_free(struct Main *bmain, struct Object *ob)
Definition: object.cc:4729
void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3], bool use_hidden)
Definition: object.cc:3839
void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src, int flag)
struct Object * BKE_object_add_for_data(struct Main *bmain, struct ViewLayer *view_layer, int type, const char *name, struct ID *data, bool do_id_user) ATTR_RETURNS_NONNULL
Definition: object.cc:2299
struct Object ** BKE_object_pose_array_get_unique(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len)
Definition: object.cc:2594
struct BoundBox * BKE_boundbox_alloc_unit(void)
Definition: object.cc:3638
struct LinkNode * BKE_object_relational_superset(struct ViewLayer *view_layer, eObjectSet objectSet, eObRelationTypes includeFilter)
Definition: object.cc:5157
void BKE_object_foreach_display_point(struct Object *ob, const float obmat[4][4], void(*func_cb)(const float[3], void *), void *user_data)
Definition: object.cc:4142
void BKE_object_copy_particlesystems(struct Object *ob_dst, const struct Object *ob_src, int flag)
void BKE_object_data_batch_cache_dirty_tag(struct ID *object_data)
bool BKE_object_moves_in_time(const struct Object *object, bool recurse_parent)
bool BKE_object_is_in_editmode(const struct Object *ob)
struct Base ** BKE_object_pose_base_array_get_unique(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_bases_len)
Definition: object.cc:2641
void BKE_boundbox_minmax(const struct BoundBox *bb, const float obmat[4][4], float r_min[3], float r_max[3])
bool BKE_object_empty_image_frame_is_visible_in_view3d(const struct Object *ob, const struct RegionView3D *rv3d)
bool BKE_object_pose_context_check(const struct Object *ob)
void BKE_object_eval_reset(struct Object *ob_eval)
Definition: object_update.c:54
#define ATTR_NONNULL(...)
unsigned int uint
Definition: BLI_sys_types.h:67
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
eObjectMode
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
Scene scene
const Depsgraph * depsgraph
void * user_data
#define rot(x, k)
#define min(a, b)
Definition: sort.c:35
Definition: DNA_ID.h:368
short flag
Definition: DNA_key_types.h:42
char name[64]
Definition: DNA_key_types.h:52
Definition: BKE_main.h:121
ustring name
Definition: graph/node.h:174
float drot[3]
float dquat[4]
struct Material ** mat
float loc[3]
float dloc[3]
float scale[3]
float parentinv[4][4]
float drotAxis[3]
float obmat[4][4]
float quat[4]
float rotAngle
float rotAxis[3]
float dscale[3]
short protectflag
struct Object * parent
float max