Page 1 of 1

Immune to camera not working

Posted: Fri Sep 03, 2021 7:49 pm
by striker2311
I don't know what's happening but immune to camera option is faded in my image layer.
Please help me to fix that !!

Re: Immune to camera not working

Posted: Fri Sep 03, 2021 8:05 pm
by synthsin75
Immune to camera only works for top level layers. So if your image layer is nested in one or more group/bone layers, etc., you'll need to set immune from its topmost parent layer.

Re: Immune to camera not working

Posted: Fri Sep 03, 2021 9:16 pm
by chucky
You can temporarily drag that layer out of the group, apply immune to camera , then drag it back in to make it work.
Works every time ! :D
I've been doing it for years.

Re: Immune to camera not working

Posted: Fri Sep 03, 2021 10:47 pm
by synthsin75
I'll be damned.

Re: Immune to camera not working

Posted: Sat Sep 04, 2021 5:50 am
by striker2311
chucky wrote: Fri Sep 03, 2021 9:16 pm You can temporarily drag that layer out of the group, apply immune to camera , then drag it back in to make it work.
Works every time ! :D
I've been doing it for years.
Yeah it's great 🐱 yesterday accidently it happened and i thought it's a bug but as long as it's working it's fine 😜

BTW thanks for tip

Re: Immune to camera not working

Posted: Sat Sep 04, 2021 5:51 am
by striker2311
synthsin75 wrote: Fri Sep 03, 2021 8:05 pm Immune to camera only works for top level layers. So if your image layer is nested in one or more group/bone layers, etc., you'll need to set immune from its topmost parent layer.
Yeah thanks for that it seems to be working like that at first i didn't understand

Re: Immune to camera not working

Posted: Sat Sep 04, 2021 7:01 am
by chucky
No worries :D

Re: Immune to camera not working

Posted: Sat Sep 04, 2021 7:18 am
by synthsin75
Quick script to toggle immune to camera on the selected layer, even if it's in a group.

Code: Select all

-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************

ScriptName = "Syn_ToggleImmune"

-- **************************************************
-- General information about this script
-- **************************************************

Syn_ToggleImmune = {}

function Syn_ToggleImmune:Name()
	return "Toggle Immune"
end

function Syn_ToggleImmune:Version()
	return "0.1"
end

function Syn_ToggleImmune:Description()
	return "Toggle immune to camera"
end

function Syn_ToggleImmune:Creator()
	return "©2021 J.Wesley Fowler (SynthSin75)"
end

function Syn_ToggleImmune:UILabel()
	return "SYN: Toggle Immune"
end

-- **************************************************
-- The guts of this script
-- **************************************************

function Syn_ToggleImmune:Run(moho)
	moho.document:PrepUndo(moho.layer)
	moho.document:SetDirty()
	
	moho.layer:SetImmuneToCamera(not moho.layer:IsImmuneToCamera())
end


Re: Immune to camera not working

Posted: Wed Sep 22, 2021 3:18 am
by chucky
Hey Wes, just saw your script... nice one ! :D Ta!
Works great.