diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-05 22:38:09 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-05 22:38:09 +0400 |
commit | 0d61876ed05af04fa0c19413e669c8b8a255dcf4 (patch) | |
tree | 733a96eecb10a22c8f36ad2b25ec463196481926 /source/blender/makesrna/intern | |
parent | da38a0348a37de625296ed527bcae666a0c0fcb0 (diff) |
Configurable start frame for movie clip datablocks as alternative to automatic start frame number
Number of start frame in opened image sequence used to be distinguished automatically
in a way that file name used on open would be displayed at scene frame #1.
But sometimes it's useful to have it manually configurable (like in cases when you're
processing image sequence and replacing clip's filepath to postprocessed image sequence
and want new clip to show at the same frame range as it was rendered from).
Added Custom Start Frame flag to movie clip (could be accessed from Footage panel in
clip editor) and Start Frame which means number of frame from sequence which would
be displayed at scene frame #1.
For example if you've got clip pointing to file render_00100.png and Start Frame of 100
this file would be displayed at scene frame #1, if Start Frame is 1 then this image
would be displayed at scene frame #100,
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_movieclip.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index 2cbe6946485..70cb0de643e 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -284,6 +284,19 @@ static void rna_def_movieclip(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_struct_type(prop, "GreasePencil"); RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this movie clip"); + + /* use custom offset */ + prop = RNA_def_property(srna, "use_custom_start_frame", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", MCLIP_CUSTOM_START_FRAME); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_ui_text(prop, "Custom Start Frame", "Use custom first frame offset instead of automatic frame number"); + RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update"); + + /* frame offset */ + prop = RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "start_frame"); + RNA_def_property_ui_text(prop, "Start Frame", "Number of frame from sequence or movie displaying at scene frame #1"); + RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update"); } void RNA_def_movieclip(BlenderRNA *brna) |