doffer
02-28-2006, 07:16 AM
Hey there.
First post from me :)
I have a problem with a script I'm making.
I need some lines to be drawn on my screen. Much like the lines in "Show Safe Frames".
For that I use gw.wPolyLine, like in the Maxscript help file.
The problem is though, that everytime my screen updates, the lines disappear.
Is there any way that I can keep my lines drawn, even when the screen updates, and only go away whenever my script is closed down?
Here is my script. I know it's not good. I'm not a programmer :D
--Define some variables.
v_width = gw.GetWinSizeX()
v_height = gw.GetWinSizeY()
vp1 = v_width/3
vp2 = vp1 + vp1
hp1 = v_height/3
hp2 = hp1 + hp1
--Turn on safe frames.
displaySafeFrames = true
--Color the lines red
gw.setColor #line red
--Draw the vertical lines.
gw.wPolyline #([vp1,0,0], [vp1,v_width,0]) true
gw.wPolyline #([vp2,0,0], [vp2,v_width,0]) true
--Draw the horizontal lines.
gw.wPolyline #([0,hp1,0], [v_width,hp1,0]) true
gw.wPolyline #([0,hp2,0], [v_width,hp2,0]) true
-- Update viewportet
gw.enlargeUpdateRect #whole
gw.updateScreen()
Anyways... Hope you get my question and have an answer.
If polylines isn't the best solution, please say so.
The same goes for the whole script. If something is done wrong, feel free to say it ;)
Best regards...
Doffer :shrug:
First post from me :)
I have a problem with a script I'm making.
I need some lines to be drawn on my screen. Much like the lines in "Show Safe Frames".
For that I use gw.wPolyLine, like in the Maxscript help file.
The problem is though, that everytime my screen updates, the lines disappear.
Is there any way that I can keep my lines drawn, even when the screen updates, and only go away whenever my script is closed down?
Here is my script. I know it's not good. I'm not a programmer :D
--Define some variables.
v_width = gw.GetWinSizeX()
v_height = gw.GetWinSizeY()
vp1 = v_width/3
vp2 = vp1 + vp1
hp1 = v_height/3
hp2 = hp1 + hp1
--Turn on safe frames.
displaySafeFrames = true
--Color the lines red
gw.setColor #line red
--Draw the vertical lines.
gw.wPolyline #([vp1,0,0], [vp1,v_width,0]) true
gw.wPolyline #([vp2,0,0], [vp2,v_width,0]) true
--Draw the horizontal lines.
gw.wPolyline #([0,hp1,0], [v_width,hp1,0]) true
gw.wPolyline #([0,hp2,0], [v_width,hp2,0]) true
-- Update viewportet
gw.enlargeUpdateRect #whole
gw.updateScreen()
Anyways... Hope you get my question and have an answer.
If polylines isn't the best solution, please say so.
The same goes for the whole script. If something is done wrong, feel free to say it ;)
Best regards...
Doffer :shrug:
