[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30309] branches/render25: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/ blender -r30292:30308

Campbell Barton ideasman42 at gmail.com
Wed Jul 14 12:02:43 CEST 2010


Revision: 30309
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30309
Author:   campbellbarton
Date:     2010-07-14 12:02:43 +0200 (Wed, 14 Jul 2010)

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

Modified Paths:
--------------
    branches/render25/release/scripts/op/object.py
    branches/render25/release/scripts/ui/properties_physics_common.py
    branches/render25/source/blender/blenkernel/intern/blender.c
    branches/render25/source/blender/blenkernel/intern/depsgraph.c
    branches/render25/source/blender/blenkernel/intern/pointcache.c
    branches/render25/source/blender/blenloader/intern/readfile.c
    branches/render25/source/blender/editors/interface/interface_regions.c
    branches/render25/source/blender/editors/space_file/filelist.c
    branches/render25/source/blender/makesrna/intern/rna_modifier.c
    branches/render25/source/blender/modifiers/intern/MOD_solidify.c
    branches/render25/source/blender/windowmanager/intern/wm_files.c

Modified: branches/render25/release/scripts/op/object.py
===================================================================
--- branches/render25/release/scripts/op/object.py	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/release/scripts/op/object.py	2010-07-14 10:02:43 UTC (rev 30309)
@@ -113,25 +113,43 @@
         return context.object
 
     def execute(self, context):
-        obj = context.object
+        objs = context.selected_objects
+        obj_act = context.object
+
+        if context.object not in objs:
+            objs.append(context.object)
+
+        if not self.properties.extend:
+            # for obj in objs:
+            #     obj.selected = False
+            bpy.ops.object.select_all(action='DESELECT')
+
         if self.properties.direction == 'PARENT':
-            parent = obj.parent
-            if not parent:
+            parents = []
+            for obj in objs:
+                parent = obj.parent
+
+                if parent:
+                    parents.append(parent)
+                
+                if obj_act == obj:
+                    context.scene.objects.active = parent
+
+                parent.selected = True
+                
+            if parents:
                 return {'CANCELLED'}
-            obj_act = parent
+
         else:
-            children = obj.children
-            if len(children) != 1:
-                return {'CANCELLED'}
-            obj_act = children[0]
+            children = []
+            for obj in objs:
+                children += list(obj.children)
+                for obj_iter in children:
+                    obj_iter.selected = True
 
-        if not self.properties.extend:
-            # obj.selected = False
-            bpy.ops.object.select_all(action='DESELECT')
+            children.sort(key=lambda obj_iter: obj_iter.name)
+            context.scene.objects.active = children[0]
 
-        obj_act.selected = True
-        context.scene.objects.active = obj_act
-
         return {'FINISHED'}
 
 

Modified: branches/render25/release/scripts/ui/properties_physics_common.py
===================================================================
--- branches/render25/release/scripts/ui/properties_physics_common.py	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/release/scripts/ui/properties_physics_common.py	2010-07-14 10:02:43 UTC (rev 30309)
@@ -46,7 +46,10 @@
         split.prop(cache, "name", text="File Name")
         split.prop(cache, "index", text="")
 
-        layout.label(text="File Path:")
+        row = layout.row()
+        row.label(text="File Path:")
+        row.prop(cache, "use_library_path", "Use Lib Path")
+        
         layout.prop(cache, "filepath", text="")
 
         layout.label(text=cache.info)

Modified: branches/render25/source/blender/blenkernel/intern/blender.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/blender.c	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/source/blender/blenkernel/intern/blender.c	2010-07-14 10:02:43 UTC (rev 30309)
@@ -313,8 +313,6 @@
 
 	/* baseflags, groups, make depsgraph, etc */
 	set_scene_bg(CTX_data_scene(C));
-
-	DAG_on_load_update();
 	
 	MEM_freeN(bfd);
 }
@@ -478,6 +476,9 @@
 	strcpy(G.sce, scestr);
 	G.fileflags= fileflags;
 
