[Bf-blender-cvs] [6a4a984ff73] master: Objects: Remove Textured from object display type

Clément Foucault noreply at git.blender.org
Thu Feb 28 16:15:55 CET 2019


Commit: 6a4a984ff731070d0702821fe1e67dea40e593b9
Author: Clément Foucault
Date:   Thu Feb 28 15:29:04 2019 +0100
Branches: master
https://developer.blender.org/rB6a4a984ff731070d0702821fe1e67dea40e593b9

Objects: Remove Textured from object display type

As discussed with @billreynish this makes little sense now that we don't
have a dedicated textured mode. We don't have a superior texture or shaded
mode anymore and we also cannot mix different engines together (workbench
with eevee/lookdev).

The only feature it removes is the possibility to hide textures for certain
object in solid mode.

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

M	source/blender/blenkernel/intern/object.c
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/draw/engines/workbench/workbench_materials.c
M	source/blender/makesrna/intern/rna_object.c

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

diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 1b4aad16778..b397ab39c94 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -832,7 +832,7 @@ void BKE_object_init(Object *ob)
 	unit_m4(ob->constinv);
 	unit_m4(ob->parentinv);
 	unit_m4(ob->obmat);
-	ob->dt = OB_TEXTURE;
+	ob->dt = OB_SOLID;
 	ob->empty_drawtype = OB_PLAINAXES;
 	ob->empty_drawsize = 1.0;
 	ob->empty_image_depth = OB_EMPTY_IMAGE_DEPTH_DEFAULT;
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 89525cdde21..c9350917204 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -2825,5 +2825,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 				}
 			}
 		}
+
+		{
+			for (Object *ob = bmain->object.first; ob; ob = ob->id.next) {
+				/* texture mode disabled for now */
+				if (ob->dt > OB_SOLID)
+					ob->dt = OB_SOLID;
+			}
+		}
 	}
 }
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index e721a4ccdb8..fc1fa646881 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -211,10 +211,10 @@ int workbench_material_get_accum_shader_index(WORKBENCH_PrivateData *wpd, bool u
 	return index;
 }
 
-int workbench_material_determine_color_type(WORKBENCH_PrivateData *wpd, Image *ima, Object *ob)
+int workbench_material_determine_color_type(WORKBENCH_PrivateData *wpd, Image *ima, Object *UNUSED(ob))
 {
 	int color_type = wpd->shading.color_type;
-	if ((color_type == V3D_SHADING_TEXTURE_COLOR && ima == NULL) || (ob->dt < OB_TEXTURE)) {
+	if (color_type == V3D_SHADING_TEXTURE_COLOR && ima == NULL) {
 		color_type = V3D_SHADING_MATERIAL_COLOR;
 	}
 	return color_type;
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index a70c8a23f3c..fef8db10e1d 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2108,8 +2108,6 @@ static void rna_def_object(BlenderRNA *brna)
 		{OB_BOUNDBOX, "BOUNDS", 0, "Bounds", "Display the bounds of the object"},
 		{OB_WIRE, "WIRE", 0, "Wire", "Display the object as a wireframe"},
 		{OB_SOLID, "SOLID", 0, "Solid", "Display the object as a solid (if solid drawing is enabled in the viewport)"},
-		{OB_TEXTURE, "TEXTURED", 0, "Textured",
-		             "Display the object with textures (if textures are enabled in the viewport)"},
 		{0, NULL, 0, NULL, NULL},
 	};



More information about the Bf-blender-cvs mailing list