[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29820] branches/render25: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29790 :29819

Brecht Van Lommel brecht at blender.org
Wed Jun 30 12:22:37 CEST 2010


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

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

Modified Paths:
--------------
    branches/render25/release/scripts/ui/properties_physics_softbody.py
    branches/render25/source/blender/blenkernel/BKE_image.h
    branches/render25/source/blender/blenkernel/intern/cdderivedmesh.c
    branches/render25/source/blender/blenkernel/intern/image.c
    branches/render25/source/blender/blenlib/intern/BLI_args.c
    branches/render25/source/blender/editors/space_image/image_ops.c
    branches/render25/source/blender/editors/space_view3d/space_view3d.c
    branches/render25/source/blender/makesrna/intern/rna_main_api.c
    branches/render25/source/blender/makesrna/intern/rna_object_force.c
    branches/render25/source/blender/makesrna/rna_cleanup/rna_booleans.txt
    branches/render25/source/blender/makesrna/rna_cleanup/rna_cleaner.py
    branches/render25/source/blender/render/intern/source/convertblender.c
    branches/render25/source/blender/render/intern/source/rayshade.c

Removed Paths:
-------------
    branches/render25/source/blender/makesrna/rna_cleanup/rna_api_cleanup.txt

Modified: branches/render25/release/scripts/ui/properties_physics_softbody.py
===================================================================
--- branches/render25/release/scripts/ui/properties_physics_softbody.py	2010-06-30 09:53:40 UTC (rev 29819)
+++ branches/render25/release/scripts/ui/properties_physics_softbody.py	2010-06-30 10:22:37 UTC (rev 29820)
@@ -186,10 +186,13 @@
         sub.active = softbody.stiff_quads
         sub.prop(softbody, "shear")
 
-        col.prop(softbody, "new_aero", text="Aero")
-        sub = col.column()
-        sub.enabled = softbody.new_aero
-        sub.prop(softbody, "aero", text="Factor")
+        col.label(text="Aerodynamics:")
+        col.row().prop(softbody, "aerodynamics_type", expand=True)
+        col.prop(softbody, "aero", text="Factor")
+        
+        #sub = col.column()
+        #sub.enabled = softbody.aero > 0
+        
 
         col.label(text="Collision:")
         col.prop(softbody, "edge_collision", text="Edge")

Modified: branches/render25/source/blender/blenkernel/BKE_image.h
===================================================================
--- branches/render25/source/blender/blenkernel/BKE_image.h	2010-06-30 09:53:40 UTC (rev 29819)
+++ branches/render25/source/blender/blenkernel/BKE_image.h	2010-06-30 10:22:37 UTC (rev 29820)
@@ -115,7 +115,7 @@
 struct Image *BKE_add_image_file(const char *name, int frame);
 
 /* adds image, adds ibuf, generates color or pattern */
-struct Image *BKE_add_image_size(int width, int height, char *name, int floatbuf, short uvtestgrid, float color[4]);
+struct Image *BKE_add_image_size(int width, int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4]);
 /* adds image from imbuf, owns imbuf */
 struct Image *BKE_add_image_imbuf(struct ImBuf *ibuf);
 

Modified: branches/render25/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/cdderivedmesh.c	2010-06-30 09:53:40 UTC (rev 29819)
+++ branches/render25/source/blender/blenkernel/intern/cdderivedmesh.c	2010-06-30 10:22:37 UTC (rev 29820)
@@ -885,7 +885,7 @@
 				else
 					orig = actualFace;
 
-				if(setDrawOptions && !setDrawOptions(userData, orig, &drawSmooth))
+				if(draw && setDrawOptions && !setDrawOptions(userData, orig, &drawSmooth))
 					draw = 0;
 
 				/* Goal is to draw as long of a contiguous triangle

Modified: branches/render25/source/blender/blenkernel/intern/image.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/image.c	2010-06-30 09:53:40 UTC (rev 29819)
+++ branches/render25/source/blender/blenkernel/intern/image.c	2010-06-30 10:22:37 UTC (rev 29820)
@@ -380,18 +380,18 @@
 	return ima;
 }
 
-static ImBuf *add_ibuf_size(int width, int height, char *name, int floatbuf, short uvtestgrid, float color[4])
+static ImBuf *add_ibuf_size(int width, int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4])
 {
 	ImBuf *ibuf;
 	unsigned char *rect= NULL;
 	float *rect_float= NULL;
 	
 	if (floatbuf) {
-		ibuf= IMB_allocImBuf(width, height, 24, IB_rectfloat, 0);
+		ibuf= IMB_allocImBuf(width, height, depth, IB_rectfloat, 0);
 		rect_float= (float*)ibuf->rect_float;
 	}
 	else {
-		ibuf= IMB_allocImBuf(width, height, 24, IB_rect, 0);
+		ibuf= IMB_allocImBuf(width, height, depth, IB_rect, 0);
 		rect= (unsigned char*)ibuf->rect;
 	}
 	
@@ -413,7 +413,7 @@
 }
 
 /* adds new image block, creates ImBuf and initializes color */
