Revision: 23347
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23347
Author:   aligorith
Date:     2009-09-19 14:36:22 +0200 (Sat, 19 Sep 2009)

Log Message:
-----------
2.5 - More Animation Bugfixes

* Updating Preview Range settings results in correct updates for Animation 
Editors

* Compositing nodes now correctly animate when the values were set by IKEY/RMB 
on suitable node parameters. Beware that these nodes are not relinkable 
node-trees, hence the standard code not working.

* Ctrl-P to parent objects to bones now works in Pose Mode too. I needed to add 
a special keymap entry for this, though I thought this would have been better 
to be automatically inherited/present from Object keymap already?
* Ctrl-P -> Parent to Bone option now works correctly again. 1.5 lines of code 
missing here...

* Breakdowns tool now shows custom cursor during 'modal' phase so that it's not 
that confusing what's going on.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/anim_sys.c
    trunk/blender/source/blender/editors/armature/armature_ops.c
    trunk/blender/source/blender/editors/armature/poseSlide.c
    trunk/blender/source/blender/editors/object/object_relations.c
    trunk/blender/source/blender/editors/space_action/space_action.c
    trunk/blender/source/blender/editors/space_graph/space_graph.c

Modified: trunk/blender/source/blender/blenkernel/intern/anim_sys.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/anim_sys.c   2009-09-19 
11:59:23 UTC (rev 23346)
+++ trunk/blender/source/blender/blenkernel/intern/anim_sys.c   2009-09-19 
12:36:22 UTC (rev 23347)
@@ -40,6 +40,7 @@
 #include "BLI_dynstr.h"
 
 #include "DNA_anim_types.h"
+#include "DNA_scene_types.h"
 
 #include "BKE_animsys.h"
 #include "BKE_action.h"
@@ -1517,7 +1518,10 @@
                AnimData *adt= BKE_animdata_from_id(id);
                Curve *cu= (Curve *)id;
                
+               /* set ctime variable for curve */
                cu->ctime= ctime;
+               
+               /* now execute animation data on top of this as per normal */
                BKE_animsys_evaluate_animdata(id, adt, ctime, ADT_RECALC_ANIM);
        }
        
@@ -1537,7 +1541,19 @@
        EVAL_ANIM_IDS(main->world.first, ADT_RECALC_ANIM);
        
        /* scenes */
-       EVAL_ANIM_IDS(main->scene.first, ADT_RECALC_ANIM);
+       for (id= main->scene.first; id; id= id->next) {
+               AnimData *adt= BKE_animdata_from_id(id);
+               Scene *scene= (Scene *)id;
+               
+               /* do compositing nodes first (since these aren't included in 
main tree) */
+               if (scene->nodetree) {
+                       AnimData *adt2= BKE_animdata_from_id(scene->nodetree);
+                       BKE_animsys_evaluate_animdata(scene->nodetree, adt2, 
ctime, ADT_RECALC_ANIM);
+               }
+               
+               /* now execute scene animation data as per normal */
+               BKE_animsys_evaluate_animdata(id, adt, ctime, ADT_RECALC_ANIM);
+       }
 }
 
 /* ***************************************** */ 

Modified: trunk/blender/source/blender/editors/armature/armature_ops.c
===================================================================
--- trunk/blender/source/blender/editors/armature/armature_ops.c        
2009-09-19 11:59:23 UTC (rev 23346)
+++ trunk/blender/source/blender/editors/armature/armature_ops.c        
2009-09-19 12:36:22 UTC (rev 23347)
@@ -298,6 +298,9 @@
        keymap= WM_keymap_find(wm, "Pose", 0, 0);
        keymap->poll= ED_operator_posemode;
        
+       // XXX: set parent is object-based operator, but it should also be 
available here...
+       WM_keymap_add_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, 
KM_CTRL, 0);
+       
        WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0);
        kmi= WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 
KM_SHIFT, 0);
                RNA_boolean_set(kmi->ptr, "unselected", 1);
