EvalContext

- class EvalContext
This class holds the evaluation context passed to the evaluation handler during a plug evaluation.
Use this interface to query the dependency count and the dependencies value. This interface is implemented by the application.
Methods
as_Box3f(index)Returns the n-th dependency value as a Box3f.
as_Color4f(index)Returns the n-th dependency value as a Color4f.
as_M44d(index)Returns the n-th dependency value as a M44d.
as_Quatd(index)Returns the n-th dependency value as a Quatd.
as_V2d(index)Returns the n-th dependency value as a V2d.
as_V2i(index)Returns the n-th dependency value as a V2i.
as_V3d(index)Returns the n-th dependency value as a V3d.
as_V3i(index)Returns the n-th dependency value as a V3i.
as_V4d(index)Returns the n-th dependency value as a V4d.
as_V4i(index)Returns the n-th dependency value as a V4i.
as_bool(index)Returns the n-th dependency value as a bool.
as_double(index)Returns the n-th dependency value as a double.
as_float(index)Returns the n-th dependency value as a float.
as_int(index)Returns the n-th dependency value as an integer.
as_string(index)Returns the n-th dependency value as a string.
error(msg)Set an error message for this evaluation.
plugvalue(index)Returns the n-th dependency value.
Returns the number of dependencies value available.
- __init__(*args, **kwargs)
- as_Box3f(index: int) Imath.Box3f
Returns the n-th dependency value as a Box3f.
You must be sure this value is a Box3f or you will have an empty box.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_Color4f(index: int) Imath.Color4f
Returns the n-th dependency value as a Color4f.
You must be sure this value is a Color4f or you will have a default value.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_M44d(index: int) Imath.M44d
Returns the n-th dependency value as a M44d.
You must be sure this value is a M44d or you will have an identity matrix.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_Quatd(index: int) Imath.Quatd
Returns the n-th dependency value as a Quatd.
You must be sure this value is a Quatd or you will have an identity quaternion.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_V2d(index: int) Imath.V2d
Returns the n-th dependency value as a V2d.
You must be sure this value is a V2d or you will have {0,0}.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_V2i(index: int) Imath.V2i
Returns the n-th dependency value as a V2i.
You must be sure this value is a V2i or you will have {0,0}.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_V3d(index: int) Imath.V3d
Returns the n-th dependency value as a V3d.
You must be sure this value is a V3d or you will have {0,0,0}.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_V3i(index: int) Imath.V3i
Returns the n-th dependency value as a V3i.
You must be sure this value is a V3i or you will have {0,0,0}.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_V4d(index: int) Imath.V4d
Returns the n-th dependency value as a V4d.
You must be sure this value is a V4d or you will have {0,0,0,0}.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_V4i(index: int) Imath.V4i
Returns the n-th dependency value as a V4i.
You must be sure this value is a V4i or you will have {0,0,0,0}.
- Parameters
index (int) – index of the dependency to query
- Return type
- as_bool(index: int) bool
Returns the n-th dependency value as a bool.
You must be sure this value is an integer, a float or a boolean or you get false.
- Parameters
index (int) – index of the dependency to query
- Return type
bool
- as_double(index: int) double
Returns the n-th dependency value as a double.
You must be sure this value is an integer, a float or a boolean or you get 0.0.
- Parameters
index (int) – index of the dependency to query
- Return type
double
- as_float(index: int) float
Returns the n-th dependency value as a float.
You must be sure this value is an integer, a float or a boolean or you get 0.0.
- Parameters
index (int) – index of the dependency to query
- Return type
float
- as_int(index: int) int
Returns the n-th dependency value as an integer.
You must be sure this value is an integer, a float or a boolean or you get 0.
- Parameters
index (int) – index of the dependency to query
- Return type
int
- as_string(index: int) unicode
Returns the n-th dependency value as a string.
You must be sure this value is a string or you will have an empty string.
- Parameters
index (int) – index of the dependency to query
- Return type
unicode
- error(msg: StringView) None
Set an error message for this evaluation.
- value(index: int) Value
Returns the n-th dependency value.
The Value pointer is null if no plug is connected to this dependency entry. If this is an internal dependency set in the Node constructor, you shall assume the Value pointer is valid.
- Parameters
index (int) – index of the dependency to query
- Return type
- value_count() int
Returns the number of dependencies value available.
- Return type
int