Scripting Plugin for Wings3D
Author: Edward Blake
April 7, 2023

This document is split in three sections:
1. Script Information (.wscr)
2. Scheme Scripting
3. Python Scripting

Script Information (.wscr)

What are .wscr les?
Wings SCRipt les provide information so that scripts can be used like normal
plugins in wings, WSCR les specify: Name and description of the script.
 If the script is a import, export, shape or command script.
 Parameters to ask the user before starting the script.
When a user opens a script chooser dialog, the script search path is traversed
for all wscr les, the name in the wscr le is used for the name shown in thescript chooser dialog.

type Directivetype" py "

This is either scm or py, depending on if the script is a Scheme or Python
le.

1name Directive
name?__( 1 , " Raw

Triangles( . raw ) " )A name for the script, which appears in the script chooser dialog.

mode Directivemode " i m p o r t "The mode indicates what kind of script it is. The mode determines in which
script chooser the script will show up.

If a script has export for mode, itwill only show up when choosing Script-based exporters in the File Export
menu.
Kind of scriptmode

New shapes
Importers

importExporters

exportSimple whole object commands

simple_body_command

New shapes scripts create a new shape.
Importer scripts are Found in File > Import. Returns an E3D leExporter scripts are Found in File > Export. Takes an E3D le.
Simple whole object command scripts changes point coordinates and vertex
attributes.

desc Directive
desc?__( 2 , " T h i s

scriptdoes

something ")A short description can be added to provide more information about what the
script does.

include Directives
include"(%) _ d i a l o g . i n c l r "WSCR les can include other les, it is recommended to move all the parameter
related conguration to another le and add an include directive towards it soas to keep the main wscr le small.

This is important as each time the user

opens a script chooser dialog, every directory is traversed for every wscr le, and2each wscr le found is read for it's information to display in the script chooser
browser.
The script chooser traversal process reads every wscr le, but it does notread the include directives.

When a script is invoked, the include directives

are used to read the rest of the conguration. A parenthesis wrapped percent
symbol (%) auto expands to the name of the .wscr le before the extension.

params_title Directive
params_title?__( 3 , " CommandS e t t i n g s ")The params_title directive indicates the titlebar string of the dialog that isshown for user input.

params_templates Section
params_templates
template{" export """}Param templates are standard groups of parameters that are used by most plugins in Wings3D for consistency. For example, importers might use the importtemplate to show the ip axis and scale parameters. When a template is used,the corresponding code that interprets the standard parameters to automaticallymodify the E3D tuple will also be handled by the scripting interface.

template Directive
template" export """A template in the params_template section.

params Section
paramsparam{" Size "

"2.0"

...
}

The params section contains param directives.

3

param Directive
param" Size ""2.0"

A param directive species one eld for user input

extensions Section
extensions
ext{". tres "?__( 5 , " Godot Mesh

Library ")}The extensions section indicates the extensions that are supported by the importer or exporter script. Each line within the section should be a ext directive,
with its rst argument the extension including the dot, and the second argument
is a description of the le format.

params_init Instructions Section
params_init{

do "1>$ ' s u b d i v i s i o n s ' "}The params_init section behaves as a subroutine, with each directive being
evaluated sequentially. This section is used to load values into temporary variables to pass to the params and params_set section. The state of temporary
variables do not carry over after the params section.

The argument of a do

The Query Mini Language in the

instruction is not a simple string. Refer tonext section on how to write the argument.

params_set Instructions Section
params_set{

export_param" include_uvs "" b o o l ( params / i n c l u d e _ u v s ) "...
}The params_set section behaves as a subroutine, with each directive within
assigning a value to a parameter sequentially.

This detail is relevant as thevariable query string of the instructions can set temporary variables for later
instructions to use.

4

export_param Instruction
export_param" subdivisions "" params / s u b d i v i s i o n s "Sets an export parameter for the wpa:export function or some scripting ex-

port functions on the scripting plugin side. For script_texture_convert,the recommended option is 'user' with the export template for the texture

The Query
Mini Language in the next section on how to write the second argument.
handling. The second argument is not a simple string. Refer toimport_param Instruction
import_param" script_texture_convert "" ' auto ' "Sets an import parameter for the wpa:import function or some scripting im-

port functions on the scripting plugin side. For script_texture_convert,the recommended option is 'auto' for the texture handling. The second argument is not a simple string. Refer to

The Query Mini Language in thenext section on how to write the second argument.

script_param Instruction
script_param" test ""1"

Sets an extra parameter for the script, which has to be accessed through theextra_params variable in Python, or the *extra-params* variable in Scheme.

The Query Mini Language in the next section on how to write the second argument.

The second argument is not a simple string. Refer toextra_file Section
extra_file
title" icon "" Choose

extensions

{

small

image "

{

...
}
}

An extra input le which can be used by any of the script modes.

The rst

argument should be the name that will be set in extra_params for the script.
Set the title and extensions for it.

5Language lesLike normal wings3d plugins, wscr les can use language les to localize theuser interface text into multiple languages.

The lang le needs to be in thesame directory as the wscr le, and begin with the same base le name without
the extension, with a underscore and a language code following it, followed bythe .lang le extension. The format of the language le is the same Erlangterm format as wings3d lang les. To localize a string in the wscr le, enclose
the string in the same enclosing syntax used in Erlang wings3d source les.

name?__( 1 , " C o l o r " )For a script called script_name.wscr, the lang le for French should be named
script_name_fr.lang, and the content resembles other Wings3D lang les but
the outer name is script and the inner name is wscr:{ script ,[{ wscr ,[{ 1 , " C o u l e u r "}]}]}.

The Query Mini Language
The query language is designed to be able to navigate the Erlang terms used by
Wings3D with a simple path-like syntax.
When the user enters parameter settings, before the script is invoked, there

will be a need to set some elaborate settings for wpa:export or wpa:importthrough export_param and import_param instructions. The query language isused for referencing parameter values in the script information le as well as forcommunicating between the script and plugin.

First Identier
The rst identier in the query can be an identier such as st, params, a temporary variable retrieval, a function call, a tuple/list constructor or a literal such
as 1, 'atom' or "string".

Atoms
Atoms must be enclosed in single quotes, words without single quotes are notautomatically made into atoms.

6

e.g.
' triangulated 'Strings
Strings are enclosed in double quotes.
e.g.
" Sampletext "

Numbers
Integers and oating point numbers can be used in the query.
e.g.
1
1.2

Dot Notationv a r i a b l e . shapes
With some records such as 'st' and 'we', elds of those records can be accessedusing a dot notation. There is no need to specify the record type itself as donein Erlang because the record is inspected at runtime to match the record typefor a eld name.
However, only a few record types have their elds registered in the plugin to
use the dot notation. Alternatively, record elds can be accessed with the tuple
index operator, where {0} is the atom of the record and {1} is the rst eld.
e.g.
st . shapes

Associative List Pathv a r i a b l e / key
Associative lists can be navigated by their keys with the "slash" (/) character. If the associated lists contain more associated lists, the slash can be chained
like a path to access deeper elements.
e.g.
params / i n c l u d e _ u v s

7

Tuple by index
v a r i a b l e {0}The entries of a tuple can be accessed by a zero-based index by enclosing a
number inside curly brackets, the rst entry is {0}. Indexing operators can bechained as necessary to access deeper elements.
e.g.
tuple (1 ,2 ,3 ,4){2}

List by index
variable [0]The entries of a list can be accessed by a zero-based index by enclosing a
number inside square brackets, the rst entry is [0] Indexing operators can bechained as necessary to access deeper elements.
e.g.
l i s t (1 ,2 ,3 ,4)[1]Store to>$ ' v a r i a b l e 'Store the current value into a temporary variable for later retrieval, thesyntax is a greater than symbol, a dollar sign and a integer or atom literal. This
operator returns the same value that it is storing so it can be added at the endof a query chain without aecting the return value.
e.g.
params / i n c l u d e _ u v s >$ ' i n c l u d e _ u v s 'Get from<$ ' v a r i a b l e 'Get the value stored in a temporary variable, the syntax is a lesser thansymbol, a dollar sign and a integer or atom literal, this can appear at the
beginning of the query.
e.g.
<$ ' s e t t i n g s ' / g r o u p 1 / s e t t i n g

Call function
8

module : f u n c t i o n (...

)

Calls a function from a module, with the given arguments. A function call
can appear at the beginning of the query.
e.g.
l i s t s : reverse ( l i s t (1 ,2 ,3 ,4))

List constructorl i s t ( 1 , ' two ' , 3 )Construct a list with given values.

A list constructor can appear at the

beginning of the query. It is usually more convenient to use %setvar with temporary variables to input list data structures from the script to the plugin thanto use inline constructors.

Tuple constructor
tuple (1 ,2 , ' three ' )Construct a tuple with given values.

A tuple constructor can appear at

the beginning of the query. It is usually more convenient to use %setvar withtemporary variables to input tuple data structures from the script to the plugin
than to use inline constructors.

Boolean Valuebool (1)
Get either the atom 'true' or 'false' from another value.

Integer Value
int ("1")
Get the integer value from another value

Float Valuefloat ("1.0")
Get the oat value from another value.

Ok Testo k _ t e s t ( o r d d i c t : f i n d ( key ,9$ <' v a r i a b l e ' ) ," notfound ")

Tests if the return of the rst argument is a tuple with the rst element being'ok'. If it is an 'ok' tuple, the tuple's value is returned. If the rst argument is
not an 'ok' tuple, the second argument is evaluated and returned instead.

Value Test
value_test ( ' value ' ,g b _ t r e e s : l o o k u p ( key ,$ <' v a r i a b l e ' ) ,A general version of ok_test that tests if the return of the second argument
is a tuple with the rst element being equal to the rst argument. If the second
argument does not match, the third argument is evaluated and returned instead.

Conditional If
i f ( b o o l (<$ ' cond ' ) ," on " ," o f f ")Tests the rst argument if it evaluates to the atom 'true', then the second
argument (the then argument) is evaluated, otherwise the third (the elseargument) is evaluated.

Scheme Scripting Guide for Wings3D

Online Resources for the Scheme Language
A very non exhaustive list of resources:
Yet Another Scheme Tutorial
http://www.shido.info/lisp/idx_scm_e.html
The Scheme Programming Language 4th ed.
https://www.scheme.com/tspl4/
Simply Scheme: Introducing Computer Science
https://people.eecs.berkeley.edu/∼bh/ss-toc2.html
R5RS (reference for functions found in nearly every Scheme)
https://conservatory.scheme.org/schemers/Documents/Standards/R5RS/
Gauche reference
http://practical-scheme.net/gauche/man/gauche-refe/index.html.wscr File
For your script to be able to appear in the script chooser dialog, you will needto make a .wscr le with the same base name as your main Scheme script le.
For example, if your script le is example.scm, your wscr le should be named
example.wscr. The name that appears in the script chooser is the name speciedin the .wscr le.

10

" not

found ")

Details Of The Script
Initial Bootstrap Script
A bootstrap script that comes with the script plugin is rst launched whichthen denes some basic functions, sometimes adds include paths, and gets fromstdin the actual script being invoked as well as parameters that goes with it.

Parameters that are passed in
When a script is invoked, parameters from the dialog box are passed in, otherparameters are also passed in depending on the type of script.

Returning values from the script
Scripts write to stdout their response before exiting.
( list' ok' ( new_shape

...

))

Calling functions in Wings3D from a script
Scripts can communicate with the plugin by setting temporary variables andusing queries to call functions and get the return value. Temporary variables
makes it easier to input elaborate data structures as arguments by referencing
them in the query.
Set value to variable:( list'% s e t v a r" var1 "

'(1

2

3

4))

The reply sent back for setvar:( list'% s e t o k" var1 ")Query:( list'% q u e r y" l i s t s : r e v e r s e (<$ ' v a r 1 ' ) " )The reply sent back for queries:( list'% r e s p o n s e

'(4

3

2

1))

New Shape Scripts
New shape scripts are available when right clicking with no selection
An example of a complete Scheme script to create a shape and send it backto Wings3D:11

( write( list' new_shape" MyShape "

'(

)

(0

1

3

2)

(6

7

5

4)

(1

0

4

5)

(2

3

7

6)

(0

2

6

4)

(3

1

5

7)

'(
#( − 2.0

0.5

−2.0)

#( − 2.0

0.5

2.0)

#(2.0

0.5

−2.0)

#(2.0

0.5

2.0)

