Conversation
|
There is not an easy solution to this issue. I looked into the format but couldn't find a pattern to detect groups easily. From what I saw, depending on the object's type, a different attribute indicates whether it has a child. |
|
I've been looking into the case of the For example, when opening that file with freecad, the wall looks like the following: In the and e.g. We may miss the objectdeps object information in the front-end, it's something that we may want to populate from the back-end before doing the front-end work. Looking into this made me think that we could probably use the label instead of the object name for displaying the tree. |
I saw that while investigating this issue, but I couldn't figure out how to extract that info using Freecad Python's API. |
|
As per https://forum.freecad.org/viewtopic.php?style=5&p=537587
Meeeeeeh. Stupid GUI mode again. I guess we are back to the issue I had when trying to load the object colors, where freecad's Python API would just not load the colors information without a GUI mode activated (a QT context basically). I suppose our only workaround would be to read the |
If every time we need a GUI feature we need to use the |
|
It looks like the |
Yeah that might make sense at some point... It was kind of convenient for colors because it was written exactly for fetching colors/opacities information.
Oh cool! From the forum I posted I thought this was only set when a QT-based app is running. |
Indeed, but it seems that it's not the information freecad uses for creating the tree view. I think the only way for us to create the same tree view is to use There is a mention of a FreeCAD branch which would populates the ViewObject properly in non-GUI mode in https://forum.freecad.org/viewtopic.php?p=146746#p146746 but I did not find the branch in question. I posted an answer on the forum, hopefully we can get some guidance from them. |

Fixes #31
Grabacion.de.pantalla.2023-02-03.a.las.17.31.37.mov