Skip to content

Commit

Permalink
0.5.3 fix texanim
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico-Duduf committed Jan 29, 2021
1 parent 084bb59 commit 6612ef9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion duik/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"blender": (2, 80, 0),
"author": "Nicolas 'Duduf' Dufresne",
"location": "Armature properties Pose Menu, View3d sidebar (N), Shader Editor sidebar (N), File > Import.",
"version": (0,5,2),
"version": (0,5,3),
"description": "Experimental tools from Rainbox Lab. which may end up in Duik for Blender.",
"wiki_url": "https://duik-blender-docs.rainboxlab.org/",
}
Expand Down
6 changes: 4 additions & 2 deletions duik/tex_anim.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,11 @@ def poll(cls, context):

def execute(self, context):
node = dublf.context.get_active_node(context)
tree = bpy.context.material.node_tree
# remove all keyframes referencing this image
# and adjust values of other keyframes to continue referencing the right images
current_index = node.duik_texanim_current_index
dublf.animation.remove_animated_index('nodes[\"' + node.name + '\"].duik_texanim_current_index', current_index)
dublf.animation.remove_animated_index(tree, 'nodes[\"' + node.name + '\"].duik_texanim_current_index', current_index)

# remove this image
node.duik_texanim_images.remove(current_index)
Expand All @@ -193,6 +194,7 @@ def poll(cls, context):

def execute(self, context):
node = dublf.context.get_active_node(context)
tree = bpy.context.material.node_tree
current_index = node.duik_texanim_current_index
images = node.duik_texanim_images

Expand All @@ -204,7 +206,7 @@ def execute(self, context):
else: new_index = current_index + 1

# update keyframes values
dublf.animation.swap_animated_index('nodes[\"' + node.name + '\"].duik_texanim_current_index', current_index, new_index)
dublf.animation.swap_animated_index(tree, 'nodes[\"' + node.name + '\"].duik_texanim_current_index', current_index, new_index)

images.move(current_index, new_index)
node.duik_texanim_current_index = new_index
Expand Down
3 changes: 3 additions & 0 deletions src-docs/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

This is the list of what has changed since the first version of *Duik for Blender*.

## 0.5.3

- Fixed an error happening when (re)moving an image in the TexAnim module.

## 0.5.2

Expand Down

0 comments on commit 6612ef9

Please sign in to comment.