Many months ago I started experimenting with running scheme scripts to generate
mesh data as a way for me to get more familiar with how wings plugins worked.
A while later I added python interpreter support so now this is a plugin that makes it
possible to run scheme and python scripts as if they were simple plugins.
Some of the uses at the moment for it there is some scripts for generating shapes.
There are also exporters to export wings3d meshes to some game formats:
Godot (.tres) and Panda3d (.egg).
A python script based exporter has some advantages for game developers for exporting
to game engine formats. Game engines change at a fairly fast pace
and their formats might not be set in stone as much like formats like .obj. Game developers
will also likely need to have easy access to the script to make changes and customizations
to the mesh output for their day-to-day use.
Installing this plugin has a few steps:
NOTE: Be careful when searching for open source software in Google. Links are added to find the real python and scheme.
Documentation:
Scripting_Plugin_Wings3D_en.pdf
When writing scripts:
The plugin code can be found in the branch:
eb/scripting-shapes
mesh data as a way for me to get more familiar with how wings plugins worked.
A while later I added python interpreter support so now this is a plugin that makes it
possible to run scheme and python scripts as if they were simple plugins.
Some of the uses at the moment for it there is some scripts for generating shapes.
There are also exporters to export wings3d meshes to some game formats:
Godot (.tres) and Panda3d (.egg).
A python script based exporter has some advantages for game developers for exporting
to game engine formats. Game engines change at a fairly fast pace
and their formats might not be set in stone as much like formats like .obj. Game developers
will also likely need to have easy access to the script to make changes and customizations
to the mesh output for their day-to-day use.
Installing this plugin has a few steps:
- Install the plugin tar (it includes the .beam and a directory of startup scripts)
wpc_scripting_shapes.tar
- Install a recent python 3.x (3.6+) (WEBSITE), add to PATH env if needed.
- Install a recent Gauche scheme (WEBSITE), add to PATH env if needed.
- Download the scripts pack to a directory
https://github.com/elblake/wings-scripts-pack
- In plug-in preferences > "Scripts Preference", add the directory to the list of paths in the import/export and shapes tabs.
- Try right click > "Shape from Script"
NOTE: Be careful when searching for open source software in Google. Links are added to find the real python and scheme.
Documentation:
Scripting_Plugin_Wings3D_en.pdf
When writing scripts:
- Wings3D doesn't need to be restarted after modifying a script, the interpreter process
is out-of-process and is started and closed on each invocation.
- Script errors if any will show up in the wings console window.
- Information can be printed to the console for debugging purpose with print (python) or
display (scheme), as long as the beginning of the line doesn't start with an open
parenthesis, which the script plugin interprets as the start of incoming return data.
If printing a variable will likely print an expression enclosed in parenthesis,
print another character just before it on the same line.
The plugin code can be found in the branch:
eb/scripting-shapes