Notifications
Clear all

[Closed] Auto "select object"

Hi everyone, I’m using this one so I can use it with the wacom graphics tablet

(
global selectionChanged

callbacks.removescripts #selectionSetChanged id:#myCallbackID	

callbacks.addscript #selectionSetChanged "selectionChanged()" id:#myCallbackID

fn selectionChanged =
(
	if not (isCreatingObject()) and not keyboard.shiftPressed do 		
	max select
)
)

is very simple, what it does is that when I select a new object it automatically activates the “select object”.
I’d like to modify the function so that it can be toggled on or off

7 Replies

nobody knows how to improve this code so that with a keyboard shortcut e.g. Control+Q, to activate or deactivate the function “selectionChanged()”

You have other places to ask the question.
Anyway, cgtalk is one of my favorites.

https://www.reddit.com/r/Maxscript/

macroScript AutoSelect_Mode
	category:"My Helpers"
	tooltip:"AUTO Select Object Mode"
	buttontext:"AUTOSEL"
(
	local auto_sel_mode = off
	on isChecked do (auto_sel_mode)

	on execute do
	(
		auto_sel_mode = not auto_sel_mode
		
		callbacks.removescripts id:#my_helpers_autosel
		if auto_sel_mode do
		(
			callbacks.addscript #selectionSetChanged "if not (iscreatingobject()) and not keyboard.shiftpressed do max select" id:#my_helpers_autosel
			max select
		)
		updateToolbarButtons()
	)
)

save it as macroscript file and place with your macroscripts

it was the best … unfortunately the owners and developers of this forum killed it with a terrible user interface, unprofessional politics, and dubious rules. (at least a tools developer’s part of the forum)

1 Reply
(@aaandres)
Joined: 10 months ago

Posts: 0

Indeed.

That’s wonderful, I love it.

The change of interface of the forum was an unforgivable error, it killed the activity of the forum. It’s unrecoverable now