Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Selecting the result of an imported file?
  RSS 2.0 ATOM  

Selecting the result of an imported file?
Rate this thread
 
62983
 
Permlink of this thread  
avatar
  • roimatola
  • Posted: 20 December 2011 08:11 AM
  • Total Posts: 3
  • Joined: 04 November 2011 07:56 AM

Hi, i’m pretty new to MEL programming. I’m trying to make a simple script that imports a mesh from a file and position it. However i can´t seem to grasp the way to select a file imported mesh in order to move or do any operation to it.

I’m importing the file like this:
file -import -type “mayaBinary” -ra true -namespace “mesh” -options “v=0” -pr -loadReferenceDepth “all” “path/to/file.mb”;

but whats the command to select the imported file?

Thanks a lot!



Replies: 0
avatar
  • roimatola
  • Posted: 20 December 2011 09:17 AM

to be more exact i’m looking to select the result of the imported file.

Thanks



Replies: 0
avatar

I see you are using a namespace “mesh” in your command.

Your imported parts should be named “mesh:NAME” after the import, where NAME is, of course, the name from the file.

If this is correct, then:

select -"mesh:*";

should select everything that was imported, as a new selection list. Unless what you are importing already has name with a namespace, in which case you would need “name:*:*”, and so on.

If you want to add what was imported to what was already selected instead of a new list, you would use -add instead of -r (replace), but it sounds like you want a new selection to move/rotate/whatever.

<* Wes *>



Replies: 0