Trying to write a script to open scene explorer. Result: massive slowdown.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to find a way to always have both scene and layer explorers open. I used the callback mechanism to run a short script to open or create said explorers whenever a scene is opened or created. The script works when I open 3ds max, and again when I open a saved file. On the *second* file I open though, I get a massive slowdown - 3ds max gets stuck for almost a minute, then eventually loads the file, regardless of the scene size. nothing in the log or maxscript listener.
Here's what I have - does anyone have any idea what could cause this? what am I doing wrong here?
fn OnOpenScene =
(
if (SceneExplorerManager.ExplorerExists "Scene Explorer") == true then
(
SceneExplorerManager.OpenExplorer "Scene Explorer"
)
else
(
sceneexplorermanager.CreateExplorerFromDefault "Scene Explorer"
)
if (SceneExplorerManager.ExplorerExists "Layer Explorer") == true then
(
SceneExplorerManager.OpenExplorer "Layer Explorer"
)
else
(
sceneexplorermanager.CreateExplorerFromDefault "Layer Explorer"
)
)
callbacks.addscript #filePostOpen "OnOpenScene()" id:#on_scene_open
callbacks.addscript #systemPostNew "OnOpenScene()" id:#on_scene_open