[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29433] branches/render25: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29404 :29432

Campbell Barton ideasman42 at gmail.com
Sun Jun 13 19:09:17 CEST 2010


Revision: 29433
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29433
Author:   campbellbarton
Date:     2010-06-13 19:09:16 +0200 (Sun, 13 Jun 2010)

Log Message:
-----------
Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29404:29432

Modified Paths:
--------------
    branches/render25/release/scripts/io/engine_render_pov.py
    branches/render25/release/scripts/ui/properties_data_modifier.py
    branches/render25/release/scripts/ui/space_info.py
    branches/render25/release/scripts/ui/space_text.py
    branches/render25/source/Makefile
    branches/render25/source/blender/blenkernel/BKE_idprop.h
    branches/render25/source/blender/blenkernel/intern/idprop.c
    branches/render25/source/blender/blenkernel/intern/lattice.c
    branches/render25/source/blender/blenkernel/intern/softbody.c
    branches/render25/source/blender/editors/curve/curve_intern.h
    branches/render25/source/blender/editors/curve/curve_ops.c
    branches/render25/source/blender/editors/curve/editcurve.c
    branches/render25/source/blender/editors/object/object_intern.h
    branches/render25/source/blender/editors/object/object_ops.c
    branches/render25/source/blender/editors/object/object_transform.c
    branches/render25/source/blender/editors/sculpt_paint/paint_vertex.c
    branches/render25/source/blender/editors/space_text/space_text.c
    branches/render25/source/blender/editors/space_text/text_draw.c
    branches/render25/source/blender/editors/space_view3d/drawobject.c
    branches/render25/source/blender/editors/space_view3d/view3d_view.c
    branches/render25/source/blender/makesdna/DNA_modifier_types.h
    branches/render25/source/blender/makesrna/intern/rna_access.c
    branches/render25/source/blender/makesrna/intern/rna_mesh.c
    branches/render25/source/blender/makesrna/intern/rna_modifier.c
    branches/render25/source/blender/makesrna/intern/rna_space.c
    branches/render25/source/blender/makesrna/intern/rna_text.c
    branches/render25/source/blender/modifiers/intern/MOD_hook.c
    branches/render25/source/blender/modifiers/intern/MOD_solidify.c
    branches/render25/source/blender/python/doc/sphinx_doc_gen.py
    branches/render25/source/blender/python/intern/bpy_rna.c
    branches/render25/source/gameengine/PyDoc/bge.types.rst

Modified: branches/render25/release/scripts/io/engine_render_pov.py
===================================================================
--- branches/render25/release/scripts/io/engine_render_pov.py	2010-06-13 13:56:13 UTC (rev 29432)
+++ branches/render25/release/scripts/io/engine_render_pov.py	2010-06-13 17:09:16 UTC (rev 29433)
@@ -762,12 +762,22 @@
 
         if 1:
             # TODO, when povray isnt found this gives a cryptic error, would be nice to be able to detect if it exists
