Notifications
Clear all

[Closed] custom vertexpaint toolbox – access colorpicker tool?

Hello everybody!

I’m new to maxscript and currently I’m scripting a vertexpainting-toolbox that is tailor-made for my terrain-shader.

So far it simply calls the standard vertexpaint-functions.

Now I’m trying to implement the colorpicker tool and I am stuck.
I need to detect whether the user picked a new color and the transfer this new color to my toolbox.
There’s two ways i could do this, but I don’t whether those are relizable:

  1. Constantly watch the 3Dsmax vertexpainting tool and whenever a value is changed, send that value to my toolbox.
  2. While in colorpicker mode, check for mouseclicks and on mouseclick send picked color to my toolbox.

Currently I’m synchronizing the tools like this:

on ckbToolsPick changed state do(
 	if state == on
 		then updateVPT(0)
 		else updateVPT(6)
 )

This then calls the following function:

function updateVPT toolID =(
 	--toolID: 0=pick
 	if toolID == 0 do(
 		ckbToolsAdd.state = off
 		ckbToolsBlur.state = off
 		ckbToolsContrast.state = off
 		ckbToolsRemove.state = off
 		ckbToolsReplace.state = off
 		VPT.curPaintMode = 8
 	)
 ...

Can you tell me how I might realize this functionality with maxscript?
Thanks alot in advance!