Jump to content

Setting Sheet Layer Sheet Title

Recommended Posts

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

class Params(metaclass = Marionette.OrderedClass):
	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" )

def RunNode(self):
	x = self.Params.obj.value
	title = self.Params.string.value
	vs.SetObjectVariableString(x, 162,title)


Link to comment

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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...