Because references aren't *quite* there yet (I have uncovered a bug that keeps a script I have from working properly in adjusting the master, and if I adjust both the child and the master the reference gets broken with no way to restore it -- it's a switch layer and you can't reestablish such switches) I need to be able to find the master layer for that reference so I can just skip the operation that the child doesn't reflect.
I can find whether a layer is a reference using IsReferencedLayer, but I can't see any way to know what the master layer is -- anyone have a clue?
Identify a layer as a master reference
Moderators: Víctor Paredes, Belgarath, slowtiger
- synthsin75
- Posts: 9972
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Identify a layer as a master reference
I haven't tried, but my guess is that you need:
GetLayerRefInfo(MohoLayerRef &refInfo)
I assume you would use it something like this:
local refInfo = MohoLayerRef:new_local()
moho.layer:GetLayerRefInfo(refInfo)
local masterLayer = refInfo.fLayerUUID
Just guessing, mind you.
GetLayerRefInfo(MohoLayerRef &refInfo)
I assume you would use it something like this:
local refInfo = MohoLayerRef:new_local()
moho.layer:GetLayerRefInfo(refInfo)
local masterLayer = refInfo.fLayerUUID
Just guessing, mind you.
- 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: Identify a layer as a master reference
Hmmm, that looks like a pretty good guess, Wes.
I may try it out but I was able to work around most of my issues by ignoring the references that were switch layers -- it's a kludge (and really only for my own workflow) but in my case the switches set width by using styles, so I can just adjust that (and that will adjust things properly on both master and reference).
I may try it out but I was able to work around most of my issues by ignoring the references that were switch layers -- it's a kludge (and really only for my own workflow) but in my case the switches set width by using styles, so I can just adjust that (and that will adjust things properly on both master and reference).