Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.
Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger
- Posts: 32
- Joined: Tue Mar 24, 2015 3:04 pm
Dear forum members,
I try to change a layercomp's name through lua. Is it possible?
Comp refers to the layercomp, name refers to a string.
It doesn't work. What's the proper way to change an LM_String?
Thanks in advance
- Posts: 7184
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
If I remember correctly, you'd do something like this:
local string = LM.String:new_local() --define LM.String object
string:Set(name) --set LM.String value
comp:SetName(string) --use LM.String