09-25-2023, 10:59 PM
Hello,
I've made some big updates to the scripting plugin. If you have made any scripts you will need to make a change to your script for it to work with this new plugin.
Scheme
For scheme you will need to wrap your code into an entry function and use (main-function entryfunction)
example:
Python
For python you will need to wrap your code into an entry function and use w3d_main_function = entryfunction
example:
With this new update scripts can now show a preview:
There's also some other new updates:
New update to plugin:
wpc_scripting_shapes.tar
Updates to pack
https://github.com/elblake/wings-scripts-pack
I've made some big updates to the scripting plugin. If you have made any scripts you will need to make a change to your script for it to work with this new plugin.
Scheme
For scheme you will need to wrap your code into an entry function and use (main-function entryfunction)
example:
Code:
...
...
(define (importer *params* *extra-params*)
(define Filename (list-ref (assoc "filename" *extra-params*) 1))
(import_fun '() Filename)
)
(main-function importer)
Python
For python you will need to wrap your code into an entry function and use w3d_main_function = entryfunction
example:
Code:
...
...
def exporter(params, params_by_key, extra_params):
filename = extra_params["filename"]
content = w3d_e3d.E3DFile()
content.load_from(extra_params["content"])
export_fun({}, filename, content)
w3d_main_function = exporter
With this new update scripts can now show a preview:
There's also some other new updates:
- Internationalization strings inside Scheme and Python source
- Some adjustments to progress message functionality
New update to plugin:
wpc_scripting_shapes.tar
Updates to pack
https://github.com/elblake/wings-scripts-pack