#( − 2.0− 0.5 − 2 . 0 )− 0.5 2 . 0 )− 0.5 − 2 . 0 )− 0.5 2 . 0 )#( − 2.0
#(2.0
#(2.0
)))

The e3d object way is also possible, all new shape scripts write a list wherethe rst element is the symbol new_shape:( define

Fs

...)

;

List

( define

Vs

...)

;

Verticeof( write( list' new_shapeindices

intovertice

list

list

" MyShape "FsVs ) )

Command Scripts
Command scripts are available when right clicking on a selected object
Return set_points
The points extra parameter is needed to access the list of vertices, whichcome as a vertice number and a 3 dimensional position.
( defineop( l i s t −r e f( definepoints( l i s t −r e f( assoc( assoc" op "* e x t r a −params * )" points "1))* e x t r a −params * )1))

The following script shifts all the vertice positions of a selected object by
0.5:

12

( defineop( l i s t −r e f( definepoints( l i s t −r e f( define

newpoints( assoc( assoc( map)( lambda" op "* e x t r a −params * )1))" points "* e x t r a −params * )

1))

(p)

( definea( v e c t o r −r e fp0))( defineb( v e c t o r −r e f

p1))( definex( v e c t o r −r e fb0))( definey( v e c t o r −r e fb1))( definez( v e c t o r −r e fb2))( vectora( vector

(+

0.5

x)

(+

0.5

y)

(+

0.5

z )))

points ))( newline )( write( list( list' set_points

newpoints)))

