Csghollow
by Brandon Maness · in Artist Corner · 07/20/2006 (12:56 am) · 8 replies
I just couldn't walk away without finishing up the interface and removing the hardcoded wall thickness, so here is a zip that integrates csghollow into Constructors Build Cube, and Modify panel. It is password protected and can be unzipped using garagegames06 as the password.
torque.smdlabs.com/content/csghollow.zip
I went ahead and implemented getParam and setParam into the toolmanager using %this.inst.__param , and also made a slight addition to the generic tool class in that you can set a waitToExecute parameter to true in the Plugin::Activate section so that it will not immediately call Plugin::Execute on the tool.activate call. If you set the waitToExecute parameter to true, you can just call tool.execute() when you are ready. I used it to set the params of the wall thickness on the tool so that it could be called from a dialog tool as well as from the Plugin::Done method of the addCube tool.
All the changes to the files are marked with //smd_begin and //smd_end so that a global search will locate the changes. Only formtools.cs, primitiveaddcube.cs, and toolmanager.cs were modified.
I don't know about you, but I like screenshots, so...


And so ends the free day I had to play with Constructor.. Back to work tomorrow!
torque.smdlabs.com/content/csghollow.zip
I went ahead and implemented getParam and setParam into the toolmanager using %this.inst.__param , and also made a slight addition to the generic tool class in that you can set a waitToExecute parameter to true in the Plugin::Activate section so that it will not immediately call Plugin::Execute on the tool.activate call. If you set the waitToExecute parameter to true, you can just call tool.execute() when you are ready. I used it to set the params of the wall thickness on the tool so that it could be called from a dialog tool as well as from the Plugin::Done method of the addCube tool.
All the changes to the files are marked with //smd_begin and //smd_end so that a global search will locate the changes. Only formtools.cs, primitiveaddcube.cs, and toolmanager.cs were modified.
I don't know about you, but I like screenshots, so...


And so ends the free day I had to play with Constructor.. Back to work tomorrow!
#2
08/02/2006 (4:09 pm)
Sweet... great to see a concrete example of how extensible Constructor will be.
#3
I've built a Hollow Brush tool for Beta 7 based on the work you've done, Brandon. Thanks! I added a couple of console methods that would help out with these types of tools so you don't have to mess with copying and pasting.
Here's the wiki release notes entry: tdn.garagegames.com/wiki/Constructor/Beta7Changes#Hollow_Brush_Tool
- LightWave Dave
08/04/2006 (12:47 pm)
Greetings!I've built a Hollow Brush tool for Beta 7 based on the work you've done, Brandon. Thanks! I added a couple of console methods that would help out with these types of tools so you don't have to mess with copying and pasting.
Here's the wiki release notes entry: tdn.garagegames.com/wiki/Constructor/Beta7Changes#Hollow_Brush_Tool
- LightWave Dave
#4
08/04/2006 (5:02 pm)
Great to hear it was of some use! I wanted to "get my feet wet" with the scripting capabilities. At some point I may add what little I learned to the Constructor section of the TDN under "Getting started with plugins".
#5
08/07/2006 (7:23 am)
Just an idea for Hollow Brush do to the fact that the this tool only works on square / rectangular shapes that you might want a warning box to pop up if the brush is not. I know it had nothing to do with textures except that it was nice that the new faces hade taken on the correct size that was ally ready assigned to the brush. And one more idea for the Hollow Brush it would be nice visually to see the inside box before you make it hollow.
#6
08/07/2006 (8:00 am)
@Adam: It works on all the primitives so far. The visual indication of the thickness is an interesting idea though.
#7
Adam:
The Hollow Tool should work with all convex brushes and not just square or rectangular ones. Would it be possible for you to send me a CSX file of your problem brush and how much you're trying to hollow by for me to try out?
Hmm. Did you modify you problem brush's individual vertices by chance? If so that may be the cause based on how it works today.
I was considering having a preview for the hollow but wanted to just get the tool out there. This would also require a move away from the dialog box and over to a more usual Interactive tool that uses the Tool Properties. So it may happen yet.
Thanks.
- LightWave Dave
08/08/2006 (9:38 pm)
Greetings!Adam:
The Hollow Tool should work with all convex brushes and not just square or rectangular ones. Would it be possible for you to send me a CSX file of your problem brush and how much you're trying to hollow by for me to try out?
Hmm. Did you modify you problem brush's individual vertices by chance? If so that may be the cause based on how it works today.
I was considering having a preview for the hollow but wanted to just get the tool out there. This would also require a move away from the dialog box and over to a more usual Interactive tool that uses the Tool Properties. So it may happen yet.
Thanks.
- LightWave Dave
#8
man this tool is going to save me so much time..
08/09/2006 (8:01 am)
And yes you are right with the modify the individual vertices would make it not work.. man this tool is going to save me so much time..
Associate Matt Fairfax
PopCap
Seeing others writing useful tools for Constructor is a dream come true for me and I hope the community really embraces this when we launch!