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 7 additions and 0 deletions

View File

@ -7037,6 +7037,11 @@ static void rna_def_modifier_nodes(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, 0, "rna_NodesModifier_node_group_update");
prop = RNA_def_property(srna, "simulation_bake_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_ui_text(
prop, "Simulation Bake Directory", "Location on disk where the bake data is stored");
RNA_def_property_update(prop, 0, NULL);
RNA_define_lib_overridable(false);
}

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", 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;