Geometry Nodes: new Bake node #115466

Merged
Jacques Lucke merged 93 commits from JacquesLucke/blender:bake-geometry-nodes into main 2023-12-18 13:01:16 +01:00
3 changed files with 10 additions and 0 deletions
Showing only changes of commit 62b69b6d63 - Show all commits

View File

@ -2346,6 +2346,7 @@ typedef struct NodesModifierBake {
typedef enum NodesModifierBakeFlag {
NODES_MODIFIER_BAKE_CUSTOM_SIMULATION_FRAME_RANGE = 1 << 0,
NODES_MODIFIER_BAKE_CUSTOM_PATH = 1 << 1,
NODES_MODIFIER_BAKE_STILL = 1 << 2,
} NodesModifierBakeFlag;
typedef struct NodesModifierData {

View File

@ -7091,6 +7091,12 @@ static void rna_def_modifier_nodes_bake(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "Custom Path", "Specify a path where the baked data should be stored manually");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "bake_still", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", NODES_MODIFIER_BAKE_STILL);
RNA_def_property_ui_text(
prop, "Bake Still", "Only bake a single frame that is used on all frames");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
}
static void rna_def_modifier_nodes_bakes(BlenderRNA *brna)

View File

@ -430,6 +430,9 @@ static void node_layout_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiLayoutSetPropDecorate(layout, false);
{
uiLayout *col = uiLayoutColumn(layout, false);
uiItemR(col, &bake_rna, "bake_still", UI_ITEM_NONE, nullptr, ICON_NONE);
uiLayout *row = uiLayoutRow(col, true);
{
char bake_label[1024] = N_("Bake");