Build dsviper add-on for Blender 4.4

Build on Mac

We use brew to install Python 3.11 if not present.

> brew install python@3.11

We launch the script build.py to build the wheel dsviper for Python 3.11.

> cd dsviper_wheel
> python3.11 build.py

Then we must create a Blender add-on from a wheel.

See Creating extensions for the full documentation.

We copy the wheel to ../dsviper_blender/wheels/ folder

> cp dsviper-1.2.0-cp311-cp311-macosx_15_0_arm64.whl ../dsviper_blender/wheels/
> cd ../dsviper_blender/wheels/

We edit the wheels configuration in the blender_manifest.toml to reference to the wheel.

wheels = [
   "./wheels/dsviper-1.2.0-cp311-cp311-macosx_15_0_arm64.whl",
]

We build the Blender add-on with blender.

> /Applications/Blender.app/Contents/MacOS/Blender --command extension build

building: dsviper_add_on-1.2.0.zip
complete
created: "./dsviper_add_on-1.2.0.zip", 2444219

Load dsviper add-on in Blender 4.4

1) Start blender 2) Open the Preferences Dialog with Menu/Edit/Preferences 3) Click on section Add-ons 4) Click the "Menu Button" in the top left corner of the dialog 5) Click Install from Disk... 6) Select the blender add-ons /Volume/DigitalSubstrate.viper/dsviper_blender/dsviper_add_on-1.2.0.zip 7) Open the scripting console and import dsviper.

PYTHON INTERACTIVE CONSOLE 3.11.9 (main, Aug  1 2024, 14:06:12) [Clang 15.0.0 (clang-1500.1.0.2.5)]

Builtin Modules:       bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, gpu, blf, mathutils
Convenience Imports:   from mathutils import *; from math import *
Convenience Variables: C = bpy.context, D = bpy.data

>>> import dsviper
>>> dsviper.version()
(1, 2, 0)

See Getting Started with dsviper for an introduction > to dsviper and Getting Started with DSM to generate python module for your DSM Definitions.