Importer Scripts
Importer scripts are available from the File > Import menu.
Return e3d_leThe lename extra parameter is needed which contain the le path of thele to read:( define

filename( l i s t −r e f( assoc" filename "* e x t r a −params * )1))Constructing e3d objects involves using make-e3d_face, make-e3d_object,make-e3dle, etc.
After parsing the le, the importer writes the contents of e3d_le back to
Wings3D:( newline )( write( list' ok( make− e 3 d _ f i l e`( objs,( l i s t

Obj ) ) ) ) )Exporter Scripts
Exporter scripts are available from the File > Export and File > Export
Selected menus.
Read e3d_le13The lename and content extra parameters are needed, the le name ischosen by the user to save the model, and the content contains an e3d_le data
structure.
( define

filename( l i s t −r e f( assoc( define" filename "* e x t r a −params * )1))* e x t r a −params * )1))content( l i s t −r e f( assoc" content "After writing the content to a le, the exporter writes an ok to Wings3D:( newline )( write' ( ok ) )E3D Function Reference
The E3D helper functions are loaded already when using Scheme.

e3d_face(make-e3d_face . sc)
Make a e3d_face list structure with a constructor list, available items are'vs 'vc 'tx 'ns 'mat 'sg 'vis(

e3d_face? l)Is the list structure an e3d_face?

e3d_face-vs l)(e3d_face-vc l)(e3d_face-tx l)(e3d_face-ns l)(e3d_face-mat l)(e3d_face-sg l)(e3d_face-vis l)(

Get the value of a given eld in e3d_face.

e3d_mesh(make-e3d_mesh . sc)
Make a e3d_mesh list structure with a constructor list, available items are'type 'vs 'vc 'tx 'ns 'fs 'he 'matrix(

e3d_mesh? l)Is the list structure an e3d_mesh?

e3d_mesh-type l)(e3d_mesh-vs l)(14

e3d_mesh-vc l)
e3d_mesh-tx l)(e3d_mesh-ns l)(e3d_mesh-fs l)(e3d_mesh-he l)(e3d_mesh-matrix l)((

Get the value of a given eld in e3d_mesh

e3d_object(

make-e3d_object . sc)
Make a e3d_object list structure with a constructor list, available items are'name 'obj 'mat 'attr(

e3d_object? l)Is the list structure an e3d_object?

e3d_object-name l)(e3d_object-obj l)(e3d_object-mat l)(e3d_object-attr l)(

Get the value of a given eld in e3d_object

e3d_le(make-e3d_le . sc)
Make a e3d_le list structure with a constructor list, available items are'objs 'mat 'creator 'dir(e3d_le? l)Is the list structure an e3d_le?

e3d_le-objs l)(e3d_le-mat l)(e3d_le-creator l)(e3d_le-dir l)(

Get the value of a given eld in e3d_lee3d_image(

make-e3d_image . sc)
Make a e3d_image list structure with a constructor list, available items are'type 'bytes_pp 'alignment 'order 'width 'height 'image 'lename 'name 'extra(

e3d_image? l)Is the list structure an e3d_image?

e3d_image-type l)(e3d_image-bytes_pp l)(e3d_image-alignment l)(e3d_image-order l)(e3d_image-width l)(15

e3d_image-height l)
e3d_image-image l)(e3d_image-lename l)(e3d_image-name l)(e3d_image-extra l)((

Get the value of a given eld in e3d_image

Python Scripting Guide for Wings3D

Online Resources for the Python language
A non exhaustive list of resources:
Python Tutorial
https://docs.python.org/3/tutorial/
Python Language Reference
https://docs.python.org/3/reference/.wscr File
For your script to be able to appear in the script chooser dialog, you will needto make a wscr le with the same base name as your main python script le.
For example, if your script le is example.py, your wscr le should be named
example.wscr. The name that appears in the script chooser is the name speciedin the wscr le.

Details Of The Script
Initial Bootstrap Script
A bootstrap script that comes with the script plugin is rst launched whichthen denes some basic functions, sometimes adds include paths, and gets fromstdin the actual script being invoked as well as parameters that goes with it.

Parameters that are passed in
When a script is invoked, parameters from the dialog box are passed in, otherparameters are also passed in depending on the type of script.

Returning values from the script
Scripts write to stdout an OutputList before exiting.

16

Calling functions in Wings3D from a script (WIP)
Scripts can communicate with the plugin by setting temporary variables andusing queries to call functions and get the return value. Temporary variables
makes it easier to input elaborate data structures as arguments by referencing
them in the query.
(WIP)
Set value to variable:( list'% s e t v a r" var1 "

'(1

2

3

4))

The reply sent back for setvar:( list'% s e t o k" var1 ")Query:( list'% q u e r y" l i s t s : r e v e r s e (<$ ' v a r 1 ' ) " )The reply sent back for queries:( list'% r e s p o n s e

'(4

3

2

1))

New Shape Scripts
New shape scripts are available when right clicking with no selection.
A complete example of a Python script to create a new shape:b = w3d_newshape . NewShape ( )b. fs= w3d_newshape . L i s t O f A r r a y s ( [[0 ,1 ,3 ,2] ,[6 ,7 ,5 ,4] ,[1 ,0 ,4 ,5] ,[2 ,3 ,7 ,6] ,[0 ,2 ,6 ,4] ,[3 ,1 ,5 ,7]])
b . v s = w3d_newshape . L i s t O f T u p l e s ( [( −2.0 ,0.5 , −2.0) ,( −2.0 ,0.5 ,2.0) ,(2.0 ,0.5 , −2.0) ,(2.0 ,0.5 ,2.0) ,( −2.0 , −0.5 , −2.0) ,( −2.0 , −0.5 ,2.0) ,(2.0 , −0.5 , −2.0) ,(2.0 , −0.5 ,2.0)])
o = b . as_output_list ()o . write_list_out ( sys . stdout )17

To create a shape, create a geometry with E3DMesh and E3DObject, andassign E3DObject to the obj attribute of a NewShape object. And then output
the output list of NewShape to stdout.
e3d_o = w3d_e3d . E3DObject ( )e3d_o . o b j = meshn s h p = w3d_newshape . NewShape ( )nshp . p r e f i x= " shape "n s h p . o b j = e3d_oo = nshp . a s _ o u t p u t _ l i s t ( )o . write_list_out ( sys . stdout )Command Scripts
Command scripts are available when right clicking on a selected object.
Return set_points(WIP)
The points extra parameter is needed to access the list of vertices, whichcome as a vertice number and a 3 dimensional position.
p o i n t s = extra_params [ " p o i n t s " ]Importer Scripts
Importer scripts are available from the File > Import menu.
The lename extra parameter is needed which contain the le path of thele to read:f i l e n a m e = extra_params [ " f i l e n a m e " ]Importers take the lename to read the le needed, construct a E3DObject,
add it to an E3DFile and return the output list as part of an ok tuple.
Constructing E3D objects involves instancing E3DFace, E3DObject, E3DFile,etc.
print ("")
e 3 d f = w3d_e3d . E 3 D F i l e ( )e3df . objs =[ obj ] # obj

isan

E3DObjecto_ok = O u t p u t L i s t ( )o_ok . add_symbol ( " ok " )o_ok . a d d _ l i s t ( e 3 d f . a s _ o u t p u t _ l i s t ( ) )o_ok . w r i t e _ l i s t _ o u t ( s y s . s t d o u t )18

Exporter Scripts
Exporter scripts are available from the File > Export and File > Export
Selected menus.
Read E3DFile
The lename and content extra parameters are needed, the le name ischosen by the user to save the model, and the content contains an e3d_le data
structure.
f i l e n a m e = extra_params [ " f i l e n a m e " ]c o n t e n t = w3d_e3d . E 3 D F i l e ( )c o n t e n t . load_from ( extra_params [ " c o n t e n t " ] )Exporters take in both a lename and the e3d_le content which has to beloaded with E3DFile.load_from(...).

After writing the le to disk, create anok tuple and write its output list out:
print ("")
o = OutputList ( )o . add_symbol ( " ok " )o . write_list_out ( sys . stdout )OutputList Function Reference
Python is somewhat dierent from Erlang and Scheme for their data structures,
so to serialize objects for input and output with the script plugin, a helper classcalled OutputList is used. Other helper classes also use OutputList to be able
to load and write data to and from Wings3D.

class OutputList
Visible attributes lst_cont, lst_type