@@ -310,7 +313,6 @@
        WM_keymap_add_item(keymap, "POSE_OT_loc_clear", GKEY, KM_PRESS, KM_ALT, 
0);
        WM_keymap_add_item(keymap, "POSE_OT_scale_clear", SKEY, KM_PRESS, 
KM_ALT, 0);
        
-               // for now, we include hotkeys for copy/paste
        WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0);
        kmi= WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, 
KM_CTRL|KM_SHIFT, 0);

Modified: trunk/blender/source/blender/editors/armature/poseSlide.c
===================================================================
--- trunk/blender/source/blender/editors/armature/poseSlide.c   2009-09-19 
11:59:23 UTC (rev 23346)
+++ trunk/blender/source/blender/editors/armature/poseSlide.c   2009-09-19 
12:36:22 UTC (rev 23347)
@@ -480,6 +480,7 @@
 {
        tPChanFCurveLink *pfl;
        AnimData *adt= pso->ob->adt;
+       wmWindow *win= CTX_wm_window(C);
        
        /* for each link, add all its keyframes to the search tree */
        for (pfl= pso->pfLinks.first; pfl; pfl= pfl->next) {
@@ -543,6 +544,9 @@
                /* initial apply for operator... */
                pose_slide_apply(C, op, pso);
                
+               /* set cursor to indicate modal */
+               WM_cursor_modal(win, BC_EW_SCROLLCURSOR);
+               
                /* add a modal handler for this operator */
                WM_event_add_modal_handler(C, op);
                return OPERATOR_RUNNING_MODAL;
@@ -559,14 +563,17 @@
 static int pose_slide_modal (bContext *C, wmOperator *op, wmEvent *evt)
 {
        tPoseSlideOp *pso= op->customdata;
+       wmWindow *win= CTX_wm_window(C);
        
        switch (evt->type) {
                case LEFTMOUSE: /* confirm */
+                       WM_cursor_restore(win);
                        pose_slide_exit(C, op);
                        return OPERATOR_FINISHED;
                
                case ESCKEY:    /* cancel */
                case RIGHTMOUSE: 
+                       WM_cursor_restore(win);
                        pose_slide_exit(C, op);
                        return OPERATOR_CANCELLED;
                        

Modified: trunk/blender/source/blender/editors/object/object_relations.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_relations.c      
2009-09-19 11:59:23 UTC (rev 23346)
+++ trunk/blender/source/blender/editors/object/object_relations.c      
2009-09-19 12:36:22 UTC (rev 23347)
@@ -647,6 +647,8 @@
                                
                                if( ELEM(partype, PAR_CURVE, PAR_LATTICE) || 
pararm )
                                        ob->partype= PARSKEL; /* note, dna 
define, not operator property */
+                               else if (partype == PAR_BONE)
+                                       ob->partype= PARBONE; /* note, dna 
define, not operator property */
                                else
                                        ob->partype= PAROBJECT; /* note, dna 
define, not operator property */
                        }

Modified: trunk/blender/source/blender/editors/space_action/space_action.c
===================================================================
--- trunk/blender/source/blender/editors/space_action/space_action.c    
2009-09-19 11:59:23 UTC (rev 23346)
+++ trunk/blender/source/blender/editors/space_action/space_action.c    
2009-09-19 12:36:22 UTC (rev 23347)
@@ -323,6 +323,7 @@
                        break;
                case NC_SCENE:
                        switch(wmn->data) {
+                               case ND_RENDER_OPTIONS:
                                case ND_OB_ACTIVE:
                                case ND_FRAME:
                                case ND_MARKERS:

Modified: trunk/blender/source/blender/editors/space_graph/space_graph.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/space_graph.c      
2009-09-19 11:59:23 UTC (rev 23346)
+++ trunk/blender/source/blender/editors/space_graph/space_graph.c      
2009-09-19 12:36:22 UTC (rev 23347)
@@ -374,6 +374,7 @@
                        break;
                case NC_SCENE:
                        switch(wmn->data) {
+                               case ND_RENDER_OPTIONS:
                                case ND_OB_ACTIVE:
                                case ND_FRAME:
                                case ND_MARKERS:


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to