Immune to camera not working

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
striker2311
Posts: 226
Joined: Wed Aug 26, 2020 3:55 pm

Immune to camera not working

Post 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 !!
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Immune to camera not working

Post 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.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Immune to camera not working

Post 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.
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Immune to camera not working

Post by synthsin75 »

I'll be damned.
User avatar
striker2311
Posts: 226
Joined: Wed Aug 26, 2020 3:55 pm

Re: Immune to camera not working

Post 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
Last edited by striker2311 on Sat Sep 04, 2021 5:52 am, edited 1 time in total.
User avatar
striker2311
Posts: 226
Joined: Wed Aug 26, 2020 3:55 pm

Re: Immune to camera not working

Post 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
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Immune to camera not working

Post by chucky »

No worries :D
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Immune to camera not working

Post 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

chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Immune to camera not working

Post by chucky »

Hey Wes, just saw your script... nice one ! :D Ta!
Works great.
Post Reply