3dmax tool development

For work needs, I have learned some 3dmax-related scripts, and I will sort them out here

1. Software architecture and class view3dmax software architecture

class view

2. Language selection

1) maxScrpit: 3dmax official language.
2) python: The official function of maxScript has been integrated into python
3) C++: SDK language, with higher efficiency and wider functions. But a deeper understanding of max is required.

For the first time learning, of course I chose from maxScript and python. Python has wider support, and some other DCC software will also be developed using python. The maxScript api is more friendly to initial development. The language is not much different, so python, which is more versatile, is not considered.

3. Language related

1) maxScript is a language compiled from top to bottom, so you need to pay attention to the compilation order
2) Subscripts start from 1
3) maxScript is also an object-oriented language
4) Case-insensitive
5) Automatic GC
Personally feel that you need to pay attention these

4. Specific object related

MaxWrapper (base type of all object types): value (root type of all types)

Modifier : MAXWrapper and SpacewarpModifier

Displace_Mesh : SpacewarpModifier

Node :MAXWrapper

MaxWrapper : category (class name), .classes Array, read-only, classId, superClassID, creatable, localizedName , nonLocalizedName , dllName (if it is a class generated by a plugin), copy and addModifier and isValidObj and isDeleted and getClassName and disable/enableRefMsgs( All objects have methods), refs, notifydependents (notify controller update)
commonly used materials, texture maps, sounds, etc. are derived from this base class

Node : common attributes name, transform, pivot, material, pos/scale/rot, dir(z), isSelected, target(node) scene
object, can derive light, camera, GeometryClass, shape, etc.

Modifier: Modifiers, commonly used grids, uvs, animations, etc. are all derived from this modifier base class

SpacewarpModifier, a special type of modifier, is divided into two types: 1 is a modifier directly bound to the spaceWrap node, and 2 is a space object modifier, which will be directly created and applied to the node like other modifiers SpaceCameraMap, SpacePathDeform,
SpaceSurfDeform etc. derived from this base class

5. Code Listener

maxScript can listen to most of the executed logic and print related codes, which greatly reduces the difficulty for developers

6. VisualScript editor

Automatically generate ui-related adaptation code

7. Function

1) Most functions of 3dmax can be rewritten
2) Plug-in functions cannot be monitored/modified
3) What is found so far is that the modification of the deformer function in the modifier cannot be monitored

8. Plugins

1) 3dmax itself has quite a large number of plug-ins, you can first check whether there are similar plug-ins on the market
2) Plug-ins are basically closed source (when I first started learning, my art classmate told me that all plug-ins are open source.. )
3) The development of max script can indeed greatly improve the work efficiency of art!

Guess you like

Origin blog.csdn.net/qq_28976599/article/details/126124596