Jump to content
Drughi

Python Mirror Tool

Recommended Posts

Posted (edited)

I'm trying to make my own python mirror tool for rigging purpose. I want to mirror on the zy plane. 

What I've tried to far:

transform = node.worldTransform()
mirror_matrix = hou.Matrix4([[-1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]])
mirrored = transform * mirror_matrix
node.setWorldTransform(mirrored)

Is leading to this:
5d28d732aa16a_Bildschirmfoto2019-07-12um20_46_15.thumb.png.eeaf5bde388917f8353fa963b28e7352.png

Y and X axis are great, but the z Axis is oriented in the wrong direction.

Can anyone help?

Edited by Drughi

Share this post


Link to post
Share on other sites

Found the solution. Its done by setting the pretransforms.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×