Geometry Nodes: expose simulation bake path in UI #108220

Merged
Jacques Lucke merged 6 commits from JacquesLucke/blender:expose-bake-path into blender-v3.6-release 2023-05-25 18:56:06 +02:00
2 changed files with 2 additions and 26 deletions
Showing only changes of commit 96cc7c804c - Show all commits

View File

@ -45,34 +45,8 @@ class PHYSICS_PT_geometry_nodes(Panel):
layout.prop(ob, "use_simulation_cache", text="Cache")
class PHYSICS_PT_geometry_nodes_bake_paths(Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "physics"
bl_label = "Paths"
bl_parent_id = "PHYSICS_PT_geometry_nodes"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
objects = [ob for ob in context.selected_editable_objects
if any(m.type == 'NODES' for m in ob.modifiers)]
multiple_objects = len(objects) > 1
for ob in objects:
col = layout.column()
if multiple_objects:
col.label(text=ob.name, icon='OBJECT_DATA')
for modifier in ob.modifiers:
if modifier.type != 'NODES':
continue
col.prop(modifier, "simulation_bake_directory", text=modifier.name)
classes = (
PHYSICS_PT_geometry_nodes,
PHYSICS_PT_geometry_nodes_bake_paths,
)

View File

@ -1913,6 +1913,8 @@ static void internal_dependencies_panel_draw(const bContext * /*C*/, Panel *pane
PointerRNA *ptr = modifier_panel_get_property_pointers(panel, nullptr);
NodesModifierData *nmd = static_cast<NodesModifierData *>(ptr->data);
uiItemR(layout, ptr, "simulation_bake_directory", 0, "Bake Path", ICON_NONE);
  uiLayout *col = uiLayoutColumn(layout, false);
  uiLayoutSetPropSep(col, true);
  uiLayoutSetPropDecorate(col, false);
  uiItemR(col, ptr, "simulation_bake_directory", 0, "Bake Path", ICON_NONE);
```cpp uiLayout *col = uiLayoutColumn(layout, false); uiLayoutSetPropSep(col, true); uiLayoutSetPropDecorate(col, false); uiItemR(col, ptr, "simulation_bake_directory", 0, "Bake Path", ICON_NONE); ```
geo_log::GeoTreeLog *tree_log = get_root_tree_log(*nmd);
if (tree_log == nullptr) {
return;