+	if(success)
+		DAG_on_load_update();
+
 	return success;
 }
 

Modified: branches/render25/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/depsgraph.c	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/source/blender/blenkernel/intern/depsgraph.c	2010-07-14 10:02:43 UTC (rev 30309)
@@ -2217,7 +2217,7 @@
 		*sce= bmain->scene.first;
 		if(*sce) *lay= (*sce)->lay;
 
-		/* XXX for background mode, we should get the scen
+		/* XXX for background mode, we should get the scene
 		   from somewhere, for the -S option, but it's in
 		   the context, how to get it here? */
 	}
@@ -2248,7 +2248,7 @@
 
 	dag_current_scene_layers(bmain, &scene, &lay);
 
-	if(scene) {
+	if(scene && scene->theDag) {
 		/* derivedmeshes and displists are not saved to file so need to be
 		   remade, tag them so they get remade in the scene update loop,
 		   note armature poses or object matrices are preserved and do not

Modified: branches/render25/source/blender/blenkernel/intern/pointcache.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/pointcache.c	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/source/blender/blenkernel/intern/pointcache.c	2010-07-14 10:02:43 UTC (rev 30309)
@@ -1082,21 +1082,21 @@
 
 static int ptcache_path(PTCacheID *pid, char *filename)
 {
-	Library *lib;
+	Library *lib= (pid)? pid->ob->id.lib: NULL;
+	const char *blendfilename= (lib && (pid->cache->flag & PTCACHE_IGNORE_LIBPATH)==0) ? lib->filepath: G.sce;
 	size_t i;
 
-	lib= (pid)? pid->ob->id.lib: NULL;
-
 	if(pid->cache->flag & PTCACHE_EXTERNAL) {
 		strcpy(filename, pid->cache->path);
+
+		if(strncmp(filename, "//", 2)==0)
+			BLI_path_abs(filename, blendfilename);
+
 		return BLI_add_slash(filename); /* new strlen() */
 	}
 	else if (G.relbase_valid || lib) {
 		char file[MAX_PTCACHE_PATH]; /* we dont want the dir, only the file */
-		char *blendfilename;
 
-		blendfilename= (lib && (pid->cache->flag & PTCACHE_IGNORE_LIBPATH)==0) ? lib->filepath: G.sce;
-
 		BLI_split_dirfile(blendfilename, NULL, file);
 		i = strlen(file);
 		

Modified: branches/render25/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/render25/source/blender/blenloader/intern/readfile.c	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/source/blender/blenloader/intern/readfile.c	2010-07-14 10:02:43 UTC (rev 30309)
@@ -9813,7 +9813,7 @@
 					if(sAct->sound)
 					{
 						sound = newlibadr(fd, lib, sAct->sound);
-						sAct->flag = sound->flags | SOUND_FLAGS_3D ? ACT_SND_3D_SOUND : 0;
+						sAct->flag = sound->flags & SOUND_FLAGS_3D ? ACT_SND_3D_SOUND : 0;
 						sAct->pitch = sound->pitch;
 						sAct->volume = sound->volume;
 						sAct->sound3D.reference_distance = sound->distance;

Modified: branches/render25/source/blender/editors/interface/interface_regions.c
===================================================================
--- branches/render25/source/blender/editors/interface/interface_regions.c	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/source/blender/editors/interface/interface_regions.c	2010-07-14 10:02:43 UTC (rev 30309)
@@ -1600,7 +1600,7 @@
 			if (rgb_gamma[1] > 1.0f) rgb_gamma[1] = modf(rgb_gamma[1], &intpart);
 			if (rgb_gamma[2] > 1.0f) rgb_gamma[2] = modf(rgb_gamma[2], &intpart);
 
-			sprintf(col, "%02X%02X%02X", (unsigned int)(rgb_gamma[0]*255.0), (unsigned int)(rgb_gamma[1]*255.0), (unsigned int)(rgb_gamma[2]*255.0));
+			sprintf(col, "%02X%02X%02X", FTOCHAR(rgb_gamma[0]), FTOCHAR(rgb_gamma[1]), FTOCHAR(rgb_gamma[2]));
 			
 			strcpy(bt->poin, col);
 		}
@@ -1861,9 +1861,9 @@
 	}
 
 	rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2);
