Skip to content

Commit

Permalink
Crop if target image name does not contain 'animated.png'
Browse files Browse the repository at this point in the history
Minetest seems to name textures '_animated.png' if they are. If source
textures are animated, but the target isn't named accordingly, crop it.

See #9
  • Loading branch information
ensonic authored and sofar committed Nov 27, 2017
1 parent fae97ae commit 16c7624
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mcresconvert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ copy_or_crop_from_anim() {
if echo $IN | grep -q "/items/"; then
crop="1"
fi
# in minetest blocks textures are called *_animated.png" if they are
if ! echo $OUT | grep -q "_animated.png"; then
crop="1"
fi
fi
fi

Expand Down

0 comments on commit 16c7624

Please sign in to comment.