Message 1 of 3
Another really basic python-maya question
Not applicable
09-03-2009
05:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Sorry for the newbie question, but I cannot seem to find any examples in the documentation that explain this:
I am trying to get a camera matrix...
I am using this command:
cmds.xform("mmCam_Shape", q=True, matrix = 0)
but I just KNOW that is way wrong.
first off, I don't know how to put myself into "query" mode. I'm guessing that is what the q=True argument does but that is a TOTAL guess.
secondly, I want to query the matrix, not set it to all zero's... but I don't know how to tell the function that I am interested in this particular piece of info.
finally, the above command seems to run, but I just get an error:
RuntimeError: No valid objects supplied to 'xform' command.
but that camera shape IS in the scene.
Basically, there is a real disconnect between my understanding of the basic syntax of using the python api and what it really needs. Could someone point me in the right direction? Thanks.
I am trying to get a camera matrix...
I am using this command:
cmds.xform("mmCam_Shape", q=True, matrix = 0)
but I just KNOW that is way wrong.
first off, I don't know how to put myself into "query" mode. I'm guessing that is what the q=True argument does but that is a TOTAL guess.
secondly, I want to query the matrix, not set it to all zero's... but I don't know how to tell the function that I am interested in this particular piece of info.
finally, the above command seems to run, but I just get an error:
RuntimeError: No valid objects supplied to 'xform' command.
but that camera shape IS in the scene.
Basically, there is a real disconnect between my understanding of the basic syntax of using the python api and what it really needs. Could someone point me in the right direction? Thanks.