[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42179] branches/soc-2011-tomato: Merging r42160 through r42177 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Sat Nov 26 21:59:00 CET 2011


Revision: 42179
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42179
Author:   nazgul
Date:     2011-11-26 20:58:53 +0000 (Sat, 26 Nov 2011)
Log Message:
-----------
Merging r42160 through r42177 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/release/scripts/modules/addon_utils.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_mesh.py
    branches/soc-2011-tomato/source/blender/blenfont/intern/blf_dir.c
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_DerivedMesh.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_material.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_particle.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/blender.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/packedFile.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/particle.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/pointcache.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/text.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/path_util.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/storage.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/winstuff.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.h
    branches/soc-2011-tomato/source/blender/blenloader/intern/writefile.c
    branches/soc-2011-tomato/source/blender/editors/gpencil/drawgpencil.c
    branches/soc-2011-tomato/source/blender/editors/gpencil/gpencil_paint.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_icons.c
    branches/soc-2011-tomato/source/blender/editors/physics/physics_fluid.c
    branches/soc-2011-tomato/source/blender/editors/render/render_opengl.c
    branches/soc-2011-tomato/source/blender/editors/screen/screendump.c
    branches/soc-2011-tomato/source/blender/editors/space_console/space_console.c
    branches/soc-2011-tomato/source/blender/editors/space_file/filelist.c
    branches/soc-2011-tomato/source/blender/editors/space_file/fsmenu.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_buttons.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_templates.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_text/text_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2011-tomato/source/blender/editors/util/ed_util.c
    branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_draw.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/IMB_indexer.h
    branches/soc-2011-tomato/source/blender/imbuf/intern/indexer.c
    branches/soc-2011-tomato/source/blender/makesdna/intern/makesdna.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_curve.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_group.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_image.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_image_api.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_key.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_lamp.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_lattice.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_main_api.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_material.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_meta.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_modifier.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nodetree.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_object.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_particle.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_pose.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_speaker.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_texture.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_world.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_fluidsim_util.c
    branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_mixrgb.c
    branches/soc-2011-tomato/source/blender/nodes/shader/nodes/node_shader_mixRgb.c
    branches/soc-2011-tomato/source/blender/nodes/texture/nodes/node_texture_bricks.c
    branches/soc-2011-tomato/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
    branches/soc-2011-tomato/source/blender/nodes/texture/nodes/node_texture_proc.c
    branches/soc-2011-tomato/source/blender/nodes/texture/nodes/node_texture_texture.c
    branches/soc-2011-tomato/source/blender/python/generic/idprop_py_api.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_app.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_interface.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_library.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_operator.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_props.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_rna_anim.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_rna_array.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_traceback.c
    branches/soc-2011-tomato/source/blender/render/extern/include/RE_engine.h
    branches/soc-2011-tomato/source/blender/render/intern/source/external_engine.c
    branches/soc-2011-tomato/source/blender/render/intern/source/pipeline.c
    branches/soc-2011-tomato/source/blender/render/intern/source/pixelshading.c
    branches/soc-2011-tomato/source/blender/render/intern/source/render_texture.c
    branches/soc-2011-tomato/source/blender/render/intern/source/shadeoutput.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_files.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_gesture.c
    branches/soc-2011-tomato/source/creator/creator.c
    branches/soc-2011-tomato/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2011-tomato/source/gameengine/VideoTexture/CMakeLists.txt

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
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-42159
   + /branches/soc-2011-cucumber:37517
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-42177

Modified: branches/soc-2011-tomato/release/scripts/modules/addon_utils.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/addon_utils.py	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/release/scripts/modules/addon_utils.py	2011-11-26 20:58:53 UTC (rev 42179)
@@ -235,7 +235,8 @@
 
     # reload if the mtime changes
     mod = sys.modules.get(module_name)
-    if mod:
+    # chances of the file _not_ existing are low, but it could be removed
+    if mod and os.path.exists(mod.__file__):
         mod.__addon_enabled__ = False
         mtime_orig = getattr(mod, "__time__", 0)
         mtime_new = os.path.getmtime(mod.__file__)
@@ -252,6 +253,7 @@
 
     # Split registering up into 3 steps so we can undo
     # if it fails par way through.
+
     # 1) try import
     try:
         mod = __import__(module_name)

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_mesh.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_mesh.py	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/properties_data_mesh.py	2011-11-26 20:58:53 UTC (rev 42179)
@@ -36,9 +36,9 @@
         layout.operator("object.vertex_group_mirror", icon='ARROW_LEFTRIGHT')
         layout.operator("object.vertex_group_remove", icon='X', text="Delete All").all = True
         layout.separator()
