#[non_exhaustive]pub enum LuaError {
Io(Error),
Inexpressible {
handle: String,
attribute: String,
type_tag: Type,
},
InexpressibleFlags {
handle: String,
attribute: String,
flags: i32,
},
EmptyStringArray {
handle: String,
attribute: String,
},
CreateArguments {
handle: String,
node_type: String,
},
}Expand description
Why a scene could not be written as a Lua script.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
Writing failed.
Inexpressible
ɴsɪ’s Lua binding has no name for this attribute’s type.
f64 and i64 arguments have no Lua spelling: nsi.TypeDouble
and nsi.TypeInt64 are nil, and passing a typed parameter
whose type is nil is a runtime error in the renderer, while
passing the value untyped silently makes a double a float and
a large integer a different number.
Fields
InexpressibleFlags
The argument carries ɴsɪ flags that its Lua binding cannot express.
A Lua parameter table has name, data, type and
arraylength – and nothing for per_vertex, per_face or
linear_interpolation. Emitting the argument without them
rebuilds a different surface: a per-vertex normal becomes a
per-varying one, which on a subdivision mesh is a different
shape. Verified against 3Delight: every spelling of a flag key
is ignored.
Fields
EmptyStringArray
An empty string array.
{name="x", data={}, type=nsi.TypeString} aborts 3Delight with
a heap error rather than reporting a problem, so emitting one
hands a consumer a script that kills the renderer. Empty numeric
arrays are fine.
CreateArguments
A Create carrying parameters.
ɴsɪ’s Lua nsi.Create takes a handle and a node type and
nothing else, while NSICreate and the stream both take
optional parameters and 3Delight writes them. Emitting the
create without them would drop whatever they said.
Trait Implementations§
Source§impl Error for LuaError
impl Error for LuaError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()