This product provides set of tools for 3D designers/developers, aimed to ease the process of Autodesk 3DS Max/Design plugin development and distribution. It helps you to develop, debug, compile, and pack plugins written in C++, C#, VB.net, Jscript, LUA and MAXScript, all at runtime, within 3DS MAX application. By binding all of this together in one application developers can focus on creating more complex plugins in DEV friendly environment (with custom syntax highlighting, autocomplete, tooltips etc) tailored for multiple programming languages, without having to worry about locked dll files, managing AppDomains, CLR security permissions, remote objects, handling cross-domain events, wrapping plugin methods for use in MAXScript, and encrypting/decrypting your IP on the fly. All of this is done in few simple steps via CodeUmbrella interface.
- Run any code in safe sandbox environment
- Dynamicly load and unload your plugins (hot plug)
- Access native Windows, MXS editor (Scintilla API), 3DS MAX (SDK) API
- Obfuscate, encrypt and compress your assets
- Customize in-built source code encryption/compression algorithms
- Access interop services for C++, JScript.net, VB.net, C#, MAXScript and LUA plugins
- Automatically wrap all of your plugins to MAXScript structs
- Simple drag and drop interface to configure, compile and deploy your plugins
- Create windows forms, controls and subscribe to any event
Your code, your way
Write your plugin in C++\CLI, combine it with Jscript.net, C# or Visual Basic extensions, and wrap everything in LUA or MAXScript code, while being able to attach/detach all of your runtime compiled dll files. CodeUmbrella provides an interface for code editing, compiling, and automatic .NET class wrapping in MAXScript, making sure that all required APIs are available to your .NET and C++\CLI plugins and MAXScript out of the box. and finaly, fully detachable without having to restart your 3DS Max/Design application. CodeUmbrella consists of many useful handcrafted extensions, and our main goal is to provide an easier and intuitive way to accomplish complex operations such as creating sandbox AppDomains, managing CAS policies, raising and handling cross-domain events and exceptions, and wrapping native windows API, 3ds max SDK, and other useful APIs to both MAXScript and your plugins.
Project hierarchy
Project hierarchy
- Windows
- 3DSMax
- 3DSMax SDK
- MaxSharp
- Custom Wrapper
- MXS Scintilla
- Legacy Editor
- Tabbed editor
- Listener
- MacroRecorder
- MAXScript
- External MXS scripts
- CULoader
- C++\CLI plugins
- Custom Linked libs
- .Net plugins
- Custom linked libsI
- C++\CLI plugins
- CodeUmbrella
- Native Win32 API
- Scintilla API
- MAXSharp API
- 3DSMax SDK API
- Custom API
- 3DSMax SDK
- 3DSMax
MAXScript integration
CodeUmbrella automatically wraps and exposes your functions and properties to MAXScript and other plugins. Offcourse, your plugins have full access to MAXScript functions, classes and interfaces as well, right out of the box. Debugging of injected MXS code is simple and straight forward with provided examples showing how to easily setup callback functions to capture any exceptions made by MAXScript code that is not run from physical *.ms files.
Sandbox security (CUss)
There are few things to consider when developing your plugins in Sandbox. By default, security policy is very strict for all sandbox plugins, due to CAS (Code Access Security) implementation that we are using in our CodeUmbrella Sandbox Security extension. It’s not possible to directly access security critical functions, such as reading/writing registry, invoking Kernel32.dll methods or creating windows forms or controls. However, we can control these permissions for each plugin instance, and add or remove functionality on demand. This can come in handy specially when executing code that you downloaded from internet, and you don't want it to have unrestricted access to your PC.
CodeUmbrella binaries (CUb)
All of your code and compiled plugins could be stored both in hard drive, or project package libraries, and this functionality is part of our CodeUmbrella.Binaries extension. Project package libraries can contain compiled DLL files, encrypted source code, images, icons, or any other file type in one single archive. It's possible to use literally any encryption algorithm out there. When your data is required by the project, it is loaded live from memory (no extraction/temp files). This enables you to keep your content organized, safe, and fully editable at runtime.
Simple and powerful API
Following example will load compiled .NET dynamic library file from our hard drive, and execute a public method.
MAXScript example - Simplified loading and execution
This example will load compiled DLL file and encrypted MAXScript plugins from custom binary archive, and execute them both.
MAXScript - Plugin loading from custom binary archives
Create Windows forms and add literally any control out there to your sandbox .NET plugin. You can subscribe to all regular forms and control events, but it's required to use different approach then usual. In following snippet, you can see the basics of how to create a window, add controls to it, and subscribe to basic events.
Event handling from .NET
Integration with MXS Scintilla
Integration with MAXScript SciTE and MaxScript Legacy editor let you set up multiple windows and color combinations for your project, all at runtime. Besides this, it provides autocomplete, custom syntax highlighting, tooltips, hotspots, and all other Scintilla/SciTE features available, such is event handling, customizable editor/menu commands, etc. and full control of all Scintilla editor instances. You get full control over all content/look of:
This product also includes few basic external lexers for C++/C#, Javascript/Jscript, Visual Basic and LUA, and provides interface for direct runtime loading of any additional external lexer libraries.
- MAXScript Legacy editor
- MAXScript SciTE (Tabbed) editor
- MAXScript listener, MacroRecorder
- Output pane (tabbed editor)
- Mini MXS Listener
This product also includes few basic external lexers for C++/C#, Javascript/Jscript, Visual Basic and LUA, and provides interface for direct runtime loading of any additional external lexer libraries.
Performance
All of your .NET and Native plugins will work as fast as usual, however, due to the fact that they run in sandbox appdomain that doesn't share same memory space with 3DS MAX, you may encounter slowdowns when sending large amount of data to/from MAXScript. All communication between 3DSMAX/MAXScript and your .NET library, goes through proxy module, so there might be slowdowns when sending large amount of data between MAXScript and .NET.
We can also boost read/write speed at both sides by using many available native methods and low level Windows API. For example, by writing arrays to unmanaged memory and using pointers to read it back, we gain significant speed up.
Here is a test run:
We can also boost read/write speed at both sides by using many available native methods and low level Windows API. For example, by writing arrays to unmanaged memory and using pointers to read it back, we gain significant speed up.
Here is a test run:
- - Pass an integer array with 1.000.000 elements from MXS to .NET
- - Convert an array to unmanaged C array
- - Load C++/CLI library and pass a pointer to the array
- - Iterate through an array and change some values
- - Unload C++/CLI library
- - Convert unmanaged array to managed .NET array
- - Pass the array from .NET to MXS
Windows, JScript.net, C#, Visual C++ and Visual Basic (VB) are trademarks or registered trademarks of the Microsoft Corporation. Scintilla and ScITE are originally developed by Neil Hodgson <[email protected]> Used under license https://www.scintilla.org/License.txt. Lua is free software distributed under the terms of the MIT license reproduced at https://www.lua.org/license.html. Autodesk 3ds Max and Autodesk 3ds Max design, MAXScript, MXS SciTE and MXS Scintilla are registered trademarks of Autodesk Inc http://autodesk.com
CodeUmbrella, LexCommando and CULoader are developed by
Association of non-aligned artists © 2018
All rights reserved
Association of non-aligned artists © 2018
All rights reserved