Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

sweepMeshFromCurve

sweepMeshFromCurve

robertofernadez2492
Participant Participant
786 Views
2 Replies
Message 1 of 3

sweepMeshFromCurve

robertofernadez2492
Participant
Participant

Is there any way to get the nodes creates by sweepMeshCreator in MEL?

 

I know that there is an sweepMeshCreator.outMeshArray attribute, but if i try to get its value i get

 

Error: line 1: The attribute is compound with mixed type elements.

 

thankx

Roberto

 

 

 

 

Accepted solutions (1)
787 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

compound attributes like this are basically coded shape nodes which have a to of different attributes and math in them so getAttr doesn't give any results because they would not be understandable to a human. But what you can do is look for the outgoing connections of your sweepMeshCreator node and filter them by object type "mesh" and you will get all the objects created by the sweepMeshCreator node.

Here is an example of how you can get  and print the shapes created by all the sweepMeshCreator nodes in the scene:

string $sMC[] = `ls -type "sweepMeshCreator"`;
for ($s in $sMC){
    string $conn[] = `listConnections -t "mesh" -sh true $s`;
    print $conn;
}

If you want to do it for just a specific sweepMeshCreator node, you can change the first line. Also if you want the transforms of the sweepmeshes instead of the shapes, just change the -sh flag in line 3 to false.

 

I hope it helps!

 

0 Likes
Message 3 of 3

robertofernadez2492
Participant
Participant

thankx a lot, it works for me

 

Roberto