Press Select All in SME.

In the SME menu, is there a way to press.

Select>Select All

 

Using:

actionMan.executeAction 369891408 "40063" /* SME: Select All */

 

is not really what Im after as it requires the SME to be open.

Basically the fn I want overall is to, select the nodes and then hide unused nodes.

Thanks.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
3dwannab's picture

Cheers all

I have spy but never really used it.

I'll test these 2 out tomorrow. Hopefully they work when SME isin't open. Both look good.

I'll report back then.

jahman's picture

.

select the nodes and then hide unused nodes.
do you mean hide unused nodeslots of selected nodes?

3dwannab's picture

Yes,

I can already press the layout all button on the toolbar through maxscript but not the menu where select all is.

jahman's picture

.

You can use Spy++ to check what messages are used to toggle various SME commands.

windows.sendMessage <smeHWND> 0x111 40048 0 -- toggle Hide Unused Nodeslots
windows.sendMessage <smeHWND> 0x111 40023 0 -- select ALL

otherwise you need to set view in focus before calling actionMan.executeAction

<viewNode>.SetFocus()
3dwannab's picture

Cool. This works. Never

Cool.

This works. Never thought it could be a focus issue. Makes sense, thanks.

local sme_av = sme.activeView
local viewNode = sme.GetView sme_av
viewNode.SetFocus()
actionMan.executeAction 369891408 "40063" /* SME: Select All */
actionMan.executeAction 369891408 "40075" /* SME: Hide Unused Nodeslots */
actionMan.executeAction 369891408 "40064" /* SME: Select None */
actionMan.executeAction 369891408 "40060" /* arrange the view */
pixamoon's picture

`

Hi there,

try this:

function SMESelectAll = (    
	local sme_av = sme.activeView
	local viewNode = sme.GetView sme_av
 
	for n = 1 to trackViewNodes[#sme][sme_av].numSubs do (
		m = trackViewNodes[#sme][sme_av][n].reference
		b = viewNode.GetNodeByRef m
		b.selected = true
	)
)
 
SMESelectAll()

Best,
Pixamoon

3dwannab's picture

Ah man! I should of thought

Ah man! I should of thought of that method and me already knew it! You're still a lifesaver! Thanks.

EDIT OR, which doesn't seem to work as well as your method.

nodeViewImp = sme.GetView sme.activeView
nodeViewImp.SelectAll()
nodeViewImp.ZoomExtents() #all

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.