In the original code depth=0 meant that there was no parents. But with
BLI_listbase_count we have depth 1 in those cases.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
| source/blender/editors/space_node/node_draw.cc | ||
|---|---|---|
| 2187–2192 | Put an explicit explanation that we want to ignore the first element of the path (as it is the top-most tree which does not need tinting), and that we don't want to go too far in the list. The name num_parents is a bit ambiguous. I.e. how many parents you expect to be in the A -> B list? Technically there is only one parent, as the B has no children. But the code will return 2. clamped_tree_path_length is what denotes the content of the variable the best. | |
| 2188 | Avoid macro whenever possible! | |
Comment Actions
Code looks fine, and logic is sound! (some minor tweak to make it clear max_depth does not clamp the depth variable, can just rename right before commit)
In the middle of doing some other tests here, so couldn't verify by applying as a patch and so on.
| source/blender/editors/space_node/node_draw.cc | ||
|---|---|---|
| 2184 | ||