HideByCategory

Hello

I like to hide / show my Forest Pro and Railclone Pro via HideByCategory.

HideByCategory.helpers works but HideByCategory.Forest Pro doesn't

Any solutions to make this work?

Thank you.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jahman's picture

.

first you need to get the correct class name for these type of objects
you can do it like this
open the listener select one of them and run classof selection[1]

and that is how you hide/unhide nodes belonging to this class
hide (getClassInstances YourClassName)
unhide (getClassInstances YourClassName)
(YourClassName without double quotes)

remykonings's picture

.

It doesn't seem to be working. Am i doing something wrong?
Thank you.

classof selection[1]
RailClone_Pro

hide (getClassInstances RailClone_Pro)
-- Runtime error: operation requires a collection of nodes, got: RailClone
-- MAXScript callstack:
-- thread data: threadID:22736
-- ------------------------------------------------------
-- [stack level: 0]
-- In top-level

jahman's picture

.

yes, I was wrong.
that function returns class instances and not nodes.

try this one
hide (for obj in objects where classof obj == RailClone_Pro collect obj)

remykonings's picture

.

Thank you for your help.
That indeed works well :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.