[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29496] branches/render25: Render Branch: remove a few options

Brecht Van Lommel brecht at blender.org
Wed Jun 16 21:12:55 CEST 2010


Revision: 29496
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29496
Author:   blendix
Date:     2010-06-16 21:12:55 +0200 (Wed, 16 Jun 2010)

Log Message:
-----------
Render Branch: remove a few options

* Simplify Skip Quads to Triangles: now quads are never split, with the
  render branch changes non-planar quads should no longer cause problems.
* Vertex Normal Flip: this seems to be more harmful than helpful in many
  cases, and also makes little sense once you start raytracing.
* Doubled Sided Lighting: just always do this, not much use in being able
  to turn this off, and it works only in the viewport anyway.

Modified Paths:
--------------
    branches/render25/release/scripts/ui/properties_data_mesh.py
    branches/render25/release/scripts/ui/properties_scene.py
    branches/render25/source/blender/blenkernel/intern/displist.c
    branches/render25/source/blender/blenkernel/intern/mesh.c
    branches/render25/source/blender/editors/space_view3d/drawobject.c
    branches/render25/source/blender/makesdna/DNA_curve_types.h
    branches/render25/source/blender/makesdna/DNA_mesh_types.h
    branches/render25/source/blender/makesdna/DNA_scene_types.h
    branches/render25/source/blender/makesrna/intern/rna_curve.c
    branches/render25/source/blender/makesrna/intern/rna_mesh.c
    branches/render25/source/blender/makesrna/intern/rna_object.c
    branches/render25/source/blender/makesrna/intern/rna_scene.c
    branches/render25/source/blender/render/intern/include/object_mesh.h
    branches/render25/source/blender/render/intern/include/render_types.h
    branches/render25/source/blender/render/intern/source/convertblender.c
    branches/render25/source/blender/render/intern/source/object_mesh.c
    branches/render25/source/blender/render/intern/source/object_particle.c
    branches/render25/source/blender/render/intern/source/shadeinput.c

Modified: branches/render25/release/scripts/ui/properties_data_mesh.py
===================================================================
--- branches/render25/release/scripts/ui/properties_data_mesh.py	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/release/scripts/ui/properties_data_mesh.py	2010-06-16 19:12:55 UTC (rev 29496)
@@ -106,16 +106,14 @@
 
         col = split.column()
         col.prop(mesh, "autosmooth")
-        sub = col.column()
-        sub.active = mesh.autosmooth
-        sub.prop(mesh, "autosmooth_angle", text="Angle")
 
         if wide_ui:
             col = split.column()
         else:
             col.separator()
-        col.prop(mesh, "vertex_normal_flip")
-        col.prop(mesh, "double_sided")
+        sub = col.column()
+        sub.active = mesh.autosmooth
+        sub.prop(mesh, "autosmooth_angle", text="Angle")
 
 
 class DATA_PT_settings(DataButtonsPanel):

Modified: branches/render25/release/scripts/ui/properties_scene.py
===================================================================
--- branches/render25/release/scripts/ui/properties_scene.py	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/release/scripts/ui/properties_scene.py	2010-06-16 19:12:55 UTC (rev 29496)
@@ -213,8 +213,6 @@
         col.prop(rd, "simplify_subdivision", text="Subdivision")
         col.prop(rd, "simplify_child_particles", text="Child Particles")
 
-        col.prop(rd, "simplify_triangulate")
-
         if wide_ui:
             col = split.column()
         col.prop(rd, "simplify_shadow_samples", text="Shadow Samples")

Modified: branches/render25/source/blender/blenkernel/intern/displist.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/displist.c	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/source/blender/blenkernel/intern/displist.c	2010-06-16 19:12:55 UTC (rev 29496)
@@ -489,7 +489,6 @@
 
 static void mesh_create_shadedColors(Render *re, Object *ob, int onlyForMesh, unsigned int **col1_r, unsigned int **col2_r)
 {
-	Mesh *me= ob->data;
 	DerivedMesh *dm;
 	MVert *mvert;
 	MFace *mface;
@@ -523,12 +522,10 @@
 	} else {
 		*col1_r = col1 = MEM_mallocN(sizeof(*col1)*totface*4, "col1");
 
-		if (col2_r && (me->flag & ME_TWOSIDED))
-			col2 = MEM_mallocN(sizeof(*col2)*totface*4, "col2");
+		if (col2_r)
+			*col2_r= col2 = MEM_mallocN(sizeof(*col2)*totface*4, "col2");
 		else
 			col2 = NULL;
-		
-		if (col2_r) *col2_r = col2;
 	}
 
 		/* vertexnormals */