OutputList()

Create a new empty OutputList instanceadd_symbol(a)list.

Add a symbol (interned string) to the list

add_str(a)list.

Add a string to the list

add_number(a)list.

Add a number to the list

add_numbers(alst)

list.

Add several numbers to the list, it does not add a sublist

add_integer(a)list.

Add an integer to the list

add_integers(alst)

list.

19

Add several integers to the list, it does not add a sublist

add_oat(a)list.

Add a oating point number to the list

add_oats(alst)

list.

Add several oating point numbers to the list, it does not add a sublist

add_list(a)list.

Add a sublist to the list

add_vector(a)list.

Add a vector (tuple) to the list

add(a, typ)list.

Add an item with type number to the list, this method shouldn't be useddirectly.

write_list_out(ost)list.

Write the list to the stream ost

NewShape (w3d_newshape) Function Reference
The w3d_newshape module contains NewShape helper classes and can be imported with:
importw3d_newshapeclass ListOfArrays
Visible attributes: l

ListOfArrays()

Create a new empty ListOfArrays instanceas_output_list()

list.

Return an OutputList instanceclass ListOfTuples
Visible attributes: l

ListOfTuples()Create a new empty ListOfTuples instanceas_output_list()

list.

Return an OutputList instanceclass NewShape
Visible attributes prex, fs, vs, obj, mat

