Bone Layer

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Greck
Posts: 3
Joined: Thu Dec 10, 2009 5:45 am

Bone Layer

Post by Greck »

Hello.

How can I get access to sub-layers of bone layer.
User avatar
Víctor Paredes
Site Admin
Posts: 5826
Joined: Tue Jan 25, 2005 3:18 pm
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Hello, have you read the tutorial?
ok, do you see the little triangle at side of the bone layer? click it.
Greck
Posts: 3
Joined: Thu Dec 10, 2009 5:45 am

Post by Greck »

Anime Studio Forum Forum Index -> Scripting

I talk about scripting. How can I get access using lua ?

"Class: GroupLayer" has "MohoLayer Layer(id)" method, but there is no BoneLayer class with same method, and Class: MohoLayer have no method...
User avatar
Víctor Paredes
Site Admin
Posts: 5826
Joined: Tue Jan 25, 2005 3:18 pm
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Greck wrote:Anime Studio Forum Forum Index -> Scripting

I talk about scripting. How can I get access using lua ?
:oops: Sorry, I didn't saw the section, I just click on View posts since last visite and open everything on tabs.
Please excuse me, I thought you were one of that newbies which never read the tutorials.

Sorry I can't help about scripting. Anyway, welcome to the forum.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 7:27 am
Location: España / Spain

Re: Bone Layer

Post by Genete »

Greck wrote:Hello.

How can I get access to sub-layers of bone layer.
You have to convert the Bone Layer to a Group Layer reference:

Code: Select all

GroupLayer LayerAsGroup(layer)

Converts a generic layer object into a group layer.
Return value (GroupLayer): a GroupLayer object layer (MohoLayer): the layer to cast 
After that you can use the members of the Group Layer:
int CountLayers()

Returns the number of sub-layers in the group.
Return value (int): the number of sub-layers in the group
MohoLayer Layer(id)

Returns a layer in the group (starting at 0 for the first layer).
Return value (MohoLayer): a layer in the group id (int): index number of the layer
and so on...
-G
Greck
Posts: 3
Joined: Thu Dec 10, 2009 5:45 am

Post by Greck »

Thank you very much.
But where can I read this descriptions ?
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 7:27 am
Location: España / Spain

Post by Genete »

Greck wrote:Thank you very much.
But where can I read this descriptions ?
Here for 6.1
and
Herefor 5.6

-G
Post Reply