[Bf-blender-cvs] [ebf1977] master: Version Bump: 2.76.2, deprecate values

Campbell Barton noreply at git.blender.org
Thu Oct 22 20:05:00 CEST 2015


Commit: ebf197724eb422eea095dd52eac8ea310f5cf758
Author: Campbell Barton
Date:   Fri Oct 23 04:54:07 2015 +1100
Branches: master
https://developer.blender.org/rBebf197724eb422eea095dd52eac8ea310f5cf758

Version Bump: 2.76.2, deprecate values

- RegionView3D.view RV3D_VIEW_PERSPORTHO
  only ever set on initialization, never checked for.
- Lamp.type LA_YF_PHOTON
  from old 2.4x yafray files.

Also iniitalize movie-clip + grease-pencil theme colors.

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

M	source/blender/blenkernel/BKE_blender.h
M	source/blender/blenloader/intern/versioning_270.c
M	source/blender/editors/interface/resources.c
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/editors/space_view3d/space_view3d.c
M	source/blender/makesdna/DNA_lamp_types.h
M	source/blender/makesdna/DNA_view3d_types.h
M	source/blender/render/intern/source/shadeoutput.c

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

diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index fb4a1a4..607f2a9 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -42,7 +42,7 @@ extern "C" {
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION         276
-#define BLENDER_SUBVERSION      1
+#define BLENDER_SUBVERSION      2
 /* Several breakages with 270, e.g. constraint deg vs rad */
 #define BLENDER_MINVERSION      270
 #define BLENDER_MINSUBVERSION   5
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 1f4aa3c..1663585 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -867,5 +867,46 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 				}
 			}
 		}
+
+		{
+			bScreen *screen;
+#define RV3D_VIEW_PERSPORTHO	 7
+			for (screen = main->screen.first; screen; screen = screen->id.next) {
+				ScrArea *sa;
+				for (sa = screen->areabase.first; sa; sa = sa->next) {
+					SpaceLink *sl;
+					for (sl = sa->spacedata.first; sl; sl = sl->next) {
+						if (sl->spacetype == SPACE_VIEW3D) {
+							ARegion *ar;
+							ListBase *lb = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
+							for (ar = lb->first; ar; ar = ar->next) {
+								if (ar->regiontype == RGN_TYPE_WINDOW) {
+									if (ar->regiondata) {
+										RegionView3D *rv3d = ar->regiondata;
+										if (rv3d->view == RV3D_VIEW_PERSPORTHO) {
+											rv3d->view = RV3D_VIEW_USER;
+										}
+									}
+								}
+							}
+							break;
+						}
+					}
+				}
+			}
+#undef RV3D_VIEW_PERSPORTHO
+		}
+
+		{
+			Lamp *lamp;
+#define LA_YF_PHOTON	5
+			for (lamp = main->lamp.first; lamp; lamp = lamp->id.next) {
+				if (lamp->type == LA_YF_PHOTON) {
+					lamp->type = LA_LOCAL;
+				}
+			}
+#undef LA_YF_PHOTON
+		}
+
 	}
 }
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 568f756..f4051da 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -2646,6 +2646,15 @@ void init_userdef_do_versions(void)
 		}
 	}
 
+	if (!USER_VERSION_ATLEAST(276, 2)) {
+		bTheme *btheme;
+		for (btheme = U.themes.first; btheme; btheme = btheme->next) {
+			rgba_char_args_set(btheme->tclip.gp_vertex, 0, 0, 0, 255);
+			rgba_char_args_set(btheme->tclip.gp_vertex_select, 255, 133, 0, 255);
+			btheme->tclip.gp_vertex_size = 3;
+		}
+	}
+
 	if (U.pixelsize == 0.0f)
 		U.pixelsize = 1.0f;
 	
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 6c01bfa..0e66c6b 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1344,7 +1344,7 @@ static void drawlamp(View3D *v3d, RegionView3D *rv3d, Base *base,
 	if (is_view) {
 		/* skip drawing extra info */
 	}
-	else if ((la->type == LA_SPOT) || (la->type == LA_YF_PHOTON)) {
+	else if (la->type == LA_SPOT) {
 		float x, y, z, z_abs;
 		copy_v3_fl3(lvec, 0.0f, 0.0f, 1.0f);
 		copy_v3_fl3(vvec, rv3d->persmat[0][2], rv3d->persmat[1][2], rv3d->persmat[2][2]);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 7869522..e276a46 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -394,7 +394,7 @@ static SpaceLink *view3d_new(const bContext *C)
 	rv3d = ar->regiondata;
 	rv3d->viewquat[0] = 1.0f;
 	rv3d->persp = RV3D_PERSP;
-	rv3d->view = RV3D_VIEW_PERSPORTHO;
+	rv3d->view = RV3D_VIEW_USER;
 	rv3d->dist = 10.0;
 	
 	return (SpaceLink *)v3d;
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index ce8e86c..8f01122 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -127,8 +127,6 @@ typedef struct Lamp {
 #define LA_SPOT			2
 #define LA_HEMI			3
 #define LA_AREA			4
-/* yafray: extra lamp type used for caustic photonmap */
-#define LA_YF_PHOTON	5
 
 /* mode */
 #define LA_SHAD_BUF		(1 << 0)
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 0ba6c4d..2384bb7 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -289,7 +289,6 @@ typedef struct View3D {
 #define RV3D_VIEW_RIGHT			 4
 #define RV3D_VIEW_TOP			 5
 #define RV3D_VIEW_BOTTOM		 6
-#define RV3D_VIEW_PERSPORTHO	 7
 #define RV3D_VIEW_CAMERA		 8
 
 #define RV3D_VIEW_IS_AXIS(view) \
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 91f9723..27714b2 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1615,9 +1615,6 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr)
 			lar= go->lampren;
 			if (lar==NULL) continue;
 			
-			/* yafray: ignore shading by photonlights, not used in Blender */
-			if (lar->type==LA_YF_PHOTON) continue;
-			
 			if (lar->mode & LA_LAYER) if ((lar->lay & shi->obi->lay)==0) continue;
 			if ((lar->lay & shi->lay)==0) continue;
 			
@@ -1858,9 +1855,6 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
 			lar= go->lampren;
 			if (lar==NULL) continue;
 			
-			/* yafray: ignore shading by photonlights, not used in Blender */
-			if (lar->type==LA_YF_PHOTON) continue;
-			
 			/* test for lamp layer */
 			if (lar->mode & LA_LAYER) if ((lar->lay & shi->obi->lay)==0) continue;
 			if ((lar->lay & shi->lay)==0) continue;
@@ -2035,7 +2029,7 @@ static float lamp_get_data_internal(ShadeInput *shi, GroupObject *go, float col[
 	LampRen *lar = go->lampren;
 	float visifac, inp;
 
-	if (!lar || lar->type == LA_YF_PHOTON
+	if (!lar
 	    || ((lar->mode & LA_LAYER) && (lar->lay & shi->obi->lay) == 0)
 	    || (lar->lay & shi->lay) == 0)
 		return 0.0f;




More information about the Bf-blender-cvs mailing list