[Closed] Shhhhh from Maxscript to Mel/Python
Any advice here from those who use both evil siblings?
Got to start making some of my tools in Maya, and I’m finding the transfer frustrating thus far!
i’m probably the right person to be asked.
if you go to maya tools development and don’t have mel background just skip it.
mel is the basic for maya scripting but today it’s ok to skip it.
pymel is a wasting time. the only real help of it is a UI creation
python is really well integrated in maya. cmds is completely covers mel.
openmaya pretty fast… openmaya api2 is almost the same fast as c++
qt is super cool as a UI making base.
so i definitely have a fun developing for maya
When I’m looking at examples like this is seems like I still need to have a basic grasp of MEL though correct?
no much help but It amused me at the time that a colleague once described Mel script as “Trying to type in Boxing Gloves”
Say what you like about Max, but it’s so easy to open it up, write a tool, with a UI without having to do any external IDE configuration, global variables, or interpreters. Feeling like I’ve been spoilt all my life!
As Denis said, you can skip Mel.
As a language, Mel is hell.
python with cmds is better for sure.
But, do not expect all the sugar from maxscript.
Just try to do “$.material” in Maya.
I don’t know how many people are actually using openMaya 2.
that’s kinda what pymel gives to you. but the prize is high. pymel is slow. no… it’s very slow. no… it’s f…ing slow!
but there is a super nice feature inherited from old maya – stretchable-alignable-dockable ui in maya.
it’s very easy to make a nice looking interface in maya.
I know this is completely the wrong place to post this but maybe it’ll be useful for other people too.
What’s the equivalent of getclassinstances in maya?
And what’s the equiv of the ‘scenematerials’ library?
import maya.cmds as cmds
cmds.ls(type='camera')
collect all camera
And what’s the equiv of the ‘scenematerials’ library?
cmds.ls(type='shadingEngine')
and find which have connection to valid shapes
So that gets me the Shading Groups, but that’s not the same as materials?
I’m trying to collect all the Blinn, Lambert, VrayMtl, etc… I’m thinking I need to use, cmds.ls(type=‘VRayMtl’) + cmds.ls(type=‘Blinn’) etc to get all my types, is there an easy way to get all the different types of surface shaders?
I’ve at least found that ‘classof’ is ‘objectType <obj>’
Cheers Denis,
What about getting display layers from the scene and what objects are in those layers?
And just more generally is there an equivalent of ‘ShowProperties’? I’m trying to work out how to start to dig myself into the structure of everything.
Max has it’s SuperClasses, Categories, Classes, Property and Value Types, with Interfaces and Methods on some of these objects. Just trying to get my head into the same for Maya.
talking about maya scene nodes ‘properties’ are similar to ‘attributes’
you can always get the list using
cmds.listAttr()
for selection… or specify a node name:
cmds.listAttr('pCubeShape1')
also there are extra flags to filter the search
Trying to find a list of the cmds I found this little snippet… it lists a lot of stuff!
import maya.cmds as mc
for k in sorted(mc.__dict__.keys()):
print k, mc.__dict__[k]
for key, value in cmds.__dict__.items(): print key, ":", value
yes, it a content of cmds module
but the way of how they work and list of available keys you can find only in the help