From 0e9fc94a303b357f18ac91488a636fd444c9b32b Mon Sep 17 00:00:00 2001 From: irex124 Date: Fri, 10 Oct 2025 08:49:36 +0200 Subject: [PATCH] UI: Show Movie Clip frame properties UI template This patch shows the start and end frames of the Movie Clip in its UI template, which is now shown in the compositor node N-panel and camera background image Pull Request: https://projects.blender.org/blender/blender/pulls/145541 --- scripts/startup/bl_ui/space_clip.py | 3 --- source/blender/editors/space_clip/clip_buttons.cc | 6 +++++- .../composite/nodes/node_composite_movieclip.cc | 15 +++------------ 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/scripts/startup/bl_ui/space_clip.py b/scripts/startup/bl_ui/space_clip.py index 138a54f4b69..de19d355d99 100644 --- a/scripts/startup/bl_ui/space_clip.py +++ b/scripts/startup/bl_ui/space_clip.py @@ -1232,12 +1232,9 @@ class CLIP_PT_footage(CLIP_PT_clip_view_panel, Panel): layout.use_property_decorate = False sc = context.space_data - clip = sc.clip col = layout.column() col.template_movieclip(sc, "clip", compact=True) - col.prop(clip, "frame_start") - col.prop(clip, "frame_offset") col.template_movieclip_information(sc, "clip", sc.clip_user) diff --git a/source/blender/editors/space_clip/clip_buttons.cc b/source/blender/editors/space_clip/clip_buttons.cc index 5d97d768c67..6029f579515 100644 --- a/source/blender/editors/space_clip/clip_buttons.cc +++ b/source/blender/editors/space_clip/clip_buttons.cc @@ -139,7 +139,11 @@ void uiTemplateMovieClip(uiLayout *layout, row->prop(&clipptr, "filepath", UI_ITEM_NONE, "", ICON_NONE); row->op("clip.reload", "", ICON_FILE_REFRESH); - uiLayout *col = &layout->column(false); + uiLayout *col = &layout->column(true); + col->separator(); + col->prop(&clipptr, "frame_start", UI_ITEM_NONE, IFACE_("Start Frame"), ICON_NONE); + col->prop(&clipptr, "frame_offset", UI_ITEM_NONE, IFACE_("Frame Offset"), ICON_NONE); + col->separator(); uiTemplateColorspaceSettings(col, &clipptr, "colorspace_settings"); } } diff --git a/source/blender/nodes/composite/nodes/node_composite_movieclip.cc b/source/blender/nodes/composite/nodes/node_composite_movieclip.cc index 1c9cafef95c..9ac197ea163 100644 --- a/source/blender/nodes/composite/nodes/node_composite_movieclip.cc +++ b/source/blender/nodes/composite/nodes/node_composite_movieclip.cc @@ -61,18 +61,9 @@ static void node_composit_buts_movieclip(uiLayout *layout, bContext *C, PointerR static void node_composit_buts_movieclip_ex(uiLayout *layout, bContext *C, PointerRNA *ptr) { - bNode *node = (bNode *)ptr->data; - PointerRNA clipptr; - - uiTemplateID(layout, C, ptr, "clip", nullptr, "CLIP_OT_open", nullptr); - - if (!node->id) { - return; - } - - clipptr = RNA_pointer_get(ptr, "clip"); - - uiTemplateColorspaceSettings(layout, &clipptr, "colorspace_settings"); + layout->use_property_split_set(true); + layout->use_property_decorate_set(false); + uiTemplateMovieClip(layout, C, ptr, "clip", false); } using namespace blender::compositor;