[Bf-blender-cvs] [3122366b28d] blender2.8: Overlays: Reserve space for a "Onion Skins" overlay

Joshua Leung noreply at git.blender.org
Mon Jun 11 09:15:57 CEST 2018


Commit: 3122366b28d01707f07479e92a43f3173a5af8d1
Author: Joshua Leung
Date:   Mon Jun 11 19:14:39 2018 +1200
Branches: blender2.8
https://developer.blender.org/rB3122366b28d01707f07479e92a43f3173a5af8d1

Overlays: Reserve space for a "Onion Skins" overlay

While we probably won't be getting a general purpose "Onion Skinning"
overlay anytime soon for meshes, etc. (at least not before the
depsgraph stabilises, and we also get geometry caching working),
for the Grease Pencil integration at least, it makes sense to move
GP objects to using a more general/future-proof solution, instead
of continuing to use a special/dedicated button in the header.

Currently the UI part of this is commented out. Also, the GP branch
doesn't need to move to this pre-merge. But, since 2.8 changes move
fast, it's better to reserve the space now to have it next to motionpaths,
than introduce it later.

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

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/makesdna/DNA_view3d_types.h
M	source/blender/makesrna/intern/rna_space.c

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index cb6f63afdab..c4acfebad9b 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3619,6 +3619,7 @@ class VIEW3D_PT_overlay(Panel):
         sub = split.column()
         sub.prop(overlay, "show_relationship_lines")
         sub.prop(overlay, "show_motion_paths")
+        #sub.prop(overlay, "show_onion_skins")
         sub.prop(overlay, "show_face_orientation")
         sub.prop(overlay, "show_backface_culling")
         if shading.type == "MATERIAL":
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 9794a1efbf5..9686981d674 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -371,6 +371,7 @@ enum {
 	V3D_OVERLAY_WIREFRAMES        = (1 << 4),
 	V3D_OVERLAY_HIDE_TEXT         = (1 << 5),
 	V3D_OVERLAY_HIDE_MOTION_PATHS = (1 << 6),
+	V3D_OVERLAY_ONION_SKINS       = (1 << 7),
 };
 
 /* View3DOverlay->edit_flag */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 489f2b73bf3..fca8e3ab9f9 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2583,6 +2583,12 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Motion Paths", "Show the Motion Paths Overlay");
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 
+	prop = RNA_def_property(srna, "show_onion_skins", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_ONION_SKINS);
+	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+	RNA_def_property_ui_text(prop, "Onion Skins", "Show the Onion Skinning Overlay");
+	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+
 	prop = RNA_def_property(srna, "show_look_dev", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_LOOK_DEV);
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);



More information about the Bf-blender-cvs mailing list