@@ -1611,7 +1608,7 @@
 				dl->charidx= nu->charidx;
 
 				/* dl->rt will be used as flag for render face and */
-				/* CU_2D conflicts with R_NOPUNOFLIP */
+				/* CU_2D conflicts with other flags */
 				dl->rt= nu->flag & ~CU_2D;
 
 				data= dl->verts;
@@ -1631,7 +1628,7 @@
 				dl->charidx= nu->charidx;
 
 				/* dl->rt will be used as flag for render face and */
-				/* CU_2D conflicts with R_NOPUNOFLIP */
+				/* CU_2D conflicts with other flags */
 				dl->rt= nu->flag & ~CU_2D;
 
 				data= dl->verts;
@@ -1738,7 +1735,7 @@
 						dl->charidx= nu->charidx;
 
 						/* dl->rt will be used as flag for render face and */
-						/* CU_2D conflicts with R_NOPUNOFLIP */
+						/* CU_2D conflicts with other flags */
 						dl->rt= nu->flag & ~CU_2D;
 
 						a= dl->nr;
@@ -1774,7 +1771,7 @@
 							dl->charidx= nu->charidx;
 
 							/* dl->rt will be used as flag for render face and */
-							/* CU_2D conflicts with R_NOPUNOFLIP */
+							/* CU_2D conflicts with other flags */
 							dl->rt= nu->flag & ~CU_2D;
 
 							dl->bevelSplitFlag= MEM_callocN(sizeof(*dl->col2)*((bl->nr+0x1F)>>5), "col2");

Modified: branches/render25/source/blender/blenkernel/intern/mesh.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/mesh.c	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/source/blender/blenkernel/intern/mesh.c	2010-06-16 19:12:55 UTC (rev 29496)
@@ -191,7 +191,7 @@
 	me->size[0]= me->size[1]= me->size[2]= 1.0;
 	me->smoothresh= 30;
 	me->texflag= AUTOSPACE;
-	me->flag= ME_TWOSIDED;
+	me->flag= 0;
 	me->bb= unit_boundbox();
 	me->drawflag= ME_DRAWEDGES|ME_DRAWFACES|ME_DRAWCREASES;
 	
@@ -697,7 +697,6 @@
 	if(dl==0) return;
 
 	if(dl->type==DL_INDEX4) {
-		me->flag= ME_NOPUNOFLIP;
 		me->totvert= dl->nr;
 		me->totface= dl->parts;
 		

Modified: branches/render25/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/render25/source/blender/editors/space_view3d/drawobject.c	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/source/blender/editors/space_view3d/drawobject.c	2010-06-16 19:12:55 UTC (rev 29496)
@@ -2344,7 +2344,7 @@
 		}
 		else {
 			/* 3 floats for position, 3 for normal and times two because the faces may actually be quads instead of triangles */
-			glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, me->flag & ME_TWOSIDED);
+			glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1);
 
 			glEnable(GL_LIGHTING);
 			glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
@@ -2605,7 +2605,7 @@
 			if((v3d->flag&V3D_SELECT_OUTLINE) && ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) && (base->flag&SELECT) && !draw_wire && !ob->sculpt)
 				draw_mesh_object_outline(v3d, ob, dm);
 
-			glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, me->flag & ME_TWOSIDED );
+			glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1);
 
 			glEnable(GL_LIGHTING);
 			glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
@@ -2697,7 +2697,7 @@
 				unsigned int *obCol1 = dl->col1;
 				unsigned int *obCol2 = dl->col2;
 
