make layer unselectable?
Posted: Thu Sep 02, 2021 11:01 am
can be done though script?
Code: Select all
function Syn_LockLayer:IsRelevant(moho)
--keep locked layer from being selected
if (moho.frame > 0) and (moho.layer:IsLocked()) and (self.lastLayer) and (moho.document:IsLayerValid(self.lastLayer)) then
moho:SetSelLayer(self.lastLayer)
end
self.lastLayer = moho.layer
end
very interested! . now is it possible to change it to ignore locked layer and select behind layer?synthsin75 wrote: ↑Thu Sep 02, 2021 5:23 pm From my lock layer script:On frames > 0, selecting a locked layer instantly selects the last selected layer. For the user, it just looks like they can't select that layer.Code: Select all
function Syn_LockLayer:IsRelevant(moho) --keep locked layer from being selected if (moho.frame > 0) and (moho.layer:IsLocked()) and (self.lastLayer) and (moho.document:IsLayerValid(self.lastLayer)) then moho:SetSelLayer(self.lastLayer) end self.lastLayer = moho.layer end
EDIT: Forgot to include the assignment of self.lastLayer
I don't understand.davoodice2 wrote: ↑Fri Sep 03, 2021 8:03 am very interested! . now is it possible to change it to ignore locked layer and select behind layer?
exactly!synthsin75 wrote: ↑Fri Sep 03, 2021 5:52 pmAnd do you want it to select the next layer down when it finds one?davoodice2 wrote: ↑Fri Sep 03, 2021 8:03 am very interested! . now is it possible to change it to ignore locked layer and select behind layer?
If you want to go to the next layer down, including to the next group, you'll have to create a table of all the layers in the document, in layer window order.davoodice2 wrote: ↑Fri Sep 03, 2021 11:02 pmexactly!synthsin75 wrote: ↑Fri Sep 03, 2021 5:52 pm And do you want it to select the next layer down when it finds one?