Model Hierarchy issues
Nov 20, 2015
Display of children while hiding parents
If a simple cellPACK HIV virus model has a membrane surface and two proteins X and Y that are children of the membrane, how do I hide the membrane surface and leave the proteins showing? Simply hiding the membrane node hides all of its children, so that simple method does not work.
Here are 4 approaches.
1) Internal model display bits. Hide all the triangles of the membrane but leave the membrane model displayed. We don't have a command for this right now, but the code supports hiding individual triangles and that is used for example for surface zone display.
2) Cinema4d method. Every node in the tree has a 3-state display attribute: On, Off, Inherit. Turn the membrane node to Off, and the child nodes to On. By default every node is set to Inherit. A top level node that is Inherit means On. Graham Johnson demonstrated this to me.
3) No inheritance. Each node has an On/Off display attribute with no inheritance. Simply turn off the membrane and the children remain showing. To turn off the node and its children uses a different command or GUI action that traverses all children and turns off their display. Graham Johnson has used this in non-Cinema4d software.
4) Inherited and non-inherited display. Each node has two display bits. I'm not sure of the semantics. Conrad discussed this idea in a meeting, but I think approach 2 is probably conceptually simpler with the same capability.
Considerations
Methods 1 and 3 don't allow preserving complex display patterns. Another scenario illustrates this, a molecule with a molecular surface child model. To hide the atoms (parent) while showing the surface, currently (method 1) the display bit of every atom is turned off. If a complicated subset of atoms was displayed (ones near ligands) it is not easy to return to that without undo, or saving the complicated display pattern. Saving the pattern with nameselection is a viable approach.
Method 2 can preserve complex display patterns but is conceptually harder for a naive user to discover and understand if they don't read documentation.
Method 2 can't display all display patterns. If you have a specific pattern of On and Off nodes and want to temporarily hide that tree you cannot do it by turning off the top node. The pattern would have to be only Inherit and Off so that setting the top node to off could hide everything. Graham has a cryptic trick for dealing with this situation that he says is a routine thing he teaches to his Cinema4d students. He makes a top level node that he names "hide", and to hide a tree he simply drags it to be a child of the "hide" node. To show it he drags from being a child of "hide" to being a top level node.
Method 3 has the simplest data state and puts the responsibility for flexible control with command options and GUI interface. I think this may be easiest for new users to do simple things while allowing arbitrarily advanced usage scenarios by learning advanced command options.