Revision: 23248 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23248 Author: ben2610 Date: 2009-09-15 14:46:18 +0200 (Tue, 15 Sep 2009)
Log Message: ----------- Add button in constraint template to turn constraint on/off. Fix redraw problem with template buttons and pose RNA updates: NB_POSE was not taken into account for redrawing the 3D view. Modified Paths: -------------- branches/itasc/source/blender/editors/interface/interface_templates.c branches/itasc/source/blender/editors/space_view3d/space_view3d.c Modified: branches/itasc/source/blender/editors/interface/interface_templates.c =================================================================== --- branches/itasc/source/blender/editors/interface/interface_templates.c 2009-09-15 12:45:05 UTC (rev 23247) +++ branches/itasc/source/blender/editors/interface/interface_templates.c 2009-09-15 12:46:18 UTC (rev 23248) @@ -675,6 +675,8 @@ if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); else DAG_id_flush_update(&ob->id, OB_RECALC_OB); + + WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob); // XXX allqueue(REDRAWVIEW3D, 0); // XXX allqueue(REDRAWBUTSOBJECT, 0); @@ -883,11 +885,13 @@ uiDefIconButO(block, BUT, "CONSTRAINT_OT_move_down", WM_OP_INVOKE_DEFAULT, VICON_MOVE_DOWN, xco+width-50+18, yco, 16, 18, "Move constraint down in constraint stack"); uiBlockEndAlign(block); } - - + /* Close 'button' - emboss calls here disable drawing of 'button' behind X */ uiBlockSetEmboss(block, UI_EMBOSSN); + uiBlockBeginAlign(block); + uiDefIconButBitS(block, ICONTOGN, CONSTRAINT_OFF, B_CONSTRAINT_TEST, ICON_CHECKBOX_DEHLT, xco+243, yco, 19, 19, &con->flag, 0.0, 0.0, 0.0, 0.0, "enable/disable constraint"); uiDefIconButO(block, BUT, "CONSTRAINT_OT_delete", WM_OP_INVOKE_DEFAULT, ICON_X, xco+262, yco, 19, 19, "Delete constraint"); + uiBlockEndAlign(block); uiBlockSetEmboss(block, UI_EMBOSS); } Modified: branches/itasc/source/blender/editors/space_view3d/space_view3d.c =================================================================== --- branches/itasc/source/blender/editors/space_view3d/space_view3d.c 2009-09-15 12:45:05 UTC (rev 23247) +++ branches/itasc/source/blender/editors/space_view3d/space_view3d.c 2009-09-15 12:46:18 UTC (rev 23248) @@ -456,6 +456,7 @@ case ND_MODIFIER: case ND_CONSTRAINT: case ND_KEYS: + case ND_POSE: case ND_PARTICLE_SELECT: case ND_PARTICLE_DATA: ED_region_tag_redraw(ar); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs