[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58045] branches/soc-2013-paint: Merge trunk -r58040 into soc-2013-paint

Antony Riakiotakis kalast at gmail.com
Sat Jul 6 20:20:54 CEST 2013


Revision: 58045
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58045
Author:   psy-fi
Date:     2013-07-06 18:20:54 +0000 (Sat, 06 Jul 2013)
Log Message:
-----------
Merge trunk -r58040 into soc-2013-paint

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

Modified Paths:
--------------
    branches/soc-2013-paint/release/scripts/freestyle/style_modules/ChainingIterators.py
    branches/soc-2013-paint/release/scripts/modules/bpy_extras/anim_utils.py
    branches/soc-2013-paint/release/scripts/startup/bl_operators/anim.py
    branches/soc-2013-paint/release/scripts/startup/bl_operators/wm.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_data_mesh.py
    branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/soc-2013-paint/source/blender/blenkernel/BKE_deform.h
    branches/soc-2013-paint/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/deform.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/library.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/modifier.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/particle_system.c
    branches/soc-2013-paint/source/blender/blenkernel/intern/rigidbody.c
    branches/soc-2013-paint/source/blender/blenlib/intern/math_geom.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_edgeloop.c
    branches/soc-2013-paint/source/blender/bmesh/intern/bmesh_marking.c
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_bridge.c
    branches/soc-2013-paint/source/blender/bmesh/operators/bmo_fill_edgeloop.c
    branches/soc-2013-paint/source/blender/bmesh/tools/bmesh_bevel.c
    branches/soc-2013-paint/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
    branches/soc-2013-paint/source/blender/editors/armature/armature_add.c
    branches/soc-2013-paint/source/blender/editors/include/ED_armature.h
    branches/soc-2013-paint/source/blender/editors/include/ED_mesh.h
    branches/soc-2013-paint/source/blender/editors/interface/interface_handlers.c
    branches/soc-2013-paint/source/blender/editors/interface/resources.c
    branches/soc-2013-paint/source/blender/editors/object/object_add.c
    branches/soc-2013-paint/source/blender/editors/object/object_relations.c
    branches/soc-2013-paint/source/blender/editors/object/object_vgroup.c
    branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_vertex.c
    branches/soc-2013-paint/source/blender/editors/space_image/image_ops.c
    branches/soc-2013-paint/source/blender/editors/space_outliner/outliner_draw.c
    branches/soc-2013-paint/source/blender/editors/space_outliner/outliner_edit.c
    branches/soc-2013-paint/source/blender/editors/space_outliner/outliner_intern.h
    branches/soc-2013-paint/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/soc-2013-paint/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2013-paint/source/blender/makesrna/intern/CMakeLists.txt
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_armature.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_curve.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_lattice.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_mesh.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_meta.c
    branches/soc-2013-paint/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2013-paint/source/blender/render/intern/source/convertblender.c
    branches/soc-2013-paint/source/blender/windowmanager/WM_api.h
    branches/soc-2013-paint/source/blender/windowmanager/intern/wm_event_system.c
    branches/soc-2013-paint/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2013-paint/source/creator/creator.c

Modified: branches/soc-2013-paint/release/scripts/freestyle/style_modules/ChainingIterators.py
===================================================================
--- branches/soc-2013-paint/release/scripts/freestyle/style_modules/ChainingIterators.py	2013-07-06 17:03:37 UTC (rev 58044)
+++ branches/soc-2013-paint/release/scripts/freestyle/style_modules/ChainingIterators.py	2013-07-06 18:20:54 UTC (rev 58045)
@@ -24,6 +24,8 @@
 from freestyle import AdjacencyIterator, ChainingIterator, ExternalContourUP1D, Nature, TVertex
 from freestyle import ContextFunctions as CF
 
+import bpy
+
 ## the natural chaining iterator
 ## It follows the edges of same nature following the topology of
 ## objects with  preseance on silhouettes, then borders, 
@@ -212,7 +214,7 @@
 										visitNext = 1
 										break
 								if visitNext != 0:
-									break	 
+									break
 							count = count+1
 							winner = ve
 						it.increment()
@@ -238,14 +240,22 @@
 		self._timeStamp = CF.get_time_stamp()+self._nRounds
 	def traverse(self, iter):
 		winner = None
+		found = False
 		it = AdjacencyIterator(iter)
 		while not it.is_end:
 			ve = it.object
 			if ve.id == self.current_edge.id:
