[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43871] branches/soc-2011-tomato: Merging r43848 through r43870 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Fri Feb 3 19:47:20 CET 2012


Revision: 43871
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43871
Author:   nazgul
Date:     2012-02-03 18:47:15 +0000 (Fri, 03 Feb 2012)
Log Message:
-----------
Merging r43848 through r43870 from trunk into soc-2011-tomato

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43848
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43870

Modified Paths:
--------------
    branches/soc-2011-tomato/doc/blender_file_format/BlendFileDnaExporter_25.py
    branches/soc-2011-tomato/doc/blender_file_format/BlendFileReader.py
    branches/soc-2011-tomato/intern/cycles/app/io_export_cycles_xml.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_curve.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_texture.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/displist.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/texture.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_curve_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_curve.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_wm.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_fluidsim_util.c
    branches/soc-2011-tomato/source/blender/python/rna_dump.py
    branches/soc-2011-tomato/source/blender/render/intern/source/pipeline.c
    branches/soc-2011-tomato/source/blender/render/intern/source/zbuf.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_event_system.c
    branches/soc-2011-tomato/source/tests/bl_mesh_modifiers.py

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-43847
   + /branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-43870

Modified: branches/soc-2011-tomato/doc/blender_file_format/BlendFileDnaExporter_25.py
===================================================================
--- branches/soc-2011-tomato/doc/blender_file_format/BlendFileDnaExporter_25.py	2012-02-03 13:08:44 UTC (rev 43870)
+++ branches/soc-2011-tomato/doc/blender_file_format/BlendFileDnaExporter_25.py	2012-02-03 18:47:15 UTC (rev 43871)
@@ -206,13 +206,13 @@
                 <td>${size}</td>
             </tr>"""
         
-        if field.Type.Structure == None or field.Name.IsPointer():
+        if field.Type.Structure is None or field.Name.IsPointer():
 
             # ${reference}
             reference = field.Name.AsReference(parentReference)
 
             # ${struct}
-            if parentReference != None:
+            if parentReference is not None:
                 struct = '<a href="#{0}">{0}</a>'.format(structure.Type.Name)
             else:
                 struct = structure.Type.Name
@@ -240,7 +240,7 @@
             
             structure_field = Template(structure_field_template).substitute(d)
         
-        elif field.Type.Structure != None:
+        elif field.Type.Structure is not None:
             reference = field.Name.AsReference(parentReference)
             structure_field = self.StructureFields(field.Type.Structure, reference, offset) 
 

Modified: branches/soc-2011-tomato/doc/blender_file_format/BlendFileReader.py
===================================================================
--- branches/soc-2011-tomato/doc/blender_file_format/BlendFileReader.py	2012-02-03 13:08:44 UTC (rev 43870)
+++ branches/soc-2011-tomato/doc/blender_file_format/BlendFileReader.py	2012-02-03 18:47:15 UTC (rev 43871)
@@ -329,7 +329,7 @@
         self.Name = name
         
     def AsReference(self, parent):
-        if parent == None:
+        if parent is None:
             result = ""
         else:
             result = parent+"."

Modified: branches/soc-2011-tomato/intern/cycles/app/io_export_cycles_xml.py
===================================================================
--- branches/soc-2011-tomato/intern/cycles/app/io_export_cycles_xml.py	2012-02-03 13:08:44 UTC (rev 43870)
+++ branches/soc-2011-tomato/intern/cycles/app/io_export_cycles_xml.py	2012-02-03 18:47:15 UTC (rev 43871)
@@ -93,7 +93,7 @@
 
     @classmethod
     def poll(cls, context):
-        return context.active_object != None
+        return (context.active_object is not None)
 
     def execute(self, context):
         filepath = bpy.path.ensure_ext(self.filepath, ".xml")

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_curve.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_curve.py	2012-02-03 13:08:44 UTC (rev 43870)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_curve.py	2012-02-03 18:47:15 UTC (rev 43871)
@@ -111,7 +111,7 @@
             sub = col.column()
             sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D'))
             sub.prop(curve, "fill_mode", text="")
-            col.prop(curve, "use_fill_deform", text="Fill Deformed")
+            col.prop(curve, "use_fill_deform")
 
 
 class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel):
@@ -165,7 +165,11 @@
         col.label(text="Bevel Object:")
         col.prop(curve, "bevel_object", text="")
 
+        row = col.row()
+        row.active = (curve.bevel_object is not None)
+        row.prop(curve, "use_fill_caps")
 
+
 class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
     bl_label = "Path Animation"
 

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_texture.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_texture.h	2012-02-03 13:08:44 UTC (rev 43870)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_texture.h	2012-02-03 18:47:15 UTC (rev 43871)
@@ -69,9 +69,9 @@
 struct ColorBand *add_colorband(int rangetype);
 int do_colorband(const struct ColorBand *coba, float in, float out[4]);
 void colorband_table_RGBA(struct ColorBand *coba, float **array, int *size);
-int vergcband(const void *a1, const void *a2);
 struct CBData *colorband_element_add(struct ColorBand *coba, float position);
 int colorband_element_remove(struct ColorBand *coba, int index);
+void colorband_update_sort(struct ColorBand *coba);
 
 void default_tex(struct Tex *tex);
 struct Tex *add_texture(const char *name);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/displist.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/displist.c	2012-02-03 13:08:44 UTC (rev 43870)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/displist.c	2012-02-03 18:47:15 UTC (rev 43871)
@@ -1179,6 +1179,60 @@
 			forRender, originalVerts, deformedVerts);
 }
 
+static void rotateBevelPiece(Curve *cu, BevPoint *bevp, DispList *dlb, float widfac, float fac, float **data_r)
+{
+	float *fp, *data = *data_r;
+	int b;
+
+	fp = dlb->verts;
+	for (b = 0; b<dlb->nr; b++,fp += 3,data += 3) {
+		if(cu->flag & CU_3D) {
+			float vec[3];
+
+			vec[0] = fp[1]+widfac;
+			vec[1] = fp[2];
+			vec[2 ]= 0.0;
+
+			mul_qt_v3(bevp->quat, vec);
+
+			data[0] = bevp->vec[0] + fac*vec[0];
+			data[1] = bevp->vec[1] + fac*vec[1];
+			data[2] = bevp->vec[2] + fac*vec[2];
+		}
+		else {
+			data[0] = bevp->vec[0] + fac*(widfac+fp[1])*bevp->sina;
+			data[1] = bevp->vec[1] + fac*(widfac+fp[1])*bevp->cosa;
+			data[2] = bevp->vec[2] + fac*fp[2];
+		}
+	}
+
+	*data_r = data;
+}
+
+static void fillBevelCap(Curve *cu, Nurb *nu, BevPoint *bevp, DispList *dlb, float fac, float widfac, ListBase *dispbase)
+{
+	DispList *dl;
+	float *data;
+
+	dl= MEM_callocN(sizeof(DispList), "makeDispListbev2");
+	dl->verts= data= MEM_callocN(3*sizeof(float)*dlb->nr, "dlverts");
+
+	dl->type= DL_POLY;
+
+	dl->parts= 1;
+	dl->nr= dlb->nr;
+	dl->col= nu->mat_nr;
+	dl->charidx= nu->charidx;
+
+	/* dl->rt will be used as flag for render face and */
+	/* CU_2D conflicts with R_NOPUNOFLIP */
+	dl->rt= nu->flag & ~CU_2D;
+
+	rotateBevelPiece(cu, bevp, dlb, widfac, fac, &data);
+
+	BLI_addtail(dispbase, dl);
+}
+
 static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispbase,
 	DerivedMesh **derivedFinal, int forRender, int forOrco)
 {
@@ -1223,9 +1277,9 @@
 
 			for (; bl && nu; bl=bl->next,nu=nu->next) {
 				DispList *dl;
-				float *fp1, *data;
+				float *data;
 				BevPoint *bevp;
-				int a,b;
+				int a;
 
 				if (bl->nr) { /* blank bevel lists can happen */
 
@@ -1262,9 +1316,10 @@
 					}
 					else {
 						DispList *dlb;
+						ListBase bottom_capbase = {NULL, NULL};
+						ListBase top_capbase = {NULL, NULL};
 
 						for (dlb=dlbev.first; dlb; dlb=dlb->next) {
-	
 							/* for each part of the bevel use a separate displblock */
 							dl= MEM_callocN(sizeof(DispList), "makeDispListbev1");
 							dl->verts= data= MEM_callocN(3*sizeof(float)*dlb->nr*bl->nr, "dlverts");
@@ -1302,33 +1357,27 @@
 									dl->bevelSplitFlag[a>>5] |= 1<<(a&0x1F);
 								}
 	
-									/* rotate bevel piece and write in data */
-								fp1= dlb->verts;
-								for (b=0; b<dlb->nr; b++,fp1+=3,data+=3) {
-									if(cu->flag & CU_3D) {
-										float vec[3];
-	
-										vec[0]= fp1[1]+widfac;
-										vec[1]= fp1[2];
-										vec[2]= 0.0;
+								/* rotate bevel piece and write in data */
+								rotateBevelPiece(cu, bevp, dlb, widfac, fac, &data);
 
-										mul_qt_v3(bevp->quat, vec);
-
-										data[0]= bevp->vec[0] + fac*vec[0];
-										data[1]= bevp->vec[1] + fac*vec[1];
-										data[2]= bevp->vec[2] + fac*vec[2];
-									}
-									else {
-										data[0]= bevp->vec[0] + fac*(widfac+fp1[1])*bevp->sina;
-										data[1]= bevp->vec[1] + fac*(widfac+fp1[1])*bevp->cosa;
-										data[2]= bevp->vec[2] + fac*fp1[2];
-									}
+								if (cu->bevobj && (cu->flag & CU_FILL_CAPS)) {
+									if (a == 0)
+										fillBevelCap(cu, nu, bevp, dlb, fac, widfac, &bottom_capbase);
+									else if (a == bl->nr - 1)
+										fillBevelCap(cu, nu, bevp, dlb, fac, widfac, &top_capbase);
 								}
 							}
-							
+
 							/* gl array drawing: using indices */
 							displist_surf_indices(dl);
 						}
+
+						if(bottom_capbase.first) {
+							filldisplist(&bottom_capbase, dispbase, 1);
+							filldisplist(&top_capbase, dispbase, 0);
+							freedisplist(&bottom_capbase);
+							freedisplist(&top_capbase);
+						}
 					}
 				}
 

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c	2012-02-03 13:08:44 UTC (rev 43870)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c	2012-02-03 18:47:15 UTC (rev 43871)
@@ -745,7 +745,7 @@
 			seq->scene = sce;
 		}
 
-		seq->len= seq->scene->r.efra - seq->scene->r.sfra + 1;
+		seq->len= (seq->scene)? seq->scene->r.efra - seq->scene->r.sfra + 1: 0;
 		seq->len -= seq->anim_startofs;
 		seq->len -= seq->anim_endofs;
 		if (seq->len < 0) {

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/texture.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/texture.c	2012-02-03 13:08:44 UTC (rev 43870)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/texture.c	2012-02-03 18:47:15 UTC (rev 43871)
@@ -478,10 +478,28 @@
 	return 0;
 }
 
-CBData *colorband_element_add(struct ColorBand *coba, float position)
+void colorband_update_sort(ColorBand *coba)
 {
 	int a;
+	
+	if(coba->tot<2)
+		return;
+	
+	for(a=0; a<coba->tot; a++)
+		coba->data[a].cur= a;
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list