• Stars
    star
    222
  • Rank 178,302 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

3ds Max python samples

3ds Max 2021, 2022, and 2023 Python How Tos

Practical Python 3.7 Development Examples For 3ds Max

Splash

This repo contains various Python programming examples and tutorials targeting 3ds Max 2021 and 2022's Python 3.7 support (the samples are not meant to be used with the Python 2.7 interpreter shipped in previous versions of 3ds Max).

All the examples in the tutorials are implemented as pip packages. This is a bit heavy for small things (we provide a setup.py, a LICENSE and everything) but makes things installable and shareable more easily. As soon as something has dependencies on external packages or requires more than one Python file, pip packages become very convenient. Because we think it is a good practice to package 3ds Max Python tools with pip, we provide all our examples in this form.

Installation

It is not necessary to install the HowTos: the repo can simply be used as a passive directory of samples and documentation for Python developers.

  • Installing the HowTos will add menu items to 3ds Max, and is documented here
  • After an update from github it is necessary to rerun install scripts to get everything working as expected

Python How Tos

New content

  • Drop maxscript code on a rich text window to get a python translation mxstranslate

Samples

The samples below are translations of MAXScript How Tos that can be found in the 3ds Max online documentation.

The conversion from MaxScript to Python could have been more mechanical but we chose to implement the Python version in the best Python way known to us. An example of this is that we use PySide2 (Qt) for the UI as much as possible instead of using more traditional 3ds Max ui mechanisms.

How To?

Python Examples that don't come from maxscript howtos

Python Samples

Python samples can be found in src/samples. These samples may already be in your 3ds Max installation directories.

3dsMax startup entry point

pystartup provides the maxscript code that, when copied to 3ds Max's startup directory, will automatically launch pip packages with the 3dsMax startup entry point.

Tools

The following packages are not really examples but Python tools.

  • menuhook is not meant to be an example (but is still interesting as such!) but as a way of attaching Python functions to 3ds Max menu items. The menuhook package is used by most of the other samples.

  • realoadmod is small tool that will reload all development modules in one operation

  • mxvscode is a small tool that will automatically import ptvsd (the VSCode debugging interface) during the startup of 3ds Max and make it accept remote connections. This may slow down the startup of 3ds Max quite a bit and is meant as a developer-only tool.

Extra Goodies

  • install.sh will install pip, install pystartup and pip install all the samples
  • uninstall.sh will uninstall what was installed with install.sh
  • installstartup.sh will install pip and pystartup and nothing more
  • installhowtos.sh will install only the howtos (works in a virtual env)
  • checks.sh runs pylint on the code, validates that 3ds Max is named properly, validates that code blocks in markdown always specify the programming language, checks that all links are valid in all markdown files of the repo
  • create.sh will generate an empty pip package in the current working directory.

More Repositories

1

RevitTrainingMaterial

Autodesk Revit Training material
C#
310
star
2

3dsMax-OSL-Shaders

shared OSL shaders for 3ds Max
225
star
3

Maya-Training-Material

Autodesk Maya Training Material
C++
138
star
4

MgdDbg

Inspection tool for AutoCAD Database (DWG) created with .NET
C#
120
star
5

AutoCAD-Net-Wizards

AutoCAD .Net Wizards for Visual Studio
C#
95
star
6

Inventor-Training-Material

Inventor API Training Material and Samples
Visual Basic
94
star
7

ObjectARX-Wizards

AutoCAD / ObjectARX Wizards for Visual Studio
C++
78
star
8

3dsMax-Learning-Path

3ds Max Learning Path
C++
63
star
9

AutoCADDotnetTrainingMaterial

AutoCAD NET Material Previous Versions
44
star
10

3dsMax-Explode-Geometry

3ds Max Explode Geometry plug-in
C#
42
star
11

Maya-Cpp-Wizards

A new Maya C++ Wizards
C
40
star
12

Civil3DSnoop

Tool to inspect AutoCAD Civil 3D Database
Visual Basic
38
star
13

