Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-04-08 18:35:06 +0300
committerJacques Lucke <jacques@blender.org>2021-04-08 18:35:37 +0300
commitc6ff722a1fcc632eacebcfc94417df466742ce5f (patch)
tree0b86327190d845c1d6b6975434caf5e2d3ac2528 /source/blender/blenkernel/intern/object.c
parent5e77ff79ccdaffb2df4d54c97f17359c017c9b85 (diff)
Spreadsheet: support showing data of specific node
Previously, the spreadsheet editor could only show data of the original and of the final evaluated object. Now it is possible to show the data at some intermediate stages too. For that the mode has to be set to "Node" in the spreadsheet editor. Furthermore, the preview of a specific node has to be activated by clicking the new icon in the header of geometry nodes. The exact ui of this feature might be refined in upcoming commits. It is already very useful for debugging node groups in it's current state though. Differential Revision: https://developer.blender.org/D10875
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 1c56312b38b..002071fac30 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1756,6 +1756,10 @@ void BKE_object_free_derived_caches(Object *ob)
BKE_geometry_set_free(ob->runtime.geometry_set_eval);
ob->runtime.geometry_set_eval = NULL;
}
+ if (ob->runtime.geometry_set_preview != NULL) {
+ BKE_geometry_set_free(ob->runtime.geometry_set_preview);
+ ob->runtime.geometry_set_preview = NULL;
+ }
}
void BKE_object_free_caches(Object *object)
@@ -1806,6 +1810,18 @@ void BKE_object_free_caches(Object *object)
}
}
+/* Can be called from multiple threads. */
+void BKE_object_set_preview_geometry_set(Object *ob, struct GeometrySet *geometry_set)
+{
+ static ThreadMutex mutex = BLI_MUTEX_INITIALIZER;
+ BLI_mutex_lock(&mutex);
+ if (ob->runtime.geometry_set_preview != NULL) {
+ BKE_geometry_set_free(ob->runtime.geometry_set_preview);
+ }
+ ob->runtime.geometry_set_preview = geometry_set;
+ BLI_mutex_unlock(&mutex);
+}
+
/**
* Actual check for internal data, not context or flags.
*/