DomC Posted December 20, 2018 Share Posted December 20, 2018 (edited) Hello I used my own "set layer" node in past. More recently the default library has a node "Set Layer". Did I understand it wrong or do this node just nothing? # The code in the node of default library l = self.Params.layer.value o = self.Params.object.value #script layer = vs.GetObject(l) #get layer handle of input layer name obj = vs.GetParent(o) #get parent of object input (obj = existing layer) vs.SetParent(obj, layer)#set existing layer to new layer that works? #outputs self.Params.obj.value = o As I understand, this code set the new layer as the parent of the existing layer. I think something like this, would be better, or not? #script layer = vs.GetObject(l) #obj = vs.GetParent(o) vs.SetParent(o, layer) Test Set Layer.vwx Edited December 20, 2018 by DomC Quote Link to comment
Marionette Maven Marissa Farrell Posted December 20, 2018 Marionette Maven Share Posted December 20, 2018 I think the default content node is missing a check to see if the parent of the object is a Marionette generated group or a layer. In the case of a Marionette created object (for instance a rectangle drawn with the rectangle node) we need to move its parent group to the appropriate layer so that when the network is rerun the object gets replaced. 1 Quote Link to comment
DomC Posted December 20, 2018 Author Share Posted December 20, 2018 Hi Marissa Thank for that quick reply. Quote object is a Marionette generated group or a layer. Aha, now I understand the additional parent check. 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.