-            self._process = subprocess.Popen([pov_binary, self._temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE
+            try:
+                self._process = subprocess.Popen([pov_binary, self._temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE
+            except OSError:
+                # TODO, report api
+                print("POVRAY: could not execute '%s', possibly povray isn't installed" % pov_binary)
+                import traceback
+                traceback.print_exc()
+                print ("***-DONE-***")
+                return False
+
         else:
             # This works too but means we have to wait until its done
             os.system('%s %s' % (pov_binary, self._temp_file_ini))
 
         print ("***-DONE-***")
+        return True
 
     def _cleanup(self):
         for f in (self._temp_file_in, self._temp_file_ini, self._temp_file_out):
@@ -783,8 +793,11 @@
         self.update_stats("", "POVRAY: Exporting data from Blender")
         self._export(scene)
         self.update_stats("", "POVRAY: Parsing File")
-        self._render()
 
+        if not self._render():
+            self.update_stats("", "POVRAY: Not found")
+            return
+
         r = scene.render
 
         # compute resolution

Modified: branches/render25/release/scripts/ui/properties_data_modifier.py
===================================================================
--- branches/render25/release/scripts/ui/properties_data_modifier.py	2010-06-13 13:56:13 UTC (rev 29432)
+++ branches/render25/release/scripts/ui/properties_data_modifier.py	2010-06-13 17:09:16 UTC (rev 29433)
@@ -645,13 +645,14 @@
         colsub.active = (md.vertex_group is not "")
         colsub.prop(md, "invert", text="Invert")
 
-        if wide_ui:
-            col.label(text="")
-
-        col.prop(md, "use_rim")
         col.prop(md, "use_even_offset")
         col.prop(md, "use_quality_normals")
 
+        col.prop(md, "use_rim")
+        colsub = col.column()
+        colsub.active = md.use_rim
+        colsub.prop(md, "use_rim_material")
+
         # col = layout.column()
         # col.label(text="Vertex Group:")
         # col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")

Modified: branches/render25/release/scripts/ui/space_info.py
===================================================================
--- branches/render25/release/scripts/ui/space_info.py	2010-06-13 13:56:13 UTC (rev 29432)
+++ branches/render25/release/scripts/ui/space_info.py	2010-06-13 17:09:16 UTC (rev 29433)
@@ -212,7 +212,20 @@
         layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text="Nurbs Circle")
         layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text="Path")
 
+class INFO_MT_surface_add(bpy.types.Menu):
+    bl_idname = "INFO_MT_surface_add"
+    bl_label = "Surface"
 
+    def draw(self, context):
+        layout = self.layout
+        layout.operator_context = 'INVOKE_REGION_WIN'
+        layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
+        layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
+        layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text="NURBS Surface")
+        layout.operator("surface.primitive_nurbs_surface_tube_add", icon='SURFACE_NTUBE', text="NURBS Tube")
+        layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere")
+        layout.operator("surface.primitive_nurbs_surface_donut_add", icon='SURFACE_NDONUT', text="NURBS Torus")
+
 class INFO_MT_armature_add(bpy.types.Menu):
     bl_idname = "INFO_MT_armature_add"
     bl_label = "Armature"
@@ -236,7 +249,8 @@
 
         #layout.operator_menu_enum("object.curve_add", "type", text="Curve", icon='OUTLINER_OB_CURVE')
         layout.menu("INFO_MT_curve_add", icon='OUTLINER_OB_CURVE')
-        layout.operator_menu_enum("object.surface_add", "type", text="Surface", icon='OUTLINER_OB_SURFACE')
+        #layout.operator_menu_enum("object.surface_add", "type", text="Surface", icon='OUTLINER_OB_SURFACE')
+        layout.menu("INFO_MT_surface_add", icon='OUTLINER_OB_SURFACE')
         layout.operator_menu_enum("object.metaball_add", "type", text="Metaball", icon='OUTLINER_OB_META')
         layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
         layout.separator()
@@ -367,6 +381,7 @@
     INFO_MT_add,
     INFO_MT_mesh_add,
     INFO_MT_curve_add,
+    INFO_MT_surface_add,
     INFO_MT_armature_add,
     INFO_MT_game,
     INFO_MT_render,

Modified: branches/render25/release/scripts/ui/space_text.py
===================================================================
--- branches/render25/release/scripts/ui/space_text.py	2010-06-13 13:56:13 UTC (rev 29432)
+++ branches/render25/release/scripts/ui/space_text.py	2010-06-13 17:09:16 UTC (rev 29433)
@@ -54,6 +54,9 @@
         if text:
             row = layout.row()
             row.operator("text.run_script")
+
+            row = layout.row()
+            row.active = text.name.endswith(".py")
             row.prop(text, "use_module")
 
             row = layout.row()
@@ -63,10 +66,7 @@
                 else:
                     row.label(text="File: %s" % text.filepath)
             else:
-                if text.library:
-                    row.label(text="Text: External")
-                else:
-                    row.label(text="Text: Internal")
+                row.label(text="Text: External" if text.library else "Text: Internal")
 
 
 class TEXT_PT_properties(bpy.types.Panel):

Modified: branches/render25/source/Makefile
===================================================================
--- branches/render25/source/Makefile	2010-06-13 13:56:13 UTC (rev 29432)
+++ branches/render25/source/Makefile	2010-06-13 17:09:16 UTC (rev 29433)
@@ -479,7 +479,7 @@
 clean:: linkclean debuglinkclean
 
 link: $(BINTARGETS)
-	@echo "****> Build $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
+	@echo "****> Build SVN rev $(BUILD_REV), $(MAKE_START) - `date '+%H:%M:%S %d-%b-%Y'`"
 ifdef NANENV
 	@for n in $(NANENV); do \
 	    echo "      $$n"; \

Modified: branches/render25/source/blender/blenkernel/BKE_idprop.h
===================================================================
--- branches/render25/source/blender/blenkernel/BKE_idprop.h	2010-06-13 13:56:13 UTC (rev 29432)
+++ branches/render25/source/blender/blenkernel/BKE_idprop.h	2010-06-13 17:09:16 UTC (rev 29433)
@@ -71,7 +71,8 @@
 void IDP_UnlinkArray(struct IDProperty *prop);
 
 /* ---------- String Type ------------ */
-void IDP_AssignString(struct IDProperty *prop, char *st);
+IDProperty *IDP_NewString(const char *st, const char *name, int maxlen);/* maxlen excludes '\0' */
+void IDP_AssignString(struct IDProperty *prop, char *st, int maxlen);	/* maxlen excludes '\0' */
 void IDP_ConcatStringC(struct IDProperty *prop, char *st);
 void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append);
 void IDP_FreeString(struct IDProperty *prop);

