On Thursday, June 13, 2013 2:46:00 PM UTC-7, Geordie Martinez wrote: > Quick pymel addendum: > > yeah. it's better to just > import pymel.core as pm > > then do > > pm.ls > > > PyMEL has some convenience pointers so you don't have to do the full module > path. > > you "should" be able to just do > pm.<WHATEVER> > and it will be available > > > the exception is datatypes. but you can just use dt for that (built in) > > pm.dt.Vector > > pm.dt.Matrix > > > etc. > > > > > > > > On Thu, Jun 13, 2013 at 2:34 PM, Jesse Capper <[email protected]> wrote: > > Get the submeshes as what? Objects? As stated, maya (and pymel) doesn't treat > different poly shells as different objects. > > > > > If you want to get the faces that comprise each shell (subobject) of an > object, Justin Israel's script shows a simple way of doing so: > https://gist.github.com/justinfx/3738519 > > > > > Also, when you import pymel.core, all the subpackages of pymel.core get > imported into the pymel.core namespace. That means that you can use > pymel.core.ls instead of having to specify pymel.core.general.ls. This also > includes the mel object. pymel.core.mel is valid. > > > > > > > On Wednesday, June 12, 2013 3:25:47 PM UTC-7, Christian Akesson wrote: > > > Does anyone know how to get the submeshes of a polygon mesh. > > > Combine two spheres into a single mesh and each sphere will be a submesh. > > > > > > > > > I've been searching the docs and Google, but have not been able to find > > anything. > > > > > > Anyone know if PyMel has anything for this anywhere? > > > > > > > > > Thanks, > > > /Christian > > > > -- > > 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 [email protected]. > > To post to this group, send email to [email protected]. > > For more options, visit https://groups.google.com/groups/opt_out.
Yea we have absolute import and usage as a standard here. "Better" is a relative term, but yea. We've been through usage conversations and reached the conclusion that absolute will be easiest to maintain in a common code base and avoid any namespace conflicts. That is a completely different conversation though :-) Thanks for the link to Justin's script. -- 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 [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
