27 #define DNA_DEPRECATED_ALLOW
57 #undef INVALIDATE_WORK_DATA
60 # define INVALIDATE_WORK_DATA
71 #ifdef INVALIDATE_WORK_DATA
73 memset(&
data->temp_dupli_object, 0xff,
sizeof(
data->temp_dupli_object));
81 if (
data->dupli_object_current ==
nullptr) {
86 const Object *dupli_object =
data->dupli_object_current->ob;
87 Object *temp_dupli_object = &
data->temp_dupli_object;
115 if (!dob || !(dob->
type & hide_original_types)) {
127 data->geometry_component_owner = object;
128 data->geometry_component_id = 0;
135 if (
data->geometry_component_owner ==
nullptr) {
139 if (
data->geometry_component_owner->runtime.geometry_set_eval ==
nullptr) {
142 data->geometry_component_owner =
nullptr;
146 GeometrySet *geometry_set =
data->geometry_component_owner->runtime.geometry_set_eval;
147 if (geometry_set ==
nullptr) {
148 data->geometry_component_owner =
nullptr;
153 if (
data->geometry_component_id == 0) {
154 data->geometry_component_id++;
157 if (
data->geometry_component_owner->type ==
OB_MESH) {
163 if (
mesh !=
nullptr) {
164 Object *temp_object = &
data->temp_geometry_component_object;
165 *temp_object = *
data->geometry_component_owner;
175 if (
data->geometry_component_id == 1) {
176 data->geometry_component_id++;
185 if (pointcloud !=
nullptr) {
186 Object *temp_object = &
data->temp_geometry_component_object;
187 *temp_object = *
data->geometry_component_owner;
189 temp_object->
data = (
void *)pointcloud;
197 if (
data->geometry_component_id == 2) {
198 data->geometry_component_id++;
210 if (volume !=
nullptr) {
211 Object *temp_object = &
data->temp_geometry_component_object;
212 *temp_object = *
data->geometry_component_owner;
214 temp_object->
data = (
void *)volume;
222 data->geometry_component_owner =
nullptr;
230 data->dupli_parent = object;
239 if (
data->dupli_list ==
nullptr) {
243 while (
data->dupli_object_next !=
nullptr) {
247 data->dupli_object_next =
data->dupli_object_next->next;
255 if (deg_object_hide_original(
data->eval_mode, dob->
ob, dob)) {
259 verify_id_properties_freed(
data);
261 data->dupli_object_current = dob;
265 Object *temp_dupli_object = &
data->temp_dupli_object;
266 *temp_dupli_object = *dob->
ob;
271 temp_dupli_object->
dt =
MIN2(temp_dupli_object->
dt, dupli_parent->
dt);
290 deg_iterator_components_init(
data, &
data->temp_dupli_object);
295 verify_id_properties_freed(
data);
297 data->dupli_parent =
nullptr;
298 data->dupli_list =
nullptr;
299 data->dupli_object_next =
nullptr;
300 data->dupli_object_current =
nullptr;
301 deg_invalidate_iterator_work_data(
data);
310 for (;
data->id_node_index <
data->num_id_nodes;
data->id_node_index++) {
319 if (id_type !=
ID_OB) {
348 if (object->
type !=
OB_MBALL && deg_object_hide_original(
data->eval_mode,
object,
nullptr)) {
355 deg_iterator_duplis_init(
data,
object);
359 deg_iterator_components_init(
data,
object);
361 data->id_node_index++;
377 if (num_id_nodes == 0) {
382 data->dupli_parent =
nullptr;
383 data->dupli_list =
nullptr;
384 data->dupli_object_next =
nullptr;
385 data->dupli_object_current =
nullptr;
387 data->id_node_index = 0;
388 data->num_id_nodes = num_id_nodes;
390 data->geometry_component_id = 0;
391 data->geometry_component_owner =
nullptr;
392 deg_invalidate_iterator_work_data(
data);
401 if (deg_iterator_components_step(iter)) {
404 if (deg_iterator_duplis_step(
data)) {
407 if (deg_iterator_objects_step(
data)) {
421 deg_invalidate_iterator_work_data(
data);
431 if (!
id_node->is_directly_visible) {
462 data->id_node_index = 0;
463 data->num_id_nodes = num_id_nodes;
482 ++
data->id_node_index;
483 if (
data->id_node_index ==
data->num_id_nodes) {
490 }
while (iter->
skip);
struct ListBase * object_duplilist(struct Depsgraph *depsgraph, struct Scene *sce, struct Object *ob)
void free_object_duplilist(struct ListBase *lb)
void IDP_FreeProperty(struct IDProperty *prop)
struct bNodeTree * ntreeFromID(struct ID *id)
General operations, lookup, etc. for blender objects.
int BKE_object_visibility(const struct Object *ob, const int dag_eval_mode)
bool invert_m4_m4(float R[4][4], const float A[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
bool is_negative_m4(const float mat[4][4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
#define SET_FLAG_FROM_TEST(value, test, flag)
static uint8 component(Color32 c, uint i)
struct Depsgraph Depsgraph
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
bool DEG_id_type_any_updated(const struct Depsgraph *depsgraph)
struct Object * DEG_get_original_object(struct Object *object)
@ DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY
@ DEG_ITER_OBJECT_FLAG_VISIBLE
@ DEG_ITER_OBJECT_FLAG_DUPLI
@ DEG_ITER_OBJECT_FLAG_LINKED_INDIRECTLY
@ DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
const Depsgraph * depsgraph
void DEG_iterator_ids_begin(BLI_Iterator *iter, DEGIDIterData *data)
void DEG_iterator_objects_begin(BLI_Iterator *iter, DEGObjectIterData *data)
void DEG_iterator_objects_end(BLI_Iterator *iter)
void DEG_iterator_objects_next(BLI_Iterator *iter)
void DEG_iterator_ids_next(BLI_Iterator *iter)
void DEG_iterator_ids_end(BLI_Iterator *UNUSED(iter))
static void DEG_iterator_ids_step(BLI_Iterator *iter, deg::IDNode *id_node, bool only_updated)
bool deg_validate_copy_on_write_datablock(ID *id_cow)
@ DEG_ID_LINKED_INDIRECTLY
const PointCloud * get_pointcloud_for_read() const
const GeometryComponent * get_component_for_read(GeometryComponentType component_type) const
const Mesh * get_mesh_for_read() const
unsigned short local_collections_bits
struct GeometrySet * geometry_set_eval
unsigned short base_local_view_bits
eDepsNode_LinkedState_Type linked_state