AlanW Posted December 19, 2022 Share Posted December 19, 2022 hi, does this node not work or am i missing something? Ungroup.vwx Quote Link to comment
Pat Stanford Posted December 19, 2022 Share Posted December 19, 2022 I think you are missing something. 😉 You are not passing a Group to the Ungroup node, you are just passing a single line. So there is nothing to ungroup. I think what you want is for the Marionette to make a line instead of a group. Right? I think there is a way to do that, but I can't remember what it is. @DomC @Marissa Farrell Help? Quote Link to comment
AlanW Posted December 19, 2022 Author Share Posted December 19, 2022 Thanks Pat, Been a long time since i played with this. If you run the line without the ungroup you get a group not a line that's why i figured i need to ungroup it. mmmmm. Quote Link to comment
Pat Stanford Posted December 19, 2022 Share Posted December 19, 2022 Yes, a Marionette network will generate a Group as the output. You can manually ungroup it afterwards. I THINK there might be a way to generate the individual geometry. But if you ungroup (or manage to generate individual geometry), then you lose the automatic ability for the Marionette Network to automatically delete the old geometry when you make a change. So in your example in you named your Point nodes so they show as parameters in the OIP, you could change them and have the original geometry deleted and the new geometry drawn. Which is the original idea behind Marionette. I Think. Quote Link to comment
Letti R Posted December 20, 2022 Share Posted December 20, 2022 Hello, you can get the handle of the group where the line is in with the "Get Parent" node. Than you can ungroup this group with the "Ungroup" node. But as @Pat Stanford pointed out the Marionette network will no longer overwrite the previously generated geometry but will draw a new line everytime you run the network. Regards, Letti 2 Quote Link to comment
SimA Posted December 20, 2022 Share Posted December 20, 2022 Hello everyone I have a small collection of nodes that I took over from networks. Please test the function first and then install it in a network. Use at your own risk. Ungroup.vwx Quote Link to comment
tomcee Posted January 24, 2023 Share Posted January 24, 2023 Has anyone successfully got this to work as an option within a wrapper? I can get it to work unwrapped but it breaks once wrapped. Simple example attached. For background: I have a script that, once configured, is to be run multiple times to build geometry on a set of control lines of the same length. I'd like the users to be able to simply chose to ungroup/detach the geometry from Marionette once they are ready to build on all the lines. Detach From Script Example.vwx Quote Link to comment
Letti R Posted January 24, 2023 Share Posted January 24, 2023 Hello, it seems like it does not work in your case, because the wrapper builds a group in which all groups from the network are put in. So you have groups that were made by nodes in a group that was made by the wrapper. There are two solutions that come to my mind: Ungroup every group from every node that created one, aswell as the group from the wrapper, with a node. I think doing the above two or more times might do the trick, although i have not testet that. I also spotted something i dont like in the network from my previous post. I think it would be better to put a "remove duplicates" node between "get parent" and "ungroup" node, so that the network only tries to ungroup every group once. Set the parent of all created objects to be the active layer (or any other layer you want). Unfortunately i could not find a node that comes with vw that does that. But because i can write nodes by myselfe i quit searching pretty quick and just write the node myself. Just replace the whole code in any node with this code and click on ok. If you find another node that does the same thing as mine, than use the other node. Chances are high, that it is written better than mine. Here is the code of the node: @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'set_parent' ) this.SetDescription( 'set_parent' ) #Input Ports x = Marionette.PortIn( [], 'items' ) x.SetDescription( "items" ) #OIP Controls #Output Ports y = Marionette.PortOut('items') y.SetDescription( "items" ) #BEHAVIOR this.SetListAbsorb() def RunNode(self): #inputs x = self.Params.x.value #script handle_active_layer = vs.ActLayer() for item in x: vs.SetParent(item, handle_active_layer) #outputs self.Params.y.value = x Here is an image of your wrapper with the node, and as far as i can tell it works (i'm sorry i cant give you the .vwx file, because i only have an educational version): Regards, Letti 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.