[Addon] Mask Animator

Source: https://github.com/volvis/BlenderScripts/blob/master/anim_mask_animator.py
Video: https://drive.google.com/file/d/0Byfee-ppswCucjI5U0o3Qlh3MXc/view?usp=sharing

This addon makes the Mask modifier animatable through frame_change_post and render_pre handlers.

I’ve been working on projects where I had to animate the visibility of several objects. Originally I set up drivers for each objects’ maximum draw type and renderable params, but for the next one I wanted to try animating the Mask modifier instead. It wasn’t possible out of the box, hence this addon. (hack-on might be more appropriate)

With an object selected press the “Set Mask Animation For Selected” to set up necessary handlers and modifiers. Active object is added to a group called “Animated Masks”, which the addon iterates per frame, switching modifier values on the go. The visible mask is animated using the the MaskIndex property in the object panel. The MaskIndex corresponds to the groups in the object’s Vertex Groups, so changing the order there affects the animation as well.

Note: Since this uses Vertex Groups, you might have a hard time using this with skinned objects or similar. Just keep the mask groups at the top of the Vertex Group list, or try wiring drivers to draw type and renderable params in those cases.

very interesting add on! Thanks for sharing :slight_smile:

Hi @volvis,

Great thanks for this new add-on but pay attention to python file name in Blender :
MaskAnimation.py =>> sequencer_mask_animation.py

No uppercase in py file, please!
Byebye.

Added a last minute fix. Keyframes were off by one frame when doing a viewport render, so I added an extra scene.update().

Hey Spirou4D, no problem, but what’s the ‘sequencer’ for?

Ha yes u’re right I made a mistake, it’s not sequencer but anim_mask_animation.py
your category is anim_…

I don’t use often animation addd-ons. Sorry.