I implemented reparenting and renaming since last time.
Reparenting was rather annoying as I had to write my own function to recursively copy the node and its children to the new location. But it seems to work smoothly and it's the first "cool" feature of the editor.
I spent the beginning of this week working on the action system (aka undo system).
Here's how it works.
Actions derive from iAction but have their own Initialize function taking their needed parameters.
How to create an action and use it:
Plugins can implement their own actions. To allow something to instantiate an action implemented in another module, the class should be added to the plugin's metadata. Then it should call scfCreateInstance<Interface> ("crystalspace.editor.action.someaction").
As it stands, the action system should be fully functional, including the undo/redo menu items. Reparenting is not undoable yet though.
One current problem is that when you rename something and then undo it, the tree view doesn't update to reflect the old name. I think the best method to get it to update is to have the tree view listen for each iEditorObject's name change. That is to say, I should add a general iEditorObjectChangeListener, that will signal when an object has changed so that interested views can update themselves. This applies to things like properties too, which will come later.
I'm going to implement a drawer which will draw a bounding box around the current selection in the 3D view as well as little billboard icons for lights (and later, camera positions). Ideally this will have a settings page where you can toggle whether to draw this stuff, or tweak the bbox colors. Settings is another thing I haven't gotten to, although it is not essential yet.
I'm still thinking about the best way to implement tools in general, and in particular the transform tools, as these are core tools that will be used all the time.
Other random Q&A's with myself
Should object select tool be undoable? No, would get quite annoying.
Should selecting something in scene browser select it in the 3d view (e.g. actually select it)? This seems like a good idea.
A little reflection:
GUI work has been interesting. I'm glad I got the chance to do it. In the GUI world, the little things count. Like the status bar/progress bar, or the edit menu telling you what action you're going to undo or redo, or dragging the nodes around in the scene browser to reparent them, or being able to customize your panel layout due to the flexible wxAUI. I've been trying to implement things in a way that is as intuitive as possible. I hope I can continue to find ideas to make things nicer.
|<< <||Current||> >>|