You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If k_read_scene_flags_groups is set to false loading the scene will loose information about hidden groups or group layers & thus groups which are in hidden layers.
This is because in addition to flattening the transform hierarchy the instance group_index is set to 0.
I am not sure of the best way to resolve this. Preserving the group_index might work but would potentially break some code, flattening the hidden information might work but a group can be in a layer different to it's children so that also needs to be taken into account. A new flag might be needed (perhaps k_flatten_hidden which flattens both layer and group hidden).
For my own code I am now going to flatten the transform hierarchy myself to work around this.
The text was updated successfully, but these errors were encountered:
Hey @dougbinks sorry for the late response, this somehow went under my radar. Good catch!
I think it's likely to be most useful to have the scene reader ultimately display the same thing that magicavoxel does when you're looking at the scene. For example: put all instances on layer 0, group them and put this group on layer1. Toggling visibility of layer1 turns off all instances that are children of the group that is now hidden.
So my proposal would be: set the instance.hidden field to true for all output instances if any of their parent groups is in a hidden layer. In essence, we don't just flatten the transform part of the groups anymore, but also the hidden state. What do you think?
If
k_read_scene_flags_groups
is set tofalse
loading the scene will loose information about hidden groups or group layers & thus groups which are in hidden layers.This is because in addition to flattening the transform hierarchy the instance
group_index
is set to 0.I am not sure of the best way to resolve this. Preserving the
group_index
might work but would potentially break some code, flattening the hidden information might work but a group can be in a layer different to it's children so that also needs to be taken into account. A new flag might be needed (perhapsk_flatten_hidden
which flattens both layer and group hidden).For my own code I am now going to flatten the transform hierarchy myself to work around this.
The text was updated successfully, but these errors were encountered: