vrml.field
property sub-class providing VRML field semantics
Functions
newField(
name
,
dataType
,
exposure
= 1
,
default
= []
)
Create a new field with support for using strings to specify type
- name
- string name
- dataType
- string (or Field sub-class) specifying datatype
- exposure
- boolean (0/1) indicating whether this is an exposed field
- default
- default value for the field
Classes
An Event-handling Port definition
The event is currently non-functional, it's just
here to allow VRML content to parse and be represented
in-memory.
__init__(
self
,
name
,
direction
= 1
)
Initialise the field object
- name
- string name
- direction
- 0 == in, 1 == out
Property sub-class with VRML field semantics
The field basically binds a name, a dataType, and
a default value (with some other meta-data that isn't
actually used by the current implementation).
Fields are normally accessed through the protofunctions
module, which retrieves field objects from node or
prototype objects.
The field offers vrml.dispatcher notification of
changes to values (see fget, fset and fdel methods).
Which allows code to watch for those changes, a
facility you can see in the OpenGLContext.scenegraph.cache
module.
__init__(
self
,
name
,
exposure
= 1
,
default
= []
)
Initialise the field object
- name
- string name
- exposure
- boolean (0/1) indicating whether this is an exposed field
- default
- default value for the field
copy(
self
,
client
= None
,
copier
= None
)
Copy this property's value/definition for client node/proto
if client is a prototype, copy this field definition
for use in a new prototype.
if client is a node, and it has a set value for this
field, then returns self.copyValue( currentValue )
otherwise returns _NULL, a singleton object which
shouldn't turn up anywhere else.