Blender  V2.93
BKE_object.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
24 #include "BLI_compiler_attrs.h"
25 #include "BLI_sys_types.h"
26 
27 #include "DNA_object_enums.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 struct Base;
34 struct BoundBox;
35 struct Curve;
36 struct Depsgraph;
37 struct GeometrySet;
38 struct GpencilModifierData;
40 struct HookModifierData;
41 struct ID;
42 struct Main;
43 struct Mesh;
44 struct ModifierData;
45 struct MovieClip;
46 struct Object;
47 struct RegionView3D;
48 struct RigidBodyWorld;
49 struct Scene;
50 struct ShaderFxData;
51 struct View3D;
52 struct ViewLayer;
53 
54 void BKE_object_workob_clear(struct Object *workob);
56  struct Scene *scene,
57  struct Object *ob,
58  struct Object *workob);
59 
60 void BKE_object_transform_copy(struct Object *ob_tar, const struct Object *ob_src);
61 void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src, const int flag);
62 struct ParticleSystem *BKE_object_copy_particlesystem(struct ParticleSystem *psys, const int flag);
64  const struct Object *ob_src,
65  const int flag);
67 void BKE_object_free_softbody(struct Object *ob);
68 void BKE_object_free_curve_cache(struct Object *ob);
69 
70 void BKE_object_free_derived_caches(struct Object *ob);
71 void BKE_object_free_caches(struct Object *object);
72 
74  const uint64_t key,
75  struct GeometrySet *geometry_set);
76 
77 void BKE_object_modifier_hook_reset(struct Object *ob, struct HookModifierData *hmd);
79  struct HookGpencilModifierData *hmd);
81 
82 bool BKE_object_shaderfx_use_time(struct Object *ob, struct ShaderFxData *md);
83 
84 bool BKE_object_supports_modifiers(const struct Object *ob);
85 bool BKE_object_support_modifier_type_check(const struct Object *ob, int modifier_type);
86 
87 /* Active modifier. */
88 void BKE_object_modifier_set_active(struct Object *ob, struct ModifierData *md);
90 
91 bool BKE_object_copy_modifier(struct Main *bmain,
92  struct Scene *scene,
93  struct Object *ob_dst,
94  const struct Object *ob_src,
95  struct ModifierData *md);
96 bool BKE_object_copy_gpencil_modifier(struct Object *ob_dst, struct GpencilModifierData *md);
98  const struct Object *ob_src,
99  const bool do_copy_all,
100  const int flag_subdata);
101 void BKE_object_link_modifiers(struct Object *ob_dst, const struct Object *ob_src);
102 void BKE_object_free_modifiers(struct Object *ob, const int flag);
103 void BKE_object_free_shaderfx(struct Object *ob, const int flag);
104 
105 void BKE_object_make_proxy(struct Main *bmain,
106  struct Object *ob,
107  struct Object *target,
108  struct Object *cob);
109 void BKE_object_copy_proxy_drivers(struct Object *ob, struct Object *target);
110 
111 bool BKE_object_exists_check(struct Main *bmain, const struct Object *obtest);
112 bool BKE_object_is_in_editmode(const struct Object *ob);
115 bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode);
116 bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode);
117 
118 bool BKE_object_data_is_in_editmode(const struct ID *id);
119 
121 
122 void BKE_object_update_select_id(struct Main *bmain);
123 
130 
131 int BKE_object_visibility(const struct Object *ob, const int dag_eval_mode);
132 
133 struct Object *BKE_object_add_only_object(struct Main *bmain, int type, const char *name)
135 struct Object *BKE_object_add(struct Main *bmain,
136  struct ViewLayer *view_layer,
137  int type,
139 struct Object *BKE_object_add_from(struct Main *bmain,
140  struct Scene *scene,
141  struct ViewLayer *view_layer,
142  int type,
143  const char *name,
144  struct Object *ob_src)
146 struct Object *BKE_object_add_for_data(struct Main *bmain,
147  struct ViewLayer *view_layer,
148  int type,
149  const char *name,
150  struct ID *data,
151  bool do_id_user) ATTR_RETURNS_NONNULL;
152 void *BKE_object_obdata_add_from_type(struct Main *bmain, int type, const char *name)
153  ATTR_NONNULL(1);
154 int BKE_object_obdata_to_type(const struct ID *id) ATTR_NONNULL(1);
155 
156 bool BKE_object_is_libdata(const struct Object *ob);
157 bool BKE_object_obdata_is_libdata(const struct Object *ob);
158 
159 struct Object *BKE_object_duplicate(struct Main *bmain,
160  struct Object *ob,
161  uint dupflag,
162  const uint duplicate_options);
163 
164 void BKE_object_obdata_size_init(struct Object *ob, const float size);
165 
166 void BKE_object_scale_to_mat3(struct Object *ob, float r_mat[3][3]);
167 void BKE_object_rot_to_mat3(const struct Object *ob, float r_mat[3][3], bool use_drot);
168 void BKE_object_mat3_to_rot(struct Object *ob, float r_mat[3][3], bool use_compat);
169 void BKE_object_to_mat3(struct Object *ob, float r_mat[3][3]);
170 void BKE_object_to_mat4(struct Object *ob, float r_mat[4][4]);
171 void BKE_object_apply_mat4(struct Object *ob,
172  const float mat[4][4],
173  const bool use_compat,
174  const bool use_parent);
175 void BKE_object_apply_mat4_ex(struct Object *ob,
176  const float mat[4][4],
177  struct Object *parent,
178  const float parentinv[4][4],
179  const bool use_compat);
180 void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4]);
181 
182 bool BKE_object_pose_context_check(const struct Object *ob);
183 struct Object *BKE_object_pose_armature_get(struct Object *ob);
185  struct ViewLayer *view_layer,
186  struct View3D *v3d);
187 
188 struct Object **BKE_object_pose_array_get_ex(struct ViewLayer *view_layer,
189  struct View3D *v3d,
190  unsigned int *r_objects_len,
191  bool unique);
192 struct Object **BKE_object_pose_array_get_unique(struct ViewLayer *view_layer,
193  struct View3D *v3d,
194  unsigned int *r_objects_len);
195 struct Object **BKE_object_pose_array_get(struct ViewLayer *view_layer,
196  struct View3D *v3d,
197  unsigned int *r_objects_len);
198 
199 struct Base **BKE_object_pose_base_array_get_ex(struct ViewLayer *view_layer,
200  struct View3D *v3d,
201  unsigned int *r_bases_len,
202  bool unique);
203 struct Base **BKE_object_pose_base_array_get_unique(struct ViewLayer *view_layer,
204  struct View3D *v3d,
205  unsigned int *r_bases_len);
206 struct Base **BKE_object_pose_base_array_get(struct ViewLayer *view_layer,
207  struct View3D *v3d,
208  unsigned int *r_bases_len);
209 
210 void BKE_object_get_parent_matrix(struct Object *ob, struct Object *par, float r_parentmat[4][4]);
211 
212 /* Compute object world transform and store it in ob->obmat. */
213 void BKE_object_where_is_calc(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
215  struct Scene *scene,
216  struct RigidBodyWorld *rbw,
217  struct Object *ob,
218  float r_originmat[3][3]);
220  struct Scene *scene,
221  struct Object *ob,
222  float ctime);
223 void BKE_object_where_is_calc_mat4(struct Object *ob, float r_obmat[4][4]);
224 
225 /* Possibly belong in own module? */
226 struct BoundBox *BKE_boundbox_alloc_unit(void);
227 void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3]);
228 void BKE_boundbox_calc_center_aabb(const struct BoundBox *bb, float r_cent[3]);
229 void BKE_boundbox_calc_size_aabb(const struct BoundBox *bb, float r_size[3]);
230 void BKE_boundbox_minmax(const struct BoundBox *bb,
231  const float obmat[4][4],
232  float r_min[3],
233  float r_max[3]);
234 
235 struct BoundBox *BKE_object_boundbox_get(struct Object *ob);
236 void BKE_object_dimensions_get(struct Object *ob, float r_vec[3]);
237 void BKE_object_dimensions_set_ex(struct Object *ob,
238  const float value[3],
239  int axis_mask,
240  const float ob_scale_orig[3],
241  const float ob_obmat_orig[4][4]);
242 void BKE_object_dimensions_set(struct Object *ob, const float value[3], int axis_mask);
243 
244 void BKE_object_empty_draw_type_set(struct Object *ob, const int value);
245 void BKE_object_boundbox_flag(struct Object *ob, int flag, const bool set);
246 void BKE_object_boundbox_calc_from_mesh(struct Object *ob, struct Mesh *me_eval);
247 void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3], const bool use_hidden);
249  struct Scene *scene,
250  struct Object *ob,
251  float r_min[3],
252  float r_max[3],
253  const bool use_hidden);
254 
255 /* sometimes min-max isn't enough, we need to loop over each point */
257  const float obmat[4][4],
258  void (*func_cb)(const float[3], void *),
259  void *user_data);
261  void (*func_cb)(const float[3], void *),
262  void *user_data);
263 
264 bool BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob);
265 
266 void *BKE_object_tfm_backup(struct Object *ob);
267 void BKE_object_tfm_restore(struct Object *ob, void *obtfm_pt);
268 
270  float loc[3], dloc[3];
271  float scale[3], dscale[3];
272  float rot[3], drot[3];
273  float quat[4], dquat[4];
274  float rotAxis[3], drotAxis[3];
277 
279 
281  const ObjectTfmProtectedChannels *obtfm,
282  const short protectflag);
283 
284 void BKE_object_tfm_copy(struct Object *object_dst, const struct Object *object_src);
285 
286 void BKE_object_eval_reset(struct Object *ob_eval);
287 
288 /* Dependency graph evaluation callbacks. */
290 void BKE_object_eval_parent(struct Depsgraph *depsgraph, struct Object *ob);
292  struct Scene *scene,
293  struct Object *ob);
295 
296 bool BKE_object_eval_proxy_copy(struct Depsgraph *depsgraph, struct Object *object);
297 void BKE_object_eval_uber_transform(struct Depsgraph *depsgraph, struct Object *ob);
299  struct Scene *scene,
300  struct Object *ob);
301 void BKE_object_eval_assign_data(struct Object *object, struct ID *data, bool is_owned);
302 
303 void BKE_object_sync_to_original(struct Depsgraph *depsgraph, struct Object *object);
304 
306  struct Scene *scene,
307  struct Object *object);
308 
310  struct Scene *scene,
311  struct Object *object);
312 
313 void BKE_object_data_select_update(struct Depsgraph *depsgraph, struct ID *object_data);
314 void BKE_object_select_update(struct Depsgraph *depsgraph, struct Object *object);
315 
317  struct Scene *scene,
318  const int view_layer_index,
319  struct Object *object,
320  int base_index,
321  const bool is_from_set);
322 
324  struct Scene *scene,
325  struct Object *ob);
326 void BKE_object_handle_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
328  struct Scene *scene,
329  struct Object *ob,
330  struct RigidBodyWorld *rbw,
331  const bool do_proxy_update);
332 
333 void BKE_object_sculpt_data_create(struct Object *ob);
334 
335 bool BKE_object_obdata_texspace_get(struct Object *ob,
336  short **r_texflag,
337  float **r_loc,
338  float **r_size);
339 
340 struct Mesh *BKE_object_get_evaluated_mesh(struct Object *object);
341 struct Mesh *BKE_object_get_pre_modified_mesh(struct Object *object);
342 struct Mesh *BKE_object_get_original_mesh(struct Object *object);
343 
344 /* Lattice accessors.
345  * These functions return either the regular lattice, or the edit-mode lattice,
346  * whichever is currently in use. */
347 struct Lattice *BKE_object_get_lattice(const struct Object *object);
348 struct Lattice *BKE_object_get_evaluated_lattice(const struct Object *object);
349 
350 int BKE_object_insert_ptcache(struct Object *ob);
351 void BKE_object_delete_ptcache(struct Object *ob, int index);
352 struct KeyBlock *BKE_object_shapekey_insert(struct Main *bmain,
353  struct Object *ob,
354  const char *name,
355  const bool from_mix);
356 bool BKE_object_shapekey_remove(struct Main *bmain, struct Object *ob, struct KeyBlock *kb);
357 bool BKE_object_shapekey_free(struct Main *bmain, struct Object *ob);
358 
359 bool BKE_object_flag_test_recursive(const struct Object *ob, short flag);
360 
361 bool BKE_object_is_child_recursive(const struct Object *ob_parent, const struct Object *ob_child);
362 
363 /* return ModifierMode flag */
364 int BKE_object_is_modified(struct Scene *scene, struct Object *ob);
365 int BKE_object_is_deform_modified(struct Scene *scene, struct Object *ob);
366 
367 bool BKE_object_moves_in_time(const struct Object *object, bool recurse_parent);
368 
369 int BKE_object_scenes_users_get(struct Main *bmain, struct Object *ob);
370 
372  struct Object *ob,
373  bool use_default);
374 
375 void BKE_object_runtime_reset(struct Object *object);
376 void BKE_object_runtime_reset_on_copy(struct Object *object, const int flag);
377 
379 
380 /* this function returns a superset of the scenes selection based on relationships */
381 
382 typedef enum eObRelationTypes {
383  OB_REL_NONE = 0, /* just the selection as is */
384  OB_REL_PARENT = (1 << 0), /* immediate parent */
385  OB_REL_PARENT_RECURSIVE = (1 << 1), /* parents up to root of selection tree*/
386  OB_REL_CHILDREN = (1 << 2), /* immediate children */
387  OB_REL_CHILDREN_RECURSIVE = (1 << 3), /* All children */
388  OB_REL_MOD_ARMATURE = (1 << 4), /* Armatures related to the selected objects */
389  /* OB_REL_SCENE_CAMERA = (1 << 5), */ /* you might want the scene camera too even if unselected?
390  */
392 
393 typedef enum eObjectSet {
394  OB_SET_SELECTED, /* Selected Objects */
395  OB_SET_VISIBLE, /* Visible Objects */
396  OB_SET_ALL, /* All Objects */
398 
399 struct LinkNode *BKE_object_relational_superset(struct ViewLayer *view_layer,
400  eObjectSet objectSet,
401  eObRelationTypes includeFilter);
402 struct LinkNode *BKE_object_groups(struct Main *bmain, struct Scene *scene, struct Object *ob);
403 void BKE_object_groups_clear(struct Main *bmain, struct Scene *scene, struct Object *object);
404 
405 struct KDTree_3d *BKE_object_as_kdtree(struct Object *ob, int *r_tot);
406 
407 bool BKE_object_modifier_use_time(struct Object *ob, struct ModifierData *md);
408 
410  struct Scene *scene,
411  struct Object *ob,
412  bool update_mesh,
413  int parent_recursion,
414  float frame,
415  int type);
416 
418  const struct RegionView3D *rv3d);
420  const struct RegionView3D *rv3d);
421 
422 /* This is an utility function for Python's object.to_mesh() (the naming is not very clear though).
423  * The result is owned by the object.
424  *
425  * The mesh will be freed when object is re-evaluated or is destroyed. It is possible to force to
426  * clear memory used by this mesh by calling BKE_object_to_mesh_clear().
427  *
428  * If preserve_all_data_layers is truth then the modifier stack is re-evaluated to ensure it
429  * preserves all possible custom data layers.
430  *
431  * NOTE: Dependency graph argument is required when preserve_all_data_layers is truth, and is
432  * ignored otherwise. */
434  struct Object *object,
435  bool preserve_all_data_layers);
436 
437 void BKE_object_to_mesh_clear(struct Object *object);
438 
439 /* This is an utility function for Python's object.to_curve().
440  * The result is owned by the object.
441  *
442  * The curve will be freed when object is re-evaluated or is destroyed. It is possible to force
443  * clear memory used by this curve by calling BKE_object_to_curve_clear().
444  *
445  * If apply_modifiers is true and the object is a curve one, then spline deform modifiers are
446  * applied on the curve control points.
447  */
448 struct Curve *BKE_object_to_curve(struct Object *object,
449  struct Depsgraph *depsgraph,
450  bool apply_modifiers);
451 
452 void BKE_object_to_curve_clear(struct Object *object);
453 
455 
456 void BKE_object_modifiers_lib_link_common(void *userData,
457  struct Object *ob,
458  struct ID **idpoin,
459  int cb_flag);
460 
461 struct PartEff;
463 
464 #ifdef __cplusplus
465 }
466 #endif
struct Object * BKE_object_add_only_object(struct Main *bmain, int type, const char *name) ATTR_NONNULL(1) ATTR_RETURNS_NONNULL
Definition: object.c:2193
void BKE_object_eval_eval_base_flags(struct Depsgraph *depsgraph, struct Scene *scene, const int view_layer_index, struct Object *object, int base_index, const bool is_from_set)
bool BKE_object_empty_image_data_is_visible_in_view3d(const struct Object *ob, const struct RegionView3D *rv3d)
eObRelationTypes
Definition: BKE_object.h:382
@ OB_REL_MOD_ARMATURE
Definition: BKE_object.h:388
@ OB_REL_PARENT
Definition: BKE_object.h:384
@ OB_REL_CHILDREN_RECURSIVE
Definition: BKE_object.h:387
@ OB_REL_NONE
Definition: BKE_object.h:383
@ OB_REL_PARENT_RECURSIVE
Definition: BKE_object.h:385
@ OB_REL_CHILDREN
Definition: BKE_object.h:386
void BKE_object_dimensions_set(struct Object *ob, const float value[3], int axis_mask)
Definition: object.c:3959
void BKE_object_batch_cache_dirty_tag(struct Object *ob)
int BKE_object_insert_ptcache(struct Object *ob)
Definition: object.c:4555
bool BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob)
void BKE_object_free_softbody(struct Object *ob)
Definition: object.c:1181
bool BKE_object_is_libdata(const struct Object *ob)
bool BKE_object_modifier_gpencil_use_time(struct Object *ob, struct GpencilModifierData *md)
Definition: object.c:5443
void BKE_object_preview_geometry_set_add(struct Object *ob, const uint64_t key, struct GeometrySet *geometry_set)
Definition: object.c:1819
void BKE_object_eval_transform_final(struct Depsgraph *depsgraph, struct Object *ob)
struct Mesh * BKE_object_get_original_mesh(struct Object *object)
Definition: object.c:4493
struct MovieClip * BKE_object_movieclip_get(struct Scene *scene, struct Object *ob, bool use_default)
Definition: object.c:5079
void BKE_object_dimensions_get(struct Object *ob, float r_vec[3])
Definition: object.c:3901
void BKE_object_to_mesh_clear(struct Object *object)
Definition: object.c:5673
struct Base ** BKE_object_pose_base_array_get(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_bases_len)
Definition: object.c:2604
bool BKE_object_data_is_in_editmode(const struct ID *id)
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.c:4273
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.c:4598
void BKE_object_eval_uber_transform(struct Depsgraph *depsgraph, struct Object *ob)
struct ParticleSystem * BKE_object_copy_particlesystem(struct ParticleSystem *psys, const int flag)
Definition: object.c:2349
void BKE_object_copy_particlesystems(struct Object *ob_dst, const struct Object *ob_src, const int flag)
void BKE_object_apply_mat4_ex(struct Object *ob, const float mat[4][4], struct Object *parent, const float parentinv[4][4], const bool use_compat)
Definition: object.c:3708
void BKE_object_eval_constraints(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
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.c:3619
void BKE_object_modifiers_lib_link_common(void *userData, struct Object *ob, struct ID **idpoin, int cb_flag)
Definition: object.c:5706
void BKE_object_eval_local_transform(struct Depsgraph *depsgraph, struct Object *ob)
Definition: object_update.c:83
struct KeyBlock * BKE_object_shapekey_insert(struct Main *bmain, struct Object *ob, const char *name, const bool from_mix)
Definition: object.c:4726
bool BKE_object_minmax_dupli(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3], const bool use_hidden)
Definition: object.c:4138
void BKE_object_copy_proxy_drivers(struct Object *ob, struct Object *target)
Definition: object.c:2838
void BKE_object_eval_parent(struct Depsgraph *depsgraph, struct Object *ob)
Definition: object_update.c:93
struct PartEff * BKE_object_do_version_give_parteff_245(struct Object *ob)
Definition: object.c:1024
bool BKE_object_modifier_stack_copy(struct Object *ob_dst, const struct Object *ob_src, const bool do_copy_all, const int flag_subdata)
void BKE_object_update_select_id(struct Main *bmain)
Definition: object.c:5654
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.c:3085
struct Object * BKE_object_pose_armature_get_visible(struct Object *ob, struct ViewLayer *view_layer, struct View3D *v3d)
Definition: object.c:2507
void * BKE_object_tfm_backup(struct Object *ob)
Definition: object.c:4250
void * BKE_object_obdata_add_from_type(struct Main *bmain, int type, const char *name) ATTR_NONNULL(1)
Definition: object.c:2107
struct Mesh * BKE_object_get_pre_modified_mesh(struct Object *object)
Definition: object.c:4472
void BKE_object_get_parent_matrix(struct Object *ob, struct Object *par, float r_parentmat[4][4])
Definition: object.c:3494
bool BKE_object_obdata_is_libdata(const struct Object *ob)
int BKE_object_is_deform_modified(struct Scene *scene, struct Object *ob)
Definition: object.c:5018
void BKE_object_free_modifiers(struct Object *ob, const int flag)
Definition: object.c:1200
void BKE_object_where_is_calc(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: object.c:3653
bool BKE_object_modifier_use_time(struct Object *ob, struct ModifierData *md)
Definition: object.c:5397
void BKE_object_modifier_hook_reset(struct Object *ob, struct HookModifierData *hmd)
Definition: object.c:1231
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.c:2561
void BKE_object_obdata_size_init(struct Object *ob, const float size)
Definition: object.c:2991
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3])
Definition: object.c:3778
struct Mesh * BKE_object_get_evaluated_mesh(struct Object *object)
Definition: object.c:4459
void BKE_object_empty_draw_type_set(struct Object *ob, const int value)
Definition: object.c:4061
struct Object * BKE_object_pose_armature_get(struct Object *ob)
Definition: object.c:2487
bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode)
Definition: object.c:1982
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)
void BKE_object_boundbox_flag(struct Object *ob, int flag, const bool set)
Definition: object.c:3860
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.c:1284
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:124
@ OB_VISIBLE_INSTANCES
Definition: BKE_object.h:127
@ OB_VISIBLE_SELF
Definition: BKE_object.h:125
@ OB_VISIBLE_PARTICLES
Definition: BKE_object.h:126
@ OB_VISIBLE_ALL
Definition: BKE_object.h:128
bool BKE_object_obdata_texspace_get(struct Object *ob, short **r_texflag, float **r_loc, float **r_size)
Definition: object.c:4413
void BKE_object_free_shaderfx(struct Object *ob, const int flag)
Definition: object.c:1222
eObjectSet
Definition: BKE_object.h:393
@ OB_SET_SELECTED
Definition: BKE_object.h:394
@ OB_SET_VISIBLE
Definition: BKE_object.h:395
@ OB_SET_ALL
Definition: BKE_object.h:396
struct Object ** BKE_object_pose_array_get(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len)
Definition: object.c:2556
struct LinkNode * BKE_object_groups(struct Main *bmain, struct Scene *scene, struct Object *ob)
Definition: object.c:5251
void BKE_object_groups_clear(struct Main *bmain, struct Scene *scene, struct Object *object)
Definition: object.c:5262
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.c:5682
void BKE_object_where_is_calc_mat4(struct Object *ob, float r_obmat[4][4])
Definition: object.c:3636
void BKE_object_data_select_update(struct Depsgraph *depsgraph, struct ID *object_data)
void BKE_object_workob_clear(struct Object *workob)
Definition: object.c:1163
bool BKE_object_exists_check(struct Main *bmain, const struct Object *obtest)
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_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.c:3220
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.c:3647
void BKE_object_to_mat4(struct Object *ob, float r_mat[4][4])
Definition: object.c:3234
void BKE_scene_foreach_display_point(struct Depsgraph *depsgraph, void(*func_cb)(const float[3], void *), void *user_data)
Definition: object.c:4209
void BKE_object_workob_calc_parent(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct Object *workob)
Definition: object.c:3667
void BKE_object_free_derived_caches(struct Object *ob)
Definition: object.c:1719
struct Lattice * BKE_object_get_evaluated_lattice(const struct Object *object)
void BKE_object_free_particlesystems(struct Object *ob)
Definition: object.c:1172
bool BKE_object_shaderfx_use_time(struct Object *ob, struct ShaderFxData *md)
Definition: object.c:5481
struct KDTree_3d * BKE_object_as_kdtree(struct Object *ob, int *r_tot)
Definition: object.c:5280
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
char * BKE_object_data_editmode_flush_ptr_get(struct ID *id)
Definition: object.c:1893
void BKE_object_handle_update_ex(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct RigidBodyWorld *rbw, const bool do_proxy_update)
Definition: object.c:4341
bool BKE_object_supports_modifiers(const struct Object *ob)
void BKE_object_free_curve_cache(struct Object *ob)
Definition: object.c:1186
void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3], const bool use_hidden)
Definition: object.c:3964
void BKE_object_boundbox_calc_from_mesh(struct Object *ob, struct Mesh *me_eval)
Definition: object.c:3873
struct Object ATTR_RETURNS_NONNULL
Definition: BKE_object.h:138
void BKE_object_free_caches(struct Object *object)
Definition: object.c:1770
void BKE_object_scale_to_mat3(struct Object *ob, float r_mat[3][3])
Definition: object.c:3038
int BKE_object_scenes_users_get(struct Main *bmain, struct Object *ob)
Definition: object.c:5068
struct Mesh * BKE_object_to_mesh(struct Depsgraph *depsgraph, struct Object *object, bool preserve_all_data_layers)
Definition: object.c:5664
struct ObjectTfmProtectedChannels ObjectTfmProtectedChannels
bool BKE_object_copy_gpencil_modifier(struct Object *ob_dst, struct GpencilModifierData *md)
Definition: object.c:1512
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)
struct Object * BKE_object_duplicate(struct Main *bmain, struct Object *ob, uint dupflag, const uint duplicate_options)
void BKE_object_copy_softbody(struct Object *ob_dst, const struct Object *ob_src, const int flag)
bool BKE_object_eval_proxy_copy(struct Depsgraph *depsgraph, struct Object *object)
void BKE_object_modifier_gpencil_hook_reset(struct Object *ob, struct HookGpencilModifierData *hmd)
Definition: object.c:1254
void BKE_object_runtime_reset_on_copy(struct Object *object, const int flag)
void BKE_object_runtime_reset(struct Object *object)
Definition: object.c:5107
void BKE_object_eval_uber_data(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
struct BoundBox * BKE_object_boundbox_get(struct Object *ob)
Definition: object.c:3817
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.c:5546
void BKE_object_make_proxy(struct Main *bmain, struct Object *ob, struct Object *target, struct Object *cob)
Definition: object.c:2885
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.c:5691
void BKE_object_sculpt_data_create(struct Object *ob)
Definition: object.c:4406
int BKE_object_is_modified(struct Scene *scene, struct Object *ob)
Definition: object.c:4869
void BKE_object_eval_assign_data(struct Object *object, struct ID *data, bool is_owned)
Definition: object.c:1687
struct Object ** BKE_object_pose_array_get_ex(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len, bool unique)
Definition: object.c:2524
bool BKE_object_shapekey_remove(struct Main *bmain, struct Object *ob, struct KeyBlock *kb)
Definition: object.c:4775
bool BKE_object_flag_test_recursive(const struct Object *ob, short flag)
void BKE_object_tfm_protected_backup(const struct Object *ob, ObjectTfmProtectedChannels *obtfm)
void BKE_object_handle_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
Definition: object.c:4401
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.c:1952
struct ModifierData * BKE_object_active_modifier(const struct Object *ob)
int BKE_object_visibility(const struct Object *ob, const int dag_eval_mode)
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.c:3926
void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4])
Definition: object.c:3245
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.c:4758
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.c:2269
struct Object ** BKE_object_pose_array_get_unique(struct ViewLayer *view_layer, struct View3D *v3d, unsigned int *r_objects_len)
Definition: object.c:2552
struct BoundBox * BKE_boundbox_alloc_unit(void)
Definition: object.c:3768
struct LinkNode * BKE_object_relational_superset(struct ViewLayer *view_layer, eObjectSet objectSet, eObRelationTypes includeFilter)
Definition: object.c:5167
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.c:4176
void BKE_object_apply_mat4(struct Object *ob, const float mat[4][4], const bool use_compat, const bool use_parent)
Definition: object.c:3754
bool BKE_object_moves_in_time(const struct Object *object, bool recurse_parent)
void BKE_object_tfm_protected_restore(struct Object *ob, const ObjectTfmProtectedChannels *obtfm, const short protectflag)
Definition: object.c:3158
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.c:2600
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:78
#define ATTR_NONNULL(...)
unsigned int uint
Definition: BLI_sys_types.h:83
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
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:51
unsigned __int64 uint64_t
Definition: stdint.h:93
Definition: DNA_ID.h:273
short flag
Definition: DNA_key_types.h:58
char name[64]
Definition: DNA_key_types.h:68
Definition: BKE_main.h:116
void set(const SocketType &input, bool value)
Definition: node.cpp:70
ustring name
Definition: 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