[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46446] tags/blender-2.63a-release/blender : blender 2.63a: merge rest of changes from trunk into tag up to r46419

Sergey Sharybin sergey.vfx at gmail.com
Wed May 9 09:17:40 CEST 2012


Revision: 46446
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46446
Author:   nazgul
Date:     2012-05-09 07:17:40 +0000 (Wed, 09 May 2012)
Log Message:
-----------
blender 2.63a: merge rest of changes from trunk into tag up to r46419

Includes commits from Aligorith (46345, 46338, 46336)
Collada commits 46214, 46215 and 46246 and one Aligorith's commit 46342 were
already merged in previous merge.

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

Modified Paths:
--------------
    tags/blender-2.63a-release/blender/release/scripts/startup/bl_ui/space_view3d.py
    tags/blender-2.63a-release/blender/source/blender/editors/animation/anim_filter.c
    tags/blender-2.63a-release/blender/source/blender/makesrna/intern/rna_object.c

Property Changed:
----------------
    tags/blender-2.63a-release/blender/
    tags/blender-2.63a-release/blender/source/blender/editors/space_outliner/


Property changes on: tags/blender-2.63a-release/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /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/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230
/trunk/blender:46003-46005,46014-46016,46027-46028,46035-46036,46039,46043,46072,46077,46085,46091,46093,46095,46116-46117,46120,46125,46127,46131,46136,46138,46140-46143,46148-46149,46152,46156-46160,46172,46178-46181,46183-46184,46192,46194,46196-46197,46205-46206,46213-46215,46222,46224-46236,46241,46246,46250,46253,46260-46261,46264-46265,46269,46273,46277-46278,46280,46282,46289-46290,46294,46305,46308,46310-46311,46316,46327,46341-46342,46346-46347,46354,46361-46363,46385,46391,46393,46410-46412,46416-46417
   + /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/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230
/trunk/blender:46003-46005,46014-46016,46027-46028,46035-46036,46039,46043,46072,46077,46085,46091,46093,46095,46116-46117,46120,46125,46127,46131,46136,46138,46140-46143,46148-46149,46152,46156-46160,46172,46178-46181,46183-46184,46192,46194,46196-46197,46205-46206,46213-46215,46222,46224-46236,46241,46246,46250,46253,46260-46261,46264-46265,46269,46273,46277-46278,46280,46282,46289-46290,46294,46305,46308,46310-46311,46316,46327,46336,46338,46341-46342,46345-46347,46354,46361-46363,46385,46391,46393,46410-46412,46416-46417

Modified: tags/blender-2.63a-release/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- tags/blender-2.63a-release/blender/release/scripts/startup/bl_ui/space_view3d.py	2012-05-09 06:22:29 UTC (rev 46445)
+++ tags/blender-2.63a-release/blender/release/scripts/startup/bl_ui/space_view3d.py	2012-05-09 07:17:40 UTC (rev 46446)
@@ -135,7 +135,9 @@
         layout.operator("%s.hide" % self._operator_name, text="Hide Unselected").unselected = True
 
 
-class VIEW3D_MT_transform(Menu):
+# Standard transforms which apply to all cases
+# NOTE: this doesn't seem to be able to be used directly
+class VIEW3D_MT_transform_base(Menu):
     bl_label = "Transform"
 
     # TODO: get rid of the custom text strings?
@@ -156,23 +158,39 @@
         layout.operator("transform.warp", text="Warp")
         layout.operator("transform.push_pull", text="Push/Pull")
 
+
+# Generic transform menu - geometry types
+class VIEW3D_MT_transform(VIEW3D_MT_transform_base):
+    def draw(self, context):
+        # base menu
+        VIEW3D_MT_transform_base.draw(self, context)
+        
+        # generic...
+        layout = self.layout
         layout.separator()
 
         layout.operator("transform.translate", text="Move Texture Space").texture_space = True
         layout.operator("transform.resize", text="Scale Texture Space").texture_space = True
 
+
+# Object-specific extensions to Transform menu
+class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base):
+    def draw(self, context):
+        # base menu
+        VIEW3D_MT_transform_base.draw(self, context)
+        
+        # object-specific option follow...
+        layout = self.layout
         layout.separator()
 
-        obj = context.object
-        if obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and obj.data.draw_type in {'BBONE', 'ENVELOPE'}:
-            layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
+        layout.operator("transform.translate", text="Move Texture Space").texture_space = True
+        layout.operator("transform.resize", text="Scale Texture Space").texture_space = True
+        
+        layout.separator()
+        
+        layout.operator_context = 'EXEC_REGION_WIN'
+        layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN'  # XXX see alignmenu() in edit.c of b2.4x to get this working
 
-        if context.edit_object and context.edit_object.type == 'ARMATURE':
-            layout.operator("armature.align")
-        else:
-            layout.operator_context = 'EXEC_REGION_WIN'
-            layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN'  # XXX see alignmenu() in edit.c of b2.4x to get this working
-
         layout.separator()
 
         layout.operator_context = 'EXEC_AREA'
@@ -191,6 +209,25 @@
         layout.operator("object.anim_transforms_to_deltas")
 
 
+# Armature EditMode extensions to Transform menu
+class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base):
+    def draw(self, context):
+        # base menu
+        VIEW3D_MT_transform_base.draw(self, context)
+        
+        # armature specific extensions follow...
+        layout = self.layout
+        layout.separator()
+
+        obj = context.object
+        if (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and 
+            obj.data.draw_type in {'BBONE', 'ENVELOPE'}):
+            layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
+
+        if context.edit_object and context.edit_object.type == 'ARMATURE':
+            layout.operator("armature.align")
+
+
 class VIEW3D_MT_mirror(Menu):
     bl_label = "Mirror"
 
