[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24939] trunk/blender: Fix for [#20086] Mirror X, Z and Y crashes Blender 2.5 Alpha

Matt Ebb matt at mke3.net
Fri Nov 27 01:34:46 CET 2009


Revision: 24939
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24939
Author:   broken
Date:     2009-11-27 01:34:46 +0100 (Fri, 27 Nov 2009)

Log Message:
-----------
Fix for [#20086] Mirror X, Z and Y crashes Blender 2.5 Alpha

Was wrong operator context

* Also added back 3d view locking options to view properties

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_view3d.py
    trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/release/scripts/ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d.py	2009-11-26 23:20:31 UTC (rev 24938)
+++ trunk/blender/release/scripts/ui/space_view3d.py	2009-11-27 00:34:46 UTC (rev 24939)
@@ -116,7 +116,7 @@
         
         layout.separator()
         
-        layout.operator_context = 'EXEC_AREA'
+        layout.operator_context = 'INVOKE_REGION_WIN'
         
         props = layout.operator("tfm.mirror", text="X Global")
         props.constraint_axis = (True, False, False)
@@ -1529,6 +1529,12 @@
         col.prop(view, "grid_subdivisions", text="Subdivisions")
 
         layout.column().prop(scene, "cursor_location", text="3D Cursor:")
+        
+        col = layout.column()
+        col.label(text="Lock to Object:")
+        col.prop(view, "lock_object", text="")
+        if view.lock_object and view.lock_object.type == 'ARMATURE':
+            col.prop_object(view, "lock_bone", view.lock_object.data, "bones", text="")
 
 
 class VIEW3D_PT_3dview_name(bpy.types.Panel):

Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c	2009-11-26 23:20:31 UTC (rev 24938)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c	2009-11-27 00:34:46 UTC (rev 24939)
@@ -656,10 +656,16 @@
 	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
 	
 	prop= RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
+	RNA_def_property_flag(prop, PROP_EDITABLE);
 	RNA_def_property_pointer_sdna(prop, NULL, "ob_centre");
 	RNA_def_property_ui_text(prop, "Lock Object", "3D View center is locked to this object's position");
 	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
 	
+	prop= RNA_def_property(srna, "lock_bone", PROP_STRING, PROP_NONE);
+	RNA_def_property_string_sdna(prop, NULL, "ob_centre_bone");
+	RNA_def_property_ui_text(prop, "Lock Bone", "3D View center is locked to this bone's position");
+	RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+	
 	prop= RNA_def_property(srna, "background_image", PROP_POINTER, PROP_NONE);
 	RNA_def_property_pointer_sdna(prop, NULL, "bgpic");
 	RNA_def_property_ui_text(prop, "Background Image", "Image and settings to display in the 3D View background");





More information about the Bf-blender-cvs mailing list