Notifications
Clear all

[Closed] Assigning a controller to object hide property

hello,
is it possible to assign controller to object’s hide property and view it in track editor ?
I know it is possible to assign controller to object’s visibility property .
But i want to control the hide property through Boolean_float () .

example: assign a controller to $.isHidden property
like $.ishidden = on/off (instead use boolean_float)

1 Reply

isHidden is not an animatable property so you can’t do this.
What you could do is to use a script controller to hide / unhide an object according to a Boolean_float controller. But this would be a very ugly solution.

I usually use an expression controller on the scale controller of an object to make it “disappear”. Here is an example:

(
	local obj = point()
	if obj.modifiers[#ui] != undefined then deleteModifier obj obj.ui
	addModifier obj (emptyModifier name:"UI")
	local def = attributes att
	(
		parameters params rollout:roll
		(
			isVisible type:#boolean ui:cbxIsVisible
		)
		
		rollout roll "UI"
		(
			checkbox cbxIsVisible "Is visible"
		)
	)
	custAttributes.add obj.ui def #unique
	obj.ui.isVisible.controller = boolean_float()
	
	local tester = teapot()
	tester.scale.controller = Scale_Expression()
	tester.scale.controller.AddScalarTarget "vis"  obj.ui.isVisible.controller
	tester.scale.controller.SetExpression "vis * [1,1,1]"
)