NewShape()

Create a NewShape instanceas_output_list()shape.

20

Return an OutputList instance, the kind of tuple that is returned is dierent
depending on if obj is set, if it is set the tuple contains obj and mat. If it is not
set, it returns a tuple with fs and vs.
e3d_o = w3d_e3d . E3DObject ( )e3d_o . o b j = meshs h p = w3d_newshape . NewShape ( )shp . p r e f i x= " shape "s h p . o b j = e3d_oo = shp . a s _ o u t p u t _ l i s t ( )o . write_list_out ( sys . stdout )E3D (w3d_e3d) Function Reference
The w3d_e3d module contains E3D helper classes and can be imported with:
importw3d_e3dclass E3DFace
Visible attributes vs, vc, tx, ns, mat, sg, vis

E3DFace()Creates a new E3DFace instanceas_output_list()

face.

Outputs the whole E3DFace instance and all its values into an output list,
not usually used directly.

load_from(expr)

face.

Load contents into a E3DFace instance, not usually used directly.

class E3DMesh
Visible attributes: type, vs, vc, tx, ns, fs, he, matrix

E3DMesh()Creates a new E3DMesh instanceas_output_list()mesh.

Outputs the whole E3DMesh instance and all its values into an output list,
not usually used directly.

load_from(expr)

mesh.

Load contents into a E3DMesh instance, not usually used directly.

class E3DObject
Visible attributes name, obj, mat, attr

21

E3DObject()Creates a new E3DObject instanceas_output_list()obj.

Outputs the whole E3DObject instance and all its values into an output list,
not usually used directly.

load_from(expr)

obj.

Load contents into a E3DObject instance, not usually used directly.

class E3DImage
Visible attributes type, bytes_pp, alignment, order, width, height, image,lename, name, extra

E3DImage()

Creates a new E3DImage instanceas_output_list()

image.

Outputs the whole E3DImage instance and all its values into an output list,
not usually used directly.

load_from(expr)

image.

Load contents into a E3DImage instance, not usually used directly.

class MaterialMaps
Visible attributes maps

MaterialMaps()

Create a new MaterialMaps instancemaps.

as_output_list()

Outputs the whole MaterialMaps instance and all its values into an output
list, not usually used directly.
maps.

load_from(tlist)

Load contents into a MaterialMaps instance, not usually used directly.

class MaterialOpenGLAttributes
Visible attributes ambient, specular, shininess, diuse, emission, metallic,roughness, vertex_colors

MaterialOpenGLAttributes()
Creates a new MaterialOpenGLAttributes instanceas_output_list()

opengl.

Outputs the whole MaterialOpenGLAttributes instance and all its values
into an output list, not usually used directly.

load_from(tlist)

opengl.

Load contents into a MaterialOpenGLAttributes instance, not usually useddirectly.

22

class Material
Visible attributes name, attrs

Material()

Creates a new Material instanceas_output_list()

mat.

Outputs the whole Material instance and all its values into an output list,
not usually used directly.

load_from(expr)

mat.

Load contents into a Material instance, not usually used directly.

class E3DFile
Visible attributes objs, mat, creator, dir

E3DFile()Creates a new E3DFile instanceas_output_list()

e3df.

Outputs the whole E3DFile instance and all its values into an output list
which is then to be written to stdout
b = w3d_e3d . E 3 D F i l e ( )b . o b j s . append ( E3DObject ( ) )o_ok = O u t p u t L i s t ( )o_ok . add_symbol ( " ok " )o_ok . a d d _ l i s t ( b . a s _ o u t p u t _ l i s t ( ) )o_ok . w r i t e _ l i s t _ o u t ( s y s . s t d o u t )load_from(expr)

e3df.

Load contents into a E3DFile instancec o n t e n t = w3d_e3d . E 3 D F i l e ( )c o n t e n t . load_from ( extra_params [ " c o n t e n t " ] )23