Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

selecting nodes in the Slate Material Editor node view window

selecting nodes in the Slate Material Editor node view window

Anonymous
Not applicable
549 Views
2 Replies
Message 1 of 3

selecting nodes in the Slate Material Editor node view window

Anonymous
Not applicable
I am getting materials hanging around in my scene that aren't attached to any geometry or taking a slot in the material library. The only way to see them is in the node view window in the Slate Material Editor, and that seems to be the only way to delete them, too. I would love to be able to script this, but I can't seem to find any way to SELECT the nodes...

So I can get the name of the view window:
viewWindowObj = sme.GetView 1

And once I select the nodes in the view window, I can delete them:
viewWindowObj.deleteSelection()

BUT I can't seem to find any way in the interface / methods to actually SELECT the nodes themselves for deletion, since the only way to delete the nodes seems to be by selection...
Any help?

Version: 3ds Max 2011 Win 64-bit

Thanks,B

PS - This material is not visible using sceneMaterials or meditMaterials, since it is not using a slot in the material library. The only reason I even knew it was there is that the texture path was bad, and I got a warning on file open.
0 Likes
550 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Figured out how to do this... Just delete and recreate the entire view.

 sme.DeleteView 1 False
sme.CreateView "View1"


This essentially performs the "Edit > Clear View" action from the SME menu.
0 Likes
Message 3 of 3

Anonymous
Not applicable
Can also do it this way, less of a "nuke it from orbit" option, but you have to save and reload the scene to get the SME to actually clear, even though you have deleted the nodes.

thisTVwindow = trackViewNodes
numTVnodes = thisTVwindow.numsubs

for i = numTVnodes to 1 by -1 do
(
execute ("deleteTrackViewNode thisTVwindow trackViewNodes")
)

--save max file
--reload max file

gc()
0 Likes