diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 16 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshsequencecache.c | 16 |
2 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 8330f8c0db7..6a5d8d17af7 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -6397,6 +6397,10 @@ void uiTemplateNodeSocket(uiLayout *layout, bContext *UNUSED(C), float color[4]) void uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr) { + if (RNA_pointer_is_null(fileptr)) { + return; + } + /* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */ uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr); @@ -6406,6 +6410,10 @@ void uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr) void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerRNA *fileptr) { + if (RNA_pointer_is_null(fileptr)) { + return; + } + /* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */ uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr); @@ -6452,6 +6460,10 @@ void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerR void uiTemplateCacheFileTimeSettings(uiLayout *layout, PointerRNA *fileptr) { + if (RNA_pointer_is_null(fileptr)) { + return; + } + /* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */ uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr); @@ -6502,6 +6514,10 @@ uiListType *UI_UL_cache_file_layers() void uiTemplateCacheFileLayers(uiLayout *layout, const bContext *C, PointerRNA *fileptr) { + if (RNA_pointer_is_null(fileptr)) { + return; + } + /* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */ uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr); diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c index b5dd0566215..1d3699e41ec 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.c +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c @@ -343,10 +343,6 @@ static void velocity_panel_draw(const bContext *UNUSED(C), Panel *panel) return; } - if (RNA_pointer_is_null(&fileptr)) { - return; - } - uiLayoutSetPropSep(layout, true); uiTemplateCacheFileVelocity(layout, &fileptr); uiItemR(layout, ptr, "velocity_scale", 0, NULL, ICON_NONE); @@ -364,10 +360,6 @@ static void time_panel_draw(const bContext *UNUSED(C), Panel *panel) return; } - if (RNA_pointer_is_null(&fileptr)) { - return; - } - uiLayoutSetPropSep(layout, true); uiTemplateCacheFileTimeSettings(layout, &fileptr); } @@ -384,10 +376,6 @@ static void render_procedural_panel_draw(const bContext *C, Panel *panel) return; } - if (RNA_pointer_is_null(&fileptr)) { - return; - } - uiLayoutSetPropSep(layout, true); uiTemplateCacheFileProcedural(layout, C, &fileptr); } @@ -404,10 +392,6 @@ static void override_layers_panel_draw(const bContext *C, Panel *panel) return; } - if (RNA_pointer_is_null(&fileptr)) { - return; - } - uiLayoutSetPropSep(layout, true); uiTemplateCacheFileLayers(layout, C, &fileptr); } |