Editor Changes...
by Melv May · in Torque Game Engine · 08/23/2002 (3:08 am) · 14 replies
Everyone,
Is there anyone here who knows enough about the internal workings of the editor to make a modification or point me in the right direction?
I admit that I'm being lazy and not doing the investigation myself but I was wondering how difficult it should be to include the ability to add a grouping field for ConsoleObjects e.g. when using 'AddField' it would be really handy to have the ability to put them in a group rather than just create a huge list.
I worked previous using another engine and although the editor was not that good it did have this feature which made organising object parameters easy. You can see an example here (Object Design / fxExplosion).
This editor allowed you to create a field (which appeared as a button) that you could toggle and would show/hide the fields in the group, defined by adding a group field, adding your other fields as normal then adding a end-group field.
I think this amendment alone would make the editor much more intuitive when it comes to the editing of objects as you start to create group categories.
Just wondering. ;)
- Melv.
Is there anyone here who knows enough about the internal workings of the editor to make a modification or point me in the right direction?
I admit that I'm being lazy and not doing the investigation myself but I was wondering how difficult it should be to include the ability to add a grouping field for ConsoleObjects e.g. when using 'AddField' it would be really handy to have the ability to put them in a group rather than just create a huge list.
I worked previous using another engine and although the editor was not that good it did have this feature which made organising object parameters easy. You can see an example here (Object Design / fxExplosion).
This editor allowed you to create a field (which appeared as a button) that you could toggle and would show/hide the fields in the group, defined by adding a group field, adding your other fields as normal then adding a end-group field.
I think this amendment alone would make the editor much more intuitive when it comes to the editing of objects as you start to create group categories.
Just wondering. ;)
- Melv.
About the author
#3
08/23/2002 (6:32 am)
well i dont know about the editor's , but what about the start menu? I was thinking a Mod button on the start menu that brings up all the mods in the mod folder and when you choose a mod it will start it up . Rather then having to change the target line in a shortcut.
#4
08/23/2002 (11:41 am)
Sigh ace, what does that have to do with Torque? Just code a simple windows app that would do that...
#5
I've been thinking about this one. This would be a nice addition to have. Could make some things a bit easier to work with.
The vision:
We could do the same sort of thing that you show in your Object Heaven. I imagine a list of rollout buttons and maybe a General rollout for the root node fields that is open when you first click on an object in the tree list or in the viewport. When you click on one rollout it would open to show the fields under that rollout and close any previously open rollouts. So basically only one rollout could be open at a time.
Step 1: Associate the fields with a rollout section:
Overload the ConsoleObject::addField function in consoleObject.cc to allow passing it a string for the name of the group rollout that the field is associated with. Change AbstractClassRep::Field to include this name so you can store this name somewhere. Then change the old addField function to set this to null or something to show that it's a general field. Whenever you need to add a field to a rollout section call the overloaded version of addField.
Step 2: Displaying the data in the field list:
The major modifications would be done in guiInspector.cc in GuiInspector::inspect(SimObject * obj) function. GuiInspector is the lower right pane that shows these fields. The scripts call this every time you select an object to view the fields or when this view needs to be updated. Create buttons in there for the rollouts. You'll see how this is done by how it creates the current objects like the Add button and the text fields for the field values.
Link the actions for the rollout buttons to a new script function in InspectDlg.gui to select the appropriate rollout and recall the InspectFields.inspect function. You'll probably need to create a field on the Inspector to hold this value of the current active rollout, so you'll know which section to display.
Step 3: Adding a new field in the editor:
Modify the scripts for GuiInspector::addDynamicField and InspectAddFieldDlg::doAction in InspectDlg.gui and the dialog for InspectAddFieldDlg.gui to ask for and save this new field.
Hope all this makes sense. I'm sure there are other little changes needed and gotchas but this should give you enough information to start from -- if you haven't already. Personally, I don't have a lot of time on my hands right now or I might work on this myself.
Mike
p.s. I'm curious, what is WTL? Is it a Wild Tangent thing?
09/01/2002 (10:58 am)
Melv,I've been thinking about this one. This would be a nice addition to have. Could make some things a bit easier to work with.
The vision:
We could do the same sort of thing that you show in your Object Heaven. I imagine a list of rollout buttons and maybe a General rollout for the root node fields that is open when you first click on an object in the tree list or in the viewport. When you click on one rollout it would open to show the fields under that rollout and close any previously open rollouts. So basically only one rollout could be open at a time.
Step 1: Associate the fields with a rollout section:
Overload the ConsoleObject::addField function in consoleObject.cc to allow passing it a string for the name of the group rollout that the field is associated with. Change AbstractClassRep::Field to include this name so you can store this name somewhere. Then change the old addField function to set this to null or something to show that it's a general field. Whenever you need to add a field to a rollout section call the overloaded version of addField.
Step 2: Displaying the data in the field list:
The major modifications would be done in guiInspector.cc in GuiInspector::inspect(SimObject * obj) function. GuiInspector is the lower right pane that shows these fields. The scripts call this every time you select an object to view the fields or when this view needs to be updated. Create buttons in there for the rollouts. You'll see how this is done by how it creates the current objects like the Add button and the text fields for the field values.
Link the actions for the rollout buttons to a new script function in InspectDlg.gui to select the appropriate rollout and recall the InspectFields.inspect function. You'll probably need to create a field on the Inspector to hold this value of the current active rollout, so you'll know which section to display.
Step 3: Adding a new field in the editor:
Modify the scripts for GuiInspector::addDynamicField and InspectAddFieldDlg::doAction in InspectDlg.gui and the dialog for InspectAddFieldDlg.gui to ask for and save this new field.
Hope all this makes sense. I'm sure there are other little changes needed and gotchas but this should give you enough information to start from -- if you haven't already. Personally, I don't have a lot of time on my hands right now or I might work on this myself.
Mike
p.s. I'm curious, what is WTL? Is it a Wild Tangent thing?
#6
09/01/2002 (12:07 pm)
IIRC, WTL == Windows Template Library, ie it's Windows only...
#7
I've already started working on this. I wanted to do something more directly useful to the community for a change.
I've got it working and it's so much better already. I decided on a slightly different approach than you suggested. Rather than overloading the addField function I decided to create an addGroup("MyJunk") function. This has many benefits such as objects with large quantities of fields can be grouped with minimum effort, changing group names becomes much simpler and an additional field called 'expandGroup' for the group field is maintained so that you can move between objects and appropriate group expansion is maintained. Also, the group itself becomes a field which sits neater into the existing code.
I'll post the resource / images when I've got all the features working fully. Just a few more tweaks to finish. ;)
Thanks for your informative post Mike, much appreciated mate.
- Melv.
09/01/2002 (1:34 pm)
Mike,I've already started working on this. I wanted to do something more directly useful to the community for a change.
I've got it working and it's so much better already. I decided on a slightly different approach than you suggested. Rather than overloading the addField function I decided to create an addGroup("MyJunk") function. This has many benefits such as objects with large quantities of fields can be grouped with minimum effort, changing group names becomes much simpler and an additional field called 'expandGroup' for the group field is maintained so that you can move between objects and appropriate group expansion is maintained. Also, the group itself becomes a field which sits neater into the existing code.
I'll post the resource / images when I've got all the features working fully. Just a few more tweaks to finish. ;)
Thanks for your informative post Mike, much appreciated mate.
- Melv.
#9
Here's my editor improvement finished. You can easily group fields so that you don't get presented with all the fields at once and can open only group of your choice.
If you move between objects in an editing session then the expanded groups are remembered to improve the ease at which you can tweak the scene using multiple objects.
I have overidden the sceneobject so all objects now have at least a "Transform" group for position/rotation/scale and each object can then add it's own easily.
Here's a screenshot of it in action...
Field Grouping (100Kb).
I'll post this as a resource or maybe I should do a CVS patch for the latest head. The resources seem to take ages to come through at the moment!!
- Melv.
09/02/2002 (10:19 am)
Everyone,Here's my editor improvement finished. You can easily group fields so that you don't get presented with all the fields at once and can open only group of your choice.
If you move between objects in an editing session then the expanded groups are remembered to improve the ease at which you can tweak the scene using multiple objects.
I have overidden the sceneobject so all objects now have at least a "Transform" group for position/rotation/scale and each object can then add it's own easily.
Here's a screenshot of it in action...
Field Grouping (100Kb).
I'll post this as a resource or maybe I should do a CVS patch for the latest head. The resources seem to take ages to come through at the moment!!
- Melv.
#10
Hehe, you could also post a download link here in the forums... ;) Looks very handy and clean - will be a big help for working with the editor! Thanks a lot!
09/02/2002 (10:25 am)
"Melvelous" again! ;PHehe, you could also post a download link here in the forums... ;) Looks very handy and clean - will be a big help for working with the editor! Thanks a lot!
#11
Well done (again) Melv...
I would like to see your additions adopted into the CVS ... have any of them been? If not, why?
-J
09/02/2002 (10:33 am)
Subtle change but majorly cool... save the eyes and brains of people editing... every ounce of wasted energy applied to hunting down a parameter or accidentally checking the wrong option takes away from production...Well done (again) Melv...
I would like to see your additions adopted into the CVS ... have any of them been? If not, why?
-J
#12
09/02/2002 (11:09 am)
And again it looks really cool Melv, you rock!
#13
09/02/2002 (11:27 am)
Nice to see this working Melv. Very cool.
#14
Here's the final shot ...
Final, with Dynamic Fields.
I will do a CVS patch on the latest head in the morning. TimG said we could roll it up with other improvements asap.
- Melv.
09/02/2002 (1:46 pm)
I know this is minor but the Dynamic fields portion was bugging me and I just thought of a better way of doing it so it's now fully done.Here's the final shot ...
Final, with Dynamic Fields.
I will do a CVS patch on the latest head in the morning. TimG said we could roll it up with other improvements asap.
- Melv.
Torque 3D Owner Frank Bignone
Darkhand Studio