ScriptSpot

Forum topic · General Scripting

Adding modifier key to toggle autogrid function.

By box01 · 2011-09-27

Description

Hi Guys, just wondering how should I do about doing this.

--- whenever during object creation , when a modifier key is pressed down( alt, for example ) , autogrid will be one, when the key is relased , autogrid is off.

Thanks.

Comments (1)

Anubis · 2011-09-27

that will do the trick but u'll have a problem to disable this callback

fn rvcb_autoGrid = (
	maxOps.autoGrid = (isCreatingObject()) and keyboard.shiftPressed
)
registerRedrawViewsCallback rvcb_autoGrid
--registerRedrawViewsCallback rvcb_autoGrid