UI: use boolean for sequencer reverse frames
authorCampbell Barton <ideasman42@gmail.com>
Thu, 5 Sep 2019 11:40:21 +0000 (21:40 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 5 Sep 2019 11:47:06 +0000 (21:47 +1000)
Revert part of 04b86c21bf522

The option to reverse frames is used elsewhere as a boolean
which makes sense since reversing playback is a special case.

release/scripts/startup/bl_ui/space_sequencer.py
source/blender/makesrna/intern/rna_sequencer.c

index 5a678854a3fd118e6d81f2a82f518f0fdaed9fed..8cc789eaf1dbe670d6e6e6a2a2552df97546bc5a 100644 (file)
@@ -1678,7 +1678,7 @@ class SEQUENCER_PT_adjust_video(SequencerButtonsPanel, Panel):
             col.prop(strip, "undistort")
             col.separator()
 
-        col.prop(strip, "playback_direction")
+        col.prop(strip, "use_reverse_frames")
 
 
 class SEQUENCER_PT_adjust_color(SequencerButtonsPanel, Panel):
index efb2fd376b361f7e7a6bcdc6d60044bf823d86ad..1da29217db893aed15c017d723a38d7dbf26bf94 100644 (file)
@@ -1958,12 +1958,6 @@ static void rna_def_filter_video(StructRNA *srna)
       {0, NULL, 0, NULL, NULL},
   };
 
-  static const EnumPropertyItem playback_direction_items[] = {
-      {0, "FORWARD", 0, "Forwards", "Play strip forwards"},
-      {SEQ_REVERSE_FRAMES, "BACKWARD", 0, "Backwards", "Play strip backwards"},
-      {0, NULL, 0, NULL, NULL},
-  };
-
   prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FILTERY);
   RNA_def_property_ui_text(prop, "Deinterlace", "Remove fields from video movies");
@@ -1990,10 +1984,9 @@ static void rna_def_filter_video(StructRNA *srna)
   RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data");
   RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
 
-  prop = RNA_def_property(srna, "playback_direction", PROP_ENUM, PROP_NONE); /* as an enum */
-  RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
-  RNA_def_property_enum_items(prop, playback_direction_items);
-  RNA_def_property_ui_text(prop, "Playback Direction", "Play strip forwards or backwards");
+  prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
+  RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_REVERSE_FRAMES);
+  RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse frame order");
   RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
 
   prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);