Onink Posted September 1, 2022 Share Posted September 1, 2022 Is there a node to move object forward or backwards? Or is there a way to determine which object goes on top? I have a 2d marionette with multiple rectangles that need to be arranged. Quote Link to comment
DomC Posted September 1, 2022 Share Posted September 1, 2022 Best Option is to sort data before creating the Objects. There is also a send backward Node here available. 1 Quote Link to comment
Onink Posted September 1, 2022 Author Share Posted September 1, 2022 Thanks! I'll see if this works for me. Quote Link to comment
Onink Posted September 7, 2022 Author Share Posted September 7, 2022 It works for me. I also made a forward node by changing the script a little: #MRoth #V1.0 20200413 @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'Forward' ) this.SetDescription( 'Send an object to the front of the object stacking order.' ) #Input Ports InObj = Marionette.PortIn( vs.Handle(0), 'h') InObj.SetDescription( "The object to send to the front." ) #OIP Controls #Output Ports OutObj = Marionette.PortOut('h') OutObj.SetDescription( "The object" ) #BEHAVIOR def RunNode(self): #inputs obj = self.Params.InObj.value #script vs.HMoveForward(obj, True) #outputs self.Params.OutObj.value = obj 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.