Are you looking for PyVoxelHorizon DLL injection version? See this branch
A framework that attaches CPython using the Voxel Horizon official SDK and provides Python Wrapper API.
flowchart TD
USER_PLUGIN["User Python Plugins"]
PY_VOXEL_HORIZON_PLUGIN_LOADER["PyVoxelHorizon Plugin Loader\n(pyvoxelhorizon/plugin/plugin_loader.py)"]
PY_VOXEL_HORIZON_PLUGIN["PyVoxelHorizon Plugin Interface\n(pyvoxelhorizon/plugin/)"]
PY_VOXEL_HORIZON["PyVoxelHorizon Interface\n(pyvoxelhorizon/enum|interface|struct/)"]
PY_VOXEL_HORIZON_WRAPPER["PyVoxelHorizon Wrapper Plugin\n(wrapper_plugin/)"]
PY_VOXEL_HORIZON_WRAPPER_GENERATOR["PyVoxelHorizon Wrapper Generator\n(pyvoxelhorizon/generator/)"]
VOXEL_HORIZON{{"VOXEL HORIZON Process"}}
VOXEL_HORIZON_HEADER_FILE{{"Offical SDK Header Files"}}
VOXEL_HORIZON -->|"Load\n(Official Function)"| PY_VOXEL_HORIZON_WRAPPER
PY_VOXEL_HORIZON_WRAPPER_GENERATOR -->|"Parse"| VOXEL_HORIZON_HEADER_FILE
subgraph C++ Side
PY_VOXEL_HORIZON_WRAPPER -->|"DLL Load"| PYTHON["CPython"]
end
subgraph Python Side
PY_VOXEL_HORIZON_WRAPPER_GENERATOR -->|"Generate"| PY_VOXEL_HORIZON
PY_VOXEL_HORIZON_WRAPPER <==>|"C++/Python\nInteroperation"| PY_VOXEL_HORIZON
PY_VOXEL_HORIZON -->|"Implementation"| PY_VOXEL_HORIZON_PLUGIN_LOADER
PY_VOXEL_HORIZON -..->|"Implementation"| IMPL1("Another Python Apps?")
end
subgraph Plugin Side
PY_VOXEL_HORIZON_PLUGIN -->|"Implementation"| USER_PLUGIN
PY_VOXEL_HORIZON_PLUGIN_LOADER -->|"Loads\n(Hot Reloads, Plugin Load, Helpers, ...)"| USER_PLUGIN
end
- Install Python 3.11 for all users
- Download
PyVoxelHorizon_{Build Number}.zip
from releases and extract all files to{VOXEL HORIZON Path}/Plugin/bin/
- Write plugin code and Save into
{VOXEL HORIZON Path}/Plugin/bin/PyVoxelHorizon/plugins
- Basic Plugin
- MIDI Player Plugin (Required Python Package
numpy
,umidiparser
) - Circuit Plugin
- Run VOXEL HORIZON
- Press the '`' key to open the console
- Enter the
load_plugin PyVoxelHorizon_x64_Release.dll
command - Or, You can also uses command arguments. See official document
- And, You can reload all python plugins at runtime using
reload_plugins
command
- Install Python 3.11 with enabled
development/embedded
options for all users - Set environment variable
PYTHON_PATH
to the path where Python is installed. - Set environment variable
VOXEL_HORIZON_PATH
to the path where VOXEL HORIZON is installed. - Open
wrapper_plugin/PyVoxelHorizon.sln
using Visual Studio 2022 - Build or Debug
Sorry, Not ready yet.
Sorry, Not ready yet.
midi_player_plugin.mp4
circuit_plugin.mp4
The Python moule that the plugin uses is not installed.
It can be resolved through pip install {Module Name}
. (For photo examples, pip install umidiparser
)