Modified: branches/render25/source/blender/blenkernel/intern/idprop.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/idprop.c	2010-06-13 13:56:13 UTC (rev 29432)
+++ branches/render25/source/blender/blenkernel/intern/idprop.c	2010-06-13 17:09:16 UTC (rev 29433)
@@ -299,6 +299,34 @@
 
 
 /* ---------- String Type ------------ */
+IDProperty *IDP_NewString(const char *st, const char *name, int maxlen)
+{
+	IDProperty *prop = MEM_callocN(sizeof(IDProperty), "IDProperty string");
+
+	if (st == NULL) {
+		prop->data.pointer = MEM_callocN(DEFAULT_ALLOC_FOR_NULL_STRINGS, "id property string 1");
+		prop->totallen = DEFAULT_ALLOC_FOR_NULL_STRINGS;
+		prop->len = 1; /*NULL string, has len of 1 to account for null byte.*/
+	}
+	else {
+		int stlen = strlen(st);
+
+		if(maxlen > 0 && maxlen < stlen)
+			stlen = maxlen;
+
+		stlen++; /* null terminator '\0' */
+
+		prop->data.pointer = MEM_callocN(stlen, "id property string 2");
+		prop->len = prop->totallen = stlen;
+		BLI_strncpy(prop->data.pointer, st, stlen);
+	}
+
+	prop->type = IDP_STRING;
+	BLI_strncpy(prop->name, name, MAX_IDPROP_NAME);
+
+	return prop;
+}
+
 IDProperty *IDP_CopyString(IDProperty *prop)
 {
 	IDProperty *newp = idp_generic_copy(prop);
@@ -312,14 +340,19 @@
 }
 
 
-void IDP_AssignString(IDProperty *prop, char *st)
+void IDP_AssignString(IDProperty *prop, char *st, int maxlen)
 {
 	int stlen;
 
 	stlen = strlen(st);
 
-	IDP_ResizeArray(prop, stlen+1); /*make room for null byte :) */
-	strcpy(prop->data.pointer, st);
+	if(maxlen > 0 && maxlen < stlen)
+		stlen= maxlen;
+
+	stlen++; /* make room for null byte */
+
+	IDP_ResizeArray(prop, stlen);
+	BLI_strncpy(prop->data.pointer, st, stlen);
 }
 
 void IDP_ConcatStringC(IDProperty *prop, char *st)
@@ -709,9 +742,6 @@
 	prop->type = type;
 	BLI_strncpy(prop->name, name, MAX_IDPROP_NAME);
 	
-	/*security null byte*/
-	prop->name[MAX_IDPROP_NAME-1] = 0;
-	
 	return prop;
 }
 

Modified: branches/render25/source/blender/blenkernel/intern/lattice.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/lattice.c	2010-06-13 13:56:13 UTC (rev 29432)
+++ branches/render25/source/blender/blenkernel/intern/lattice.c	2010-06-13 17:09:16 UTC (rev 29433)
@@ -845,26 +845,20 @@
 		use_vgroups = 0;
 	
 	if(vgroup && vgroup[0] && use_vgroups) {
-		bDeformGroup *curdef;
 		Mesh *me = target->data;
-		int index = 0;
-		
-		/* find the group (weak loop-in-loop) */
-		for(curdef = target->defbase.first; curdef;
-			curdef = curdef->next, index++)
-			if(!strcmp(curdef->name, vgroup)) break;
+		int index = defgroup_name_index(target, vgroup);
+		float weight;
 
-		if(curdef && (me->dvert || dm)) {
+		if(index >= 0 && (me->dvert || dm)) {
 			MDeformVert *dvert = me->dvert;
-			int j;
 			

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list