[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56252] branches/soc-2011-tomato: Merging r56248 through r56251 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Tue Apr 23 22:28:53 CEST 2013


Revision: 56252
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56252
Author:   nazgul
Date:     2013-04-23 20:28:52 +0000 (Tue, 23 Apr 2013)
Log Message:
-----------
Merging r56248 through r56251 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/intern/anim_sys.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/linestyle.c
    branches/soc-2011-tomato/source/blender/editors/animation/drivers.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_access.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_armature.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_boid.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_cloth.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_constraint.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_dynamicpaint.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_fluidsim.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_key.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_linestyle.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mesh.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_modifier.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nla.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nodetree.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_object_force.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_sequencer.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_smoke.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_texture.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_tracking.c

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


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/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-56247
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/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-56251

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/anim_sys.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/anim_sys.c	2013-04-23 20:24:40 UTC (rev 56251)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/anim_sys.c	2013-04-23 20:28:52 UTC (rev 56252)
@@ -38,9 +38,10 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_utildefines.h"
+#include "BLI_array.h"
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
-#include "BLI_utildefines.h"
 
 #include "BLF_translation.h"
 
@@ -725,8 +726,15 @@
 	
 	if ((oldName != NULL) && (newName != NULL)) {
 		/* pad the names with [" "] so that only exact matches are made */
-		oldN = BLI_sprintfN("[\"%s\"]", oldName);
-		newN = BLI_sprintfN("[\"%s\"]", newName);
+		const size_t name_old_len = strlen(oldName);
+		const size_t name_new_len = strlen(newName);
+		char *name_old_esc = BLI_array_alloca(name_old_esc, (name_old_len * 2) + 1);
+		char *name_new_esc = BLI_array_alloca(name_new_esc, (name_new_len * 2) + 1);
+
+		BLI_strescape(name_old_esc, oldName, (name_old_len * 2) + 1);
+		BLI_strescape(name_new_esc, newName, (name_new_len * 2) + 1);
+		oldN = BLI_sprintfN("[\"%s\"]", name_old_esc);
+		newN = BLI_sprintfN("[\"%s\"]", name_new_esc);
 	}
 	else {
 		oldN = BLI_sprintfN("[%d]", oldSubscript);
@@ -745,7 +753,7 @@
 	/* NLA Data - Animation Data for Strips */
 	for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next)
 		nlastrips_path_rename_fix(owner_id, prefix, oldName, newName, oldN, newN, &nlt->strips, verify_paths);
-		
+
 	/* free the temp names */
 	MEM_freeN(oldN);
 	MEM_freeN(newN);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/linestyle.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/linestyle.c	2013-04-23 20:24:40 UTC (rev 56251)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/linestyle.c	2013-04-23 20:28:52 UTC (rev 56252)