-	
-	sprintf(hexcol, "%02X%02X%02X", (unsigned int)(rgb_gamma[0]*255.0), (unsigned int)(rgb_gamma[1]*255.0), (unsigned int)(rgb_gamma[2]*255.0));	
 
+	sprintf(hexcol, "%02X%02X%02X", FTOCHAR(rgb_gamma[0]), FTOCHAR(rgb_gamma[1]), FTOCHAR(rgb_gamma[2]));
+
 	bt= uiDefBut(block, TEX, 0, "Hex: ", 0, -60, butwidth, UI_UNIT_Y, hexcol, 0, 8, 0, 0, "Hex triplet for color (#RRGGBB)");
 	uiButSetFunc(bt, do_hex_rna_cb, bt, hexcol);
 	uiDefBut(block, LABEL, 0, "(Gamma Corrected)", 0, -80, butwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");

Modified: branches/render25/source/blender/editors/space_file/filelist.c
===================================================================
--- branches/render25/source/blender/editors/space_file/filelist.c	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/source/blender/editors/space_file/filelist.c	2010-07-14 10:02:43 UTC (rev 30309)
@@ -807,9 +807,6 @@
 
 			/* Don't check extensions for directories */ 
 		if (file->type & S_IFDIR) {
-			if(BLO_has_bfile_extension(file->relname)) {
-				file->flags |= BLENDERFILE;
-			}
 			continue;
 		}
 

Modified: branches/render25/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- branches/render25/source/blender/makesrna/intern/rna_modifier.c	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/source/blender/makesrna/intern/rna_modifier.c	2010-07-14 10:02:43 UTC (rev 30309)
@@ -2143,7 +2143,7 @@
 	RNA_def_property_float_sdna(prop, NULL, "offset_fac");
 	RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
 	RNA_def_property_ui_range(prop, -1, 1, 0.1, 4);
-	RNA_def_property_ui_text(prop, "Offset", "");
+	RNA_def_property_ui_text(prop, "Offset", "Offset the thickness from the center");
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
 	prop= RNA_def_property(srna, "edge_crease_inner", PROP_FLOAT, PROP_FACTOR);

Modified: branches/render25/source/blender/modifiers/intern/MOD_solidify.c
===================================================================
--- branches/render25/source/blender/modifiers/intern/MOD_solidify.c	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/source/blender/modifiers/intern/MOD_solidify.c	2010-07-14 10:02:43 UTC (rev 30309)
@@ -162,6 +162,7 @@
 {
 	SolidifyModifierData *smd = (SolidifyModifierData*) md;
 	smd->offset = 0.01f;
+	smd->offset_fac = -1.0f;
 	smd->flag = MOD_SOLIDIFY_RIM;
 }
  

Modified: branches/render25/source/blender/windowmanager/intern/wm_files.c
===================================================================
--- branches/render25/source/blender/windowmanager/intern/wm_files.c	2010-07-14 09:47:44 UTC (rev 30308)
+++ branches/render25/source/blender/windowmanager/intern/wm_files.c	2010-07-14 10:02:43 UTC (rev 30309)
@@ -61,6 +61,7 @@
 
 #include "BKE_blender.h"
 #include "BKE_context.h"
+#include "BKE_depsgraph.h"
 #include "BKE_DerivedMesh.h"
 #include "BKE_exotic.h"
 #include "BKE_font.h"
@@ -309,7 +310,9 @@
 //		refresh_interface_font();
 
 		CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first);
+
 		ED_editors_init(C);
+		DAG_on_load_update();
 
 #ifndef DISABLE_PYTHON
 		/* run any texts that were loaded in and flagged as modules */
@@ -389,6 +392,7 @@
 	BKE_write_undo(C, "original");	/* save current state */
 
 	ED_editors_init(C);

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list