One object including multi-shape node..

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 04 April 2013   #1
One object including multi-shape node..

Hi everybody, I need help!

I have imported a stp file into maya, and the nurbs object have a lot of shape node in it..How can I separate these shape node to single object ? The outliner tree just like attachment picture.
Attached Images
File Type: jpg outline.jpg (89.1 KB, 16 views)
 
Old 04 April 2013   #2
Check out the "parent" MEL command with the -shape flag. A simple script will do the job.
 
Old 04 April 2013   #3
You can't actually "combine" NURBS objects in the same way you combine polygon meshes unless you're actually using AttachSurfaces and doing some more intelligent merging of the meshes. You'd need to group them all under the same transform node. This is the kind of code to do that:

you would select all your nurbs objects then run:

for ($obj in `ls -sl`){
    parent -r -s ($obj + "Shape") a_nurbs;
}


I wrote this without double checking it runs, but the ideas are there
__________________
MPC NYC
Andres Weber | CG Generalist
434 Broadway, 9th Floor, New York City, 10013
GChat AndresMWeber
www.moving-picture.com

Last edited by Daemonecles : 04 April 2013 at 07:37 PM.
 
Old 04 April 2013   #4
Originally Posted by Daemonecles: You can't actually "combine" NURBS objects in the same way you combine polygon meshes unless you're actually using AttachSurfaces and doing some more intelligent merging of the meshes. You'd need to group them all under the same transform node. This is the kind of code to do that:

you would select all your nurbs objects then run:

for ($obj in `ls -sl`){
    parent -r -s ($obj + "Shape") a_nurbs;
}


I wrote this without double checking it runs, but the ideas are there


Thanks Daemonecles. But the script isn't work..Sorry for my english. Infact , this object is imported from a STP file. the STP file is export from CATIA. If I turn off the shpae display of outliner window, this model looks like a alone object, It isn't a group or a parent connection. And I really don't know about MEL more..
Attached Images
File Type: jpg a.jpg (92.1 KB, 14 views)
 
Old 04 April 2013   #5
Oh! It's a parent transform with multiple shape objects. Well unless you know how to actually attach nurbs surfaces (I'd recommend a tutorial in the subject, it's very deep including matching spans on edges etc.) then this is how you'lll have to deal with the object. If you want to separate all the shape objects to separate transforms then you can run this script on all the SHAPE NODES:

for ($obj in `ls -sl`){
    string $shapes[]=getShapes($obj);
    for ($shape in $shapes){
        string $transform = `createNode transform -n ($shape+"_GEO")`;
        print ("Unparenting shape: " + $shape + "\n");
        parent -s -r $shape $transform;
    }
}

//This code thanks to Bryan Ewert
proc string[] getShapes( string $xform )
{
   string $shapes[];
   $shapes[0] = $xform;
   if ( "transform" == `nodeType $xform` )
   // If given node is not a transform, assume it is a shape
   // and pass it through
   {
      $shapes = `listRelatives -fullPath -shapes $xform`;
   }
   return $shapes;
}
__________________
MPC NYC
Andres Weber | CG Generalist
434 Broadway, 9th Floor, New York City, 10013
GChat AndresMWeber
www.moving-picture.com
 
Old 04 April 2013   #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 10:53 PM.


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