OGRECave / ogre-meshviewer

Viewer for .mesh and .scene files as consumed by OGRE as well as any format supported by assimp
MIT License
56 stars 13 forks source link

File Open Dialog, initial draft #26

Closed sercero closed 4 months ago

sercero commented 4 months ago

@paroj sorry to bother you, but I'm having trouble with this.

I can't recreate the scene when the user opens a new file.

Something is creating a core dump, I wasn't able to figure out what.

fixes #19

paroj commented 4 months ago

wouldnt it be sufficient to only show the file dialog on startup, when there is no infile specified?

if you want to find out why its segfaulting do:

gdb --args python ogre_mesh_viewer.py

probably its some destruction order thingy between python and C++ leading to a dangling pointer

sercero commented 4 months ago

Fixed the issue when opening a file.

The behaviour now is:

paroj commented 4 months ago

tried this locally. Using "Renderer Settings > Apply & Restart" now crashes, which used to work before

sercero commented 4 months ago

tried this locally. Using "Renderer Settings > Apply & Restart" now crashes, which used to work before

It seems that there was some problem with the rebasing on the previous code.

I'll take a look.

Thanks

EDIT: Been doing some tests and in my case the viewer restarts correctly when changing the Renderer but the mesh does not show and then if I change to another mesh it crashes.

paroj commented 4 months ago

got an idea how to avoid a lot of the headaches here #27

what do you think?

sercero commented 4 months ago

got an idea how to avoid a lot of the headaches here #27

what do you think?

Ouch, I just saw this.

That will certainly fix the issues 😅

But I think that they are solved now.

paroj commented 4 months ago

anyway.. I would go with the other version as this is much more complex. The problem is the branching based on whether a scene was loaded before or not. It will be a burden to maintain in the future.