@@ -699,7 +736,7 @@
 
         layout.separator()
 
-        layout.menu("VIEW3D_MT_transform")
+        layout.menu("VIEW3D_MT_transform_object")
         layout.menu("VIEW3D_MT_mirror")
         layout.menu("VIEW3D_MT_object_clear")
         layout.menu("VIEW3D_MT_object_apply")
@@ -1317,7 +1354,7 @@
 
         layout.separator()
 
-        layout.menu("VIEW3D_MT_transform")
+        layout.menu("VIEW3D_MT_transform_armature")
 
         layout.menu("VIEW3D_MT_pose_transform")
         layout.menu("VIEW3D_MT_pose_apply")
@@ -2071,7 +2108,7 @@
         edit_object = context.edit_object
         arm = edit_object.data
 
-        layout.menu("VIEW3D_MT_transform")
+        layout.menu("VIEW3D_MT_transform_armature")
         layout.menu("VIEW3D_MT_mirror")
         layout.menu("VIEW3D_MT_snap")
         layout.menu("VIEW3D_MT_edit_armature_roll")

Modified: tags/blender-2.63a-release/blender/source/blender/editors/animation/anim_filter.c
===================================================================
--- tags/blender-2.63a-release/blender/source/blender/editors/animation/anim_filter.c	2012-05-09 06:22:29 UTC (rev 46445)
+++ tags/blender-2.63a-release/blender/source/blender/editors/animation/anim_filter.c	2012-05-09 07:17:40 UTC (rev 46446)
@@ -1476,51 +1476,83 @@
 	return items;
 }
 
+
+static size_t animdata_filter_ds_material (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Material *ma, int filter_mode)
+{
+	ListBase tmp_data = {NULL, NULL};
+	size_t tmp_items = 0;
+	size_t items = 0;
+	
+	/* add material's animation data to temp collection */
+	BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_MAT_OBJD(ma))
+	{
+		/* material's animation data */
+		tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)ma, filter_mode);
+			
+		/* textures */
+		if (!(ads->filterflag & ADS_FILTER_NOTEX))
+			tmp_items += animdata_filter_ds_textures(ac, &tmp_data, ads, (ID *)ma, filter_mode);
+			
+		/* nodes */
+		if ((ma->nodetree) && !(ads->filterflag & ADS_FILTER_NONTREE)) 
+			tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)ma, ma->nodetree, filter_mode);
+	}
+	END_ANIMFILTER_SUBCHANNELS;
+	
+	/* did we find anything? */
+	if (tmp_items) {
+		/* include material-expand widget first */
+		// hmm... do we need to store the index of this material in the array anywhere?
+		if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
+			/* check if filtering by active status */
+			if (ANIMCHANNEL_ACTIVEOK(ma)) {
+				ANIMCHANNEL_NEW_CHANNEL(ma, ANIMTYPE_DSMAT, ma);
+			}
+		}
+		
+		/* now add the list of collected channels */
+		BLI_movelisttolist(anim_data, &tmp_data);
+		BLI_assert((tmp_data.first == tmp_data.last) && (tmp_data.first == NULL));
+		items += tmp_items;
+	}
+	
+	return items;
+}
+
 static size_t animdata_filter_ds_materials (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
 {
-	size_t items=0;
-	int a=0;
+	short has_nested = 0;
+	size_t items = 0;
+	int a = 0;
 	
-	/* firstly check that we actuallly have some materials, by gathering all materials in a temp list */
-	for (a=1; a <= ob->totcol; a++) {
-		Material *ma= give_current_material(ob, a);
-		ListBase tmp_data = {NULL, NULL};
-		size_t tmp_items = 0;
+	/* first pass: take the materials referenced via the Material slots of the object */
+	for (a = 1; a <= ob->totcol; a++) {
+		Material *ma = give_current_material(ob, a);
 		
-		/* if no material returned, skip - so that we don't get weird blank entries... */
-		if (ma == NULL) continue;
-		
-		/* add material's animation data to temp collection */
-		BEGIN_ANIMFILTER_SUBCHANNELS(FILTER_MAT_OBJD(ma))
-		{
-			/* material's animation data */
-			tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)ma, filter_mode);
-				
-			/* textures */
-			if (!(ads->filterflag & ADS_FILTER_NOTEX))
-				tmp_items += animdata_filter_ds_textures(ac, &tmp_data, ads, (ID *)ma, filter_mode);
-				
-			/* nodes */
-			if ((ma->nodetree) && !(ads->filterflag & ADS_FILTER_NONTREE)) 
-				tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)ma, ma->nodetree, filter_mode);
+		/* if material is valid, try to add relevant contents from here */
+		if (ma) {
+			/* add channels */
+			items += animdata_filter_ds_material(ac, anim_data, ads, ma, filter_mode);
+			
+			/* for optimising second pass - check if there's a nested material here to come back for */
+			if (has_nested == 0)
+				has_nested = give_node_material(ma) != NULL;
 		}
-		END_ANIMFILTER_SUBCHANNELS;
-		
-		/* did we find anything? */
-		if (tmp_items) {
-			/* include material-expand widget first */
-			// hmm... do we need to store the index of this material in the array anywhere?

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list