Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: File Saving/Loading/Activating Complete  (Read 2582 times)

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
File Saving/Loading/Activating Complete
« on: June 28, 2006, 09:18:15 PM »

The general interfaces for the Main IDE Saving/Loading/Closing/ and BringToFront (activating) are fully implemented. I may add a File-> close -> save action. But, that will use the existing interfaces so no more changes there are planned.

I have some more documenting to do, this time with the existing plugins so that they will make good examples of what to do to implement some functionality into Visual Ogre Studio.

Some more work is also needed in the events department. Ie, if one plugin modifies the main window's scene, and another plugin has the actualy sceneformat loader/saver, it will need to know that the scene is modified. I plan to add a method to the Ogre container class (that holds root, scenemanager, etc), so that anyone can register an event handler for listening to when their scenemanager has been modified (environment settings, nodes added/deleted, entities added/removed from the scene, etc) so that they can mark themselves as modified (or update their windows like the sceneviewer pluging should or whatever). Of course, this will mean that plugins should behave, and set off the event when they change something. But, a misbehaving plugin could destroy the app anyway.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
File Saving/Loading/Activating Complete
« Reply #1 on: June 29, 2006, 03:38:13 PM »

Along these same lines, I have added a RemoveFile to ProjectFactories. And, have also implement Absolute or Relative file handling in the OgreProject factory (part of the DotScene plugin), and allowed the user to change it via the PropertyWindow. Of course, this is not yet saved, but Project saving is next on the agenda as file saving has been completed.

Also, just a note about plugin developers. You do not have to implement a ProjectFactory, for must basic editing of certain files, you would want to implement the IFileFactory, so that a project (from any plugin) could be able to open your file.

If your plugin does not implement neither a Project or FileFactory, you can look at the SceneViewer for an example of how to open up windows, and interact. Once your tool window is being used, you could listen to the PropertyManager changin events, plus, i plan to add an event to OgrePane, so that you know when something else has changed the Ogre scene. Of course, you are free to create your own floating window (or new tab window) that has an OgreWindow that you create + your own scenemanager, so that no one else could mess with your editor's scene/material editing/etc.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
File Saving/Loading/Activating Complete
« Reply #2 on: June 30, 2006, 09:36:37 AM »

I've implemented project saving, and handling of relative or absolute paths. It seems .Net has no way to get a Relative path from a fullpath, so I had to find a method to do so, which works pretty nicely.

Anyway, the user can (via the property viewer) change which way it is saved to in the project file. It can be changed and saved at anytime. The IDE will also attempt to close (hence, saving) all open project files when exiting - non propject files that are opened are not yet saved when exited. you can also cancel exiting by canceling the close (return false). At some point, a forced parameter will be added to the close method, so that the file knows there is no chance in canceling (ie.. If the IDE crased, and there is no chance of recovering, by files should be saved if possible).
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
File Saving/Loading/Activating Complete
« Reply #3 on: June 30, 2006, 03:35:04 PM »

Ok, New File creation, and Add new File to project is implemented.

Next, Ogre resource location adding/removing. Then, I will get to work on the DotScene file loader/saver. As, it does not currently save the scene if it were to be modified.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
File Saving/Loading/Activating Complete
« Reply #4 on: July 01, 2006, 06:52:03 PM »

I have completed the Resource Handling.. No problems there :). I also, took the opportunity to list resources that are in filesystems, Zip's are not lisited (yet anyway). I had to manually scan the directories, because the method I think Ogre exposes is not wrapped. Anyway, it works. I even created a small (WIP) Mesh Viewer to open up files of ".mesh". You can check the other thread for that.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
File Saving/Loading/Activating Complete
« Reply #5 on: July 05, 2006, 03:56:20 PM »

I've added a couple events to the OgreContainer to facilitate in editing and saving.

Also, I have begun working on scene saving. If the Ogre scene is modified (currently only AddObject or clearing the scene via OgreContainer class cause scene to register as modified - however, more things will be added to this) then the scene file will attempt to save itself. Now, I have not yet fully implemented it, it is pretty tedious stuff :) But, am about 40% complete with saving.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
File Saving/Loading/Activating Complete
« Reply #6 on: July 06, 2006, 12:28:13 PM »

I've completed most of the .Scene file saving features now.

Environment
* Fog only so far

Nodes:
Node - Complete - Position/Orientation/Scale/etc
Enitties - Complete, Name, Material, Castshadows
Lights - Complete
ParticleSystem - Complete
Billboardsets - Not complete
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
File Saving/Loading/Activating Complete
« Reply #7 on: July 12, 2006, 10:41:55 AM »

Environment
Fog, SkyBox, SkyDome, SkyPlane, ColourAmbient and background

Nodes:
Node - Complete - Position/Orientation/Scale/etc
Enitties - Complete, Name, Material, Castshadows, SubEntities material settings
Lights - Complete (fixed a bug)
ParticleSystem - Saving complete
Billboardsets - Not complete
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
File Saving/Loading/Activating Complete
« Reply #8 on: July 23, 2006, 11:44:54 AM »

I just fixed a slight bug in the loader/saver. When using a non-us locale, errors would happen when parsing floats.. Now, it always uses US locale to parse .scene files. In the future, a locale attribute should be added to .scene.
Logged