max commands / mouse tools

Hey,
I just found out about the max command to fire up tools like "zoomregion". They are listed in the reference file under "MAX commands". My question is, is there any way to see the underlying code of these tools in maxscript? To be more specific, i would like to have a look at the "zoomregion"-code to be able to enhance my scripted mouse tool so that it will show a selection-frame when dragging.
Maybe this illustrates further, thus I am not sure if i am expressing right:

I want this tool...

	tool tool_dragFrame
	(
		local startpos = 0
		local endpos = 0
 
		on mousePoint clickno do
		(
			if clickno == 1 then 
			(
				startpos = mouse.pos
				print ("Start: "+startpos as String)
			)
			else 
			(
				endpos = mouse.pos
				print ("End: "+endpos as String)
				#stop
			)--end else
		)--end on
		on mouseMove clickno do ()--end on
	)--end tool
 
	startTool tool_dragFrame

...to create a visual representation of the dragged frame like this:
http://img707.imageshack.us/i/showframewhendragging.jpg/

Is there a way to see the code of the "zoomregion"-tool or do you know how to do what i described above?

Greetings

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
br0t's picture

mhm might be a starting

mhm might be a starting point, but I don't get it right now, maybe when I have more time. Thanks for the tip.
Maybe I could just crete a Rectangle-Spline when dragging the frame, to have it visualize the frame. But I also don't know how to do that, anyone do :/ ?

Never get low & slow & out of ideas

sergo's picture

What about "Viewport Drawing

What about "Viewport Drawing Methods"? Do they work in mouse tool clause?

my scripts and tips/tricks:
www.sergepogosyan.com

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.