[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34887] trunk/blender: PoseLib UI and Bugfixes:

Joshua Leung aligorith at gmail.com
Wed Feb 16 03:05:43 CET 2011


Revision: 34887
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34887
Author:   aligorith
Date:     2011-02-16 02:05:41 +0000 (Wed, 16 Feb 2011)
Log Message:
-----------
PoseLib UI and Bugfixes:
- Added operator button to show the current pose. This runs on top of
the interactive pose browse functionality, so the tooltip may be a bit
obtuse...
- Specifying a pose for the Pose browse functionality to set now works
correctly. Previously, some old depsgraph hacks were actually
interferring with correct updating (only the armature updated
correctly, but deforms didn't occur)
- Fixed a case of accessing freed memory, which I'm surprised no
static checkers have reportedly picked up on yet, or that nobody has
really had issues with (probably due to low memory "turnaround" so
far)

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_data_armature.py
    trunk/blender/source/blender/editors/armature/poselib.c

Modified: trunk/blender/release/scripts/ui/properties_data_armature.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_armature.py	2011-02-16 02:05:36 UTC (rev 34886)
+++ trunk/blender/release/scripts/ui/properties_data_armature.py	2011-02-16 02:05:41 UTC (rev 34887)
@@ -193,12 +193,12 @@
             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
             
-            # TODO:
-            # - show selected pose in 3d-view using browse op...
-            # - rename selected pose...
+            #col.operator_context = 'EXEC_DEFAULT' # exec not invoke, so modal preview loop doesn't run
+            col.operator("poselib.browse_interactive", icon='ZOOM_SELECTED', text="").pose_index = activePoseIndex
             
             # TODO: "validate action" operator to be restored
 
+
 # TODO: this panel will soon be depreceated too
 class DATA_PT_ghost(ArmatureButtonsPanel, bpy.types.Panel):
     bl_label = "Ghost"

Modified: trunk/blender/source/blender/editors/armature/poselib.c
===================================================================
--- trunk/blender/source/blender/editors/armature/poselib.c	2011-02-16 02:05:36 UTC (rev 34886)
+++ trunk/blender/source/blender/editors/armature/poselib.c	2011-02-16 02:05:41 UTC (rev 34887)
@@ -1477,11 +1477,8 @@
 		if (IS_AUTOKEY_MODE(scene, NORMAL)) {
 			//remake_action_ipos(ob->action);
 		}
-		else {
-			/* need to trick depgraph, action is not allowed to execute on pose */
+		else
 			where_is_pose(scene, ob);
-			ob->recalc= 0;
-		}
 	}
 	
 	/* free memory used for backups and searching */
@@ -1497,11 +1494,12 @@
 static int poselib_preview_exit (bContext *C, wmOperator *op)
 {
 	tPoseLib_PreviewData *pld= op->customdata;
+	int exit_state = pld->state;
 	
 	/* finish up */
 	poselib_preview_cleanup(C, op);
 	
-	if (ELEM(pld->state, PL_PREVIEW_CANCEL, PL_PREVIEW_ERROR))
+	if (ELEM(exit_state, PL_PREVIEW_CANCEL, PL_PREVIEW_ERROR))
 		return OPERATOR_CANCELLED;
 	else
 		return OPERATOR_FINISHED;




More information about the Bf-blender-cvs mailing list