From d3293882456abb77ca6af198c6a1ed0ae8812c23 Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 5 Apr 2010 00:06:06 +0000 Subject: Missed one of the tweak operator for nodes when adding new param. --- source/blender/editors/transform/transform_ops.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/transform') diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 6059d9d4697..eba6482c884 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -864,6 +864,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac km= WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0); km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_A, KM_ANY, 0, 0); + RNA_enum_set(km->ptr, "release_confirm", 1); km= WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0); RNA_enum_set(km->ptr, "release_confirm", 1); -- cgit v1.2.3 From 8bf6e2d09ce11176d374f371c4b7e8b89d9d05dd Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 7 Apr 2010 11:27:59 +0000 Subject: Auto Keyframing: Made 'PoseLib', 'Pose Paste', and 'Transforms' use the active KeyingSet instead of a hardcoded one if there is an active KeyingSet and the 'Only Insert for Keying Set' option is enabled in the User Prefs. Also, made sure that for transforms, the active KeyingSet is provided with the data being modified instead of having them retrieve this from the context (which may miss a few items). --- While making the changes for pose paste, made pasting poses not destroy the existing properties on the bones if the buffer bones didn't have any properties to replace the old ones with. IMO, this seems a bit too destructive if they don't get replaced, but perhaps in some cases not removing causes some problems with bad poses? --- source/blender/editors/transform/transform_conversions.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/transform') diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index f9c537e1c20..0e11058a244 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4451,7 +4451,7 @@ void autokeyframe_ob_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *ob, /* only insert into active keyingset * NOTE: we assume here that the active Keying Set does not need to have its iterator overridden spe */ - ANIM_apply_keyingset(C, NULL, NULL, active_ks, MODIFYKEY_MODE_INSERT, cfra); + ANIM_apply_keyingset(C, &dsources, NULL, active_ks, MODIFYKEY_MODE_INSERT, cfra); } else if (IS_AUTOKEY_FLAG(INSERTAVAIL)) { AnimData *adt= ob->adt; @@ -4560,9 +4560,9 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o ANIM_relative_keyingset_add_source(&dsources, id, &RNA_PoseBone, pchan); /* only insert into active keyingset? */ - // TODO: move this first case out of the loop if (IS_AUTOKEY_FLAG(ONLYKEYINGSET) && (active_ks)) { - ANIM_apply_keyingset(C, NULL, NULL, active_ks, MODIFYKEY_MODE_INSERT, cfra); + /* run the active Keying Set on the current datasource */ + ANIM_apply_keyingset(C, &dsources, NULL, active_ks, MODIFYKEY_MODE_INSERT, cfra); } /* only insert into available channels? */ else if (IS_AUTOKEY_FLAG(INSERTAVAIL)) { -- cgit v1.2.3 From 56b1c4e47f8cd98c6513e7d972bd489f7d892a4f Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 11 Apr 2010 16:04:11 +0000 Subject: Specific operator for Push/Pull (no need to go through the generic operator and it makes it available in the operator search) --- source/blender/editors/transform/transform_ops.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'source/blender/editors/transform') diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index eba6482c884..4571cc0ace9 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -61,6 +61,7 @@ char OP_RESIZE[] = "TRANSFORM_OT_resize"; char OP_SHEAR[] = "TRANSFORM_OT_shear"; char OP_WARP[] = "TRANSFORM_OT_warp"; char OP_SHRINK_FATTEN[] = "TRANSFORM_OT_shrink_fatten"; +char OP_PUSH_PULL[] = "TRANSFORM_OT_push_pull"; char OP_TILT[] = "TRANSFORM_OT_tilt"; char OP_TRACKBALL[] = "TRANSFORM_OT_trackball"; char OP_MIRROR[] = "TRANSFORM_OT_mirror"; @@ -75,6 +76,7 @@ void TRANSFORM_OT_resize(struct wmOperatorType *ot); void TRANSFORM_OT_shear(struct wmOperatorType *ot); void TRANSFORM_OT_warp(struct wmOperatorType *ot); void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot); +void TRANSFORM_OT_push_pull(struct wmOperatorType *ot); void TRANSFORM_OT_tilt(struct wmOperatorType *ot); void TRANSFORM_OT_trackball(struct wmOperatorType *ot); void TRANSFORM_OT_mirror(struct wmOperatorType *ot); @@ -91,6 +93,7 @@ TransformModeItem transform_modes[] = {OP_SHEAR, TFM_SHEAR, TRANSFORM_OT_shear}, {OP_WARP, TFM_WARP, TRANSFORM_OT_warp}, {OP_SHRINK_FATTEN, TFM_SHRINKFATTEN, TRANSFORM_OT_shrink_fatten}, + {OP_PUSH_PULL, TFM_PUSHPULL, TRANSFORM_OT_push_pull}, {OP_TILT, TFM_TILT, TRANSFORM_OT_tilt}, {OP_TRACKBALL, TFM_TRACKBALL, TRANSFORM_OT_trackball}, {OP_MIRROR, TFM_MIRROR, TRANSFORM_OT_mirror}, @@ -579,6 +582,26 @@ void TRANSFORM_OT_shear(struct wmOperatorType *ot) // XXX Shear axis? } +void TRANSFORM_OT_push_pull(struct wmOperatorType *ot) +{ + /* identifiers */ + ot->name = "Push/Pull"; + ot->description= "Push/Pull selected items"; + ot->idname = OP_PUSH_PULL; + ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + + /* api callbacks */ + ot->invoke = transform_invoke; + ot->exec = transform_exec; + ot->modal = transform_modal; + ot->cancel = transform_cancel; + ot->poll = ED_operator_areaactive; + + RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Distance", "", -FLT_MAX, FLT_MAX); + + Transform_Properties(ot, P_PROPORTIONAL|P_MIRROR|P_SNAP); +} + void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot) { /* identifiers */ -- cgit v1.2.3 From 8c3ab1c2a40c17901546575adda3eba5d76b25ba Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 12 Apr 2010 00:36:50 +0000 Subject: - use more inline math funcitons where possible - swapped in less verbose math functons - modifier include cleanup --- source/blender/editors/transform/transform_generics.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/transform') diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 8bbeec63155..41914ed4135 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -189,8 +189,8 @@ static void clipMirrorModifier(TransInfo *t, Object *ob) copy_v3_v3(iloc, td->iloc); if (mmd->mirror_ob) { - mul_v3_m4v3(loc, mtx, loc); - mul_v3_m4v3(iloc, mtx, iloc); + mul_m4_v3(mtx, loc); + mul_m4_v3(mtx, iloc); } clip = 0; @@ -218,7 +218,7 @@ static void clipMirrorModifier(TransInfo *t, Object *ob) } if (clip) { if (mmd->mirror_ob) { - mul_v3_m4v3(loc, imtx, loc); + mul_m4_v3(imtx, loc); } copy_v3_v3(td->loc, loc); } -- cgit v1.2.3 From 584dbcc2fc4b8c837b80951babf28dc4c50017ac Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Mon, 12 Apr 2010 22:42:09 +0000 Subject: [#21993] Edge Slide operator should disable projection snapping Adding proper flag. If there are others like that, other people can fix them too, it's easy peasy. --- source/blender/editors/transform/transform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/transform') diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 498313838df..e4061a30af1 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4670,7 +4670,7 @@ void initEdgeSlide(TransInfo *t) t->num.increment = t->snap[1]; - t->flag |= T_NO_CONSTRAINT; + t->flag |= T_NO_CONSTRAINT|T_NO_PROJECT; } int doEdgeSlide(TransInfo *t, float perc) -- cgit v1.2.3