@@ -1018,25 +1018,29 @@
 
 	for (m = (LineStyleModifier *)linestyle->color_modifiers.first; m; m = m->next) {
 		switch (m->type) {
-		case LS_MODIFIER_ALONG_STROKE:
-			if (color_ramp == ((LineStyleColorModifier_AlongStroke *)m)->color_ramp)
-				found = true;
-			break;
-		case LS_MODIFIER_DISTANCE_FROM_CAMERA:
-			if (color_ramp == ((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp)
-				found = true;
-			break;
-		case LS_MODIFIER_DISTANCE_FROM_OBJECT:
-			if (color_ramp == ((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp)
-				found = true;
-			break;
-		case LS_MODIFIER_MATERIAL:
-			if (color_ramp == ((LineStyleColorModifier_Material *)m)->color_ramp)
-				found = true;
-			break;
+			case LS_MODIFIER_ALONG_STROKE:
+				if (color_ramp == ((LineStyleColorModifier_AlongStroke *)m)->color_ramp)
+					found = true;
+				break;
+			case LS_MODIFIER_DISTANCE_FROM_CAMERA:
+				if (color_ramp == ((LineStyleColorModifier_DistanceFromCamera *)m)->color_ramp)
+					found = true;
+				break;
+			case LS_MODIFIER_DISTANCE_FROM_OBJECT:
+				if (color_ramp == ((LineStyleColorModifier_DistanceFromObject *)m)->color_ramp)
+					found = true;
+				break;
+			case LS_MODIFIER_MATERIAL:
+				if (color_ramp == ((LineStyleColorModifier_Material *)m)->color_ramp)
+					found = true;
+				break;
 		}
-		if (found)
-			return BLI_sprintfN("color_modifiers[\"%s\"].color_ramp", m->name);
+
+		if (found) {
+			char name_esc[sizeof(m->name) * 2];
+			BLI_strescape(name_esc, m->name, sizeof(name_esc));
+			return BLI_sprintfN("color_modifiers[\"%s\"].color_ramp", name_esc);
+		}
 	}
 	printf("BKE_path_from_ID_to_color_ramp: No color ramps correspond to the given pointer.\n");
 	return NULL;

Modified: branches/soc-2011-tomato/source/blender/editors/animation/drivers.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/animation/drivers.c	2013-04-23 20:24:40 UTC (rev 56251)
+++ branches/soc-2011-tomato/source/blender/editors/animation/drivers.c	2013-04-23 20:28:52 UTC (rev 56252)
@@ -434,11 +434,17 @@
 					
 					/* assumes: texture will only be shown if it is active material's active texture it's ok */
 					if ((ID *)tex == id) {
+						char name_esc_ma[(sizeof(ma->id.name) - 2) * 2];
+						char name_esc_tex[(sizeof(tex->id.name) - 2) * 2];
+
+						BLI_strescape(name_esc_ma, ma->id.name + 2, sizeof(name_esc_ma));
+						BLI_strescape(name_esc_tex, tex->id.name + 2, sizeof(name_esc_tex));
+
 						/* create new path */
 						// TODO: use RNA path functions to construct step by step instead?
 						// FIXME: maybe this isn't even needed anymore...
 						path = BLI_sprintfN("material_slots[\"%s\"].material.texture_slots[\"%s\"].texture.%s", 
-						                    ma->id.name + 2, tex->id.name + 2, basepath);
+						                    name_esc_ma, name_esc_tex, basepath);
 							
 						/* free old one */
 						MEM_freeN(basepath);


Property changes on: branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-56247
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-56251


Property changes on: branches/soc-2011-tomato/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-56247
   + /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-56251

Modified: branches/soc-2011-tomato/source/blender/makesrna/intern/rna_access.c
===================================================================
--- branches/soc-2011-tomato/source/blender/makesrna/intern/rna_access.c	2013-04-23 20:24:40 UTC (rev 56251)
+++ branches/soc-2011-tomato/source/blender/makesrna/intern/rna_access.c	2013-04-23 20:28:52 UTC (rev 56252)
@@ -4325,14 +4325,25 @@
 	propname = RNA_property_identifier(prop);
 
 	if (ptrpath) {
-		path = BLI_sprintfN(is_rna ? "%s.%s" : "%s[\"%s\"]", ptrpath, propname);
+		if (is_rna) {
+			path = BLI_sprintfN("%s.%s", ptrpath, propname);
+		}
+		else {
+			char propname_esc[MAX_IDPROP_NAME * 2];
+			BLI_strescape(propname_esc, propname, sizeof(propname_esc));
+			path = BLI_sprintfN("%s[\"%s\"]", ptrpath, propname_esc);
+		}
 		MEM_freeN(ptrpath);
 	}
 	else if (RNA_struct_is_ID(ptr->type)) {
-		if (is_rna)
+		if (is_rna) {
 			path = BLI_strdup(propname);
-		else
-			path = BLI_sprintfN("[\"%s\"]", propname);
+		}
+		else {
+			char propname_esc[MAX_IDPROP_NAME * 2];
+			BLI_strescape(propname_esc, propname, sizeof(propname_esc));
+			path = BLI_sprintfN("[\"%s\"]", propname_esc);
+		}
 	}
 	else {
 		path = NULL;

Modified: branches/soc-2011-tomato/source/blender/makesrna/intern/rna_armature.c
===================================================================
--- branches/soc-2011-tomato/source/blender/makesrna/intern/rna_armature.c	2013-04-23 20:24:40 UTC (rev 56251)
+++ branches/soc-2011-tomato/source/blender/makesrna/intern/rna_armature.c	2013-04-23 20:28:52 UTC (rev 56252)
@@ -191,20 +191,23 @@
 
 static char *rna_Bone_path(PointerRNA *ptr)
 {
+	ID *id = ptr->id.data;
 	Bone *bone = (Bone *)ptr->data;
+	char name_esc[sizeof(bone->name) * 2];
 	
+	BLI_strescape(name_esc, bone->name, sizeof(name_esc));
+
 	/* special exception for trying to get the path where ID-block is Object
-	 *	- this will be assumed to be from a Pose Bone...
+	 * - this will be assumed to be from a Pose Bone...
 	 */
-	if (ptr->id.data) {
-		ID *id = (ID *)ptr->id.data;
-		
-		if (GS(id->name) == ID_OB)
-			return BLI_sprintfN("pose.bones[\"%s\"].bone", bone->name);
+	if (id) {
+		if (GS(id->name) == ID_OB) {
+			return BLI_sprintfN("pose.bones[\"%s\"].bone", name_esc);
+		}
 	}
 	
 	/* from armature... */
-	return BLI_sprintfN("bones[\"%s\"]", bone->name);
+	return BLI_sprintfN("bones[\"%s\"]", name_esc);
 }
 
 static IDProperty *rna_Bone_idprops(PointerRNA *ptr, bool create)


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list