ScriptSpot

Forum topic · Scripts Wanted

Display As Box switcher for One Hotkey

By Torvisart · 2020-02-23

Description

Hi, Need a script to switch for a one hotkey (F3 for example) display object as BOX.

some experiments:


( 
	for obj in selection do
	(
		if (obj.boxmode = on) != (obj.boxmode = off) 
		then (obj.boxmode = off) 
		else (obj.boxmode = on) 
	)
	  
) 

Thanks

Comments (2)

.

miauu · 2020-02-24

This will toggel box mode per objects. If for one object the current state of the boxMode is On the script will turn it Off and vice versa


macroscript ToggleBoxMode
category:"miauu"
tooltip:"Box mode On/Off"
buttonText:"Box mode On/Off"
(
	for o in selection do
	(
		o.boxmode = not o.boxmode
	)
)

This will turn all selected objects to BoxMode On.


macroscript BoxModeOn
category:"miauu"
tooltip:"Box mode ON"
buttonText:"Box mode ON"
(
	for o in selection do
	(
		o.boxmode = true
	)
)

This will turn all selected objects to BoxMode Off.


macroscript BoxModeOn
category:"miauu"
tooltip:"Box mode OFF"
buttonText:"Box mode OFF"
(
	for o in selection do
	(
		o.boxmode = false
	)
)

Thanks for your reply

Torvisart · 2020-03-03

Thanks a lot, works good, great solution.