Page 1 of 1

How to change Tool name with script

PostPosted: Sun May 22, 2016 10:19 pm
by Richard Yao
In the scripting reference, it says to change tool name, should use TOOLS_Name property, but I have tried setattr and simply assigning a string to TOOLS_Name, nothing works.

Re: How to change Tool name with script

PostPosted: Mon May 23, 2016 7:22 pm
by michael vorberg
in python you use
Code: Select all
comp.Background1.SetAttrs({"TOOLS_Name":"GREEN", "TOOLB_NameSet": True})


lua:
Code: Select all
Background1:SetAttrs({TOOLS_Name="RED", TOOLB_NameSet = 1})


the secret is to set the "TOOLB_NameSet" attribute to True to change the name

Re: How to change Tool name with script

PostPosted: Thu May 26, 2016 8:43 pm
by Richard Yao
in python you use
CODE: SELECT ALL
comp.Background1.SetAttrs({"TOOLS_Name":"GREEN", "TOOLB_NameSet": True})


lua:
CODE: SELECT ALL
Background1:SetAttrs({TOOLS_Name="RED", TOOLB_NameSet = 1})


the secret is to set the "TOOLB_NameSet" attribute to True to change the name


Thanks Michael,
It's weird, this forum doesn't seem to send e-mails when someone reply to your post. Sincerely, appreciate your help.

Re: How to change Tool name with script

PostPosted: Sat May 28, 2016 8:13 pm
by Glenn Sakatch
you have to ask the forum to email you with replys

There is a checkbox at the bottom of your posting page that says "notify e when a reply is posted"

I personally think it should default to on position.

Glenn

Re: How to change Tool name with script

PostPosted: Mon May 30, 2016 8:29 pm
by Richard Yao
Glenn Sakatch wrote:you have to ask the forum to email you with replys

There is a checkbox at the bottom of your posting page that says "notify e when a reply is posted"

I personally think it should default to on position.

Glenn


Thanks for the tip.