-				dm->drawFacesColored(dm, me->flag&ME_TWOSIDED, (unsigned char*) obCol1, (unsigned char*) obCol2);
+				dm->drawFacesColored(dm, 1, (unsigned char*) obCol1, (unsigned char*) obCol2);
 			}
 
 			if(base->flag & SELECT) {

Modified: branches/render25/source/blender/makesdna/DNA_curve_types.h
===================================================================
--- branches/render25/source/blender/makesdna/DNA_curve_types.h	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/source/blender/makesdna/DNA_curve_types.h	2010-06-16 19:12:55 UTC (rev 29496)
@@ -236,7 +236,7 @@
 #define CU_PATH			8
 #define CU_FOLLOW		16
 #define CU_UV_ORCO		32
-#define CU_NOPUNOFLIP	64
+#define CU_DEPRECATED	64
 #define CU_STRETCH		128
 #define CU_OFFS_PATHDIST	256
 #define CU_FAST			512 /* Font: no filling inside editmode */

Modified: branches/render25/source/blender/makesdna/DNA_mesh_types.h
===================================================================
--- branches/render25/source/blender/makesdna/DNA_mesh_types.h	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/source/blender/makesdna/DNA_mesh_types.h	2010-06-16 19:12:55 UTC (rev 29496)
@@ -129,8 +129,8 @@
 
 /* me->flag */
 #define ME_ISDONE		1
-#define ME_NOPUNOFLIP	2
-#define ME_TWOSIDED		4
+#define ME_DEPRECATED	2
+#define ME_DEPRECATED2	4
 #define ME_UVEFFECT		8
 #define ME_VCOLEFFECT	16
 #define ME_AUTOSMOOTH	32

Modified: branches/render25/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- branches/render25/source/blender/makesdna/DNA_scene_types.h	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/source/blender/makesdna/DNA_scene_types.h	2010-06-16 19:12:55 UTC (rev 29496)
@@ -1004,7 +1004,7 @@
 #define R_INTEGRATOR_PATHTRACER	1
 
 /* simplify_flag */
-#define R_SIMPLE_NO_TRIANGULATE		1
+#define R_SIMPLE_DEPRECATED		1
 
 /* sequencer seq_prev_type seq_rend_type */
 

Modified: branches/render25/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_curve.c	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/source/blender/makesrna/intern/rna_curve.c	2010-06-16 19:12:55 UTC (rev 29496)
@@ -697,11 +697,6 @@
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
 	RNA_def_property_ui_text(prop, "Map Along Length", "Generate texture mapping coordinates following the curve direction, rather than the local bounding box");
 	RNA_def_property_update(prop, 0, "rna_Curve_update_data");
-	
-	prop= RNA_def_property(srna, "vertex_normal_flip", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_NOPUNOFLIP);
-	RNA_def_property_ui_text(prop, "Vertex Normal Flip", "Flip vertex normals towards the camera during render");
-	RNA_def_property_update(prop, 0, "rna_Curve_update_data");
 }
 
 static void rna_def_font(BlenderRNA *brna, StructRNA *srna)

Modified: branches/render25/source/blender/makesrna/intern/rna_mesh.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_mesh.c	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/source/blender/makesrna/intern/rna_mesh.c	2010-06-16 19:12:55 UTC (rev 29496)
@@ -1748,15 +1748,6 @@
 	RNA_def_property_range(prop, 1, 80);
 	RNA_def_property_ui_text(prop, "Auto Smooth Angle", "Defines maximum angle between face normals that 'Auto Smooth' will operate on");
 
-	prop= RNA_def_property(srna, "vertex_normal_flip", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ME_NOPUNOFLIP);
-	RNA_def_property_ui_text(prop, "Vertex Normal Flip", "Flip vertex normals towards the camera during render");
-
-	prop= RNA_def_property(srna, "double_sided", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_TWOSIDED);
-	RNA_def_property_ui_text(prop, "Double Sided", "Render/display the mesh with double or single sided lighting");
-	RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
-
 	prop= RNA_def_property(srna, "texco_mesh", PROP_POINTER, PROP_NONE);
 	RNA_def_property_pointer_sdna(prop, NULL, "texcomesh");
 	RNA_def_property_flag(prop, PROP_EDITABLE);

Modified: branches/render25/source/blender/makesrna/intern/rna_object.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_object.c	2010-06-16 19:12:48 UTC (rev 29495)
+++ branches/render25/source/blender/makesrna/intern/rna_object.c	2010-06-16 19:12:55 UTC (rev 29496)
@@ -1985,13 +1985,13 @@
 	RNA_def_property_float_sdna(prop, NULL, "displacebound");
 	RNA_def_property_range(prop, 0, FLT_MAX);
 	RNA_def_property_ui_text(prop, "Displacement Bound", "Maximum displacement offset for rendering.");

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list