+				found = True
 				it.increment()
 				continue
 			winner = ve
 			it.increment()
+		if not found:
+			# This is a fatal error condition: self.current_edge must be found
+			# among the edges seen by the AdjacencyIterator [bug #35695].
+			if bpy.app.debug_freestyle:
+				print('pySketchyChainingIterator: current edge not found')
+			return None
 		if winner is None:
 			winner = self.current_edge
 		if winner.chaining_time_stamp == self._timeStamp:

Modified: branches/soc-2013-paint/release/scripts/modules/bpy_extras/anim_utils.py
===================================================================
--- branches/soc-2013-paint/release/scripts/modules/bpy_extras/anim_utils.py	2013-07-06 17:03:37 UTC (rev 58044)
+++ branches/soc-2013-paint/release/scripts/modules/bpy_extras/anim_utils.py	2013-07-06 18:20:54 UTC (rev 58045)
@@ -31,6 +31,7 @@
                 only_selected=False,
                 do_pose=True,
                 do_object=True,
+                do_visual_keying=True,
                 do_constraint_clear=False,
                 do_parents_clear=False,
                 do_clean=False,
@@ -53,7 +54,9 @@
     :type do_pose: bool
     :arg do_object: Bake objects.
     :type do_object: bool
-    :arg do_constraint_clear: Remove constraints (and do 'visual keying').
+    :arg do_visual_keying: Use the final transformations for baking ('visual keying')
+    :type do_visual_keying: bool
+    :arg do_constraint_clear: Remove constraints after baking.
     :type do_constraint_clear: bool
     :arg do_parents_clear: Unparent after baking objects.
     :type do_parents_clear: bool
@@ -83,14 +86,14 @@
     if do_parents_clear:
         def obj_frame_info(obj, do_visual_keying):
             parent = obj.parent
-            matrix = obj.matrix_local if do_visual_keying else obj.matrix_basis
+            matrix = obj.matrix_local if do_visual_keying else obj.matrix_local
             if parent:
                 return parent.matrix_world * matrix
             else:
                 return matrix.copy()
     else:
         def obj_frame_info(obj, do_visual_keying):
-            return obj.matrix_local.copy() if do_visual_keying else obj.matrix_basis.copy()
+            return obj.matrix_local.copy() if do_visual_keying else obj.matrix_local.copy()
 
     # -------------------------------------------------------------------------
     # Setup the Context
@@ -118,10 +121,11 @@
 
     for f in frame_range:
         scene.frame_set(f)
+        scene.update()
         if do_pose:
-            pose_info.append(pose_frame_info(obj, do_constraint_clear))
+            pose_info.append(pose_frame_info(obj, do_visual_keying))
         if do_object:
-            obj_info.append(obj_frame_info(obj, do_constraint_clear))
+            obj_info.append(obj_frame_info(obj, do_visual_keying))
 
     # -------------------------------------------------------------------------
     # Create action

Modified: branches/soc-2013-paint/release/scripts/startup/bl_operators/anim.py
===================================================================
--- branches/soc-2013-paint/release/scripts/startup/bl_operators/anim.py	2013-07-06 17:03:37 UTC (rev 58044)
+++ branches/soc-2013-paint/release/scripts/startup/bl_operators/anim.py	2013-07-06 18:20:54 UTC (rev 58045)
@@ -190,6 +190,11 @@
             description="Only key selected object/bones",
             default=True,
             )
