Removing tweaks from meshes - pt attribute

675 views
Skip to first unread message

f.michal

unread,
Oct 5, 2015, 11:33:03 AM10/5/15
to python_in...@googlegroups.com
Hi
Some time ago I was bitten by a nasty bug and it took me a while to pin
that down.

The issue is that if you:
1. reference in an object that has tweaks in .pt attribute AND output
connection from .outMesh
2. apply any deformer to that mesh (in scene that is referencing)
3. reopen that scene
you get double transformations.

It all comes down to fact, that maya meshes save vertex positions plus
optional tweak positions as a 'pt' attribute.
Is there any method to remove this 'pt' - effectively freezing vertex
positions saved in 'vt' ?

Here is a step list showing how to reproduce the problem:

1. New Scene, create polySphere, move, freeze transformation, delete
history
This step adds a '.pt' tweaks attribute to your mesh
2. create a follicle and attach to sphereShape - you can use
parentToSurface.mel by Duncan Brinsmead
http://area.autodesk.com/blogs/attachment/12618
3. Save as ASSET.MA
4. New Scene
5. reference in ASSET.MA
6. create deformer on referenced sphere
7. save as SHOT.ma
8. reopen SHOT.ma and watch double transformations

A solution is to remove .pt attrbiute from mesh and only way I found is
to save as OBJ, but this is far from ideal.
Are there any other methods ? Perhaps somewhere in MFnMesh ?
Any tips appreciated as this bug is haunting us for quite some time now.

thanks
-michal

Nicolas Combecave

unread,
Oct 6, 2015, 3:25:49 AM10/6/15
to python_in...@googlegroups.com
We found that applying a deformer, and deleting history "bakes" everything down and cleans those vertex tweaks...
Might not be applicable to your situation though...



-michal

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/56129824.5020002%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Chad Fox

unread,
Oct 7, 2015, 4:56:47 PM10/7/15
to python_in...@googlegroups.com
​I started a thread recently about how to remove tweaks and Marcus O offered a one line python that zeros the .pnts values. 



-Chad


Reply all
Reply to author
Forward
0 new messages