[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39435] branches/soc-2011-tomato: Merging r39397 through r39434 from trunk into soc-2011-tomato

Sergey Sharybin g.ulairi at gmail.com
Tue Aug 16 09:56:45 CEST 2011


Revision: 39435
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39435
Author:   nazgul
Date:     2011-08-16 07:56:44 +0000 (Tue, 16 Aug 2011)
Log Message:
-----------
Merging r39397 through r39434 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowWin32.cpp
    branches/soc-2011-tomato/release/scripts/modules/bpy_extras/io_utils.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_smart_project.py
    branches/soc-2011-tomato/source/blender/blenkernel/intern/depsgraph.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/texture.c
    branches/soc-2011-tomato/source/blender/blenlib/BLI_utildefines.h
    branches/soc-2011-tomato/source/blender/blenlib/intern/BLI_ghash.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_mods.c
    branches/soc-2011-tomato/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2011-tomato/source/blender/editors/object/object_edit.c
    branches/soc-2011-tomato/source/blender/editors/render/render_update.c
    branches/soc-2011-tomato/source/blender/editors/space_file/file_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_file/filelist.c
    branches/soc-2011-tomato/source/blender/editors/space_nla/nla_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_select.c
    branches/soc-2011-tomato/source/blender/editors/space_text/text_python.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/anim_movie.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/filter.c
    branches/soc-2011-tomato/source/blender/makesrna/RNA_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_access.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_object.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_wm.c
    branches/soc-2011-tomato/source/blender/render/intern/source/rayshade.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_files.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_keymap.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_operators.c

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
   - /trunk/blender:36831-39396
   + /trunk/blender:36831-39434

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowWin32.cpp	2011-08-16 06:53:03 UTC (rev 39434)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowWin32.cpp	2011-08-16 07:56:44 UTC (rev 39435)
@@ -612,7 +612,6 @@
 		wp.showCmd = SW_SHOWMINIMIZED;
 		break;
 	case GHOST_kWindowStateMaximized:
-		ShowWindow(m_hWnd, SW_HIDE);
 		wp.showCmd = SW_SHOWMAXIMIZED;
 		SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
 		break;
@@ -629,12 +628,12 @@
 		break;
 	case GHOST_kWindowStateNormal:
 	default:
-		ShowWindow(m_hWnd, SW_HIDE);
 		wp.showCmd = SW_SHOWNORMAL;
 		SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
 		break;
 	}
-	return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
+	SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); /*Clears window cache for SetWindowLongPtr */
+ 	return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
 }
 
 

Modified: branches/soc-2011-tomato/release/scripts/modules/bpy_extras/io_utils.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy_extras/io_utils.py	2011-08-16 06:53:03 UTC (rev 39434)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy_extras/io_utils.py	2011-08-16 07:56:44 UTC (rev 39435)
@@ -439,7 +439,7 @@
             shutil.copy(file_src, file_dst)
 
 
-def unique_name(key, name, name_dict, name_max=-1, clean_func=None):
+def unique_name(key, name, name_dict, name_max=-1, clean_func=None, sep="."):
     """
     Helper function for storing unique names which may have special characters
     stripped and restricted to a maximum length.
@@ -456,6 +456,9 @@
     :type name_dict: dict
     :arg clean_func: Function to call on *name* before creating a unique value.
     :type clean_func: function
+    :arg sep: Separator to use when between the name and a number when a
+       duplicate name is found.
+    :type sep: string
     """
     name_new = name_dict.get(key)
     if name_new is None:
@@ -466,14 +469,15 @@
 
         if name_max == -1:
             while name_new in name_dict_values:
-                name_new = "%s.%03d" % (name_new_orig, count)
+                name_new = "%s%s%03d" % (name_new_orig, sep, count)
                 count += 1
         else:
             name_new = name_new[:name_max]
             while name_new in name_dict_values:
                 count_str = "%03d" % count
-                name_new = "%.*s.%s" % (name_max - (len(count_str) + 1),
+                name_new = "%.*s%s%s" % (name_max - (len(count_str) + 1),
                                         name_new_orig,
+                                        sep,
                                         count_str,
                                         )
                 count += 1

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_smart_project.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_smart_project.py	2011-08-16 06:53:03 UTC (rev 39434)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_operators/uvcalc_smart_project.py	2011-08-16 07:56:44 UTC (rev 39435)
@@ -813,39 +813,26 @@
     global RotMatStepRotation
     main_consts()
 
-    # TODO, all selected meshes
-    '''
-    # objects = context.selected_editable_objects
-    objects = []
-
-    # we can will tag them later.
-    obList =  [ob for ob in objects if ob.type == 'MESH']
-
-    # Face select object may not be selected.
-    ob = context.active_object
-
-    if ob and (not ob.select) and ob.type == 'MESH':
-        # Add to the list
-        obList =[ob]
-    del objects
-    '''
+    # Create the variables.
+    USER_PROJECTION_LIMIT = projection_limit
+    USER_ONLY_SELECTED_FACES = True
+    USER_SHARE_SPACE = 1 # Only for hole filling.
+    USER_STRETCH_ASPECT = 1 # Only for hole filling.
+    USER_ISLAND_MARGIN = island_margin # Only for hole filling.
+    USER_FILL_HOLES = 0
+    USER_FILL_HOLES_QUALITY = 50 # Only for hole filling.
+    USER_VIEW_INIT = 0 # Only for hole filling.
     
-    # quick workaround
-    obList =  [ob for ob in [context.active_object] if ob and ob.type == 'MESH']
+    is_editmode = (context.active_object.mode == 'EDIT')
+    if is_editmode:
+        obList =  [ob for ob in [context.active_object] if ob and ob.type == 'MESH']
+    else:
+        obList =  [ob for ob in context.selected_editable_objects if ob and ob.type == 'MESH']
+        USER_ONLY_SELECTED_FACES = False
 
     if not obList:
         raise('error, no selected mesh objects')
 
-    # Create the variables.
-    USER_PROJECTION_LIMIT = projection_limit
-    USER_ONLY_SELECTED_FACES = (1)
-    USER_SHARE_SPACE = (1) # Only for hole filling.
-    USER_STRETCH_ASPECT = (1) # Only for hole filling.
-    USER_ISLAND_MARGIN = island_margin # Only for hole filling.
-    USER_FILL_HOLES = (0)
-    USER_FILL_HOLES_QUALITY = (50) # Only for hole filling.
-    USER_VIEW_INIT = (0) # Only for hole filling.
-
     # Reuse variable
     if len(obList) == 1:
         ob = "Unwrap %i Selected Mesh"
@@ -906,8 +893,8 @@
 
         if USER_ONLY_SELECTED_FACES:
             meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.select]
