diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-09-20 05:36:11 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-09-20 05:36:11 +0400 |
commit | f4b9ec0e37d636c974f4ea24c90d288015df7d24 (patch) | |
tree | 402dec6b5be8672a93346b8128fc0b38d38a2960 /source/blender | |
parent | b28109b442f5e87edf865c6bcbdb8f53665cdef5 (diff) |
2.5 - 2 Armature Related Crash Fixes
* #19397: Properties panel (transform panel in 3D-View) crashed when there was no active posechannel.
* Breakdown/Push/Relax Pose tools crashed when auto-keyframing was enabled. There where 2 main causes here: 1) laziness to try and avoid having to clear some data everytime, 2) a typo for one of the KeyingSet names
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/armature/poseSlide.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_buttons.c | 17 |
2 files changed, 6 insertions, 16 deletions
diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c index e55c5608112..eb290b1f83c 100644 --- a/source/blender/editors/armature/poseSlide.c +++ b/source/blender/editors/armature/poseSlide.c @@ -219,7 +219,7 @@ static int pose_slide_init (bContext *C, wmOperator *op, short mode) /* get builtin KeyingSets */ pso->ks_loc= ANIM_builtin_keyingset_get_named(NULL, "Location"); pso->ks_rot= ANIM_builtin_keyingset_get_named(NULL, "Rotation"); - pso->ks_scale= ANIM_builtin_keyingset_get_named(NULL, "Scale"); + pso->ks_scale= ANIM_builtin_keyingset_get_named(NULL, "Scaling"); /* return status is whether we've got all the data we were requested to get */ return 1; @@ -393,8 +393,7 @@ static void pose_slide_autoKeyframe (bContext *C, tPoseSlideOp *pso, bPoseChanne ListBase dsources = {&cks, &cks}; /* init common-key-source for use by KeyingSets */ - // TODO: for now, we don't clear it out, since it should be safe to do so... - //memset(&cks, 0, sizeof(bCommonKeySrc)); + memset(&cks, 0, sizeof(bCommonKeySrc)); cks.id= &pso->ob->id; /* init cks for this PoseChannel, then use the relative KeyingSets to keyframe it */ diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 286b0ca0898..89d07fbbfea 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -512,6 +512,10 @@ static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float if(bone && (bone->flag & BONE_ACTIVE) && (bone->layer & arm->layer)) break; } + if (!pchan) { + uiDefBut(block, LABEL, 0, "No Bone Active", 0, 240, 100, 20, 0, 0, 0, 0, 0, ""); + return; + } if (pchan->rotmode == PCHAN_ROT_AXISANGLE) { float quat[4]; @@ -1447,25 +1451,12 @@ void view3d_buttons_register(ARegionType *art) pt->draw= view3d_panel_transform_spaces; BLI_addtail(&art->paneltypes, pt); - pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel gpencil"); - strcpy(pt->idname, "VIEW3D_PT_gpencil"); - strcpy(pt->label, "Greas Pencil"); - pt->draw= view3d_panel_gpencil; - BLI_addtail(&art->paneltypes, pt);*/ - pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel bonesketch spaces"); strcpy(pt->idname, "VIEW3D_PT_bonesketch_spaces"); strcpy(pt->label, "Bone Sketching"); pt->draw= view3d_panel_bonesketch_spaces; pt->poll= view3d_panel_bonesketch_spaces_poll; BLI_addtail(&art->paneltypes, pt); - - /* - pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel redo"); - strcpy(pt->idname, "VIEW3D_PT_redo"); - strcpy(pt->label, "Last Operator"); - pt->draw= view3d_panel_operator_redo; - BLI_addtail(&art->paneltypes, pt); */ // XXX view3d_panel_preview(C, ar, 0); } |