+    visual_keying = BoolProperty(
+            name="Visual Keying",
+            description="Keyframe from the final transformations (with constraints applied)",
+            default=False,
+            )
     clear_constraints = BoolProperty(
             name="Clear Constraints",
             description="Remove all constraints from keyed object/bones, and do 'visual' keying",
@@ -220,6 +225,7 @@
                                         only_selected=self.only_selected,
                                         do_pose='POSE' in self.bake_types,
                                         do_object='OBJECT' in self.bake_types,
+                                        do_visual_keying=self.visual_keying,
                                         do_constraint_clear=self.clear_constraints,
                                         do_parents_clear=self.clear_parents,
                                         do_clean=True,

Modified: branches/soc-2013-paint/release/scripts/startup/bl_operators/wm.py
===================================================================
--- branches/soc-2013-paint/release/scripts/startup/bl_operators/wm.py	2013-07-06 17:03:37 UTC (rev 58044)
+++ branches/soc-2013-paint/release/scripts/startup/bl_operators/wm.py	2013-07-06 18:20:54 UTC (rev 58045)
@@ -471,34 +471,29 @@
         return operator_path_undo_return(context, data_path)
 
 
-class WM_MT_context_menu_enum(Menu):
-    bl_label = ""
-    data_path = ""  # BAD DESIGN, set from operator below.
+class WM_OT_context_menu_enum(Operator):
+    bl_idname = "wm.context_menu_enum"
+    bl_label = "Context Enum Menu"
+    bl_options = {'UNDO', 'INTERNAL'}
+    data_path = rna_path_prop
 
-    def draw(self, context):
+    def execute(self, context):
         data_path = self.data_path
         value = context_path_validate(context, data_path)
+
         if value is Ellipsis:
             return {'PASS_THROUGH'}
+
         base_path, prop_string = data_path.rsplit(".", 1)
         value_base = context_path_validate(context, base_path)
         prop = value_base.bl_rna.properties[prop_string]
 
-        layout = self.layout
-        layout.label(prop.name, icon=prop.icon)
-        layout.prop(value_base, prop_string, expand=True)
+        def draw_cb(self, context):
+            layout = self.layout
+            layout.prop(value_base, prop_string, expand=True)
 
+        context.window_manager.popup_menu(draw_func=draw_cb, title=prop.name, icon=prop.icon)
 
-class WM_OT_context_menu_enum(Operator):
-    bl_idname = "wm.context_menu_enum"
-    bl_label = "Context Enum Menu"
-    bl_options = {'UNDO', 'INTERNAL'}
-    data_path = rna_path_prop
-
-    def execute(self, context):
-        data_path = self.data_path
-        WM_MT_context_menu_enum.data_path = data_path
-        bpy.ops.wm.call_menu(name="WM_MT_context_menu_enum")
         return {'PASS_THROUGH'}
 
 

Modified: branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_data_mesh.py
===================================================================
--- branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_data_mesh.py	2013-07-06 17:03:37 UTC (rev 58044)
+++ branches/soc-2013-paint/release/scripts/startup/bl_ui/properties_data_mesh.py	2013-07-06 18:20:54 UTC (rev 58045)
@@ -33,7 +33,7 @@
         layout.operator("object.vertex_group_copy", icon='COPY_ID')
         layout.operator("object.vertex_group_copy_to_linked", icon='LINK_AREA')
         layout.operator("object.vertex_group_copy_to_selected", icon='LINK_AREA')
-        layout.operator("object.vertex_group_mirror", icon='ARROW_LEFTRIGHT')
+        layout.operator("object.vertex_group_mirror", icon='ARROW_LEFTRIGHT').use_topology = False
         layout.operator("object.vertex_group_mirror", text="Mirror Vertex Group (Topology)", icon='ARROW_LEFTRIGHT').use_topology = True
         layout.operator("object.vertex_group_remove_from", icon='X', text="Remove from All Groups").use_all_groups = True
         layout.operator("object.vertex_group_remove_from", icon='X', text="Clear Active Group").use_all_verts = True
@@ -53,7 +53,7 @@
 
         layout.operator("object.shape_key_transfer", icon='COPY_ID')  # icon is not ideal
         layout.operator("object.join_shapes", icon='COPY_ID')  # icon is not ideal
-        layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
+        layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT').use_topology = False
         layout.operator("object.shape_key_mirror", text="Mirror Shape Key (Topology)", icon='ARROW_LEFTRIGHT').use_topology = True
         layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix").from_mix = True
         layout.operator("object.shape_key_remove", icon='X', text="Delete All Shapes").all = True

Modified: branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-07-06 17:03:37 UTC (rev 58044)
+++ branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-07-06 18:20:54 UTC (rev 58045)
@@ -1103,10 +1103,7 @@
     def draw(self, context):
         layout = self.layout
 
-        ob = context.active_object
-
         col = layout.column()
-        col.active = ob.vertex_groups.active is not None
         col.operator("object.vertex_group_normalize_all", text="Normalize All")
         col.operator("object.vertex_group_normalize", text="Normalize")
         col.operator("object.vertex_group_mirror", text="Mirror")
@@ -1114,10 +1111,7 @@
         col.operator("object.vertex_group_clean", text="Clean")
         col.operator("object.vertex_group_levels", text="Levels")
         col.operator("object.vertex_group_blend", text="Blend")

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list