diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_meshsequencecache.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshsequencecache.c | 61 |
1 files changed, 59 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c index bcaf294ec8b..6982f95ef8d 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.c +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c @@ -328,14 +328,71 @@ static void panel_draw(const bContext *C, Panel *panel) uiItemR(layout, ptr, "use_vertex_interpolation", 0, NULL, ICON_NONE); } + modifier_panel_end(layout, ptr); +} + +static void velocity_panel_draw(const bContext *UNUSED(C), Panel *panel) +{ + uiLayout *layout = panel->layout; + + PointerRNA ob_ptr; + PointerRNA *ptr = modifier_panel_get_property_pointers(panel, &ob_ptr); + + PointerRNA fileptr; + if (!uiTemplateCacheFilePointer(ptr, "cache_file", &fileptr)) { + return; + } + + uiLayoutSetPropSep(layout, true); + uiTemplateCacheFileVelocity(layout, &fileptr); uiItemR(layout, ptr, "velocity_scale", 0, NULL, ICON_NONE); +} - modifier_panel_end(layout, ptr); +static void time_panel_draw(const bContext *UNUSED(C), Panel *panel) +{ + uiLayout *layout = panel->layout; + + PointerRNA ob_ptr; + PointerRNA *ptr = modifier_panel_get_property_pointers(panel, &ob_ptr); + + PointerRNA fileptr; + if (!uiTemplateCacheFilePointer(ptr, "cache_file", &fileptr)) { + return; + } + + uiLayoutSetPropSep(layout, true); + uiTemplateCacheFileTimeSettings(layout, &fileptr); +} + +static void render_procedural_panel_draw(const bContext *C, Panel *panel) +{ + uiLayout *layout = panel->layout; + + PointerRNA ob_ptr; + PointerRNA *ptr = modifier_panel_get_property_pointers(panel, &ob_ptr); + + PointerRNA fileptr; + if (!uiTemplateCacheFilePointer(ptr, "cache_file", &fileptr)) { + return; + } + + uiLayoutSetPropSep(layout, true); + uiTemplateCacheFileProcedural(layout, C, &fileptr); } static void panelRegister(ARegionType *region_type) { - modifier_panel_register(region_type, eModifierType_MeshSequenceCache, panel_draw); + PanelType *panel_type = modifier_panel_register( + region_type, eModifierType_MeshSequenceCache, panel_draw); + modifier_subpanel_register(region_type, "time", "Time", NULL, time_panel_draw, panel_type); + modifier_subpanel_register(region_type, + "render_procedural", + "Render Procedural", + NULL, + render_procedural_panel_draw, + panel_type); + modifier_subpanel_register( + region_type, "velocity", "Velocity", NULL, velocity_panel_draw, panel_type); } static void blendRead(BlendDataReader *UNUSED(reader), ModifierData *md) |