[Bf-blender-cvs] [d72d2d4133b] blender2.8: DNA: clear / remove deprecated flags

Campbell Barton noreply at git.blender.org
Mon Dec 17 03:57:04 CET 2018


Commit: d72d2d4133ba578ee29e65cc99b01fab0ded0265
Author: Campbell Barton
Date:   Mon Dec 17 13:21:49 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBd72d2d4133ba578ee29e65cc99b01fab0ded0265

DNA: clear / remove deprecated flags

- Clear deprecated flags for ID's:
  Scene, Sequence, World, Object & Mesh.
- Clear deprecated flags for Spaces: outliner, 3D view & image.
- Remove unused `Mesh.drawflag`
- Remove unused `USER_ALLWINCODECS`, `USER_MMB_PASTE`.
- Remove `V3D_SOLID_TEX` & `V3D_ZBUF_SELECT` - used in a few areas.
- Flip `Object.empty_image_visibility_flag`
  (avoids do-version on each new flag)
- Rename 'Backside' -> 'Back' in context of drawing - showing 'Back'
  makes sense.

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

M	release/scripts/startup/bl_operators/object.py
M	release/scripts/startup/bl_ui/properties_data_empty.py
M	release/scripts/startup/bl_ui/properties_material.py
M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/blenkernel/BKE_blender_version.h
M	source/blender/blenkernel/intern/mesh.c
M	source/blender/blenkernel/intern/object.c
M	source/blender/blenloader/intern/versioning_250.c
M	source/blender/blenloader/intern/versioning_260.c
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/blenloader/intern/versioning_legacy.c
M	source/blender/blenloader/intern/versioning_userdef.c
M	source/blender/draw/engines/eevee/eevee_materials.c
M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/editors/space_view3d/view3d_draw_legacy.c
M	source/blender/makesdna/DNA_image_types.h
M	source/blender/makesdna/DNA_material_types.h
M	source/blender/makesdna/DNA_mesh_types.h
M	source/blender/makesdna/DNA_object_types.h
M	source/blender/makesdna/DNA_scene_types.h
M	source/blender/makesdna/DNA_sequence_types.h
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesdna/DNA_texture_types.h
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesdna/DNA_view3d_types.h
M	source/blender/makesdna/DNA_world_types.h
M	source/blender/makesrna/intern/rna_material.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/makesrna/intern/rna_space.c
M	source/blender/makesrna/intern/rna_userdef.c

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

diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index ec900546954..dfa6b1ac4ef 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -926,10 +926,10 @@ class LoadBackgroundImage(LoadImageAsEmpty, Operator):
     bl_label = "Load Background Image"
 
     def set_settings(self, context, obj):
-        obj.empty_image_depth = "BACK"
-        obj.show_empty_image_backside = False
+        obj.empty_image_depth = 'BACK'
+        obj.show_empty_image_back = False
 
-        if context.space_data.type == "VIEW_3D":
+        if context.space_data.type == 'VIEW_3D':
             if not context.space_data.region_3d.is_perspective:
                 obj.show_empty_image_perspective = False
 
diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py
index d72089c8a9a..bcbb6a7dc01 100644
--- a/release/scripts/startup/bl_ui/properties_data_empty.py
+++ b/release/scripts/startup/bl_ui/properties_data_empty.py
@@ -58,7 +58,7 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
             col.row().prop(ob, "empty_image_depth", text="Depth", expand=True)
             col.prop(ob, "show_empty_image_orthographic", text="Display Orthographic")
             col.prop(ob, "show_empty_image_perspective", text="Display Perspective")
