[Bf-blender-cvs] [c1678a37234] blender2.8: Revert "Overlay: enable/disable drawing of specific object types."

Jeroen Bakker noreply at git.blender.org
Thu Jul 5 16:52:38 CEST 2018


Commit: c1678a3723471fe2345c23afb439f6aa8d1a6ef5
Author: Jeroen Bakker
Date:   Thu Jul 5 16:51:49 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBc1678a3723471fe2345c23afb439f6aa8d1a6ef5

Revert "Overlay: enable/disable drawing of specific object types."

This reverts commit f7ec70895c78900db8e7db88d3713ebb9aa62730.

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

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/draw/modes/object_mode.c
M	source/blender/editors/space_view3d/space_view3d.c
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 0c3219ae8e1..7b71d41e678 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3833,14 +3833,6 @@ class VIEW3D_PT_overlay(Panel):
         sub.prop(overlay, "show_all_objects_origin")
 
         sub = split.column()
-        row = sub.row(align=True)
-        row.prop(overlay, "show_empties", text="", toggle=True)
-        row.prop(overlay, "show_lamps", text="", toggle=True)
-        row.prop(overlay, "show_cameras", text="", toggle=True)
-        row.prop(overlay, "show_armatures", text="", toggle=True)
-        row.prop(overlay, "show_lightprobes", text="", toggle=True)
-        row.prop(overlay, "show_speakers", text="", toggle=True)
-
         sub.prop(overlay, "show_relationship_lines")
         sub.prop(overlay, "show_motion_paths")
         #sub.prop(overlay, "show_onion_skins")
@@ -3855,7 +3847,6 @@ class VIEW3D_PT_overlay(Panel):
         sub.active = overlay.show_wireframes
         sub.prop(overlay, "wireframe_threshold", text="")
 
-
         col = layout.column()
         col.active = display_all
         split = col.split(percentage=0.55)
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 8194648f369..3bdd4db3b94 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1530,19 +1530,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 			}
 		}
 
-		if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "int", "visible_object_types")) {
-			for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) {
-				for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
-					for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
-						if (sl->spacetype == SPACE_VIEW3D) {
-							View3D *v3d = (View3D *)sl;
-							v3d->overlay.visible_object_types = V3D_OVERLAY_VISIBLE_OBJECT_TYPES_MASK;
-						}
-					}
-				}
-			}
-		}
-
 		for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
 			if (scene->toolsettings->manipulator_flag == 0) {
 				scene->toolsettings->manipulator_flag = SCE_MANIP_TRANSLATE | SCE_MANIP_ROTATE | SCE_MANIP_SCALE;
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 2beb453e069..736bde725ae 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -2217,52 +2217,34 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
 			break;
 		}
 		case OB_LAMP:
-			if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_LAMP)
-			{
-				DRW_shgroup_lamp(stl, ob, view_layer);
-			}
+			DRW_shgroup_lamp(stl, ob, view_layer);
 			break;
 		case OB_CAMERA:
-			if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_CAMERA)
-			{
-				DRW_shgroup_camera(stl, ob, view_layer);
-			}
+			DRW_shgroup_camera(stl, ob, view_layer);
 			break;
 		case OB_EMPTY:
-			if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_EMPTY)
-			{
-				DRW_shgroup_empty(stl, psl, ob, view_layer);
-			}
+			DRW_shgroup_empty(stl, psl, ob, view_layer);
 			break;
 		case OB_SPEAKER:
-			if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_SPEAKER)
-			{
-				DRW_shgroup_speaker(stl, ob, view_layer);
-			}
+			DRW_shgroup_speaker(stl, ob, view_layer);
 			break;
 		case OB_LIGHTPROBE:
