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:
Diffstat (limited to 'source/blender/editors/transform/transform_convert_nla.c')
-rw-r--r--source/blender/editors/transform/transform_convert_nla.c44
1 files changed, 10 insertions, 34 deletions
diff --git a/source/blender/editors/transform/transform_convert_nla.c b/source/blender/editors/transform/transform_convert_nla.c
index 7e5b80c2453..acef8a666e3 100644
--- a/source/blender/editors/transform/transform_convert_nla.c
+++ b/source/blender/editors/transform/transform_convert_nla.c
@@ -208,30 +208,18 @@ void createTransNlaData(bContext *C, TransInfo *t)
/* just set tdn to assume that it only has one handle for now */
tdn->handle = -1;
- /* now, link the transform data up to this data */
- if (ELEM(t->mode, TFM_TRANSLATION, TFM_TIME_EXTEND)) {
- td->loc = tdn->h1;
- copy_v3_v3(td->iloc, tdn->h1);
+ /* Now, link the transform data up to this data. */
+ td->loc = tdn->h1;
+ copy_v3_v3(td->iloc, tdn->h1);
- /* store all the other gunk that is required by transform */
+ if (ELEM(t->mode, TFM_TRANSLATION, TFM_TIME_EXTEND)) {
+ /* Store all the other gunk that is required by transform. */
copy_v3_v3(td->center, center);
- memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
-
- td->ext = NULL;
- td->val = NULL;
-
td->flag |= TD_SELECTED;
- td->dist = 0.0f;
-
unit_m3(td->mtx);
unit_m3(td->smtx);
}
- else {
- /* time scaling only needs single value */
- td->val = &tdn->h1[0];
- td->ival = tdn->h1[0];
- }
td->extra = tdn;
td++;
@@ -241,30 +229,18 @@ void createTransNlaData(bContext *C, TransInfo *t)
* then we're doing both, otherwise, only end */
tdn->handle = (tdn->handle) ? 2 : 1;
- /* now, link the transform data up to this data */
- if (ELEM(t->mode, TFM_TRANSLATION, TFM_TIME_EXTEND)) {
- td->loc = tdn->h2;
- copy_v3_v3(td->iloc, tdn->h2);
+ /* Now, link the transform data up to this data. */
+ td->loc = tdn->h2;
+ copy_v3_v3(td->iloc, tdn->h2);
- /* store all the other gunk that is required by transform */
+ if (ELEM(t->mode, TFM_TRANSLATION, TFM_TIME_EXTEND)) {
+ /* Store all the other gunk that is required by transform. */
copy_v3_v3(td->center, center);
- memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
-
- td->ext = NULL;
- td->val = NULL;
-
td->flag |= TD_SELECTED;
- td->dist = 0.0f;
-
unit_m3(td->mtx);
unit_m3(td->smtx);
}
- else {
- /* time scaling only needs single value */
- td->val = &tdn->h2[0];
- td->ival = tdn->h2[0];
- }
td->extra = tdn;
td++;