Message 1 of 23
Delete SME views script causing error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have used this script for a while in conjunction with the 'show materials for selected' in order to quickly get materials in and out of the Slate Editor. Recently (I think it corresponds with me updating to Vray 5) the clear SME views one causes the below error, and a lot of the time causes max to crash.
I'm a complete scripting luddite and don't know what this means unfortunately, can anyone help!?
Or is there a more sensible way of doing it now (I'm on 2020)
here's the script:
----------------------------------------------------------------------------------------
-- Version: v1.0
-- Author: Aleksey Sheremetov - https://kotiger.co/
----------------------------------------------------------------------------------------
macroScript Delete_SME_Views
category:"Kotscript"
tooltip:"Delete SME views"
buttontext:"DeleteViews"
(
ViewsTotal = sme.GetNumViews ()
ViewIndex = 1
for i in 1 to ViewsTotal do
(
view = sme.GetView (ViewIndex)
if matchPattern view.name pattern:"*View*" then
(
sme.DeleteView (sme.GetViewIndex (view)) false
)
else
(
ViewIndex += 1
)
)
)