-        layout.operator("object.vertex_group_lock", icon='LOCK', text="Lock All").action = 'SELECT'
-        layout.operator("object.vertex_group_lock", icon='UNLOCK', text="UnLock All").action = 'DESELECT'
-        layout.operator("object.vertex_group_lock", icon='LOCK', text="Lock Invert All").action = 'INVERT'
+        layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock All").action = 'SELECT'
+        layout.operator("object.vertex_group_lock", icon='UNLOCKED', text="UnLock All").action = 'DESELECT'
+        layout.operator("object.vertex_group_lock", icon='LOCKED', text="Lock Invert All").action = 'INVERT'
 
 
 class MESH_MT_shape_key_specials(Menu):

Modified: branches/soc-2011-tomato/source/blender/blenfont/intern/blf_dir.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenfont/intern/blf_dir.c	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/source/blender/blenfont/intern/blf_dir.c	2011-11-26 20:58:53 UTC (rev 42179)
@@ -129,7 +129,7 @@
 char *blf_dir_search(const char *file)
 {
 	DirBLF *dir;
-	char full_path[FILE_MAXDIR+FILE_MAXFILE];
+	char full_path[FILE_MAX];
 	char *s= NULL;
 
 	for(dir=global_font_dir.first; dir; dir= dir->next) {

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_DerivedMesh.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_DerivedMesh.h	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_DerivedMesh.h	2011-11-26 20:58:53 UTC (rev 42179)
@@ -526,7 +526,7 @@
 int sculpt_get_deform_matrices(struct Scene *scene, struct Object *ob,
 								float (**deformmats)[3][3], float (**deformcos)[3]);
 
-void weight_to_rgb(float input, float *fr, float *fg, float *fb);
+void weight_to_rgb(float r_rgb[3], const float weight);
 
 /* convert layers requested by a GLSL material to actually available layers in
  * the DerivedMesh, with both a pointer for arrays and an offset for editmesh */

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_material.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_material.h	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_material.h	2011-11-26 20:58:53 UTC (rev 42179)
@@ -91,7 +91,7 @@
 
 int material_in_material(struct Material *parmat, struct Material *mat);
 
-void ramp_blend(int type, float *r, float *g, float *b, float fac, const float col[3]);
+void	ramp_blend(int type, float r_col[3], const float fac, const float col[3]);
 
 /* copy/paste */
 void clear_matcopybuf(void);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_particle.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_particle.h	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_particle.h	2011-11-26 20:58:53 UTC (rev 42179)
@@ -217,7 +217,7 @@
 	float *ndata, *nd;		/* normal data */
 	float *cdata, *cd;		/* color data */
 	float *vedata, *ved;	/* velocity data */
-	float *ma_r, *ma_g, *ma_b;
+	float *ma_col;
 	int tot_vec_size, flag;
 	int totpoint, totve;
 } ParticleDrawData;

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c	2011-11-26 20:58:53 UTC (rev 42179)
@@ -1775,31 +1775,29 @@
  * happens on enter/exit wpaint.
  */
 
-void weight_to_rgb(float input, float *fr, float *fg, float *fb)
+void weight_to_rgb(float r_rgb[3], const float weight)
 {
-	float blend;
-	
-	blend= ((input/2.0f)+0.5f);
-	
-	if (input<=0.25f){	// blue->cyan
-		*fr= 0.0f;
-		*fg= blend*input*4.0f;
-		*fb= blend;
+	const float blend= ((weight/2.0f)+0.5f);
+
+	if (weight<=0.25f){	// blue->cyan
+		r_rgb[0]= 0.0f;
+		r_rgb[1]= blend*weight*4.0f;
+		r_rgb[2]= blend;
 	}
-	else if (input<=0.50f){	// cyan->green
-		*fr= 0.0f;
-		*fg= blend;
-		*fb= blend*(1.0f-((input-0.25f)*4.0f)); 
+	else if (weight<=0.50f){	// cyan->green
+		r_rgb[0]= 0.0f;
+		r_rgb[1]= blend;
+		r_rgb[2]= blend*(1.0f-((weight-0.25f)*4.0f));
 	}
-	else if (input <= 0.75f){	// green->yellow
-		*fr= blend * ((input-0.50f)*4.0f);
-		*fg= blend;
-		*fb= 0.0f;
+	else if (weight <= 0.75f){	// green->yellow
+		r_rgb[0]= blend * ((weight-0.50f)*4.0f);
+		r_rgb[1]= blend;
+		r_rgb[2]= 0.0f;
 	}
-	else if (input <= 1.0f){ // yellow->red
-		*fr= blend;
-		*fg= blend * (1.0f-((input-0.75f)*4.0f)); 
-		*fb= 0.0f;
+	else if (weight <= 1.0f){ // yellow->red
+		r_rgb[0]= blend;
+		r_rgb[1]= blend * (1.0f-((weight-0.75f)*4.0f));
+		r_rgb[2]= 0.0f;
 	}
 }
 
@@ -1864,7 +1862,7 @@
 	if(coba)
 		do_colorband(coba, input, colf);
 	else
-		weight_to_rgb(input, colf, colf+1, colf+2);
+		weight_to_rgb(colf, input);
 	
 	col[3] = (unsigned char)(colf[0] * 255.0f);
 	col[2] = (unsigned char)(colf[1] * 255.0f);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/blender.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/blender.c	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/blender.c	2011-11-26 20:58:53 UTC (rev 42179)
@@ -451,7 +451,7 @@
 #define MAXUNDONAME	64
 typedef struct UndoElem {
 	struct UndoElem *next, *prev;
-	char str[FILE_MAXDIR+FILE_MAXFILE];
+	char str[FILE_MAX];
 	char name[MAXUNDONAME];
 	MemFile memfile;
 	uintptr_t undosize;
@@ -536,7 +536,7 @@
 	/* disk save version */
 	if(UNDO_DISK) {
 		static int counter= 0;
-		char filepath[FILE_MAXDIR+FILE_MAXFILE];
+		char filepath[FILE_MAX];
 		char numstr[32];
 		int fileflags = G.fileflags & ~(G_FILE_HISTORY); /* don't do file history on undo */
 
@@ -702,7 +702,7 @@
 	UndoElem *uel;
 	MemFileChunk *chunk;
 	int file;
-	char str[FILE_MAXDIR+FILE_MAXFILE];
+	char str[FILE_MAX];
 	
 	if( (U.uiflag & USER_GLOBALUNDO)==0) return;
 	

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/dynamicpaint.c	2011-11-26 20:58:53 UTC (rev 42179)
@@ -1681,7 +1681,7 @@
 									for (; j<((mface[i].v4)?4:3); j++) {
 										int index = (j==0)?mface[i].v1: (j==1)?mface[i].v2: (j==2)?mface[i].v3: mface[i].v4;
 
-										weight_to_rgb(weight[index], temp_color, temp_color+1, temp_color+2);
+										weight_to_rgb(temp_color, weight[index]);
 										col[i*4+j].r = FTOCHAR(temp_color[2]);
 										col[i*4+j].g = FTOCHAR(temp_color[1]);
 										col[i*4+j].b = FTOCHAR(temp_color[0]);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c	2011-11-26 20:48:18 UTC (rev 42178)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c	2011-11-26 20:58:53 UTC (rev 42179)
@@ -1180,129 +1180,129 @@
 
 /* r g b = current value, col = new value, fac==0 is no change */
 /* if g==NULL, it only does r channel */
-void ramp_blend(int type, float *r, float *g, float *b, float fac, const float col[3])
+void ramp_blend(int type, float r_col[3], const float fac, const float col[3])
 {
 	float tmp, facm= 1.0f-fac;
 	
 	switch (type) {
 		case MA_RAMP_BLEND:
-			*r = facm*(*r) + fac*col[0];
-			if(g) {
-				*g = facm*(*g) + fac*col[1];
-				*b = facm*(*b) + fac*col[2];
+			r_col[0] = facm*(r_col[0]) + fac*col[0];
+			if(r_col[1]) {
+				r_col[1] = facm*(r_col[1]) + fac*col[1];
+				r_col[2] = facm*(r_col[2]) + fac*col[2];
 			}
 				break;
 		case MA_RAMP_ADD:
-			*r += fac*col[0];
-			if(g) {
-				*g += fac*col[1];
-				*b += fac*col[2];
+			r_col[0] += fac*col[0];
+			if(r_col[1]) {
+				r_col[1] += fac*col[1];
+				r_col[2] += fac*col[2];
 			}
 				break;
 		case MA_RAMP_MULT:
-			*r *= (facm + fac*col[0]);
-			if(g) {
-				*g *= (facm + fac*col[1]);
-				*b *= (facm + fac*col[2]);
+			r_col[0] *= (facm + fac*col[0]);
+			if(r_col[1]) {
+				r_col[1] *= (facm + fac*col[1]);
+				r_col[2] *= (facm + fac*col[2]);
 			}

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list