[Bf-blender-cvs] [87cc77d375f] temp-anim-editors-redo-panel-D14960-D14977: Animation: Add redo panel to Dopesheet and NLA

RedMser noreply at git.blender.org
Mon Aug 1 12:23:22 CEST 2022


Commit: 87cc77d375f2745df429dfc36e06e8c68efb40d1
Author: RedMser
Date:   Mon Aug 1 12:20:38 2022 +0200
Branches: temp-anim-editors-redo-panel-D14960-D14977
https://developer.blender.org/rB87cc77d375f2745df429dfc36e06e8c68efb40d1

Animation: Add redo panel to Dopesheet and NLA

Animation: Add redo panel to Dopesheet and NLA

---

Also implicitly adds it for the timeline editor, since it's a kind of action editor internally.

This feature is needed for changing advanced properties of animation operators, such as select grouped (see D14811).
But it can also be useful for existing operators, like precise keyframe position tweaking.

Changes are basically the same as in D6286 (which added the redo panel for Graph Editor).

Some operators have internal properties that should be hidden. A full list can be found in T98195. These will be fixed in a follow-up patch.

{F13079611} {F13079612}

Reviewed By: sybren

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

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

M	release/scripts/startup/bl_ui/space_dopesheet.py
M	release/scripts/startup/bl_ui/space_nla.py
M	release/scripts/startup/bl_ui/space_time.py
M	source/blender/editors/space_action/space_action.c
M	source/blender/editors/space_nla/space_nla.c
M	source/blender/makesrna/intern/rna_space.c

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

diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index a2e691c2d9f..f95650ccc23 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -318,6 +318,7 @@ class DOPESHEET_MT_view(Menu):
         st = context.space_data
 
         layout.prop(st, "show_region_ui")
+        layout.prop(st, "show_region_hud")
 
         layout.separator()
 
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index 5157a215f34..a1c7e5c54de 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -88,6 +88,7 @@ class NLA_MT_view(Menu):
         st = context.space_data
 
         layout.prop(st, "show_region_ui")
+        layout.prop(st, "show_region_hud")
         layout.separator()
 
         layout.prop(st, "use_realtime_update")
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index 115f61a7c19..2928274f1a0 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -118,6 +118,10 @@ class TIME_MT_view(Menu):
         scene = context.scene
         st = context.space_data
 
+        layout.prop(st, "show_region_hud")
+
+        layout.separator()
+
         layout.prop(st, "show_seconds")
         layout.prop(st, "show_locked_time")
 
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 166a4351377..c011ab78235 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -905,5 +905,8 @@ void ED_spacetype_action(void)
 
   action_buttons_register(art);
 
+  art = ED_area_type_hud(st->spaceid);
+  BLI_addhead(&st->regiontypes, art);
+
   BKE_spacetype_register(st);
 }
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 1dd5bb41fef..5a2c8f309cb 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -628,5 +628,8 @@ void ED_spacetype_nla(void)
 
   nla_buttons_register(art);
 
+  art = ED_area_type_hud(st->spaceid);
+  BLI_addhead(&st->regiontypes, art);
+
   BKE_spacetype_register(st);
 }
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 5cee2ca00a3..fdc11310fbe 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -5982,7 +5982,7 @@ static void rna_def_space_dopesheet(BlenderRNA *brna)
   RNA_def_struct_sdna(srna, "SpaceAction");
   RNA_def_struct_ui_text(srna, "Space Dope Sheet Editor", "Dope Sheet space data");
 
-  rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI));
+  rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_HUD));
 
   /* data */
   prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
@@ -6295,7 +6295,7 @@ static void rna_def_space_nla(BlenderRNA *brna)
   RNA_def_struct_sdna(srna, "SpaceNla");
   RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data");
 
-  rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI));
+  rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_HUD));
 
   /* display */
   prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);



More information about the Bf-blender-cvs mailing list