How to separete the categories that is in the project?

I have a list of all categories that are in the project (user and system categories). It is about 278 items but in the project I usee only 4 of them.
How to filter categories? I wish to operate only on those 4 items.
I interested only in python scripting.

Why not just use the Categories node?
I don’t really see the problem.

In categories node, it is 278 items. I don’t need so much, I wish to have only 4 categories to work with.

Do you want to change the Categories node to only have the 4 categories in there or am I misunderstanding you?

Not exatly. I do not want to change anything, I only wish to filter categories that exist in a project and work only with them. I mean those categories that are used in a project or have some relations with the system categories.

I don’t even know how you’d manage to lad in all categories in the first place. Did you use the Document.BuiltIn Categories from clockwork?
If you have clockwork and don’t want 4 Categories nodes I’d say try using the BuiltInCategory.ByName node from clockwork.

Thank you, I will try.

Which parameter of category shows that it is in use in a project?
I think that it has to be a boolean type.

I don’t believe there is a property that states whether a category is in use or not. And even if there was, there would probably be many categories that show as “in use” even if you aren’t using them.

Are these 4 categories static? Will they ever change? I would recommend just hard coding each category in your python script.

1 Like

Thanks a lot. Maybe it is a wrong way that I choose to solve a problem.