How to clone a group use lua?

Questions and information about using Lua scripting with Storyboard

Moderator: jamiev

How to clone a group use lua?

Postby zero147 » Mon Feb 26, 2018 2:13 am

Hi,

How to clone a group use lua?

I tried something.

1.gre.clone_object("group","groupclone","layer",{x = 100, y = 10})
got an warn message. (WARN [4.718]:Unable to find reference group to clone)

2.gre.clone_object("layer.group","groupclone","layer",{x = 100, y = 10})
It looks like everything is fine, but when you have a table control under the group, you can't clone it successfully, the sbengine crashes.

thanks.
zero147
 
Posts: 33
Joined: Mon Jun 06, 2016 4:27 am

Re: How to clone a group use lua?

Postby MikeMarchand » Tue May 29, 2018 3:00 pm

Hi Zero147,

In Storyboard 5.2 and under, we are unable to clone table objects, so cloning a group with a table in it will not work.

This was one of the issues we've addressed in our upcoming version of Storyboard. Hopefully you get a chance to check it out!

Cheers,
Mike
MikeMarchand
 
Posts: 31
Joined: Wed Jan 21, 2015 3:33 pm


Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 3 guests

cron