- fix python error for poselib UI when none is active.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Feb 2011 03:08:14 +0000 (03:08 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Feb 2011 03:08:14 +0000 (03:08 +0000)
- add info to create_dupli_objects rna function docstring.
- transform snap had bad define, disabling BVH accelerated snap (own fault).

release/scripts/ui/properties_data_armature.py
source/blender/editors/transform/transform_snap.c
source/blender/makesrna/intern/rna_object_api.c

index 5f5b5ad3878ca85cb8a3bd0915f1b3feb0159dcf..2dc23fd34937c3d1cfe5b5184545ff6ad07392d9 100644 (file)
@@ -172,12 +172,6 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel):
         row.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink")
 
         if poselib:
-            activePoseIndex = poselib.pose_markers.active_index
-            if poselib.pose_markers.active:
-                activePoseName = poselib.pose_markers.active.name
-            else:
-                activePoseName = ""
-
             row = layout.row()
             row.template_list(poselib, "pose_markers", poselib.pose_markers, "active_index", rows=5)
 
@@ -189,9 +183,12 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel):
             col.operator("poselib.pose_add", icon='ZOOMIN', text="")
 
             col.operator_context = 'EXEC_DEFAULT'  # exec not invoke, so that menu doesn't need showing
-            col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = activePoseName
 
-            col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = activePoseIndex
+            pose_marker_active = poselib.pose_markers.active
+
+            if pose_marker_active is not None:
+                col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = pose_marker_active.name
+                col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = poselib.pose_markers.active_index
 
             row = layout.row()
             row.operator("poselib.action_sanitise")
index ab1cbab9a233a6d1a256f7ab5d916b80483d3dc8..9ff21a1c5e4ca006d675899d644045bd253e087c 100644 (file)
@@ -83,7 +83,7 @@
 
 //#include "blendef.h" /* for selection modes */
 
-#define USE_BVH_FACE_PROJECT
+#define USE_BVH_FACE_SNAP
 
 /********************* PROTOTYPES ***********************/
 
index 43113fed2c4371719fd84100d291a53f9c3186b9..644fb519524bfbe91897d15b7341c05495e46fda 100644 (file)
@@ -444,7 +444,7 @@ void RNA_api_object(StructRNA *srna)
 
        /* duplis */
        func= RNA_def_function(srna, "create_dupli_list", "rna_Object_create_duplilist");
-       RNA_def_function_ui_description(func, "Create a list of dupli objects for this object, needs to be freed manually with free_dupli_list.");
+       RNA_def_function_ui_description(func, "Create a list of dupli objects for this object, needs to be freed manually with free_dupli_list to restore the objects real matrix and layers.");
        parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate duplis.");
        RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
        RNA_def_function_flag(func, FUNC_USE_REPORTS);