Hey,
I'm trying to write a script that builds me a house randomly in Python.
For that I am importing a window model, and i have to get the name of that Object and save it in a variable!
I found no way how to do that.
There's no problem getting the name of polyCube for example created in the script editor, so there have to be also a command for imported Objects as well or am I wrong?
I hope someone can tell how I have to do it
Simple. When you import a file, it (by default) puts the objects into a namespace. You can then look at the new namespace, and you have all the objects that were imported.
Thank you :-)
I had a lot of trouble with namespaces, when i executed my script twice for example, the given names didn't start over at 0, but did coninue where it left off.
So I had no idea how to select an object in an algorithm, not knowing where the namespace had counted
But I fixed it now with a global variable, not the most beautiful solution i believe, but it works ;-)
Thank you very much for your help :-)
there is another problem for which I can find no solution.
I want to select a face, than extrude and scale!
I want it to scale to the center, but I think Maya scales it to the center of the hole object, so i have to give it the pivot information of the face, but how do i get it?
Or is there any other solution scaling a face to its center? Any flag or something I miss?
Im using Maya 2011, if this is important.
You may not post new threads |
You may not post replies |
You may not post attachments |
You may not edit your posts |
BB code is On |
Smilies are On |
[IMG] code is On |
HTML code is Off