Message 1 of 2
pluginManager.loadClass quirks?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been building an export tool for the Source Game Engine. One of the main features is the use of third-party exporters to export files to a specific format (in this case, SMD files). The two SMD exporter developers have been very helpful in updating their plugins to accomodate the tool.
I've run into a wall, though, in preparing support for Wunderboy's newest SMD exporter (which he's provided me to test before he releases it).
A dilemma I've run into is that he has made the plugin load as a deferred plugin--which is really cool from a user's perspective since (I believe) it doesn't use up resources unless it's actually called. The problem is that the first time my script runs, there is an error... like the plugin isn't installed at all.
To load the plugin I use this syntax:
which is the syntax he's provided (and similar to those I've seen in other examples).
But it isn't available to MAXScript until after it fails once and I reload my script.
To explain more:
1) When I load Max, the plugin is listed in the plugin manager but has a yellow icon to denote it's deferred.
2) I run my script. It includes the code above. Now in the plugin manager, the plugin is green.
3) I run the export... and it fails.
4) I re-run my script, and it works.
Any ideas about why an export plugin fails when initialized from MAXScript using pluginManager.loadClass ? Is there something that should be done in MAXScript to get this to work? The docs on pluginManager.loadClass are less than extensive. Is there a bug with this method?
Shawn Olson
Developer of Wall Worm
3ds Max plugins and Scripts
3ds Max 4/Gmax - 3ds Max 2020
Mudbox 2009-2019
Windows 10 x64
i7 8700K
64GB RAM
Geforce 1080ti
I've run into a wall, though, in preparing support for Wunderboy's newest SMD exporter (which he's provided me to test before he releases it).
A dilemma I've run into is that he has made the plugin load as a deferred plugin--which is really cool from a user's perspective since (I believe) it doesn't use up resources unless it's actually called. The problem is that the first time my script runs, there is an error... like the plugin isn't installed at all.
To load the plugin I use this syntax:
pluginManager.loadClass SMDExporter
which is the syntax he's provided (and similar to those I've seen in other examples).
But it isn't available to MAXScript until after it fails once and I reload my script.
To explain more:
1) When I load Max, the plugin is listed in the plugin manager but has a yellow icon to denote it's deferred.
2) I run my script. It includes the code above. Now in the plugin manager, the plugin is green.
3) I run the export... and it fails.
4) I re-run my script, and it works.
Any ideas about why an export plugin fails when initialized from MAXScript using pluginManager.loadClass ? Is there something that should be done in MAXScript to get this to work? The docs on pluginManager.loadClass are less than extensive. Is there a bug with this method?
Shawn Olson
Developer of Wall Worm
3ds Max plugins and Scripts
3ds Max 4/Gmax - 3ds Max 2020
Mudbox 2009-2019
Windows 10 x64
i7 8700K
64GB RAM
Geforce 1080ti