Giobbe Posted January 19 Share Posted January 19 (edited) Hello everyone. I would like to understand how this Marionette 'button' works. It seems like a simple button, but maybe it’s just me—I can’t figure out how to place it inside a wrapper or even make it visible in the Object Info Palette (OIP). Does anyone have examples of how to use it? Or perhaps let me know if it’s even possible to use it within a Marionette node and then implement it! THANKS Edited January 19 by Giobbe Quote Link to comment
Pat Stanford Posted January 19 Share Posted January 19 It does not look like it works inside a wrapper unless it is the only object in the wrapper. And it does not work as a button in the drawing. It just provides a button in the OIP that will let you run a script that has been edited into the button node code. So you would need to duplicate the node and edit each version to have a different script. Then to use you would have to select the button in the drawing and then click the button line in the OIP. I think this is probably more of a demonstrator on how to create a node that will have buttons in the OIP than a useful node as part of a network of Marionette Object. @Marissa FarrellAm I missing anything? 1 Quote Link to comment
Antonio Landsberger Posted January 20 Share Posted January 20 @Giobbe Check out this page explaining all the possible OIP options for Marionette Nodes and how to implement them: https://github.com/Vectorworks/developer-scripting/blob/main/Marionette/pages/Implement a Node.md 2 Quote Link to comment
Marionette Maven Marissa Farrell Posted January 26 Marionette Maven Share Posted January 26 On 1/19/2026 at 12:18 PM, Pat Stanford said: I think this is probably more of a demonstrator on how to create a node that will have buttons in the OIP than a useful node as part of a network of Marionette Object Yes, the Button, Radio Button, Popup, and Slider nodes that we ship are all essentially template nodes so that users have easier access to starting points for those OIP controls, although the latter three can be modified directly and used in a network as-is. 3 Quote Link to comment
Giobbe Posted January 28 Author Share Posted January 28 Hi everyone, is it impossible to put a button in OIP after creating a marionette object? I would like to give a command to the object, what I would like to do is open the function vs.EditTexture(texH) @Antonio Landsberger yes, I see and thanks for remember it The file test is attached. Thank you very much @Marissa Farrell @Pat Stanford Senza Titolo 7.vwx 1 Quote Link to comment
Giobbe Posted January 30 Author Share Posted January 30 Hi everyone I found this by @DomC. I can see this up to the creation of the marionette object, why? Now, I would like this to provide activation of another node. Is it possible? Is it enough for me to create a script that, for example, sends an interaction or a string? Button Example.vwx Thanks 1 Quote Link to comment
DomC Posted February 2 Share Posted February 2 Hi, I’m not sure I understand correctly what you’re trying to do. But maybe you just want to name the button-node inside your wrapper and then you see the button appears on the wrapper or the PIO Object? 1 Quote Link to comment
Pat Stanford Posted February 2 Share Posted February 2 The current Button node does not get properly included in a Wrapper. It is more a template to understand how to create/modify nodes to include an OIP button. 1 Quote Link to comment
Giobbe Posted February 3 Author Share Posted February 3 @Pat Stanford for now I've done this: import Marionette import vs @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'Button Trigger 0.1i' ) this.SetDescription('Modifica Texture 2') #OIP Controls btn = Marionette.OIPControl( 'Modifica Texture 2', Marionette.WidgetType.Button, 'script', 'Apri editor Texture 1') #Output Ports outTrig = Marionette.PortOut('trigger') def RunNode(self): self.Params.outTrig.value = 1 def script(self): # CANALE FISSO PER TEXTURE 1 channelID = '2' settingName = 'EditTex_Trigger_' + channelID vs.SetSavedSetting('Marionette_Custom', settingName, '1') hObj = vs.GetCustomObjectInfo()[0] if hObj != vs.Handle(0): vs.ResetObject(hObj) The button call: import Marionette import vs @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( "Edit Texture 0.1i" ) this.SetDescription( 'Edit Texture 2 - Chanel 2' ) #Input Ports inObj = Marionette.PortIn( 0, 'hObj' ) sTexName = Marionette.PortIn( 'sTexName' ) trigger = Marionette.PortIn( 0, 'trigger' ) #Output Ports outObj = Marionette.PortOut('hObj') texNameOut = Marionette.PortOut('sTexName') def RunNode(self): inObj = self.Params.inObj.value texName = self.Params.sTexName.value # CANALE FISSO PER TEXTURE 2 channelID = '2' if isinstance(inObj, int) or inObj is None: if inObj == 0: inObj = vs.Handle(0) settingName = 'EditTex_Trigger_' + channelID ok, val = vs.GetSavedSetting('Marionette_Custom', settingName) should_edit = False if ok and val == '1': should_edit = True vs.SetSavedSetting('Marionette_Custom', settingName, '0') if should_edit and texName != '': texH = vs.GetObject(texName) if texH != vs.Handle(0): vs.EditTexture(texH) self.Params.outObj.value = inObj self.Params.texNameOut.value = texName When you press the button in the Button Trigger 0.1i node, the script(self) function is executed. Sorry for the Italian, but I sometimes write in my own language! PARETE .vwx 2 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.