-            col.prop(ob, "show_empty_image_backside", text="Display Backside")
+            col.prop(ob, "show_empty_image_back", text="Display Back")
 
 
 classes = (
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index aa3166febee..323b495ec04 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -229,7 +229,7 @@ class EEVEE_MATERIAL_PT_settings(MaterialButtonsPanel, Panel):
             row.prop(mat, "alpha_threshold")
 
         if mat.blend_method not in {'OPAQUE', 'CLIP', 'HASHED'}:
-            layout.prop(mat, "show_transparent_backside")
+            layout.prop(mat, "show_transparent_back")
 
         layout.prop(mat, "use_screen_refraction")
         layout.prop(mat, "refraction_depth")
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index dbe3f86dc1a..efbccc33c1b 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -375,7 +375,6 @@ class USERPREF_PT_system_general(Panel):
         col.row().prop(system, "audio_device", expand=False)
         sub = col.column()
         sub.active = system.audio_device not in {'NONE', 'Null'}
-        #sub.prop(system, "use_preview_images")
         sub.prop(system, "audio_channels", text="Channels")
         sub.prop(system, "audio_mixing_buffer", text="Mixing Buffer")
         sub.prop(system, "audio_sample_rate", text="Sample Rate")
@@ -1097,8 +1096,6 @@ class USERPREF_PT_input(Panel):
             sub.row().prop(inputs, "view_zoom_axis", expand=True)
             sub.prop(inputs, "invert_mouse_zoom", text="Invert Mouse Zoom Direction")
 
-        #sub.prop(inputs, "use_mouse_mmb_paste")
-
         # layout.separator()
 
         sub = layout.column()
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h
index a71987c20c5..dd0803a3a67 100644
--- a/source/blender/blenkernel/BKE_blender_version.h
+++ b/source/blender/blenkernel/BKE_blender_version.h
@@ -28,7 +28,7 @@
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         280
-#define BLENDER_SUBVERSION      37
+#define BLENDER_SUBVERSION      38
 /* Several breakages with 280, e.g. collections vs layers */
 #define BLENDER_MINVERSION      280
 #define BLENDER_MINSUBVERSION   0
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 2f198c5b565..9e4a7372010 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -503,7 +503,6 @@ void BKE_mesh_init(Mesh *me)
 	me->size[0] = me->size[1] = me->size[2] = 1.0;
 	me->smoothresh = DEG2RADF(30);
 	me->texflag = ME_AUTOSPACE;
-	me->drawflag = 0;
 
 	CustomData_reset(&me->vdata);
 	CustomData_reset(&me->edata);
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index cb5cb96acd3..56843899ff6 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -837,10 +837,6 @@ void BKE_object_init(Object *ob)
 	ob->empty_drawtype = OB_PLAINAXES;
 	ob->empty_drawsize = 1.0;
 	ob->empty_image_depth = OB_EMPTY_IMAGE_DEPTH_DEFAULT;
-	ob->empty_image_visibility_flag = (
-	        OB_EMPTY_IMAGE_VISIBLE_PERSPECTIVE |
-	        OB_EMPTY_IMAGE_VISIBLE_ORTHOGRAPHIC |
-	        OB_EMPTY_IMAGE_VISIBLE_BACKSIDE);
 	if (ob->type == OB_EMPTY) {
 		copy_v2_fl(ob->ima_ofs, -0.5f);
 	}
@@ -2674,19 +2670,19 @@ void BKE_object_empty_draw_type_set(Object *ob, const int value)
 
 bool BKE_object_empty_image_is_visible_in_view3d(const Object *ob, const RegionView3D *rv3d)
 {
-	int visibility_flag = ob->empty_image_visibility_flag;
+	char visibility_flag = ob->empty_image_visibility_flag;
 
-	if ((visibility_flag & OB_EMPTY_IMAGE_VISIBLE_BACKSIDE) == 0) {
+	if ((visibility_flag & OB_EMPTY_IMAGE_HIDE_BACK) != 0) {
 		if (dot_v3v3((float *)&ob->obmat[2], (float *)&rv3d->viewinv[2]) < 0.0f) {
 			return false;
 		}
 	}
 
 	if (rv3d->is_persp) {
-		return visibility_flag & OB_EMPTY_IMAGE_VISIBLE_PERSPECTIVE;
+		return (visibility_flag & OB_EMPTY_IMAGE_HIDE_PERSPECTIVE) == 0;
 	}
 	else {
-		return visibility_flag & OB_EMPTY_IMAGE_VISIBLE_ORTHOGRAPHIC;
+		return (visibility_flag & OB_EMPTY_IMAGE_HIDE_ORTHOGRAPHIC) == 0;
 	}
 }
 
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index 54e1512c953..4f2417c21d2 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -694,6 +694,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
 
 		/* and composite trees */
 		for (sce = bmain->scene.first; sce; sce = sce->id.next) {
+			enum { R_PANORAMA = (1 << 10) };
 			if (sce->nodetree && sce->nodetree->id.name[0] == '\0')
 				strcpy(sce->nodetree->id.name, "NTCompositing Nodetree");
 
@@ -727,13 +728,6 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
 			}
 		}
 
-#if 0 /* ME_DRAWEDGES and others was moved to viewport. */
-		/* copy standard draw flag to meshes(used to be global, is not available here) */
-		for (me = bmain->mesh.first; me; me = me->id.next) {
-			me->drawflag = ME_DRAWEDGES | ME_DRAWFACES | ME_DRAWCREASES;
-		}
-#endif
-
 		/* particle draw and render types */
 		for (part = bmain->particle.first; part; part = part->id.next) {
 			if (part->draw_as) {
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index 217720caada..65133954359 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -767,7 +767,6 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
 	if (bmain->versionfile < 260 || (bmain->versionfile == 260 && bmain->subversionfile < 6)) {
 		Scene *sce;
 		MovieClip *clip;
-		bScreen *sc;
 
 		for (sce = bmain->scene.first; sce; sce = sce->id.next) {
 			do_versions_image_settings_2_60(sce);
@@ -784,19 +783,6 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
 			}
 		}
 
-		for (sc = bmain->screen.first; sc; sc = sc->id.next) {
-			ScrArea *sa;
-			for (sa = sc->areabase.first; sa; sa = sa->next) {
-				SpaceLink *sl;
-				for (sl = sa->spacedata.first; sl; sl = sl->next) {
-					if (sl->spacetype == SPACE_VIEW3D) {
-						View3D *v3d = (View3D *)sl;
-						v3d->flag2 &= ~V3D_RENDER_SHADOW;
-					}
-				}
-			}
-		}
-
 		{
 			Object *ob;
 			for (ob = bmain->object.first; ob; ob = ob->id.next) {
@@ -1726,6 +1712,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
 
 			SEQ_BEGIN (scene->ed, seq)
 			{
+				enum { SEQ_MAKE_PREMUL = (1 << 6) };
 				if (seq->flag & SEQ_MAKE_PREMUL) {
 					seq->alpha_mode = SEQ_ALPHA_STRAIGHT;
 				}
@@ -2411,6 +2398,11 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
 			Sculpt *sd = scene->toolsettings->sculpt;
 
 			if (sd) {
+				enum {
+					SCULPT_SYMM_X = (1 << 0),
+					SCULPT_SYMM_Y = (1 << 1),
+					SCULPT_SYMM_Z = (1 << 2),
+				};
 				int symmetry_flags = sd->flags & 7;
 
 				if (symmetry_flags & SCULPT_SYMM_X)
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 5a1002702b3..ba13445f2f3 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1796,6 +1796,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 				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) {
+							enum { V3D_SHOW_MODE_SHADE_OVERRIDE = (1 << 15), };
 							View3D *v3d = (View3D *)sl;
 							float alpha = v3d->flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE ? 0.0f : 0.8f;
 							float alpha_full = v3d->flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE ? 0.0f : 1.0f;
@@ -2181,6 +2182,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 			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) {
+						enum { V3D_OCCLUDE_WIRE = (1 << 14) };
 						View3D *v3d = (View3D *)sl;
 						if (v3d->flag2 & V3D_OCCLUDE_WIRE) {
 							v3d->overlay.edit_flag |= V3D_OVERLAY_EDIT_OCCLUDE_WIRE;
@@ -2230,15 +2232,6 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
 				}
 			}
 		}
-
-		for (Object *ob = bmain->object.first; ob; ob = o

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list