Is it possible to extrude equally in both directions? Or is there a script that can already do this? Would be very useful in a lot of scenarios when modeling, and particularly when bringing in garments from MD
Solved! Go to Solution.
Is it possible to extrude equally in both directions? Or is there a script that can already do this? Would be very useful in a lot of scenarios when modeling, and particularly when bringing in garments from MD
Solved! Go to Solution.
Solved by Kahylan. Go to Solution.
Hi!
I don't think there is a standart tool to do that in Maya.
If this is only about giving clothing from MD some thickness, I wrote a script for that a while back.
But it was only for my own workflow, so it is pretty limited and only works if you select all the faces of the object at the same time.
import maya.cmds as mc
def extrudeFlatObjBothDirections(thick = 0, tz = 0):
"""
Extrudes selected faces in both directions.
WARNING: only works properly if all polygons of object are selected
"""
sl = mc.ls(selection = True) or []
l = mc.ls(selection = True, fl = True) or []
ext = mc.polyExtrudeFacet(sl[0], kft = True, thickness = thick, ltz = tz, sma = 30, taper = 1, d = 1, ws = True)
mc.setAttr('{0}.reverseAllFaces'.format(ext[0]),1)
ext = mc.polyExtrudeFacet("{0}[{1}:{2}]".format(sl[0].split("[")[0],len(l), 2*len(l)-1), kft = True, thickness = thick, ltz =tz, sma = 30, taper = 1, d = 1, ws = True)
mc.setAttr('{0}.reverseAllFaces'.format(ext[0]),1)
extrudeFlatObjBothDirections(thick = 0, tz = 0.1)
the arg "thick" defines thickness and "tz" defines Translate Z, depending on the mesh one or the other will give you better results.
I hope this helps!
Hi!
I don't think there is a standart tool to do that in Maya.
If this is only about giving clothing from MD some thickness, I wrote a script for that a while back.
But it was only for my own workflow, so it is pretty limited and only works if you select all the faces of the object at the same time.
import maya.cmds as mc
def extrudeFlatObjBothDirections(thick = 0, tz = 0):
"""
Extrudes selected faces in both directions.
WARNING: only works properly if all polygons of object are selected
"""
sl = mc.ls(selection = True) or []
l = mc.ls(selection = True, fl = True) or []
ext = mc.polyExtrudeFacet(sl[0], kft = True, thickness = thick, ltz = tz, sma = 30, taper = 1, d = 1, ws = True)
mc.setAttr('{0}.reverseAllFaces'.format(ext[0]),1)
ext = mc.polyExtrudeFacet("{0}[{1}:{2}]".format(sl[0].split("[")[0],len(l), 2*len(l)-1), kft = True, thickness = thick, ltz =tz, sma = 30, taper = 1, d = 1, ws = True)
mc.setAttr('{0}.reverseAllFaces'.format(ext[0]),1)
extrudeFlatObjBothDirections(thick = 0, tz = 0.1)
the arg "thick" defines thickness and "tz" defines Translate Z, depending on the mesh one or the other will give you better results.
I hope this helps!
This works amazing, thank you so much for sharing 🙂
This works amazing, thank you so much for sharing 🙂
Can't find what you're looking for? Ask the community or share your knowledge.