OK, I've never touched scripting so far, but it seems that I need some now.
Is it possible to script the "warp with bones" property? I've found no mention of this in the online documentation.
What I need is a script which I run after importing a bunch of images which sets all of them to "don't warp" - go through all layers, if image layer, set "warp with bones" to No.
I work with version 11, 9.5 and 8 - does the script need to be version-specific?
(Ideally this should go into the preferences - set warp yes/no for all images imported in the future.)
Image layer: Warp
Moderators: Víctor Paredes, Belgarath, slowtiger
Image layer: Warp
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
- synthsin75
- Posts: 9973
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Image layer: Warp
If you worked in 12 this would be easy. Just filter the layers by kind, shift-select all, and change all at once.
How much scripting do you really want to learn? I mean someone could just give you the code, but since you use older versions, maybe you want to learn enough to automate simple tasks like this. Kind of like writing macros.
How much scripting do you really want to learn? I mean someone could just give you the code, but since you use older versions, maybe you want to learn enough to automate simple tasks like this. Kind of like writing macros.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- neeters_guy
- Posts: 1619
- Joined: Mon Sep 14, 2009 7:33 pm
- Contact:
Re: Image layer: Warp
This is a hack, but since ver. 8 (and 9?) format is text editable, you could do a search for "parent_bone -3" and replace it with "parent_bone -1". (I don't know what the numbers mean. I discovered this by doing a text compare with a simple anme file consisting of one bone and one image.)
Re: Image layer: Warp
Yes, for the old versions I rely on Text Edit too. So there's no solution for v11?
Thx so far.
Thx so far.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
- synthsin75
- Posts: 9973
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Image layer: Warp
This will work in v11 for all selected layers.
Should work in any version that allows multiple layer selection.
Code: Select all
local sel = moho.document:CountSelectedLayers()-1
for i=0, sel do
local layer = moho.document:GetSelectedLayer(i)
if (layer:LayerType() == MOHO.LT_IMAGE) then
layer:SetLayerParentBone(-1)
end
end
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Image layer: Warp
Thank you so much. I'll try that first in January!
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini Plus OS 13.5