Message 1 of 5
Python Node Type Problem
Not applicable
05-06-2011
03:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey,
Recently i started learning Python but today I came across a problem which seems weird to me. I'm trying to work with all the materials in my scene. So to get them all I'd do:
But it always errors out, saying mat is an unknown Object Type. Maya's Python documentation though says that the Type of the materials is "mat". Even more strange: if i try the same thing in mel (ls -mat), it works, showing me the materials in my scene.
Using Maya 2011.
I would be very thankfull for help!
Recently i started learning Python but today I came across a problem which seems weird to me. I'm trying to work with all the materials in my scene. So to get them all I'd do:
import maya.cmds as mc
mc.ls(type="mat")
But it always errors out, saying mat is an unknown Object Type. Maya's Python documentation though says that the Type of the materials is "mat". Even more strange: if i try the same thing in mel (ls -mat), it works, showing me the materials in my scene.
Using Maya 2011.
I would be very thankfull for help!