Camera Creation in MEL

45 views
Skip to first unread message

likage

unread,
Apr 20, 2015, 4:56:11 AM4/20/15
to python_in...@googlegroups.com
I am coding some MEL for camera creations, I have encountered an issue that have make me quite lost

I am trying to do something like this:
createNode transform -n "csc_wcam1";
createNode camera
-n "csc_wcamShape1" -p "csc_wcam1";

It works during my "testing" but when the name of the node was changed to cater to the actual application, instead of creating the actual camera that I am expecting as in my "testing", I got two nodes creations:
createNode transform -n "csc_X2A-1Q_csc_0290_wcam1";
createNode camera
-n "csc_X2A-1Q_csc_0290_wcamShape1" -p "csc_X2A-1Q_csc_0290_wcam1";

and along with a warning : // Warning: line 2: No object matches the parent name: csc_X2A-1Q_csc_0290_wcam1 //

These 2 lines of codes are almost exactly the same but why are the output are so different?

Marcus Ottosson

unread,
Apr 20, 2015, 5:05:27 AM4/20/15
to python_in...@googlegroups.com

You can’t use - as name for your node.


Mahmoodreza Aarabi

unread,
Apr 20, 2015, 5:11:03 AM4/20/15
to python_in...@googlegroups.com
hey
Don't use dash in name "_X2A-1Q_"
instead of dash use underscore "_"
maya itself change dash "-" to underscore "_" and this creates error

--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/e0e415cb-50f2-4625-bfe9-398719347392%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--


Bests,
madoodia

likage

unread,
Apr 20, 2015, 6:08:25 AM4/20/15
to python_in...@googlegroups.com
Hey Marcus and madoodia,

Thanks for pointing that out to me.
It was such a noob mistake on my part.

Thank you very much!

Cheers!



On Monday, April 20, 2015 at 5:05:27 PM UTC+8, Marcus Ottosson wrote:

You can’t use - as name for your node.




Reply all
Reply to author
Forward
0 new messages