robot_designer_plugin.operators.helpers module

class robot_designer_plugin.operators.helpers.AssignObjectBase[source]

Bases: robot_designer_plugin.core.operators.RDOperator

Base class for operators for assigning an object to the currently selected segment segment.

execute(context)

Execute the operator

Parameters

context ('Context') –

Return type

Union[Set[str], Set[int]]

Returns

result * RUNNING_MODAL Running Modal, Keep the operator running with blender. * CANCELLED Cancelled, The operator exited without doing anything, so no undo entry should be pushed. * FINISHED Finished, The operator exited after completing its action. * PASS_THROUGH Pass Through, Do nothing and pass the event on. * INTERFACE Interface, Handled but not executed (popup menus).

classmethod run()[source]

Enables to run an operator by calling its class object. Child classes should override this method with keywords. Then your IDE will be able to assist you The pass_keywords() function makes overriding very convenient (just copy the method’s body):

In addition, this method also does extensive error and exception handling writing everything to the log file (see logfile).

Parameters

kwargs – The keyword arguments passed to the Operator (must match the names of the class’s attributes (only of type :class:`bpy.types.Property).

Returns

The return values of bpy.types.Operator.execute().

class robot_designer_plugin.operators.helpers.AtLeastOneSegmentSelected[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that at least one bone of the active object is selected

Returns

True if the condition is met, else false. String with error message.

class robot_designer_plugin.operators.helpers.ModelSelected[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures the armature is selected.

Returns

True if the condition is met, else false. String with error message.

class robot_designer_plugin.operators.helpers.NotEditMode[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that the edit mode is not selected.

class robot_designer_plugin.operators.helpers.ObjectMode[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that the object mode is selected.

class robot_designer_plugin.operators.helpers.ObjectScaled[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that model has been scaled before the operation.

class robot_designer_plugin.operators.helpers.PoseMode[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that the pose mode is selected.

class robot_designer_plugin.operators.helpers.SelectObjectBase[source]

Bases: robot_designer_plugin.core.operators.RDOperator

Base class for operators for selecting an object (bpy.types.Object) second to the selected model (Blender object with bpy.types.Armature data)

execute(context)

Execute the operator

Parameters

context ('Context') –

Return type

Union[Set[str], Set[int]]

Returns

result * RUNNING_MODAL Running Modal, Keep the operator running with blender. * CANCELLED Cancelled, The operator exited without doing anything, so no undo entry should be pushed. * FINISHED Finished, The operator exited after completing its action. * PASS_THROUGH Pass Through, Do nothing and pass the event on. * INTERFACE Interface, Handled but not executed (popup menus).

object_data_type = 'MESH'
object_name = None
classmethod run(object_name='')[source]

Enables to run an operator by calling its class object. Child classes should override this method with keywords. Then your IDE will be able to assist you The pass_keywords() function makes overriding very convenient (just copy the method’s body):

In addition, this method also does extensive error and exception handling writing everything to the log file (see logfile).

Parameters

kwargs – The keyword arguments passed to the Operator (must match the names of the class’s attributes (only of type :class:`bpy.types.Property).

Returns

The return values of bpy.types.Operator.execute().

class robot_designer_plugin.operators.helpers.SingleCameraSelected[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that a bpy.types.Camera associated object is selected.

class robot_designer_plugin.operators.helpers.SingleMassObjectSelected[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that a bpy.types.Camera associated object is selected.

class robot_designer_plugin.operators.helpers.SingleMeshSelected[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that a single mesh object (i.e., two selected objects where exactly one is a mesh).

Returns

True if the condition is met, else false. String with error message.

class robot_designer_plugin.operators.helpers.SingleSegmentSelected[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that a single mesh object (i.e., two selected objects where exactly one is a mesh).

Returns

True if the condition is met, else false. String with error message.

class robot_designer_plugin.operators.helpers.SingleSensorSelected[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that a single sensor object ist selected.

Returns

True if the condition is met, else false. String with error message.

class robot_designer_plugin.operators.helpers.WorldSelected[source]

Bases: robot_designer_plugin.core.conditions.Condition

static check()[source]

condition that assures that a single world object.

Returns

True if the condition is met, else false. String with error message.