Maya-Net-Wizards

Maya .Net Wizards for Visual Studio
C#
36
star
14

revit-api-chms

A collection of the Revit API CHM Windows Help Files from the Revit SDKs
34
star
15

3dsMax-MCG-Samples

A library of useful compounds and tools for Max Creation Graph.
MAXScript
31
star
16

Maya-Locator

Maya Locator Library (Example) - Plug-in of the Month, October 2012
C++
27
star
17

AutoCAD-Slide-Library-Manager

AutoCAD Slide Library Manager
C#
24
star
18

Maya-dx11Shader-Sample

Maya-dx11Shader-Sample
C++
22
star
19

ObjectARXTrainingMaterial

ObjectARX Training Material
20
star
20

Maya-Net-Wpf-DarkScheme

Maya .Net Dark Scheme for WPF
C#
19
star
21

Maya-CustomConstraint

Maya CustomConstraint Sample
C++
14
star
22

Plant3DTraining

C#
14
star
23

3dsMax-SampleCode

C++
12
star
24

ScriptPro-installer

ScriptPro 2.0 is a batch processing utility that applies a set of commands to multiple drawings.
11
star
25

AutoCAD-SendCommand

Samples showing how SendCommand works in AutoCAD 2014 and 2015
10
star
26

A360ViewerSamples

JavaScript
8
star
27

3dsMax-WindowMatic

3ds Max sample code showing how to capture an outside window process, into a 3ds Max viewport
C++
7
star
28

Vault-Plugin-Wizard

This wizard helps you to create an Autodesk Vault plugin more easily.
C#
7
star
29

apps.exchange.packager

Cross platform scripts to produce installers for the Autodesk http://apps.exchange.autodesk.com store
Python
7
star
30

Termlicensing

C#
7
star
31

3dsMax-Bake-Radiosity

C++
6
star
32

3dsMax-Menu-Sample

.NET API Menu sample
C#
6
star
33

PIOTM-QRCode

Create single hatch QR code on AutoCAD
C#
6
star
34

EntitlementAPI

Samples related to Entitlement API for Autodesk Exchange Store
C#
5
star
35

MotionBuilder-Training-Material

Autodesk MotionBuilder Training Material http://www.autodesk.com/developmotionbuilder
5
star
36

Associative-Fillet-sample-application

A realistic Associative Fillet ObjectARX sample application
C++
5
star
37

ObjectARX-Natvis

MSVC Debugger Type Formatting (Natvis files) for AutoCAD ObjectARX
4
star
38

iLogicRuleExporter

Utility to export all Rules from the Active assembly to *.iLogicVb files
Visual Basic .NET
4
star
39

EntitlementAPI_Inventor

Shows how to use the entitlement API from an Inventor AddIn
C#
3
star
40

Exchange-IPNListener-Sample

An ASP.Net sample demonstrating how to connect and receive the Autodesk Exchange Store IPN notification.
C#
3
star
41

Inventor-Attribute-Helper

The latest version is here https://github.com/brianekins/AttributeHelper
Visual Basic .NET
2
star
42

ADN-Field-Android-Sample

A demo on some workflows to handle Issues using Field API
Java
2
star
43

Vault_Thinclient_Integration

C#
2
star
44

MaterialProfiler

An Inventor Material Profiler Add-In
C#
2
star
45

map-resource-explorer

C#
2
star
46

ADN-Android-Samples

Various Android related samples
Java
2
star
47

3dsMax-OSL-Shaders-TestSuite

3ds Max OSL Shaders tests and content
MAXScript
1
star
48

.NETwrappersCustomEntity

Tutorial to create managed wrappers for custom ARX functions and objects
1
star
49

ADN-WinRT-Samples

Various WinRT/Windows App Store Samples
C#
1
star
50

Fiber_removal_AutoCAD2015

1
star
51

AdnGallery

Node.js gallery website
JavaScript
1
star
52

AdnNodeServer

A Node.Js Server demo running Apprentice to fetch data from Inventor files
C#
1
star