-        #else:
-        #	meshFaces = map(thickface, me.faces)
+        else:
+        	meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces)]
 
         if not meshFaces:
             continue
@@ -922,7 +909,7 @@
         # meshFaces = []
 
         # meshFaces.sort( lambda a, b: cmp(b.area , a.area) ) # Biggest first.
-        meshFaces.sort( key = lambda a: -a.area )
+        meshFaces.sort(key=lambda a: -a.area)
 
         # remove all zero area faces
         while meshFaces and meshFaces[-1].area <= SMALL_NUM:

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/depsgraph.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/depsgraph.c	2011-08-16 06:53:03 UTC (rev 39434)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/depsgraph.c	2011-08-16 07:56:44 UTC (rev 39435)
@@ -302,6 +302,7 @@
 	for (fcu= adt->drivers.first; fcu; fcu= fcu->next) {
 		ChannelDriver *driver= fcu->driver;
 		DriverVar *dvar;
+		int isdata_fcu = isdata || (fcu->rna_path && strstr(fcu->rna_path, "modifiers["));
 		
 		/* loop over variables to get the target relationships */
 		for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
@@ -321,14 +322,14 @@
 							( ((dtar->rna_path) && strstr(dtar->rna_path, "pose.bones[")) || 
 							  ((dtar->flag & DTAR_FLAG_STRUCT_REF) && (dtar->pchan_name[0])) )) 
 						{
-							dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
+							dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
 						}
 						/* check if ob data */
 						else if (dtar->rna_path && strstr(dtar->rna_path, "data."))
-							dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
+							dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
 						/* normal */
 						else
-							dag_add_relation(dag, node1, node, isdata?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Driver");
+							dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Driver");
 					}
 				}
 			}

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c	2011-08-16 06:53:03 UTC (rev 39434)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/nla.c	2011-08-16 07:56:44 UTC (rev 39435)
@@ -1582,7 +1582,7 @@
 
 /* Baking Tools ------------------------------------------- */
 
-static void BKE_nla_bake (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
+static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
 {
 
 	/* verify that data is valid 

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c	2011-08-16 06:53:03 UTC (rev 39434)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c	2011-08-16 07:56:44 UTC (rev 39435)
@@ -714,6 +714,7 @@
 			seq->len = 0;
 		}
 		seq->strip->len = seq->len;
+		break;
 	case SEQ_SOUND:
 #ifdef WITH_AUDASPACE
 		if(!seq->sound)

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/texture.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/texture.c	2011-08-16 06:53:03 UTC (rev 39434)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/texture.c	2011-08-16 07:56:44 UTC (rev 39435)
@@ -1005,7 +1005,7 @@
 
 Tex *give_current_object_texture(Object *ob)
 {
-	Material *ma;
+	Material *ma, *node_ma;
 	Tex *tex= NULL;
 	
 	if(ob==NULL) return NULL;
@@ -1015,6 +1015,10 @@
 		tex= give_current_lamp_texture(ob->data);
 	} else {
 		ma= give_current_material(ob, ob->actcol);
+
+		if((node_ma=give_node_material(ma)))
+			ma= node_ma;
+
 		tex= give_current_material_texture(ma);
 	}
 	
@@ -1080,17 +1084,6 @@
 			tex= (Tex *)node->id;
 			ma= NULL;
 		}
-		else {
-			node= nodeGetActiveID(ma->nodetree, ID_MA);
-			if(node) {
-				ma= (Material*)node->id;
-				if(ma) {
-					mtex= ma->mtex[(int)(ma->texact)];
-					if(mtex) tex= mtex->tex;
-				}
-			}
-		}
-		return tex;
 	}
 
 	if(ma) {
@@ -1165,11 +1158,6 @@
 			id_us_plus(&newtex->id);
 			ma= NULL;
 		}
-		else {
-			node= nodeGetActiveID(ma->nodetree, ID_MA);
-			if(node)
-				ma= (Material*)node->id;
-		}
 	}
 	if(ma) {
 		int act= (int)ma->texact;
@@ -1198,16 +1186,8 @@
 	if(ma && ma->use_nodes && ma->nodetree) {
 		node= nodeGetActiveID(ma->nodetree, ID_TE);
 
-		if(node) {

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list