selecting last object. ie importd obj

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 11 November 2005   #1
selecting last object. ie importd obj

hey,

is there a way to select the newly imported object....when you import an object it by default isn't selected. want to know if there is a way to do this.
At the moment the script we have queries everything in the scene and finds the odd one out. I didn't write it, but it is painfully slow on large scenes. Which are all our scenes.

Is it possible to search the scene being imported for the object. as there is usually only one object/group being imported and get that name for the master scene...so it doesn't have to search for it?

If there is another way please let me know
__________________

 
Old 11 November 2005   #2
if the script you have is slow, then it is probably comparing every node in the scene,which is not that smart since imported objects are always inported to the top level (parent of the world)... so you really only need to compare them...


either..

look into the script for the line that list everything (will look like string $allThings = `ls`) and replace the `ls` with `ls -as`

it will do that twice...


or..

poste the script and I'll do it.

or...

just import with nameSpace, than list stuff inthe sameSpace, then remove it from the nameSpace..
be careFull, nameSpaces are a bit of a pain if you dont keep ontop of them... and the help isn't soo good

.j
__________________
Make something idiot proof and they'll just build a better idiot

Last edited by john_homer : 11 November 2005 at 03:57 AM.
 
Old 11 November 2005   #3
Isn't there any "import" related condition/event that you could use with a scriptjob?
 
Old 11 November 2005   #4
thanks guys...i asked the melScripter here at work, and he'll look at fixing this one. Likely using the nameSpace ooption like John suggested..

thanks fellas.
__________________

 
Old 11 November 2005   #5
the extra flag -as worked very well. in one test i did took only four seconds compared to 77sec...almost 20x faster.
thats good for me.

thanks john.
__________________

 
Old 11 November 2005   #6
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:11 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.