Scene loading Topic is solved

Problems building or running the engine, queries about how to use features etc.
slapin
Bronze Sponsor
Bronze Sponsor
Posts: 250
Joined: Fri May 23, 2025 5:04 pm
x 16

Scene loading

Post by slapin »

Hi, all!
Is it possible to interfere with DotScene loader/saver to support some new userData or other stuff?

User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 535
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 198

Re: Scene loading

Post by sercero »

You mean without recompiling OGRE?

In my case I created a LevelLoader that is basically a custom DotScene.cpp so I can modify it.

slapin
Bronze Sponsor
Bronze Sponsor
Posts: 250
Joined: Fri May 23, 2025 5:04 pm
x 16

Re: Scene loading

Post by slapin »

I mean as plugin i.e. to not copy all the code but implement my code just for additional features.
Also if you did your own scene loader how do you register it with node system? The biggest annoyance to me with current system is not knowing which nodes were loading with scene and having to iterate over children to guess... :(
I think if there was a callback for each loaded node that would be sufficient for me to not need any custom scene loaders...

slapin
Bronze Sponsor
Bronze Sponsor
Posts: 250
Joined: Fri May 23, 2025 5:04 pm
x 16

Re: Scene loading

Post by slapin »

Also as I see DotScene loader does not support multiple same scenes loading, so I guess I need my own loader anyway.
The problem is how to get it done in less stressful way...

slapin
Bronze Sponsor
Bronze Sponsor
Posts: 250
Joined: Fri May 23, 2025 5:04 pm
x 16

Re: Scene loading

Post by slapin »

Implemented custom scene loader, it was not as bad as I thought... Now I can mark stuff directly in Blender and spawn various effects without need for
lots of hacky manual labor. Even integrated it into my event system and Lua scripting... Good!

Thanks a lot for advice!

User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 535
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 198

Re: Scene loading

Post by sercero »

You can also use Ogre::Any to store metadata in the Nodes:
viewtopic.php?t=52772

slapin
Bronze Sponsor
Bronze Sponsor
Posts: 250
Joined: Fri May 23, 2025 5:04 pm
x 16

Re: Scene loading

Post by slapin »

Yes, I use exactly that.