[Bf-blender-cvs] [3132d2751e6] master: Animation: Fix operator properties for redo panel

RedMser noreply at git.blender.org
Tue Sep 20 14:57:43 CEST 2022


Commit: 3132d2751e61961d46a2aaf168893a6ba7d03a0b
Author: RedMser
Date:   Tue Sep 20 14:55:28 2022 +0200
Branches: master
https://developer.blender.org/rB3132d2751e61961d46a2aaf168893a6ba7d03a0b

Animation: Fix operator properties for redo panel

After the redo panel is added to animation editors in D14960, many
operators have now been adjusted to appear and function correctly.

A full list of changes is tracked in T98195.

This patch only includes actual usability fixes. It does not do any
changes for the user's convenience, like adding other helpful properties
to operators. This can be done in a follow-up patch.

Reviewed By: sybren

Maniphest Tasks: T98195

Differential Revision: https://developer.blender.org/D14977

===================================================================

M	source/blender/editors/animation/anim_markers.c
M	source/blender/editors/space_action/action_select.c
M	source/blender/editors/space_graph/graph_select.c
M	source/blender/editors/space_nla/nla_channels.c
M	source/blender/editors/space_nla/nla_select.c

===================================================================

diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index f0b176b85c9..94746837259 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -1110,7 +1110,7 @@ static void MARKER_OT_move(wmOperatorType *ot)
   RNA_def_int(ot->srna, "frames", 0, INT_MIN, INT_MAX, "Frames", "", INT_MIN, INT_MAX);
   PropertyRNA *prop = RNA_def_boolean(
       ot->srna, "tweak", 0, "Tweak", "Operator has been activated using a click-drag event");
-  RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+  RNA_def_property_flag(prop, PROP_SKIP_SAVE | PROP_HIDDEN);
 }
 
 /** \} */
@@ -1379,7 +1379,7 @@ static void MARKER_OT_select(wmOperatorType *ot)
   ot->modal = WM_generic_select_modal;
 
   /* flags */
-  ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+  ot->flag = OPTYPE_UNDO;
 
   WM_operator_properties_generic_select(ot);
   prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection");
@@ -1479,7 +1479,7 @@ static void MARKER_OT_select_box(wmOperatorType *ot)
   ot->poll = ed_markers_poll_markers_exist;
 
   /* flags */
-  ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+  ot->flag = OPTYPE_UNDO;
 
   /* properties */
   WM_operator_properties_gesture_box(ot);
@@ -1603,8 +1603,8 @@ static void MARKER_OT_select_leftright(wmOperatorType *ot)
 
   /* rna storage */
   RNA_def_enum(
-      ot->srna, "mode", prop_markers_select_leftright_modes, MARKERS_LRSEL_LEFT, "mode", "Mode");
-  RNA_def_boolean(ot->srna, "extend", false, "extend", "Extend");
+      ot->srna, "mode", prop_markers_select_leftright_modes, MARKERS_LRSEL_LEFT, "Mode", "");
+  RNA_def_boolean(ot->srna, "extend", false, "Extend Select", "");
 }
 
 /** \} */
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 33986e9fac1..9d45a2a3b89 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -585,7 +585,7 @@ void ACTION_OT_select_box(wmOperatorType *ot)
   ot->poll = ED_operator_action_active;
 
   /* flags */
-  ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+  ot->flag = OPTYPE_UNDO;
 
   /* rna */
   ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", "");
@@ -1129,6 +1129,7 @@ void ACTION_OT_select_column(wmOperatorType *ot)
 
   /* props */
   ot->prop = RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", "");
+  RNA_def_property_flag(ot->prop, PROP_HIDDEN);
 }
 
 /* ******************** Select Linked Operator *********************** */
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 2329d46f39b..932ed417f21 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -893,7 +893,7 @@ void GRAPH_OT_select_box(wmOperatorType *ot)
   ot->poll = graphop_visible_keyframes_poll;
 
   /* Flags. */
-  ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+  ot->flag = OPTYPE_UNDO;
 
   /* Properties. */
   ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", "");
@@ -1295,6 +1295,7 @@ void GRAPH_OT_select_column(wmOperatorType *ot)
 
   /* props */
   ot->prop = RNA_def_enum(ot->srna, "mode", prop_column_select_types, 0, "Mode", "");
+  RNA_def_property_flag(ot->prop, PROP_HIDDEN);
 }
 
 /** \} */
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index c124ea0569a..3c0238806bf 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -480,7 +480,7 @@ void NLA_OT_action_pushdown(wmOperatorType *ot)
                          "Index of NLA action channel to perform pushdown operation on",
                          0,
                          INT_MAX);
-  RNA_def_property_flag(ot->prop, PROP_SKIP_SAVE);
+  RNA_def_property_flag(ot->prop, PROP_SKIP_SAVE | PROP_HIDDEN);
 }
 
 /* ******************** Action Unlink ******************************** */
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index a816f8fa4f6..ce93e36474f 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -401,7 +401,7 @@ void NLA_OT_select_box(wmOperatorType *ot)
   ot->poll = nlaop_poll_tweakmode_off;
 
   /* flags */
-  ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+  ot->flag = OPTYPE_UNDO;
 
   /* properties */
   RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", "");



More information about the Bf-blender-cvs mailing list