-Image *BKE_add_image_size(int width, int height, char *name, int floatbuf, short uvtestgrid, float color[4])
+Image *BKE_add_image_size(int width, int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4])
 {
 	/* on save, type is changed to FILE in editsima.c */
 	Image *ima= image_alloc(name, IMA_SRC_GENERATED, IMA_TYPE_UV_TEST);
@@ -426,7 +426,7 @@
 		ima->gen_y= height;
 		ima->gen_type= uvtestgrid;
 		
-		ibuf= add_ibuf_size(width, height, name, floatbuf, uvtestgrid, color);
+		ibuf= add_ibuf_size(width, height, name, depth, floatbuf, uvtestgrid, color);
 		image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
 		
 		ima->ok= IMA_OK_LOADED;
@@ -2079,7 +2079,7 @@
 				/* UV testgrid or black or solid etc */
 				if(ima->gen_x==0) ima->gen_x= 1024;
 				if(ima->gen_y==0) ima->gen_y= 1024;
-				ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 0, ima->gen_type, color);
+				ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 24, 0, ima->gen_type, color);
 				image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
 				ima->ok= IMA_OK_LOADED;
 			}

Modified: branches/render25/source/blender/blenlib/intern/BLI_args.c
===================================================================
--- branches/render25/source/blender/blenlib/intern/BLI_args.c	2010-06-30 09:53:40 UTC (rev 29819)
+++ branches/render25/source/blender/blenlib/intern/BLI_args.c	2010-06-30 10:22:37 UTC (rev 29820)
@@ -284,7 +284,8 @@
 					}
 					i += retval;
 				} else if (retval == -1){
-					ba->passes[i] = pass;
+					if (a->key->pass != -1)
+						ba->passes[i] = pass;
 					break;
 				}
 			}

Modified: branches/render25/source/blender/editors/space_image/image_ops.c
===================================================================
--- branches/render25/source/blender/editors/space_image/image_ops.c	2010-06-30 09:53:40 UTC (rev 29819)
+++ branches/render25/source/blender/editors/space_image/image_ops.c	2010-06-30 10:22:37 UTC (rev 29820)
@@ -1182,7 +1182,7 @@
 	PropertyRNA *prop;
 	char name[22];
 	float color[4];
-	int width, height, floatbuf, uvtestgrid;
+	int width, height, floatbuf, uvtestgrid, alpha;
 
 	/* retrieve state */
 	sima= CTX_wm_space_image(C);
@@ -1195,13 +1195,16 @@
 	floatbuf= RNA_boolean_get(op->ptr, "float");
 	uvtestgrid= RNA_boolean_get(op->ptr, "uv_test_grid");
 	RNA_float_get_array(op->ptr, "color", color);
-	color[3]= RNA_float_get(op->ptr, "alpha");
+	alpha= RNA_boolean_get(op->ptr, "alpha");
 	
 	if (!floatbuf && scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)
 		linearrgb_to_srgb_v3_v3(color, color);
 
-	ima = BKE_add_image_size(width, height, name, floatbuf, uvtestgrid, color);
+	if(!alpha)
+		color[3]= 1.0f;
 
+	ima = BKE_add_image_size(width, height, name, alpha ? 32 : 24, floatbuf, uvtestgrid, color);
+
 	if(!ima)
 		return OPERATOR_CANCELLED;
 
@@ -1228,6 +1231,9 @@
 
 void IMAGE_OT_new(wmOperatorType *ot)
 {
+	PropertyRNA *prop;
+	float default_color[4]= {0.0f, 0.0f, 0.0f, 1.0f};
+	
 	/* identifiers */
 	ot->name= "New";
 	ot->idname= "IMAGE_OT_new";
@@ -1243,8 +1249,9 @@
 	RNA_def_string(ot->srna, "name", "Untitled", 21, "Name", "Image datablock name.");
 	RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, "Width", "Image width.", 1, 16384);
 	RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, "Height", "Image height.", 1, 16384);
