From 4dfd72d453fc019e4ddd6d4d5cc5cc434fc4c751 Mon Sep 17 00:00:00 2001 From: Erik Abrahamsson Date: Fri, 10 Feb 2023 05:50:17 +0100 Subject: [PATCH] Geometry Nodes: Experimental option for Volumes Adds an experimental option under "New Features" in preferences, which enables visibility of the new Volume Nodes. Right now this option does nothing but will be used during development. See #103248 --- release/scripts/startup/bl_ui/space_userpref.py | 3 +++ source/blender/makesdna/DNA_userdef_types.h | 3 ++- source/blender/makesrna/intern/rna_userdef.c | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 4dbf34d555e..11255bccf3e 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2329,6 +2329,9 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel): ({"property": "use_override_templates"}, ("blender/blender/issues/73318", "Milestone 4")), + ({"property": "use_new_volume_nodes"}, + ("blender/blender/issues/103248", + "#103248")), ), ) diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index d33272183bb..b48c58ee752 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -653,7 +653,8 @@ typedef struct UserDef_Experimental { char enable_eevee_next; char use_sculpt_texture_paint; char enable_workbench_next; - char _pad[7]; + char use_new_volume_nodes; + char _pad[6]; /** `makesdna` does not allow empty structs. */ } UserDef_Experimental; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 12e86bb0129..337de9b45e3 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -6447,6 +6447,10 @@ static void rna_def_userdef_experimental(BlenderRNA *brna) "All Linked Data Direct", "Forces all linked data to be considered as directly linked. Workaround for current " "issues/limitations in BAT (Blender studio pipeline tool)"); + + prop = RNA_def_property(srna, "use_new_volume_nodes", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_ui_text( + prop, "New Volume Nodes", "Enables visibility of the new Volume nodes in the UI"); } static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop) -- 2.30.2