Blender V5.3
object_update.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2014 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
10#include "DNA_lattice_types.h"
11#include "DNA_mesh_types.h"
12#include "DNA_modifier_types.h"
13#include "DNA_scene_types.h"
14
15#include "BLI_listbase.hh"
16#include "BLI_math_matrix_c.hh"
17#include "BLI_math_vector_c.hh"
18#include "BLI_string.hh"
19
20#include "BKE_armature.hh"
21#include "BKE_constraint.h"
22#include "BKE_curve.hh"
23#include "BKE_curves.h"
24#include "BKE_displist.h"
25#include "BKE_editmesh.hh"
26#include "BKE_grease_pencil.h"
27#include "BKE_grease_pencil.hh"
28#include "BKE_instances.hh"
29#include "BKE_lattice.hh"
30#include "BKE_layer.hh"
31#include "BKE_mball.hh"
32#include "BKE_mesh.hh"
33#include "BKE_modifier.hh"
34#include "BKE_object.hh"
35#include "BKE_particle.h"
36#include "BKE_pointcache.h"
37#include "BKE_pointcloud.hh"
38#include "BKE_scene.hh"
39#include "BKE_volume.hh"
40
41#include "MEM_guardedalloc.h"
42
43#include "DEG_depsgraph.hh"
46
47namespace blender {
48
53
54void BKE_object_eval_local_transform(Depsgraph *depsgraph, Object *ob)
55{
56 DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
57
58 /* calculate local matrix */
60}
61
62void BKE_object_eval_parent(Depsgraph *depsgraph, Object *ob)
63{
64 /* NOTE: based on `solve_parenting()`, but with the cruft stripped out. */
65
66 Object *par = ob->parent;
67
68 float totmat[4][4];
69 float tmat[4][4];
70 float locmat[4][4];
71
72 DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
73
74 /* get local matrix (but don't calculate it, as that was done already!) */
75 /* XXX: redundant? */
76 copy_m4_m4(locmat, ob->object_to_world().ptr());
77
78 /* get parent effect matrix */
79 BKE_object_get_parent_matrix(ob, par, totmat);
80
81 /* total */
82 mul_m4_m4m4(tmat, totmat, ob->parentinv);
83 mul_m4_m4m4(ob->runtime->object_to_world.ptr(), tmat, locmat);
84
85 /* origin, for help line */
86 if ((ob->partype & PARTYPE) == PARSKEL) {
87 copy_v3_v3(ob->runtime->parent_display_origin, par->object_to_world().location());
88 }
89 else {
91 }
92}
93
94void BKE_object_eval_constraints(Depsgraph *depsgraph, Scene *scene, Object *ob)
95{
96 bConstraintOb *cob;
97 float ctime = BKE_scene_ctime_get(scene);
98
99 DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
100
101 /* evaluate constraints stack */
102 /* TODO: split this into:
103 * - pre (i.e. BKE_constraints_make_evalob), per-constraint (i.e.
104 * - inner body of BKE_constraints_solve),
105 * - post (i.e. BKE_constraints_clear_evalob)
106 *
107 * Not sure why, this is from Joshua - sergey
108 */
109 cob = BKE_constraints_make_evalob(depsgraph, scene, ob, nullptr, CONSTRAINT_OBTYPE_OBJECT);
110 BKE_constraints_solve(depsgraph, &ob->constraints, cob, ctime);
112}
113
114void BKE_object_eval_transform_final(Depsgraph *depsgraph, Object *ob)
115{
116 DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
117 /* Make sure inverse matrix is always up to date. This way users of it
118 * do not need to worry about recalculating it. */
119 invert_m4_m4_safe(ob->runtime->world_to_object.ptr(), ob->object_to_world().ptr());
120 /* Set negative scale flag in object. */
121 if (is_negative_m4(ob->object_to_world().ptr())) {
122 ob->transflag |= OB_NEG_SCALE;
123 }
124 else {
126 }
127
129}
130
131static void empty_object_apply_modifiers(Depsgraph *depsgraph,
132 Scene *scene,
133 Object *object,
134 bke::GeometrySet &geometry_set)
135{
136 const bool use_render = (DEG_get_mode(depsgraph) == DAG_EVAL_RENDER);
137 const int required_mode = use_render ? eModifierMode_Render : eModifierMode_Realtime;
138 ModifierApplyFlag apply_flag = use_render ? MOD_APPLY_RENDER : MOD_APPLY_USECACHE;
139 const ModifierEvalContext mectx = {depsgraph, object, apply_flag};
140
142
143 VirtualModifierData virtual_modifier_data;
144 ModifierData *md = BKE_modifiers_get_virtual_modifierlist(object, &virtual_modifier_data);
145
146 /* Evaluate modifiers. */
147 for (; md; md = md->next) {
149
150 if (!BKE_modifier_is_enabled(scene, md, required_mode)) {
151 continue;
152 }
153
154 if (mti->modify_geometry_set) {
155 mti->modify_geometry_set(md, &mectx, &geometry_set);
156 }
157 }
158}
159
160static void empty_object_update(Depsgraph *depsgraph, Scene *scene, Object *object)
161{
163
164 bke::GeometrySet geometry_set;
165 /* If the empty is instancing a collection, create an input geometry set of this collection. */
166 if (object->instance_collection != nullptr) {
167 Collection &collection = *object->instance_collection;
168 auto instances = std::make_unique<bke::Instances>(1);
169 instances->reference_handles_for_write().first() = instances->add_reference(collection);
170 instances->transforms_for_write().first() = float4x4::identity();
171 geometry_set = bke::GeometrySet::from_instances(std::move(instances));
172 }
173 /* Evaluate modifiers. */
174 empty_object_apply_modifiers(depsgraph, scene, object, geometry_set);
175
176 object->runtime->geometry_set_eval = new bke::GeometrySet(std::move(geometry_set));
177}
178
179void BKE_object_handle_data_update(Depsgraph *depsgraph, Scene *scene, Object *ob)
180{
181 DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
182
183 /* includes all keys and modifiers */
184 switch (ob->type) {
185 case OB_EMPTY: {
186 empty_object_update(depsgraph, scene, ob);
187 break;
188 }
189 case OB_MESH: {
190 CustomData_MeshMasks cddata_masks = scene->customdata_mask;
192 /* Custom attributes should not be removed automatically. They might be used by the render
193 * engine or scripts. They can still be removed explicitly using geometry nodes.
194 * Vertex groups can be used in arbitrary situations with geometry nodes as well. */
196 cddata_masks.emask |= CD_MASK_PROP_ALL;
197 cddata_masks.fmask |= CD_MASK_PROP_ALL;
198 cddata_masks.pmask |= CD_MASK_PROP_ALL;
199 cddata_masks.lmask |= CD_MASK_PROP_ALL;
200 if (DEG_get_mode(depsgraph) == DAG_EVAL_RENDER) {
201 /* Always compute orcos for render. */
202 cddata_masks.vmask |= CD_MASK_ORCO;
203 }
204 bke::mesh_data_update(*depsgraph, *scene, *ob, cddata_masks);
205 break;
206 }
207 case OB_ARMATURE:
208 BKE_pose_where_is(depsgraph, scene, ob);
209 break;
210
211 case OB_MBALL:
212 BKE_mball_data_update(depsgraph, scene, ob);
213 break;
214
215 case OB_CURVES_LEGACY:
216 case OB_SURF:
217 case OB_FONT: {
218 bool for_render = (DEG_get_mode(depsgraph) == DAG_EVAL_RENDER);
219 BKE_displist_make_curveTypes(depsgraph, scene, ob, for_render);
220 break;
221 }
222
223 case OB_LATTICE:
224 BKE_lattice_modifiers_calc(depsgraph, scene, ob);
225 break;
226 case OB_CURVES:
227 BKE_curves_data_update(depsgraph, scene, ob);
228 break;
229 case OB_POINTCLOUD:
230 BKE_pointcloud_data_update(depsgraph, scene, ob);
231 break;
232 case OB_VOLUME:
233 BKE_volume_data_update(depsgraph, scene, ob);
234 break;
235 case OB_GREASE_PENCIL:
236 BKE_object_eval_grease_pencil(depsgraph, scene, ob);
237 break;
238 default:
239 break;
240 }
241
242 /* particles */
243 if (!(ob->mode & OB_MODE_EDIT) && ob->particlesystem.first()) {
244 const bool use_render_params = (DEG_get_mode(depsgraph) == DAG_EVAL_RENDER);
245 ParticleSystem *tpsys, *psys;
247 psys = ob->particlesystem.first();
248 while (psys) {
249 if (psys_check_enabled(ob, psys, use_render_params)) {
250 /* check use of dupli objects here */
251 if (psys->part && (psys->part->draw_as == PART_DRAW_REND || use_render_params) &&
252 ((psys->part->ren_as == PART_DRAW_OB && psys->part->instance_object) ||
253 (psys->part->ren_as == PART_DRAW_GR && psys->part->instance_collection)))
254 {
256 }
257
258 particle_system_update(depsgraph, scene, ob, psys, use_render_params);
259 psys = psys->next;
260 }
261 else if (psys->flag & PSYS_DELETE) {
262 tpsys = psys->next;
263 BLI_remlink(&ob->particlesystem, psys);
264 psys_free(ob, psys);
265 psys = tpsys;
266 }
267 else {
268 psys = psys->next;
269 }
270 }
271 }
272
273 /* Cache the contained geometry types of the #geometry_set_eval. */
275 if (ob->runtime->geometry_set_eval) {
276 for (const bke::GeometryComponent::Type type :
278 {
279 ob->runtime->contained_geometry_types |= uint16_t(1 << size_t(type));
280 }
281 }
282
283 if (DEG_is_active(depsgraph)) {
284 Object *object_orig = DEG_get_original(ob);
286 }
287}
288
289void BKE_object_sync_to_original(Depsgraph *depsgraph, Object *object)
290{
291 if (!DEG_is_active(depsgraph)) {
292 return;
293 }
294 Object *object_orig = DEG_get_original(object);
295 /* Base flags. */
296 object_orig->base_flag = object->base_flag;
297 object_orig->base_local_view_bits = object->base_local_view_bits;
298
299 /* Particle edit mode draws from the original object, so sync imat from evaluated to original
300 * object so drawing uses the correct transform. */
301 for (ParticleSystem *psys_eval = object->particlesystem.first(),
302 *psys_orig = object_orig->particlesystem.first();
303 psys_eval && psys_orig;
304 psys_eval = psys_eval->next, psys_orig = psys_orig->next)
305 {
306 copy_m4_m4(psys_orig->imat, psys_eval->imat);
307 }
308
309 /* Transformation flags. */
310 copy_m4_m4(object_orig->runtime->object_to_world.ptr(), object->object_to_world().ptr());
311 copy_m4_m4(object_orig->runtime->world_to_object.ptr(), object->world_to_object().ptr());
312 copy_m4_m4(object_orig->constinv, object->constinv);
313 object_orig->transflag = object->transflag;
314 object_orig->flag = object->flag;
315
316 /* Copy back error messages from modifiers. */
317 for (ModifierData *md = object->modifiers.first(), *md_orig = object_orig->modifiers.first();
318 md != nullptr && md_orig != nullptr;
319 md = md->next, md_orig = md_orig->next)
320 {
321 BLI_assert(md->type == md_orig->type && STREQ(md->name, md_orig->name));
322 MEM_SAFE_DELETE(md_orig->error);
323 if (md->error != nullptr) {
324 md_orig->error = BLI_strdup(md->error);
325 }
326 }
327}
328
329void BKE_object_eval_uber_transform(Depsgraph * /*depsgraph*/, Object * /*object*/) {}
330
332{
333 switch (ob->type) {
334 case OB_MESH:
336 break;
337 case OB_LATTICE:
339 break;
340 case OB_CURVES_LEGACY:
341 case OB_SURF:
342 case OB_FONT:
344 break;
345 case OB_MBALL: {
346 /* This function is currently called on original objects, so to properly
347 * clear the actual displayed geometry, we have to tag the evaluated mesh. */
349 if (mesh) {
351 }
352 break;
353 }
354 case OB_CURVES:
356 break;
357 case OB_POINTCLOUD:
358 BKE_pointcloud_batch_cache_dirty_tag(id_cast<PointCloud *>(ob->data),
360 break;
361 case OB_VOLUME:
363 break;
364 case OB_GREASE_PENCIL:
365 BKE_grease_pencil_batch_cache_dirty_tag(id_cast<GreasePencil *>(ob->data),
367 break;
368 default:
369 break;
370 }
371}
372
373void BKE_object_eval_uber_data(Depsgraph *depsgraph, Scene *scene, Object *ob)
374{
375 DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
377 BKE_object_handle_data_update(depsgraph, scene, ob);
379
381}
382
383void BKE_object_eval_ptcache_reset(Depsgraph *depsgraph, Scene *scene, Object *object)
384{
385 DEG_debug_print_eval(depsgraph, __func__, object->id.name, object);
387}
388
389void BKE_object_eval_transform_all(Depsgraph *depsgraph, Scene *scene, Object *object)
390{
391 /* This mimics full transform update chain from new depsgraph. */
392 BKE_object_eval_local_transform(depsgraph, object);
393 if (object->parent != nullptr) {
394 BKE_object_eval_parent(depsgraph, object);
395 }
396 if (!object->constraints.is_empty()) {
397 BKE_object_eval_constraints(depsgraph, scene, object);
398 }
399 BKE_object_eval_uber_transform(depsgraph, object);
400 BKE_object_eval_transform_final(depsgraph, object);
401}
402
403void BKE_object_data_select_update(Depsgraph *depsgraph, ID *object_data)
404{
405 DEG_debug_print_eval(depsgraph, __func__, object_data->name, object_data);
406 switch (GS(object_data->name)) {
407 case ID_ME:
408 BKE_mesh_batch_cache_dirty_tag(id_cast<Mesh *>(object_data), BKE_MESH_BATCH_DIRTY_SELECT);
409 break;
410 case ID_CU_LEGACY:
412 break;
413 case ID_LT:
414 BKE_lattice_batch_cache_dirty_tag(reinterpret_cast<Lattice *>(object_data),
416 break;
417 default:
418 break;
419 }
420}
421
422void BKE_object_select_update(Depsgraph *depsgraph, Object *object)
423{
424 DEG_debug_print_eval(depsgraph, __func__, object->id.name, object);
425 if (object->type == OB_MESH && !object->runtime->is_data_eval_owned) {
426 Mesh *mesh_input = id_cast<Mesh *>(object->runtime->data_orig);
427 std::lock_guard lock{mesh_input->runtime->eval_mutex};
428 BKE_object_data_select_update(depsgraph, object->data);
429 }
430 else {
431 BKE_object_data_select_update(depsgraph, object->data);
432 }
433}
434
435void BKE_object_eval_eval_base_flags(Depsgraph *depsgraph,
436 Scene *scene,
437 const int view_layer_index,
438 Object *object,
439 int base_index,
440 const bool is_from_set)
441{
442 /* TODO(sergey): Avoid list lookup. */
443 BLI_assert(view_layer_index >= 0);
444 ViewLayer *view_layer = static_cast<ViewLayer *>(
445 BLI_findlink(&scene->view_layers, view_layer_index));
446 BLI_assert(view_layer != nullptr);
447 BLI_assert(base_index >= 0);
448 Base *base = view_layer->object_bases_array()[base_index];
449 BLI_assert(base->object == object);
450
451 DEG_debug_print_eval(depsgraph, __func__, object->id.name, object);
452
453 /* Set base flags based on collection and object restriction. */
455
456 /* For render, compute base visibility again since BKE_base_eval_flags
457 * assumed viewport visibility. Select-ability does not matter here. */
458 if (DEG_get_mode(depsgraph) == DAG_EVAL_RENDER) {
459 if (base->flag & BASE_ENABLED_RENDER) {
461 }
462 else {
464 }
465 }
466
467 /* Copy flags and settings from base. */
468 object->base_flag = base->flag;
469 if (is_from_set) {
470 object->base_flag |= BASE_FROM_SET;
471 object->base_flag &= ~(BASE_SELECTED | BASE_SELECTABLE);
472 }
473 object->base_local_view_bits = base->local_view_bits;
474 object->runtime->local_collections_bits = base->local_collections_bits;
475
476 if (object->mode == OB_MODE_PARTICLE_EDIT) {
477 for (ParticleSystem *psys = object->particlesystem.first(); psys != nullptr; psys = psys->next)
478 {
480 }
481 }
482
483 /* Copy base flag back to the original view layer for editing. */
484 if (DEG_is_active(depsgraph) && (view_layer == DEG_get_evaluated_view_layer(depsgraph))) {
485 Base *base_orig = base->base_orig;
486 BLI_assert(base_orig != nullptr);
487 BLI_assert(base_orig->object != nullptr);
488 base_orig->flag = base->flag;
489 }
490}
491
492void BKE_object_eval_light_linking(Depsgraph *depsgraph, Object *object)
493{
494 DEG_debug_print_eval(depsgraph, __func__, object->id.name, object);
495 deg::light_linking::eval_runtime_data(depsgraph, *object);
496}
497
498void BKE_object_eval_shading(Depsgraph *depsgraph, Object *object)
499{
500 DEG_debug_print_eval(depsgraph, __func__, object->id.name, object);
501
502 object->runtime->last_update_shading = DEG_get_update_count(depsgraph);
503}
504
505} // namespace blender
Low-level operations for curves that cannot be defined in the C++ header yet.
display list (or rather multi purpose list) stuff.
Low-level operations for grease pencil that cannot be defined in the C++ header yet.
Low-level operations for grease pencil.
General operations, lookup, etc. for blender objects.
#define PTCACHE_RESET_DEPSGRAPH
General operations for point clouds.
Volume data-block.
Read Blender memory allocation and freeing.
volatile int lock
#define STREQ(a, b)
#define CD_MASK_ORCO
#define CD_MASK_MDEFORMVERT
#define CD_MASK_PROP_ALL
void mesh_data_update(Depsgraph &depsgraph, const Scene &scene, Object &ob, const CustomData_MeshMasks &dataMask)
void eval_runtime_data(const Depsgraph *depsgraph, Object &object_eval)
BMesh Iterators.
void CustomData_MeshMasks_update(CustomData_MeshMasks *mask_dst, const CustomData_MeshMasks *mask_src)
Definition customdata.cc:89
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
@ BKE_POINTCLOUD_BATCH_DIRTY_ALL
void BKE_object_eval_reset(Object *ob_eval)
void BKE_object_eval_shading(Depsgraph *depsgraph, Object *object)
const CustomData_MeshMasks CD_MASK_BAREMESH
void BKE_mball_data_update(Depsgraph *depsgraph, Scene *scene, Object *ob)
Definition mball.cc:648
void BKE_volume_batch_cache_dirty_tag(Volume *volume, int mode)
void BKE_object_eval_eval_base_flags(Depsgraph *depsgraph, Scene *scene, int view_layer_index, Object *object, int base_index, bool is_from_set)
static void empty_object_apply_modifiers(Depsgraph *depsgraph, Scene *scene, Object *object, bke::GeometrySet &geometry_set)
void BKE_particle_batch_cache_dirty_tag(struct ParticleSystem *psys, int mode)
Definition particle.cc:5580
void BKE_object_eval_grease_pencil(Depsgraph *depsgraph, Scene *scene, Object *object)
static void empty_object_update(Depsgraph *depsgraph, Scene *scene, Object *object)
void BKE_object_eval_uber_data(Depsgraph *depsgraph, Scene *scene, Object *ob)
int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode)
MINLINE void copy_v3_v3(float r[3], const float a[3])
@ BKE_CURVE_BATCH_DIRTY_SELECT
Definition BKE_curve.hh:388
@ BKE_CURVE_BATCH_DIRTY_ALL
Definition BKE_curve.hh:387
bool DEG_is_active(const Depsgraph *depsgraph)
Definition depsgraph.cc:324
void BKE_pointcloud_batch_cache_dirty_tag(PointCloud *pointcloud, int mode)
void BKE_constraints_solve(struct Depsgraph *depsgraph, ListBaseT< bConstraint > *conlist, struct bConstraintOb *cob, float ctime)
void BKE_object_eval_transform_final(Depsgraph *depsgraph, Object *ob)
void BKE_object_get_parent_matrix(const Object *ob, Object *par, float r_parentmat[4][4])
Definition object.cc:3419
@ BKE_LATTICE_BATCH_DIRTY_ALL
@ BKE_LATTICE_BATCH_DIRTY_SELECT
@ BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT
uint64_t DEG_get_update_count(const Depsgraph *depsgraph)
Definition depsgraph.cc:356
struct bConstraintOb * BKE_constraints_make_evalob(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, void *subdata, short datatype)
void BKE_volume_data_update(Depsgraph *depsgraph, Scene *scene, Object *object)
void BKE_object_eval_ptcache_reset(Depsgraph *depsgraph, Scene *scene, Object *object)
void DEG_debug_print_eval(Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address)
bool is_negative_m4(const float mat[4][4])
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void BKE_curve_batch_cache_dirty_tag(Curve *cu, int mode)
Definition curve.cc:5536
void BKE_object_select_update(Depsgraph *depsgraph, Object *object)
void BKE_pose_where_is(Depsgraph *depsgraph, Scene *scene, Object *ob)
void BKE_object_data_select_update(Depsgraph *depsgraph, ID *object_data)
void BKE_object_eval_light_linking(Depsgraph *depsgraph, Object *object)
void BKE_object_batch_cache_dirty_tag(Object *ob)
void BKE_object_eval_local_transform(Depsgraph *depsgraph, Object *ob)
unsigned short uint16_t
Definition BKE_text.h:80
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition listbase.cc:541
void BKE_grease_pencil_batch_cache_dirty_tag(GreasePencil *grease_pencil, int mode)
void BKE_object_handle_data_update(Depsgraph *depsgraph, Scene *scene, Object *ob)
void BKE_object_free_derived_caches(Object *ob)
Definition object.cc:1810
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:138
void BKE_object_to_mat4(const Object *ob, float r_mat[4][4])
Definition object.cc:3125
void BKE_lattice_modifiers_calc(Depsgraph *depsgraph, Scene *scene, Object *ob)
Definition lattice.cc:528
@ OB_MODE_PARTICLE_EDIT
void BKE_mesh_batch_cache_dirty_tag(Mesh *mesh, eMeshBatchDirtyMode mode)
@ MOD_APPLY_USECACHE
void psys_free(struct Object *ob, struct ParticleSystem *psys)
Definition particle.cc:1009
void BKE_curves_data_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *object)
ModifierData * BKE_modifiers_get_virtual_modifierlist(const Object *ob, VirtualModifierData *data)
@ BKE_GREASEPENCIL_BATCH_DIRTY_ALL
void BKE_object_eval_constraints(Depsgraph *depsgraph, Scene *scene, Object *ob)
ViewLayer * DEG_get_evaluated_view_layer(const Depsgraph *graph)
void BKE_modifiers_clear_errors(Object *ob)
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
bool psys_check_enabled(struct Object *ob, struct ParticleSystem *psys, bool use_render_params)
Definition particle.cc:739
void BKE_object_eval_uber_transform(Depsgraph *depsgraph, Object *object)
void invert_m4_m4_safe(float inverse[4][4], const float mat[4][4])
void particle_system_update(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, bool use_render_params)
std::optional< Bounds< float3 > > BKE_object_evaluated_geometry_bounds(const Object *ob)
Definition object.cc:3766
T * DEG_get_original(T *id)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
float BKE_scene_ctime_get(const Scene *scene)
Definition scene.cc:2581
void BKE_constraints_clear_evalob(struct bConstraintOb *cob)
void BKE_base_eval_flags(Base *base)
void BKE_lattice_batch_cache_dirty_tag(Lattice *lt, int mode)
Definition lattice.cc:718
void BKE_object_eval_parent(Depsgraph *depsgraph, Object *ob)
ID_Type GS(const char *name)
Definition DNA_ID.h:410
@ BKE_VOLUME_BATCH_DIRTY_ALL
Definition BKE_volume.hh:63
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void BKE_displist_make_curveTypes(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, bool for_render)
void BKE_object_sync_to_original(Depsgraph *depsgraph, Object *object)
@ BKE_MESH_BATCH_DIRTY_ALL
Definition BKE_mesh.h:48
@ BKE_MESH_BATCH_DIRTY_SELECT
Definition BKE_mesh.h:49
void BKE_pointcloud_data_update(Depsgraph *depsgraph, Scene *scene, Object *object)
void BKE_curves_batch_cache_dirty_tag(struct Curves *curves, int mode)
bool BKE_modifier_is_enabled(const Scene *scene, ModifierData *md, int required_mode)
Mesh * BKE_object_get_evaluated_mesh_no_subsurf(const Object *object_eval)
Definition object.cc:4419
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
@ BKE_CURVES_BATCH_DIRTY_ALL
Definition BKE_curves.h:41
void BKE_object_eval_transform_all(Depsgraph *depsgraph, Scene *scene, Object *object)
@ BKE_PARTICLE_BATCH_DIRTY_ALL
struct Object * object
unsigned short local_collections_bits
struct Base * base_orig
unsigned short local_view_bits
char name[258]
Definition DNA_ID.h:433
const c_style_mat & ptr() const
bke::MeshRuntime * runtime
struct ModifierData * next
void(*) modify_geometry_set(ModifierData *md, const ModifierEvalContext *ctx, bke::GeometrySet *geometry_set)
struct Object * parent
ListBaseT< ModifierData > modifiers
float parentinv[4][4]
bke::ObjectRuntime * runtime
ListBaseT< struct ParticleSystem > particlesystem
eObject_Partype partype
ListBaseT< bConstraint > constraints
unsigned short base_local_view_bits
eObject_TransFlag transflag
struct Collection * instance_collection
struct ParticleSystem * next
eParticleSystem_Flag flag
ListBaseT< ViewLayer > view_layers
struct CustomData_MeshMasks customdata_mask
static GeometrySet from_instances(std::unique_ptr< Instances > instances)
Vector< GeometryComponent::Type > gather_component_types(bool include_instances, bool ignore_empty) const
std::optional< Bounds< float3 > > bounds_eval