-	RNA_def_float_color(ot->srna, "color", 3, NULL, 0.0f, FLT_MAX, "Color", "Default fill color.", 0.0f, 1.0f);
-	RNA_def_float(ot->srna, "alpha", 1.0f, 0.0f, 1.0f, "Alpha", "Default fill alpha.", 0.0f, 1.0f);
+	prop= RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, "Color", "Default fill color.", 0.0f, 1.0f);
+	RNA_def_property_float_array_default(prop, default_color);
+	RNA_def_boolean(ot->srna, "alpha", 1, "Alpha", "Create an image with an alpha channel.");
 	RNA_def_boolean(ot->srna, "uv_test_grid", 0, "UV Test Grid", "Fill the image with a grid for UV map testing.");
 	RNA_def_boolean(ot->srna, "float", 0, "32 bit Float", "Create image with 32 bit floating point bit depth.");
 }

Modified: branches/render25/source/blender/editors/space_view3d/space_view3d.c
===================================================================
--- branches/render25/source/blender/editors/space_view3d/space_view3d.c	2010-06-30 09:53:40 UTC (rev 29819)
+++ branches/render25/source/blender/editors/space_view3d/space_view3d.c	2010-06-30 10:22:37 UTC (rev 29820)
@@ -749,6 +749,7 @@
 				case ND_POSE:
 				case ND_DRAW:
 				case ND_KEYS:
+				case ND_MODIFIER:
 					ED_region_tag_redraw(ar);
 					break;
 			}
@@ -760,6 +761,8 @@
 					ED_region_tag_redraw(ar);
 					break;
 			}
+			if (wmn->action == NA_EDITED)
+				ED_region_tag_redraw(ar);
 			break;
 		case NC_TEXTURE:
 			/* for brush textures */

Modified: branches/render25/source/blender/makesrna/intern/rna_main_api.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_main_api.c	2010-06-30 09:53:40 UTC (rev 29819)
+++ branches/render25/source/blender/makesrna/intern/rna_main_api.c	2010-06-30 10:22:37 UTC (rev 29820)
@@ -253,10 +253,10 @@
 	/* XXX python now has invalid pointer? */
 }
 
-Image *rna_Main_images_new(Main *bmain, char* name, int width, int height, int float_buffer)
+Image *rna_Main_images_new(Main *bmain, char* name, int width, int height, int alpha, int float_buffer)
 {
 	float color[4]= {0.0, 0.0, 0.0, 1.0};
-	Image *image= BKE_add_image_size(width, height, name, float_buffer, 0, color);
+	Image *image= BKE_add_image_size(width, height, name, alpha ? 32:24, float_buffer, 0, color);
 	image->id.us--;
 	return image;
 }
@@ -685,6 +685,7 @@
 	RNA_def_property_flag(parm, PROP_REQUIRED);
 	parm= RNA_def_int(func, "width", 1024, 1, INT_MAX, "", "Width of the image.", 0, INT_MAX);
 	parm= RNA_def_int(func, "height", 1024, 1, INT_MAX, "", "Height of the image.", 0, INT_MAX);
+	parm= RNA_def_boolean(func, "alpha", 0, "Alpha", "Use alpha channel");
 	parm= RNA_def_boolean(func, "float_buffer", 0, "Float Buffer", "Create an image with floating point color");
 	/* return type */
 	parm= RNA_def_pointer(func, "image", "Image", "", "New image datablock.");

Modified: branches/render25/source/blender/makesrna/intern/rna_object_force.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_object_force.c	2010-06-30 09:53:40 UTC (rev 29819)
+++ branches/render25/source/blender/makesrna/intern/rna_object_force.c	2010-06-30 10:22:37 UTC (rev 29820)
@@ -357,14 +357,19 @@
 static int rna_SoftBodySettings_new_aero_get(PointerRNA *ptr)
 {
 	Object *data= (Object*)(ptr->id.data);
-	return (((data->softflag) & OB_SB_AERO_ANGLE) != 0);
+	if (data->softflag & OB_SB_AERO_ANGLE)
+		return 1;
+	else
+		return 0;
 }
 
 static void rna_SoftBodySettings_new_aero_set(PointerRNA *ptr, int value)
 {
 	Object *data= (Object*)(ptr->id.data);

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list