AlHanson Posted May 21, 2020 Share Posted May 21, 2020 I'm attempting to make some nodes for interacting with a Sheet Layer's Sheet Title. I've been able to make the Get Title function work correctly (Although this does also grab the Sheet Number- any way to avoid this outside of scripting its removal?) but I can't seem to get the the Set function to work. I've also tried to just replacing the variable I've created with a string value without success. Here's the code as I've cobbled together and VWX is attached. Sheet Layer Marionette.vwx @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'Set Sheet Layer Title' ) this.SetDescription( 'Retrieves the sheet title from a sheet layer' ) #Input Ports obj = Marionette.PortIn(vs.Handle(0), 'hLayer') obj.SetDescription( "The input layer object") string = Marionette.PortIn( '[Sheet Title]', 'sTitle' ) string.SetDescription( 'The sheet layer title' ) #OIP Controls #Output Ports layer = Marionette.PortOut('hLayer') layer.SetDescription( "The handle for the layer" ) #BEHAVIOR def RunNode(self): #inputs x = self.Params.obj.value title = self.Params.string.value vs.SetObjectVariableString(x, 162,title) #script #outputs self.Params.layer.value=x Quote Link to comment
AlHanson Posted May 21, 2020 Author Share Posted May 21, 2020 Continuing to mess around with this- I did find that using int 159 is actually the better usage for the Get function to retrieve just the Title without the Number. Doesnt seem to do anything to help the Setting problem. Quote Link to comment
AlHanson Posted May 21, 2020 Author Share Posted May 21, 2020 ...Or using 159 does in fact work. Not sure what I did incorrectly the first time, but it's working now after another attempt. Love it when I solve problems by opening and closing the program... 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.