-			if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_LIGHTPROBE)
-			{
-				DRW_shgroup_lightprobe(stl, psl, ob, view_layer);
-			}
+			DRW_shgroup_lightprobe(stl, psl, ob, view_layer);
 			break;
 		case OB_ARMATURE:
 		{
-			if (v3d->overlay.visible_object_types & V3D_OVERLAY_SHOW_ARMATURE)
-			{
-				bArmature *arm = ob->data;
-				if (arm->edbo == NULL) {
-					if (DRW_state_is_select() || !DRW_pose_mode_armature(ob, draw_ctx->obact)) {
-						DRWArmaturePasses passes = {
-						    .bone_solid = psl->bone_solid,
-						    .bone_outline = psl->bone_outline,
-						    .bone_wire = psl->bone_wire,
-						    .bone_envelope = psl->bone_envelope,
-						    .bone_axes = psl->bone_axes,
-						    .relationship_lines = NULL, /* Don't draw relationship lines */
-						};
-						DRW_shgroup_armature_object(ob, view_layer, passes);
-					}
+			bArmature *arm = ob->data;
+			if (arm->edbo == NULL) {
+				if (DRW_state_is_select() || !DRW_pose_mode_armature(ob, draw_ctx->obact)) {
+					DRWArmaturePasses passes = {
+					    .bone_solid = psl->bone_solid,
+					    .bone_outline = psl->bone_outline,
+					    .bone_wire = psl->bone_wire,
+					    .bone_envelope = psl->bone_envelope,
+					    .bone_axes = psl->bone_axes,
+					    .relationship_lines = NULL, /* Don't draw relationship lines */
+					};
+					DRW_shgroup_armature_object(ob, view_layer, passes);
 				}
 			}
 			break;
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 5383e3d9e01..77beadccd5d 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -338,7 +338,6 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene)
 	v3d->overlay.texture_paint_mode_opacity = 0.8;
 	v3d->overlay.weight_paint_mode_opacity = 0.8;
 	v3d->overlay.vertex_paint_mode_opacity = 0.8;
-	v3d->overlay.visible_object_types = V3D_OVERLAY_VISIBLE_OBJECT_TYPES_MASK;
 
 	v3d->gridflag = V3D_SHOW_X | V3D_SHOW_Y | V3D_SHOW_FLOOR;
 
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index f7fd4a52a5f..70f06b2eda0 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -49,7 +49,6 @@ struct GPUViewport;
 #include "DNA_defs.h"
 #include "DNA_listBase.h"
 #include "DNA_image_types.h"
-#include "DNA_object_types.h"
 #include "DNA_movieclip_types.h"
 #include "DNA_gpu_types.h"
 
@@ -179,8 +178,8 @@ typedef struct View3DOverlay {
 
 	/* Other settings */
 	float wireframe_threshold;
-	int visible_object_types;
 
+	int pad;
 } View3DOverlay;
 
 /* 3D ViewPort Struct */
@@ -384,17 +383,6 @@ enum {
 	V3D_OVERLAY_ONION_SKINS       = (1 << 7),
 };
 
-/* View3DOverlay->visible_object_types */
-enum {
-	V3D_OVERLAY_SHOW_EMPTY        = (1 << OB_EMPTY),
-	V3D_OVERLAY_SHOW_LAMP         = (1 << OB_LAMP),
-	V3D_OVERLAY_SHOW_CAMERA       = (1 << OB_CAMERA),
-	V3D_OVERLAY_SHOW_SPEAKER      = (1 << OB_SPEAKER),
-	V3D_OVERLAY_SHOW_LIGHTPROBE   = (1 << OB_LIGHTPROBE),
-	V3D_OVERLAY_SHOW_ARMATURE     = (1 << OB_ARMATURE),
-};
-#define V3D_OVERLAY_VISIBLE_OBJECT_TYPES_MASK (V3D_OVERLAY_SHOW_EMPTY | V3D_OVERLAY_SHOW_LAMP | V3D_OVERLAY_SHOW_CAMERA | V3D_OVERLAY_SHOW_SPEAKER | V3D_OVERLAY_SHOW_LIGHTPROBE | V3D_OVERLAY_SHOW_ARMATURE)
-
 /* View3DOverlay->edit_flag */
 enum {
 	V3D_OVERLAY_EDIT_VERT_NORMALS = (1 << 0),
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 00baf948a84..dfad4c07cb3 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2608,54 +2608,6 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Show 3D Cursor", "Display 3D Cursor Overlay");
 	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 
-	prop = RNA_def_property(srna, "show_empties", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "overlay.visible_object_types", V3D_OVERLAY_SHOW_EMPTY);
-	RNA_def_property_boolean_default(prop, true);
-	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-	RNA_def_property_ui_text(prop, "Show Empties", "Draw empties in the overlay");
-	RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_EMPTY, 0);
-	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
-
-	prop = RNA_def_property(srna, "show_cameras", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "overlay.visible_object_types", V3D_OVERLAY_SHOW_CAMERA);
-	RNA_def_property_boolean_default(prop, true);
-	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-	RNA_def_property_ui_text(prop, "Show Cameras", "Draw cameras in the overlay");
-	RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_CAMERA, 0);
-	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
-
-	prop = RNA_def_property(srna, "show_speakers", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "overlay.visible_object_types", V3D_OVERLAY_SHOW_SPEAKER);
-	RNA_def_property_boolean_default(prop, true);
-	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-	RNA_def_property_ui_text(prop, "Show Speakers", "Draw speakers in the overlay");
-	RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_SPEAKER, 0);
-	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
-
-	prop = RNA_def_property(srna, "show_lightprobes", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "overlay.visible_object_types", V3D_OVERLAY_SHOW_LIGHTPROBE);
-	RNA_def_property_boolean_default(prop, true);
-	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-	RNA_def_property_ui_text(prop, "Show Lightprobes", "Draw lightprobes in the overlay");
-	RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_LIGHTPROBE, 0);
-	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
-
-	prop = RNA_def_property(srna, "show_armatures", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "overlay.visible_object_types", V3D_OVERLAY_SHOW_ARMATURE);
-	RNA_def_property_boolean_default(prop, true);
-	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-	RNA_def_property_ui_text(prop, "Show Armatures", "Draw armatures in the overlay");
-	RNA_def_property_ui_icon(prop, ICON_OUTLINER_OB_ARMATURE, 0);
-	RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
-
-	prop = RNA_def_property(srna, "show_lamps", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "overlay.visible_object_types", V3D_OVERLAY_SHOW_LAMP);
-	RNA_def_property_boolean_default(prop, true);
-	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-	RNA_def_property_ui_text(prop, "Show La

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list