change Icon of layer

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

change Icon of layer

Post by davoodice2 »

hello friends.
can we change Icon of layer ?
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
synthsin75
Posts: 9978
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: change Icon of layer

Post by synthsin75 »

Yes, the layer type icons are located in C:\Program Files\Moho\Resources\Images on Windows. They are named bone_type.png, group_type.png, mesh_type.png, etc..
Replacing these will change the layer icons.
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: change Icon of layer

Post by davoodice2 »

synthsin75 wrote: Wed Nov 10, 2021 3:44 am Yes, the layer type icons are located in C:\Program Files\Moho\Resources\Images on Windows. They are named bone_type.png, group_type.png, mesh_type.png, etc..
Replacing these will change the layer icons.
Thanks. I mean, I do this with a script.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
synthsin75
Posts: 9978
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: change Icon of layer

Post by synthsin75 »

Lua does have the os library, which can move files around. But I don't see any reason why you'd want to do that, as you'd still have to restart Moho to see the change.
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: change Icon of layer

Post by davoodice2 »

synthsin75 wrote: Wed Nov 10, 2021 5:31 pm Lua does have the os library, which can move files around. But I don't see any reason why you'd want to do that, as you'd still have to restart Moho to see the change.
I want change color of icons for all parents of child in hierarchy. just for faster find parents by eye. I did by changing names but it's not interesting.

some thing like this

Image
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
User avatar
synthsin75
Posts: 9978
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: change Icon of layer

Post by synthsin75 »

That doesn't look like the icon color is changed. It just looks like secondary selection. You could also color layers on the fly: MohoLayer:SetLabelColor(colID)
Post Reply