How do I get the Smart Warp Layer settings in the Image Tag of the Image Layer Setings in Script?

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
CIto
Posts: 3
Joined: Sat Nov 07, 2020 1:12 pm

How do I get the Smart Warp Layer settings in the Image Tag of the Image Layer Setings in Script?

Post by CIto »

I am creating a Script using information from SmartWarp.
How do I get the SmartWarp data set in ImageLayer's Settings?
User avatar
hayasidist
Posts: 3511
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: How do I get the Smart Warp Layer settings in the Image Tag of the Image Layer Setings in Script?

Post by hayasidist »

is this what you want?

MohoLayer:SetDistortionMeshLayer(layer)

http://mohoscripting.com/methods/1180
CIto
Posts: 3
Joined: Sat Nov 07, 2020 1:12 pm

Re: How do I get the Smart Warp Layer settings in the Image Tag of the Image Layer Setings in Script?

Post by CIto »

Thanks for the reply.

But that's not the information I want.

For example.
LayerID 1 MohoLayer ImageLayer
LayerID 2 MohoLayer MeshLayer (SmartWarp)
If this were to happen.

MohoLayer:SetDistortionMeshLayer(layer)
What you can get here is the MeshLayer in the Layer of LayerID2.

I would like to know the information about the Layers of LayerID1 to 2
User avatar
synthsin75
Posts: 9968
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How do I get the Smart Warp Layer settings in the Image Tag of the Image Layer Setings in Script?

Post by synthsin75 »

MohoLayer:GetDistortionMeshLayer()
http://mohoscripting.com/methods/1181

So ImageLayer:GetDistortionMeshLayer() will return the assigned smart warp layer.

MohoLayer:SetDistortionMeshLayer(layer) sets which layer is used as the smart warp.
CIto
Posts: 3
Joined: Sat Nov 07, 2020 1:12 pm

Re: How do I get the Smart Warp Layer settings in the Image Tag of the Image Layer Setings in Script?

Post by CIto »

Thank you!
We have the income for the information we need!

> So ImageLayer:GetDistortionMeshLayer() will return the assigned smart warp layer.

I didn't know you could use it like this.
Post Reply