Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2010-05-06 23:54:43 +0400
committerJoseph Eagar <joeedh@gmail.com>2010-05-06 23:54:43 +0400
commit9610515b22dcf0450aca9c3794700380851753a9 (patch)
tree23b4be78bc917090113ca661259578629c527afe /source/blender/editors/transform/transform_generics.c
parent6e3812d7bc645b0731cf17a0d7d82d1bdac7d678 (diff)
keyframe transform, both through dopesheet/action editor and graph editor, works a bit better with handles. handles now follow keyframes properly in frame snap mode, in situations where they would move (but the keyframe would not) in undesirable ways before. also hopefully fixed vector scope crash in image editor. and disabled snapping to seconds (ever); this can be a seperate option, silently switching to second snapping in frame snapping mode is absolutely evil. also, the action editor draws in hundredth of seconds, not seconds, so it didn't even work. Aligorith: I hope this code is ok, if not feel free to rewrite it.
Diffstat (limited to 'source/blender/editors/transform/transform_generics.c')
-rw-r--r--source/blender/editors/transform/transform_generics.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 59961f5812c..99793f4010a 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1167,6 +1167,7 @@ static void restoreElement(TransData *td) {
if (td->val) {
*td->val = td->ival;
}
+
if (td->ext && (td->flag&TD_NO_EXT)==0) {
if (td->ext->rot) {
VECCOPY(td->ext->rot, td->ext->irot);
@@ -1188,11 +1189,23 @@ static void restoreElement(TransData *td) {
void restoreTransObjects(TransInfo *t)
{
TransData *td;
-
+ TransData2D *td2d;
+
for (td = t->data; td < t->data + t->total; td++) {
restoreElement(td);
}
+ for (td2d=t->data2d; t->data2d && td2d < t->data2d + t->total; td2d++) {
+ if (td2d->h1) {
+ td2d->h1[0] = td2d->ih1[0];
+ td2d->h1[1] = td2d->ih1[1];
+ }
+ if (td2d->h2) {
+ td2d->h2[0] = td2d->ih2[0];
+ td2d->h2[1] = td2d->ih2[1];
+ }
+ }
+
unit_m3(t->mat);
recalcData(t);