Here's an interesting one..
I'm wondering if there's a plugin/setting/script that allows me to see and select all scene objects using a quad menu. For example, you press the "H" key, you get a list of items and the ability to select them. In my dream scenario, you'd be able to just right click and see a list.
Working with particle simulations, you start to get a lot of objects built up, and it would save quite a bit on the workflow to be able to select items with one mouse click.
Replies
<font class="small">Code:</font><hr /><pre>macroScript quadMenuList
(
try (destroyDialog roll_mouseList) catch ()
max select all
allObjArr = selection as array
allObjStrArr = #()
for i in 1 to allObjArr.count do (
append allObjStrArr allObjArr.name
)
rollout roll_mouseList "Falloff" --width:200 height:24
(
listbox li_allObj "Scene Objects" items:allObjStrArr
on li_allObj doubleClicked sel do (
objStr = li_allObj.items[sel]
execute ("select $" + objStr)
destroyDialog roll_mouseList
)
)
createDialog roll_mouseList pos:(mouse.screenpos-[194,10]) style:#(#style_sysmenu)
)
</pre><hr />
You can assign this macro to your quad menu.
If you can be more particular about what you need to select, etc., I can refine it. Right now it selects everything visible in your scene for you to choose from, and you select whatever you doubleclick.
Also, do you want all selected objects, objects of a particular type, etc?
here's a quick mockup. Ideally it would select objects of any type. Maybe only objects that are not hidden?
macroScript quadMenuList
(
try (destroyDialog roll_mouseList) catch ()
allObjArr = #()
allObjStrArr = #()
for i in objects do (
if i.isHidden == false then append allObjArr i
)
for i in 1 to allObjArr.count do (
append allObjStrArr allObjArr.name
)
if objects.count >= 1 then (
rollout roll_mouseList "Falloff" --width:200 height:24
(
listbox li_allObj "Scene Objects" items:allObjStrArr height:allObjStrArr.count
on li_allObj selected sel do (
objStr = li_allObj.items[sel]
execute ("selectMore $" + objStr)
)
on li_allObj doubleClicked sel do (
objStr = li_allObj.items[sel]
execute ("selectMore $" + objStr)
destroyDialog roll_mouseList
)
)
createDialog roll_mouseList pos:(mouse.screenpos - [10,10]) style:#(#style_sysmenu)
)
)
</pre><hr />
Unfortunately I can't do what you need, it would probably need some SDK implementation which I can't do. I doubt it is even doable with some dotnet stuff, probably needs true SDK love.
I've cleaned up the code some and I think I'm going to start using it. It will put all visible objects (of all types) on the list to select. Each time you click you will add to the selection, doubleclick to select the last item and close the floater. I use a hotkey but it is of course fine to use on your quad menu.
Any other improvements or suggestions, feel free to ask.
Selection floater is probably a better bet still though.