I’m a first timer trying to solve a bug in Blender here. I actually looked at it a couple months ago, but got caught up and forgot about it. The issue may be reproduced as follows:-
- Open a blend file with at least one object in it, say the default cube.
- Create a new collection in the outliner as a child of the root collection.
- Bring up the view menu (is that what it’s called?) by hitting ‘n’ and selecting the view tab.
- Check local collections under ‘Collections’ and hide the collection you created. (Collection 1 by default)
- Move the default cube ‘Cube’ into the collection you created.
- The cube doesn’t become hidden.
- To get the desired result, unhide and then hide the local collection again.
This is my logical take on the issue:-
- The visibility of the objects in a local collection is calculated only when the visibility of the collection is changed.
- Visibility has to be calculated also after every change in the outliner.
- This does happen when local collections are disabled.
What I need to solve the issue:-
- I need to know what code is executed when a local collection’s visibility is changed.
- I need to know what function calculates the visibility of an object.
So I tried finding functions for the purpose by searching for keywords from the respective python commands (Search on QtCreator) for each UI element, but didn’t get any useful results. And then a good man on blender.chat pointed out that rna_collection.c would be a good place to look for what happens when collections are moved about. I don’t understand the code though. Would anyone help me find the code I need to work with? I’ve never worked on a large project before. Also, is it unusual for re-builds to take upto five minutes on a reasonable machine? It would be helpful if someone did a walk through on solving a beginner issue from a new comer’s perspective.