View Full Version : [Script]Blueprint Tools
09-23-2005, 09:14 AM
Hi folks, i created a little script for all you car modellers out there!
It all came about, due to working in a front viewport last night, and having some troubles with the car images getting in the way. So i thought id give maxscript a go, and this is my first script!
I was having the dilemna of hiding some planes when modelling, and the freeze/unfreeze hide/unhide was getting fairly annoying, so i made a little script, to solve this problem.
It hides/unhides planes name Front,Back,Top and Side, and also All at once too.
Anyways guys, give me some feedback on this - would be much appreciated.
09-23-2005, 10:54 AM
Congratulations on your first script! wasn't that easy!!
I've got a couple of suggestion that may help you to improve it. How about combining your icons into one file, and then making them for both large and small icon views, look for 'Icon Bitmap Files - Creating' in the MXS help.
How about making your five buttons macroscripts, then they can be dragged to any toolbar on the interface. Look for 'macorscript' in the help index.
When you're ready to learn a bit more, how about a creation utility for the four panels that you're controlling.
well done and keep it up < :
09-23-2005, 11:13 AM
Thanks for the suggestions, i was thinking along the same lines!
Maxscript is good stuff!
09-23-2005, 12:18 PM
hi! cool! i wish i had something like this back then while trying to model a car...
my suggestions, maybe you could use a checkbutton instead of a normal button, so if the button is pressed, it means the the plane is visible, and vice-versa.
Just make sure that you do some checking when the rollout is opened by using a handler like this: on BlueHider open do
checkbutton hideFront "Hide Front"
on hideFront changed state do
$front.isHidden = state
on BlueHider open do
if $front == undefined then hideFront.checked = false
else hideFront.checked = true
or, maybe you could also try using some keypressed functions, to check if the user is pressing the control on the keyboard and clicking on a button to... maybe alter its see-through mode?
on hideTop pressed do
if keyboard.controlpressed then
$top.xray = not $top.xray
congrats on your first script!
just my two cents :)
09-23-2005, 12:45 PM
Awesome ! cheers.
Ill have a look at it later when i get home, although i dont quite understand your code.
for instance, the isHidden attribute, state ??
The maxscript reference is not that good, if you dont know how maxscript works. It could be better IMO.Clearer examples. However, i got there in the end.
Quite pleased with it as it stands, as its helping me already, which was the main thing.
But i will be planning on revising it, as itll only benefit myself and possibly others.
09-23-2005, 02:06 PM
no problem.. :)
as for the isHidden part...
you could try typing this in the listener if you have your $top object in the scene...
after pressing enter, you'd get something like this in return
the isHidden is a property of an object (or a node)... these are stuff you find when selecting and object and looking for its properties through right+click -> properties...
You can find them in "General Node Properties" in the helpfile
so when the code says "false"
it means that $top is not hidden... it is visible
now if you want it to be visible, you can type:
$top.isHidden = true
true or false are sometimes refered to as booleans in the helpfile
the helpfile is great, it just takes a little getting used to, especially if you no programming background. :)
as for the samples, i beleieve you could ask here at the forums anytime, i think that people will be more that happy to provide you with samples of a function that is quite hard to understand... well at least its much easier that writing a specific script for someone. :D
09-23-2005, 02:19 PM
Thanks a bunch dude, your a star! :D
09-23-2005, 03:52 PM
How could i link a slider bar, to control the xray function of a selected object?
The higher the slider the more the transparent it becomes?
left to right opaque to transparent.
09-25-2005, 06:02 AM
I am not sure about slider and the opacity but on the directions given by galagast with the checkButton, you can also change the text displayed on the button when checked or not (in case you would waht to change to text buttons instead of images).
The code would be something like this:
rollout testCheckButton "Test The CheckButton"
checkbutton myCheckButton "Hide the Objects"
on myCheckButton changed theState do
if theState == true then myCheckButton.text = "Unhide the Objects"
else myCheckButton.text = "Hide the Objects"
Nice script by the way and great for the first one! My first one was about 7 months ago and now on everything I have to do I try to use or create a script for. They help alot!
Keep it up!
09-26-2005, 08:51 AM
Thanks, i implemented the changes over the weekend. Should post up the new version tomorrow!
09-27-2005, 08:46 AM
Here we go guys - nothing too special for now. Give me your feedback
09-30-2005, 03:25 PM
ok interest seems to have died, maybe because no1 knows 0.2 is out!
10-01-2005, 06:38 AM
I've tryed the script and it crashes if you run it without having the planes in your scene.You should put a try catch trap or an if then with a messagebox or something.
You could use some functions in there to avoid the repetitive code.
Also in your text file you don't say where to put your button images which makes somebody that has no idea abot maxscript not being able to place them in the right spot.
As an improvemnt idea you could create the planes, place them in the right location and name them correctly and avoid using too much "$" from the given bitmaps.
It looks amazing for the first script. Keep up the good work!
10-01-2005, 10:11 AM
cheers, ill get to it then!
the beauty of testing lol
10-12-2005, 11:46 AM
Im currently looking for some scripters with some free time, maybe to invest some time/help in the development of this script? Anyone?
There's just tinny mistake in v0.2.zip file,
icon "top.bmp" is missing in images folder.
10-18-2005, 03:52 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.