[Solved] Help: Open tone mapping settings editor from script

Does anybody know if it is possible to open a camera’s tone mapping settings editor from maxscript or a macro?

This button:

Thanks!

Hi,

Not conveniently, but you can get a reference to the UI and let windows press the button. Example macro:


macroScript OpenCCamToneMapping
	category:"# Scripts"
	toolTip:"Opens tone mapping edit window of current Corona camera."
	icon: #("Systems",2)

(

on isEnabled do (
	return ((classof (viewport.getCamera())==CoronaCam))
)

on execute do (
	max modify mode
	select (viewport.getCamera())
	TMButton=windows.getChildHWND (windows.getChildHWND #max ((viewport.getCamera()).name))[7] "Edit..."         
	windows.sendMessage TMButton[1] 0x201 0 0 -- LMB down
	windows.sendMessage TMButton[1] 0x202 0 0 -- LMB up
)
)

Coding like this it is crap, but it works.

Good Luck

Thank you so much, that has worked great!

Had to change it a little to get it to work with my python script. If anyone’s curious:

from pymxs import runtime as rt
parent = rt.windows.getChildHWND(rt.name("max"), (rt.viewport.getCamera().name))
tm_btn = rt.windows.getChildHWND(parent[7], "Edit...")

Thanks again, I really appreciate it!