diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2015-09-25 18:08:33 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2015-09-25 18:08:33 +0300 |
commit | 0419d3bb014bf9c3bbbb420c89f1ba2b3b15a579 (patch) | |
tree | c32bef4384e0cf8799c5b47b3a94bae063fafb03 /source/blender/editors/space_node/node_relationships.c | |
parent | cf12e51eba8cb45e3c19f9f069725ed2d7624b8d (diff) |
Fix node auto-offset to left broken
Own, really stupid mistake in rBc653077bf56 :| Kids, don't commit at night!
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.c')
-rw-r--r-- | source/blender/editors/space_node/node_relationships.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index a9f126a75e2..4097db29e5a 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -1646,10 +1646,15 @@ static int node_insert_offset_modal(bContext *C, wmOperator *UNUSED(op), const w for (node = snode->edittree->nodes.first; node; node = node->next) { if (UNLIKELY(node->anim_ofsx)) { const float endval = node->anim_init_locx + node->anim_ofsx; - if (node->locx < endval) { + if (IS_EQF(node->locx, endval) == false) { node->locx = BLI_easing_cubic_ease_in_out(duration, node->anim_init_locx, node->anim_ofsx, NODE_INSOFS_ANIM_DURATION); - CLAMP_MAX(node->locx, endval); + if (node->anim_ofsx < 0) { + CLAMP_MIN(node->locx, endval); + } + else { + CLAMP_MAX(node->locx, endval); + } redraw = true; } } |