Stud logo toggle for Preview #572
Replies: 2 comments 3 replies
-
I think the parts are disappearing because you decrease the ref count with Release but don't increase it back after so eventually they get unloaded. You can only have 1 mesh for a part so if you add stud logos to the preview you'll add it to the main view as well. What use case is this? Sounds strange to have logos in only one place. |
Beta Was this translation helpful? Give feedback.
-
Indeed, hence the the set and reset calls in lcpreviewdockwidget::SetCurrentPiece. The thinking here is there will not be any View redraw calls during the SetCurrentPiece call. Cheers, |
Beta Was this translation helpful? Give feedback.
-
Is it reasonably possible to enable stud logos for preview, independent of view ?
lcLibrary takes into account the stud logo during inititalization but it will also reload primitives when instructed - e.g SetStudLogo(3, true). Additionally, it is possible to release and unload a part in the library so a subsequent call on that part should reload its associated primitives etc...
With this understanding, I created a PoC where I set the stud logo to 3 at the top of the SetCurrentPiece() call, release and unload the piece, load the piece (
lcGetPiecesLibrary()->LoadPieceInfo(Info, false, true)
), and at the end, reset stud logo to 0. Here is what the code looks like:The resulting behaviour is initially as expected but then the library parts become increasingly unstable. A common behaviour is when clicking on a part in the View, the part disappears.
Any ideas on what's missing ?
Cheers,
Beta Was this translation helpful? Give feedback.
All reactions