robot_designer_plugin.core.conditions module
This submodule provides the Condition
.
- class robot_designer_plugin.core.conditions.Condition[source]
Bases:
object
Base Class for conditions.
Classes should implement a
check()
method which returns a tuple of (bool,str) stating whether the condition’s are met and an (potentially) empty error message.Using the
operators.RDOperator.Preconditions()
decorator, the conditions that should be met when executing an operator (i.e., a subclass ofoperators.RDOperator
) are added to the classes’ list of preconditions andcheck_conditions()
is called when Blender executes theoperators.RDOperator.poll()
method.Note
Instances of this type should never be created.
For examples see
robot_designer_plugin.operators.helpers.ModelSelected
.