Add a widget to World Editor?
by ArchieMD User · in Torque 3D Professional · 02/17/2010 (3:33 pm) · 3 replies
I have a 2nd set of transforms for a custom object that extends SceneObject (don't ask why. suffice it to say that the SceneObject transforms get modified by an external input device).
I've exposed the 2nd set of transforms (position, rotation, scale) to the editor. However, it's a pain to try to enter rotation, translation values by hand (trial and error), so I'd like to manipulate these with another set of rotation / translation widgets.
Any suggestions to adding a widget to the world editor, conditional on this type of object being selected? Think this could be done in script or do I have to dig through world editor code? Know of any examples of custom widgets I could look at?
Thanks
I've exposed the 2nd set of transforms (position, rotation, scale) to the editor. However, it's a pain to try to enter rotation, translation values by hand (trial and error), so I'd like to manipulate these with another set of rotation / translation widgets.
Any suggestions to adding a widget to the world editor, conditional on this type of object being selected? Think this could be done in script or do I have to dig through world editor code? Know of any examples of custom widgets I could look at?
Thanks
#2
(To clarify that first part, I could use the hierarchical approach you suggest, but I'd need certain aspects of the rendering to be "inherited" down the hierarchy, or I'd need the child object to also be very customized. Which is fine, it would just require reworking of my classes.)
But your suggestion brings up a question I've had for a while, is there a way to define a general hierarchy of SceneObjects? (I haven't looked at the marker/path thing yet, but will soon...in case that answers this question).
Every other engine I've worked with let their equivalent of the SceneObject class have children, which could inherit or not inherit aspects of the parent pose, etc. (or better yet, Nodes had children which may or may not be SceneNodes, which could in turn contain geometry and other renderable things). Anything equivalent in Torque? I haven't found anything in the docs or code yet.
02/17/2010 (4:27 pm)
Thanks for the suggestion. I thought about doing it that way originally... but I would need to control rendering of the "child" object (view and projection matrices)... seemed more straightforward to make my "parent" object just have a shape instance. Of course it doesn't integrate with the editor this way.(To clarify that first part, I could use the hierarchical approach you suggest, but I'd need certain aspects of the rendering to be "inherited" down the hierarchy, or I'd need the child object to also be very customized. Which is fine, it would just require reworking of my classes.)
But your suggestion brings up a question I've had for a while, is there a way to define a general hierarchy of SceneObjects? (I haven't looked at the marker/path thing yet, but will soon...in case that answers this question).
Every other engine I've worked with let their equivalent of the SceneObject class have children, which could inherit or not inherit aspects of the parent pose, etc. (or better yet, Nodes had children which may or may not be SceneNodes, which could in turn contain geometry and other renderable things). Anything equivalent in Torque? I haven't found anything in the docs or code yet.
#3
Smart idea, wonder why it didn't take?
02/17/2010 (4:58 pm)
Like this: http://www.torquepowered.com/community/resources/view/9093Smart idea, wonder why it didn't take?
Torque Owner Jason Eubank
Studeeoh Solo
Markers are children of Path objects and their position/orientation can be modified independently of the Path object. Also moving the Path object moves all of its child Markers. Try these out to see the behavior.
Pretty different concept, but the World Editor already works well for it.