Jump to content
Developer Wiki and Function Reference Links ×

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

@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

 

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.

Guest
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...