[Bf-blender-cvs] [6963f3e5957] temp-geometry-nodes-volume: integrate with depsgraph iterator
Jacques Lucke
noreply at git.blender.org
Mon Jan 18 16:36:46 CET 2021
Commit: 6963f3e595758c88c9b244371fae9405d70e0e60
Author: Jacques Lucke
Date: Mon Jan 18 15:09:17 2021 +0100
Branches: temp-geometry-nodes-volume
https://developer.blender.org/rB6963f3e595758c88c9b244371fae9405d70e0e60
integrate with depsgraph iterator
===================================================================
M source/blender/depsgraph/intern/depsgraph_query_iter.cc
===================================================================
diff --git a/source/blender/depsgraph/intern/depsgraph_query_iter.cc b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
index e472d82f2ee..4648330fee0 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_iter.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_iter.cc
@@ -193,6 +193,29 @@ bool deg_iterator_components_step(BLI_Iterator *iter)
}
}
+ /* The volume component. */
+ if (data->geometry_component_id == 2) {
+ data->geometry_component_id++;
+
+ if (data->geometry_component_owner->type == OB_VOLUME) {
+ iter->current = data->geometry_component_owner;
+ return true;
+ }
+
+ const VolumeComponent *component = geometry_set->get_component_for_read<VolumeComponent>();
+ if (component != nullptr) {
+ const Volume *volume = component->get_for_read();
+
+ Object *temp_object = &data->temp_geometry_component_object;
+ *temp_object = *data->geometry_component_owner;
+ temp_object->type = OB_VOLUME;
+ temp_object->data = (void *)volume;
+ temp_object->runtime.select_id = data->geometry_component_owner->runtime.select_id;
+ iter->current = temp_object;
+ return true;
+ }
+ }
+
data->geometry_component_owner = nullptr;
return false;
}
More information about the Bf-blender-cvs
mailing list