phobos.operators package¶
Submodules¶
phobos.operators.editing module¶
Contains all Blender operators for editing of Phobos models.
-
class
phobos.operators.editing.
AddControllerOperator
¶ Bases:
bpy_types.Operator
Add a controller at the position of the selected object.
-
addToAll
= (<built-in function BoolProperty>, {'name': 'Add to all', 'default': True, 'description': 'Add a controller to all controllable selected objects'})¶
-
bl_idname
= 'phobos.add_controller'¶
-
bl_label
= 'Add Controller'¶
-
bl_options
= {'UNDO'}¶
-
categ
= (<built-in function EnumProperty>, {'items': <function AddControllerOperator.categorylist>, 'description': 'The controller category'})¶
-
categorylist
(context)¶ Create an enum for the controller categories. For phobos preset categories, the phobosIcon is added to the enum.
Parameters: context – Returns:
-
check
(context)¶ Parameters: context – Returns:
-
controllerName
= (<built-in function StringProperty>, {'name': 'Controller name', 'default': 'new_controller', 'description': 'Name of the controller'})¶
-
controllerType
= (<built-in function EnumProperty>, {'items': <function AddControllerOperator.controllerlist>, 'description': 'The controller type'})¶
-
controllerlist
(context)¶ Parameters: context – Returns:
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
AddHeightmapOperator
¶ Bases:
bpy_types.Operator
Add a heightmap object to the 3D-Cursors location
-
bl_idname
= 'phobos.add_heightmap'¶
-
bl_label
= 'Create heightmap'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
cutNo
= (<built-in function IntProperty>, {'name': 'Number of cuts', 'description': 'Number of cuts for subdivision', 'default': 100})¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
filepath
= (<built-in function StringProperty>, {'subtype': 'FILE_PATH'})¶
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
name
= (<built-in function StringProperty>, {'name': 'Name', 'description': 'The name of the new heightmap object', 'default': 'heightmap'})¶
-
strength
= (<built-in function FloatProperty>, {'name': 'Displacement strength', 'description': 'Strength of the displacement effect', 'default': 0.1})¶
-
subsurf
= (<built-in function BoolProperty>, {'name': 'Use subsurf', 'description': 'Use subsurf modifier to smoothen surface', 'default': False})¶
-
subsurflvl
= (<built-in function IntProperty>, {'name': 'Subsurf subdivisions', 'description': 'Number of divisions for subsurf smoothing', 'default': 2})¶
-
-
class
phobos.operators.editing.
AddKinematicChainOperator
¶ Bases:
bpy_types.Operator
Add a kinematic chain between two selected objects
-
bl_idname
= 'phobos.add_kinematic_chain'¶
-
bl_label
= 'Add Kinematic Chain'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
chainname
= (<built-in function StringProperty>, {'name': 'Chain Name', 'default': 'new_chain', 'description': 'Name of the chain to be created'})¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
AddMotorOperator
¶ Bases:
bpy_types.Operator
Add a motor to the selected joint. It is possible to add motors to multiple joints at the same time.
Args:
Returns:
-
addControllers
= (<built-in function BoolProperty>, {'name': 'Add controller', 'default': False, 'description': 'Add the controller object specified in the motor definitions'})¶
-
addToAllJoints
= (<built-in function BoolProperty>, {'name': 'Add to all', 'default': True, 'description': 'Add a motor to all selected joints'})¶
-
bl_idname
= 'phobos.add_motor'¶
-
bl_label
= 'Add Motor'¶
-
bl_options
= {'UNDO'}¶
-
categ
= (<built-in function EnumProperty>, {'items': <function AddMotorOperator.categorylist>, 'description': 'The motor category'})¶
-
categorylist
(context)¶ Create an enum for the motor categories. For phobos preset categories, the phobosIcon is added to the enum.
Parameters: context – Returns:
-
check
(context)¶ Parameters: context – Returns:
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
motorName
= (<built-in function StringProperty>, {'name': 'Motor name', 'default': 'new_motor', 'description': 'Name of the motor'})¶
-
motorType
= (<built-in function EnumProperty>, {'items': <function AddMotorOperator.motorlist>, 'description': 'The motor type'})¶
-
motorlist
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
AddSensorOperator
¶ Bases:
bpy_types.Operator
Add a sensor at the position of the selected object. It is possible to create a new link for the sensor on the fly. Otherwise, the next link in the hierarchy will be used to parent the sensor to.
Args:
Returns:
-
addLink
= (<built-in function BoolProperty>, {'name': 'Add link', 'default': True, 'description': 'Add additional link as sensor mounting'})¶
-
bl_idname
= 'phobos.add_sensor'¶
-
bl_label
= 'Add Sensor'¶
-
bl_options
= {'UNDO'}¶
-
categ
= (<built-in function EnumProperty>, {'items': <function AddSensorOperator.categorylist>, 'description': 'The sensor category'})¶
-
categorylist
(context)¶ Create an enum for the sensor categories. For phobos preset categories, the phobosIcon is added to the enum.
Parameters: context – Returns:
-
check
(context)¶ Parameters: context – Returns:
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
sensorName
= (<built-in function StringProperty>, {'name': 'Sensor name', 'default': 'new_sensor', 'description': 'Name of the sensor'})¶
-
sensorType
= (<built-in function EnumProperty>, {'items': <function AddSensorOperator.sensorlist>, 'description': 'The sensor type'})¶
-
sensorlist
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
AddSubmodel
¶ Bases:
bpy_types.Operator
Add a submodel instance to the scene
-
bl_idname
= 'phobos.add_submodel'¶
-
bl_label
= 'Add submodel'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
check
(context)¶ Parameters: context – Returns:
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ create an instance of the submodel
Parameters: context – Returns:
-
instancename
= (<built-in function StringProperty>, {'name': 'Instance name', 'default': ''})¶
-
invoke
(context, event)¶ Start off the instance numbering based on Blender objects and show a property dialog
Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Hide the operator when no submodels are defined
Parameters: context – Returns:
-
submodelname
= (<built-in function EnumProperty>, {'name': 'Submodel name', 'description': 'Name of the submodel', 'items': <function AddSubmodel.submodelnames>})¶
-
submodelnames
(context)¶ Returns a list of submodels of the chosen type for use as enum
Parameters: context – Returns:
-
submodeltype
= (<built-in function EnumProperty>, {'name': 'Submodel type', 'description': 'Type of the submodel', 'items': <function AddSubmodel.submodeltypes>})¶
-
submodeltypes
(context)¶ Returns a list of submodel types in the scene for use as enum
Parameters: context – Returns:
-
-
class
phobos.operators.editing.
AssignSubmechanism
¶ Bases:
bpy_types.Operator
Assign a submechanism to the model
-
bl_idname
= 'phobos.assign_submechanism'¶
-
bl_label
= 'Assign Submechanism'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
compileSubmechanismTreeEnum
(context)¶ Parameters: context – Returns:
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
isLinearChain
(jointlist)¶ Parameters: jointlist – Returns:
-
joints
= []¶
-
jointtype0
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype1
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype10
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype11
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype12
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype13
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype14
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype15
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype2
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype3
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype4
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype5
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype6
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype7
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype8
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
jointtype9
= (<built-in function EnumProperty>, {'items': <function AssignSubmechanism.compileSubmechanismTreeEnum>})¶
-
linear_chain
= (<built-in function BoolProperty>, {'name': 'Serial Chain', 'default': False})¶
-
mechanism_name
= (<built-in function StringProperty>, {'name': 'Name'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
BatchEditPropertyOperator
¶ Bases:
bpy_types.Operator
Edit custom property of selected object(s)
-
bl_idname
= 'phobos.batch_property'¶
-
bl_label
= 'Edit Custom Property'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
property_name
= (<built-in function StringProperty>, {'name': 'Name', 'default': '', 'description': 'Custom property name'})¶
-
property_value
= (<built-in function StringProperty>, {'name': 'Value', 'default': '', 'description': 'Custom property value'})¶
-
-
class
phobos.operators.editing.
CalculateMassOperator
¶ Bases:
bpy_types.Operator
Display mass of the selected objects in a pop-up window
-
bl_idname
= 'phobos.calculate_mass'¶
-
bl_label
= 'Calculate Mass'¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
mass
= (<built-in function FloatProperty>, {'name': 'Mass', 'default': 0.0, 'description': 'Calculated sum of masses'})¶
-
-
class
phobos.operators.editing.
ConnectInterfacesOperator
¶ Bases:
bpy_types.Operator
Connects submodels at interfaces
-
bl_idname
= 'phobos.connect_interfaces'¶
-
bl_label
= 'Connect Interfaces'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Hide operator if there are more than two objects are selected and the interfaces do not match.
Parameters: context – Returns:
-
-
class
phobos.operators.editing.
CopyCustomProperties
¶ Bases:
bpy_types.Operator
Copy custom properties of selected object(s)
-
bl_idname
= 'phobos.copy_props'¶
-
bl_label
= 'Copy Custom Properties'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
empty_properties
= (<built-in function BoolProperty>, {'name': 'empty', 'default': False, 'description': 'empty properties?'})¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
CreateCollisionObjects
¶ Bases:
bpy_types.Operator
Create collision objects for all selected visual objects
-
bl_idname
= 'phobos.create_collision_objects'¶
-
bl_label
= 'Create Collision Object(s)'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
property_colltype
= (<built-in function EnumProperty>, {'name': 'Collision Type', 'default': 'box', 'description': 'Collision type', 'items': (('box', 'box', 'box'), ('cylinder', 'cylinder', 'cylinder'), ('sphere', 'sphere', 'sphere'), ('mesh', 'mesh', 'mesh'))})¶
-
-
class
phobos.operators.editing.
CreateInterfaceOperator
¶ Bases:
bpy_types.Operator
Create interface and optionally attach to parent
-
all_selected
= (<built-in function BoolProperty>, {'name': 'all selected', 'default': False})¶
-
bl_idname
= 'phobos.create_interface'¶
-
bl_label
= 'Create Interface'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
interface_direction
= (<built-in function EnumProperty>, {'name': 'direction', 'items': <generator object compileEnumPropertyList.<locals>.<genexpr>>, 'default': 'outgoing'})¶
-
interface_name
= (<built-in function StringProperty>, {'name': 'name', 'default': 'interface'})¶
-
interface_type
= (<built-in function StringProperty>, {'name': 'type', 'default': 'default'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
scale
= (<built-in function FloatProperty>, {'name': 'scale', 'default': 1.0})¶
-
-
class
phobos.operators.editing.
CreateLinksOperator
¶ Bases:
bpy_types.Operator
Create link(s), optionally based on existing objects
-
bl_idname
= 'phobos.create_links'¶
-
bl_label
= 'Create Link(s)'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
linkname
= (<built-in function StringProperty>, {'name': 'Link Name', 'description': 'A name for a single newly created link.', 'default': 'new_link'})¶
-
location
= (<built-in function EnumProperty>, {'items': (('3D cursor', '3D cursor', '3D cursor'), ('selected objects', 'selected objects', 'selected objects')), 'default': '3D cursor', 'name': 'Location', 'description': 'Where to create new link(s)?'})¶
-
nameformat
= (<built-in function StringProperty>, {'name': 'Name Format', 'description': "Provide a string containing {0} {1} etc. to reuse parts of objects' names.", 'default': ''})¶
-
parent_link
= (<built-in function BoolProperty>, {'name': 'Parent Link', 'default': False, 'description': "Parent link to object's parents"})¶
-
parent_objects
= (<built-in function BoolProperty>, {'name': 'Parent Objects', 'default': False, 'description': 'Parent children of object to new link'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
size
= (<built-in function FloatProperty>, {'name': 'Visual Size', 'default': 1.0, 'description': 'Size of the created link'})¶
-
-
class
phobos.operators.editing.
CreateMimicJointOperator
¶ Bases:
bpy_types.Operator
Make a number of joints follow a specified joint
-
bl_idname
= 'phobos.create_mimic_joint'¶
-
bl_label
= 'Mimic Joint'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
mimicjoint
= (<built-in function BoolProperty>, {'name': 'Mimic Joint', 'default': True, 'description': 'Create joint mimicry'})¶
-
mimicmotor
= (<built-in function BoolProperty>, {'name': 'Mimic Motor', 'default': False, 'description': 'Create motor mimicry'})¶
-
multiplier
= (<built-in function FloatProperty>, {'name': 'Multiplier', 'default': 1.0, 'description': 'Multiplier for joint mimicry'})¶
-
offset
= (<built-in function FloatProperty>, {'name': 'Offset', 'default': 0.0, 'description': 'Offset for joint mimicry'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
DefineJointConstraintsOperator
¶ Bases:
bpy_types.Operator
Add bone constraints to the joint (link)
-
bl_idname
= 'phobos.define_joint_constraints'¶
-
bl_label
= 'Define Joint(s)'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
damping
= (<built-in function FloatProperty>, {'name': 'Damping Constant', 'default': 0.0, 'description': 'Damping constant of the joint'})¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
joint_type
= (<built-in function EnumProperty>, {'name': 'Joint Type', 'default': 'revolute', 'description': 'Type of the joint', 'items': (('revolute', 'revolute', 'revolute'), ('continuous', 'continuous', 'continuous'), ('prismatic', 'prismatic', 'prismatic'), ('fixed', 'fixed', 'fixed'), ('floating', 'floating', 'floating'), ('planar', 'planar', 'planar'))})¶
-
lower
= (<built-in function FloatProperty>, {'name': 'Lower', 'default': 0.0, 'description': 'Lower constraint of the joint'})¶
-
maxeffort
= (<built-in function FloatProperty>, {'name': 'Max Effort (N or Nm)', 'default': 0.0, 'description': 'Maximum effort of the joint'})¶
-
maxvelocity
= (<built-in function FloatProperty>, {'name': 'Max Velocity (m/s or rad/s)', 'default': 0.0, 'description': 'Maximum velocity of the joint. If you uncheck radian, you can enter °/sec here'})¶
-
passive
= (<built-in function BoolProperty>, {'name': 'Passive', 'default': False, 'description': 'Make the joint passive (no actuation)'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
spring
= (<built-in function FloatProperty>, {'name': 'Spring Constant', 'default': 0.0, 'description': 'Spring constant of the joint'})¶
-
upper
= (<built-in function FloatProperty>, {'name': 'Upper', 'default': 0.0, 'description': 'Upper constraint of the joint'})¶
-
useRadian
= (<built-in function BoolProperty>, {'name': 'Use Radian', 'default': True, 'description': 'Use degrees or rad for joints'})¶
-
-
class
phobos.operators.editing.
DefineSubmodel
¶ Bases:
bpy_types.Operator
Define a new submodel from objects
-
bl_idname
= 'phobos.define_submodel'¶
-
bl_label
= 'Define Submodel'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Create a submodel based on selected objects
Parameters: context – Returns:
-
invoke
(context, event)¶ Show a property dialog
Parameters: - context –
- event –
Returns:
-
submodelname
= (<built-in function StringProperty>, {'name': 'Submodel name', 'description': 'Name of the submodel', 'default': 'newsubmodel'})¶
-
submodeltype
= (<built-in function EnumProperty>, {'items': (('mechanism', 'mechanism', 'mechanism'),), 'name': 'Submodel type', 'default': 'mechanism', 'description': 'The type for the new submodel'})¶
-
version
= (<built-in function StringProperty>, {'name': 'Version name', 'description': 'Name of the submodel version', 'default': '1.0'})¶
-
-
class
phobos.operators.editing.
DeleteSubmechanism
¶ Bases:
bpy_types.Operator
Delete an existing submechanism
-
bl_idname
= 'phobos.delete_submechanism'¶
-
bl_label
= 'Delete Submechanism'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
get_submechanism_roots
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
submechanism
= (<built-in function EnumProperty>, {'name': 'Submechanism', 'description': 'submechanism to remove', 'items': <function DeleteSubmechanism.get_submechanism_roots>})¶
-
-
class
phobos.operators.editing.
DisconnectInterfaceOperator
¶ Bases:
bpy_types.Operator
Disconnects submodels at interface
-
bl_idname
= 'phobos.disconnect_interface'¶
-
bl_label
= 'Disconnect Interface'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Execute disconnection
Parameters: context – Returns:
-
classmethod
poll
(context)¶ Hide operator if there is more than one object selected. Also, the selected object has to be a connected interface.
Parameters: context – Returns:
-
-
class
phobos.operators.editing.
DissolveLink
¶ Bases:
bpy_types.Operator
Dissolve a link and parent all children of type link, inertia, visual and collision to its effective parent
-
bl_idname
= 'phobos.dissolve_link'¶
-
bl_label
= 'Dissolve Link(s)'¶
-
bl_options
= {'UNDO'}¶
-
check
(context)¶ Parameters: context – Returns:
-
delete
= (<built-in function BoolProperty>, {'name': 'Delete Other', 'default': False, 'description': 'Delete all non reparented children'})¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
EditInertialData
¶ Bases:
bpy_types.Operator
Edit mass/inertia of selected object(s)
-
bl_idname
= 'phobos.edit_inertial_data'¶
-
bl_label
= 'Edit Mass/Inertia'¶
-
bl_options
= {'UNDO'}¶
-
changeInertia
= (<built-in function BoolProperty>, {'name': 'Change inertia', 'default': True, 'description': 'Change inertia values'})¶
-
changeMass
= (<built-in function BoolProperty>, {'name': 'Change mass', 'default': True, 'description': 'Change mass values'})¶
-
check
(context)¶ Parameters: context – Returns:
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
inertiavector
= (<built-in function FloatVectorProperty>, {'name': 'Inertia Vector', 'default': [0.001, 0.001, 0.001, 0.001, 0.001, 0.001], 'subtype': 'NONE', 'precision': 10, 'size': 6, 'description': 'New inertia values for the inertial objects'})¶
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
mass
= (<built-in function FloatProperty>, {'name': 'Mass', 'default': 0.001, 'description': 'New mass for the inertial objects (in kg)', 'precision': 10})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
EditYAMLDictionary
¶ Bases:
bpy_types.Operator
Edit object dictionary as YAML
-
bl_idname
= 'phobos.edityamldictionary'¶
-
bl_label
= 'Edit Object Dictionary'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
GenerateInertialObjectsOperator
¶ Bases:
bpy_types.Operator
Creates inertial object(s) to add mass and inertia data to links
-
bl_idname
= 'phobos.generate_inertial_objects'¶
-
bl_label
= 'Create Inertials'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
clear
= (<built-in function BoolProperty>, {'name': 'Clear existing inertial objects', 'default': True, 'description': 'Clear existing inertial objects of selected links.'})¶
-
collisions
= (<built-in function BoolProperty>, {'name': 'collision', 'default': True, 'description': 'Use the selected visual objects for inertial creation.'})¶
-
derive_inertia_from_geometry
= (<built-in function BoolProperty>, {'name': 'Calculate inertia from geometry ', 'default': True, 'description': 'Derive inertia value(s) from geometry of visual or collision objects.'})¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
mass
= (<built-in function FloatProperty>, {'name': 'Mass', 'default': 0.001, 'description': 'Mass (of active object) in kg'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
visuals
= (<built-in function BoolProperty>, {'name': 'visual', 'default': True, 'description': 'Use the selected visual objects for inertial creation.'})¶
-
-
class
phobos.operators.editing.
MeasureDistanceOperator
¶ Bases:
bpy_types.Operator
Show distance between two selected objects in world coordinates
-
bl_idname
= 'phobos.measure_distance'¶
-
bl_label
= 'Measure Distance'¶
-
bl_options
= {'REGISTER'}¶
-
distVector
= (<built-in function FloatVectorProperty>, {'name': 'Distance Vector', 'default': (0.0, 0.0, 0.0), 'subtype': 'TRANSLATION', 'unit': 'LENGTH', 'size': 3, 'precision': 6, 'description': 'Distance vector between objects'})¶
-
distance
= (<built-in function FloatProperty>, {'name': 'Distance', 'default': 0.0, 'subtype': 'DISTANCE', 'unit': 'LENGTH', 'precision': 6, 'description': 'Distance between objects'})¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
MergeLinks
¶ Bases:
bpy_types.Operator
Merge links
-
bl_idname
= 'phobos.merge_links'¶
-
bl_label
= 'Merge Links'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
movetotarget
= (<built-in function BoolProperty>, {'name': 'move to target', 'default': False})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
MoveToSceneOperator
¶ Bases:
bpy_types.Operator
Moves all selected objects to (new) scene
-
bl_idname
= 'phobos.move_to_scene'¶
-
bl_label
= 'Move To Scene'¶
-
bl_options
= {'UNDO'}¶
-
check
(context)¶ Parameters: context – Returns:
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
getSceneEnumProperty
(context)¶ Parameters: context – Returns:
-
init
= (<built-in function BoolProperty>, {'name': 'Link current scene', 'default': True, 'description': 'Link all unselected objects from the current scene'})¶
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
link_material
= (<built-in function BoolProperty>, {'name': 'Link material data', 'default': True, 'description': 'Link material data to new objects'})¶
-
link_obdata
= (<built-in function BoolProperty>, {'name': 'Link mesh data', 'default': True, 'description': 'Link mesh data to new objects'})¶
-
link_texture
= (<built-in function BoolProperty>, {'name': 'Link texture data', 'default': True, 'description': 'Link texture data to new objects'})¶
-
new
= (<built-in function BoolProperty>, {'name': 'New', 'default': True, 'description': 'Create new scene for configuration'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
remove
= (<built-in function BoolProperty>, {'name': 'Remove selected', 'default': False, 'description': 'Remove selected objects from active scene'})¶
-
scene
= (<built-in function EnumProperty>, {'name': 'Scene', 'items': <function MoveToSceneOperator.getSceneEnumProperty>, 'description': 'List of available scenes'})¶
-
scenename
= (<built-in function StringProperty>, {'name': 'Scene Name', 'default': 'new', 'description': 'Name of the scene to which to add selection'})¶
-
truecopy
= (<built-in function BoolProperty>, {'name': 'Copy selected', 'default': False, 'description': 'Copy selected objects from active scene'})¶
-
-
class
phobos.operators.editing.
RenameCustomProperty
¶ Bases:
bpy_types.Operator
Rename custom property of selected object(s)
-
bl_idname
= 'phobos.rename_custom_property'¶
-
bl_label
= 'Rename Custom Property'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
find
= (<built-in function StringProperty>, {'name': 'Find Property Name', 'default': '', 'description': 'Name to be searched for'})¶
-
overwrite
= (<built-in function BoolProperty>, {'name': 'Overwrite Existing Properties', 'default': False, 'description': 'If a property of the specified replacement name exists, overwrite it?'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
replace
= (<built-in function StringProperty>, {'name': 'Replacement Name', 'default': '', 'description': 'New name to be replaced with'})¶
-
-
class
phobos.operators.editing.
SafelyRemoveObjectsFromSceneOperator
¶ Bases:
bpy_types.Operator
Removes all selected objects from scene, warning if they are deleted
-
bl_idname
= 'phobos.safely_remove_objects_from_scene'¶
-
bl_label
= 'Safely Remove Objects From Scene'¶
-
bl_options
= {'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
SelectSubmechanism
¶ Bases:
bpy_types.Operator
Select all objects of a submechanism
-
bl_idname
= 'phobos.select_submechanism'¶
-
bl_label
= 'Select Submechanism'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
get_submechanism_roots
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
submechanism
= (<built-in function EnumProperty>, {'name': 'Submechanism', 'description': 'submechanism which to select', 'items': <function SelectSubmechanism.get_submechanism_roots>})¶
-
-
class
phobos.operators.editing.
SetCollisionGroupOperator
¶ Bases:
bpy_types.Operator
Set the collision groups of the selected collision object(s)
-
bl_idname
= 'phobos.set_collision_group'¶
-
bl_label
= 'Set Collision Group(s)'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
groups
= (<built-in function BoolVectorProperty>, {'name': 'Collision Groups', 'size': 20, 'subtype': 'LAYER', 'default': (False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False), 'description': 'Collision groups'})¶
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
SetGeometryType
¶ Bases:
bpy_types.Operator
Edit geometry type of selected object(s)
-
bl_idname
= 'phobos.define_geometry'¶
-
bl_label
= 'Define Geometry'¶
-
bl_options
= {'UNDO'}¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
geomType
= (<built-in function EnumProperty>, {'items': (('box', 'box', 'box'), ('cylinder', 'cylinder', 'cylinder'), ('sphere', 'sphere', 'sphere'), ('mesh', 'mesh', 'mesh')), 'name': 'Type', 'default': 'box', 'description': 'Phobos geometry type'})¶
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
SetModelRoot
¶ Bases:
bpy_types.Operator
Set Model Root
-
bl_idname
= 'phobos.set_model_root'¶
-
bl_label
= 'Set Model Root'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
SetPhobosType
¶ Bases:
bpy_types.Operator
Change phobostype of selected object(s)
-
bl_idname
= 'phobos.set_phobostype'¶
-
bl_label
= 'Set Phobostype'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Change phobostype of all selected objects.
Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
phobostype
= (<built-in function EnumProperty>, {'items': (('undefined', 'undefined', 'undefined'), ('link', 'link', 'link'), ('inertial', 'inertial', 'inertial'), ('visual', 'visual', 'visual'), ('collision', 'collision', 'collision'), ('sensor', 'sensor', 'sensor'), ('motor', 'motor', 'motor'), ('controller', 'controller', 'controller'), ('approxsphere', 'approxsphere', 'approxsphere'), ('light', 'light', 'light'), ('entity', 'entity', 'entity'), ('frame', 'frame', 'frame'), ('interface', 'interface', 'interface'), ('submodel', 'submodel', 'submodel'), ('annotation', 'annotation', 'annotation')), 'name': 'Phobostype', 'default': 'undefined', 'description': 'Phobostype'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
SetXRayOperator
¶ Bases:
bpy_types.Operator
Show the selected/chosen objects via X-ray
-
bl_idname
= 'phobos.set_xray'¶
-
bl_label
= 'X-Ray Vision'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
namepart
= (<built-in function StringProperty>, {'name': 'Name Contains', 'default': '', 'description': "Part of a name for objects to be selected in 'by name' mode"})¶
-
objects
= (<built-in function EnumProperty>, {'name': 'Objects', 'default': 'selected', 'items': (('all', 'all', 'all'), ('selected', 'selected', 'selected'), ('by name', 'by name', 'by name'), ('undefined', 'undefined', 'undefined'), ('link', 'link', 'link'), ('inertial', 'inertial', 'inertial'), ('visual', 'visual', 'visual'), ('collision', 'collision', 'collision'), ('sensor', 'sensor', 'sensor'), ('motor', 'motor', 'motor'), ('controller', 'controller', 'controller'), ('approxsphere', 'approxsphere', 'approxsphere'), ('light', 'light', 'light'), ('entity', 'entity', 'entity'), ('frame', 'frame', 'frame'), ('interface', 'interface', 'interface'), ('submodel', 'submodel', 'submodel'), ('annotation', 'annotation', 'annotation')), 'description': 'Show objects via x-ray'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
show
= (<built-in function BoolProperty>, {'name': 'Enable X-Ray', 'default': True, 'description': 'Enable or disable X-Ray'})¶
-
-
class
phobos.operators.editing.
SmoothenSurfaceOperator
¶ Bases:
bpy_types.Operator
Smoothen surface of selected objects
-
bl_idname
= 'phobos.smoothen_surface'¶
-
bl_label
= 'Smoothen Surface'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
SortObjectsToLayersOperator
¶ Bases:
bpy_types.Operator
Sort all selected objects to their according layers
-
bl_idname
= 'phobos.sort_objects_to_layers'¶
-
bl_label
= 'Sort Objects to Layers'¶
-
bl_options
= {'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.editing.
ToggleInterfaces
¶ Bases:
bpy_types.Operator
Toggle interfaces of a submodel
-
bl_idname
= 'phobos.toggle_interfaces'¶
-
bl_label
= 'Toggle Interfaces'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
mode
= (<built-in function EnumProperty>, {'name': 'Toggle mode', 'description': 'The mode in which to display the interfaces', 'items': (('toggle', 'toggle', 'toggle'), ('activate', 'activate', 'activate'), ('deactivate', 'deactivate', 'deactivate'))})¶
-
-
class
phobos.operators.editing.
ValidateOperator
¶ Bases:
bpy_types.Operator
Check the robot dictionary
-
bl_idname
= 'phobos.validate'¶
-
bl_label
= 'Validate'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
-
phobos.operators.editing.
addControllerFromYaml
(controller_dict, annotations, selected_objs, active_obj, *args)¶ Execution function for the temporary operator to add controllers from yaml files.
The specified parameters match the interface of the addObjectFromYaml generic function.
Parameters: - controller_dict (dict) – phobos representation of a controller
- annotations (dict) – annotation dictionary containing annotation categories as keys
- selected_objs (list(bpy.types.Object) – selected objects in the current context
- active_obj (bpy.types.Object) – active object in the current context
- *args (list) – empty list
Returns: tuple of lists of new motor, new controller and new annotation objects
Return type: tuple
-
phobos.operators.editing.
addMotorFromYaml
(motor_dict, annotations, selected_objs, active_obj, *args)¶ Execution function for the temporary operator to add motors from yaml files.
The specified parameters match the interface of the addObjectFromYaml generic function.
As additional argument, a boolean value is required. It controls whether the specified motor will be added to all selected joints (True) or to the active object only (False).
Parameters: - motor_dict (dict) – phobos representation of a motor
- annotations (dict) – annotation dictionary containing annotation categories as keys
- selected_objs (list(bpy.types.Object) – selected objects in the current context
- active_obj (bpy.types.Object) – active object in the current context
- *args (list) – list containing a single bool value
Returns: lists of new motor, new annotation and controller objects
Return type: tuple
-
phobos.operators.editing.
addSensorFromYaml
(sensor_dict, annotations, selected_objs, active_obj, *args)¶ Execution function for the temporary operator to add sensors from yaml files.
The specified parameters match the interface of the addObjectFromYaml generic function.
As additional argument, a boolean value is required. It controls whether the specified sensor will be added to a new link (True) or not (False).
Parameters: - sensor_dict (dict) – phobos representation of a sensor
- annotations (dict) – annotation dictionary containing annotation categories as keys
- selected_objs (list(bpy.types.Object) – selected objects in the current context
- active_obj (bpy.types.Object) – active object in the current context
- *args (list) – list containing a single bool value
Returns: lists of new sensor, new annotation objects and empty list
Return type: tuple
-
phobos.operators.editing.
getControllerParameters
(name)¶ Returns the controller parameters for the controller type with the provided name.
Parameters: name (str) – the name of the controller type. Returns:
-
phobos.operators.editing.
getDefaultControllerParameters
(scene, context)¶ Returns the default controller parameters for the controller of the active object.
Parameters: - scene –
- context –
Returns:
-
phobos.operators.editing.
register
()¶ TODO Missing documentation
-
phobos.operators.editing.
unregister
()¶ TODO Missing documentation
phobos.operators.generic module¶
Contains the generic Blender operators for adding yaml parsed objects and similar.
-
class
phobos.operators.generic.
AddAnnotationsOperator
¶ Bases:
bpy_types.Operator
Add annotations defined by the Phobos definitions
-
annotation_data
= (<built-in function CollectionProperty>, {'type': <class 'phobos.operators.generic.DynamicProperty'>})¶
-
annotationcategories
= (<built-in function EnumProperty>, {'items': <function AddAnnotationsOperator.getAnnotationCategories>, 'name': 'Categories', 'description': 'Categories of this annotation type.'})¶
-
annotationtype
= (<built-in function EnumProperty>, {'items': <function AddAnnotationsOperator.getAnnotationTypes>, 'name': 'Annotation Type', 'description': 'Annotation Types'})¶
-
asObject
= (<built-in function BoolProperty>, {'name': 'Add as objects', 'description': 'Add annotation as object(s)', 'default': True})¶
-
bl_idname
= 'phobos.add_annotations'¶
-
bl_label
= 'Add Annotations'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
bl_region_type
= 'FILE'¶
-
bl_space_type
= 'VIEW_3D'¶
-
check
(context)¶ Parameters: context – Returns:
-
devicetype
= (<built-in function EnumProperty>, {'items': <function AddAnnotationsOperator.getDeviceTypes>, 'name': 'Device Type', 'description': 'Device Types'})¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
getAnnotationCategories
(context)¶ Parameters: context – Returns:
-
getAnnotationTypes
(context)¶ Parameters: context – Returns:
-
getDeviceTypes
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.generic.
DynamicProperty
¶ Bases:
bpy_types.PropertyGroup
A support class to handle dynamic properties in a temporary operator.
-
assignDict
(dictionary, ignore=[])¶ Parameters: - addfunc –
- dictionary –
- ignore – (Default value = [])
Returns:
-
assignValue
(name, value)¶ Parameters: - name –
- value –
Returns:
-
boolProp
= (<built-in function BoolProperty>, {})¶
-
draw
(layout, name)¶ Parameters: - layout –
- name –
Returns:
-
floatProp
= (<built-in function FloatProperty>, {})¶
-
intProp
= (<built-in function IntProperty>, {})¶
-
name
= (<built-in function StringProperty>, {})¶
-
stringProp
= (<built-in function StringProperty>, {})¶
-
-
phobos.operators.generic.
addObjectFromYaml
(name, phobtype, presetname, execute_func, *args, hideprops=[])¶ This registers a temporary Operator. The data for the properties is provided by the parsed yaml files of the specified phobostype. The operator then adds an object and writes the information to custom properties. The name is changed to fit the blender format of name1_name2_name3.
Parameters: - name –
- phobtype –
- presetname –
- execute_func –
- *args –
- hideprops – (Default value = [])
Returns:
-
phobos.operators.generic.
linkObjectLists
(annotation, objectlist)¶ Recursively adds the objects of the specified list to an annotation dictionary.
Wherever the keyword “$selected_objects:phobostype1:phobostype2” is found as a value in the annotation dictionary, the value is replaced by a list of tuples:
(phobostype, object)These tuples represent each an object from the specified objectlist. ‘joint’ is in this case considered a phobostype.
An arbitrary number of phobostypes can be provided. The rest of the annotation dictionary remains untouched.
Parameters: - annotation (dict) – annotation dictionary
- objectlist (list(bpy.types.Object) – objects to add to the annotation
Returns: dict – annotation dictionary with inserted object dictionaries
-
phobos.operators.generic.
register
()¶ TODO Missing documentation
-
phobos.operators.generic.
unregister
()¶ TODO Missing documentation
phobos.operators.io module¶
Contains all Blender operators for import and export of models/files.
-
class
phobos.operators.io.
CreateRobotInstance
¶ Bases:
bpy_types.Operator
Create a new instance of the selected robot lib entry
-
bakeObj
= (<built-in function EnumProperty>, {'name': 'Robot Lib Entries', 'items': <function generateLibEntries>, 'description': 'The robot lib entries'})¶
-
bl_idname
= 'phobos.create_robot_instance'¶
-
bl_label
= 'Create Robot Instance'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
robName
= (<built-in function StringProperty>, {'name': 'Instance Name', 'default': 'instance', 'description': "The instance's name"})¶
-
-
class
phobos.operators.io.
ExportAllPosesOperator
¶ Bases:
bpy_types.Operator
Bake the selected model
-
bl_idname
= 'phobos.export_all_poses'¶
-
bl_label
= 'Export All Poses'¶
-
check
(context)¶ Parameters: context – Returns:
-
decimate_angle_limit
= (<built-in function FloatProperty>, {'name': 'Angle Limit', 'default': 5})¶
-
decimate_iteration
= (<built-in function IntProperty>, {'name': 'Iterations', 'default': 1})¶
-
decimate_ratio
= (<built-in function FloatProperty>, {'name': 'Ratio', 'default': 0.15})¶
-
decimate_type
= (<built-in function EnumProperty>, {'name': 'Decimate Type', 'items': [('COLLAPSE', 'Collapse', 'COLLAPSE'), ('UNSUBDIV', 'Un-Subdivide', 'UNSUBDIV'), ('DISSOLVE', 'Planar', 'DISSOLVE')]})¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.io.
ExportCurrentPoseOperator
¶ Bases:
bpy_types.Operator
Bake the selected model
-
bl_idname
= 'phobos.export_current_poses'¶
-
bl_label
= 'Export Selected Pose'¶
-
check
(context)¶ Parameters: context – Returns:
-
decimate_angle_limit
= (<built-in function FloatProperty>, {'name': 'Angle Limit', 'default': 5})¶
-
decimate_iteration
= (<built-in function IntProperty>, {'name': 'Iterations', 'default': 1})¶
-
decimate_ratio
= (<built-in function FloatProperty>, {'name': 'Ratio', 'default': 0.15})¶
-
decimate_type
= (<built-in function EnumProperty>, {'name': 'Decimate Type', 'items': [('COLLAPSE', 'Collapse', 'COLLAPSE'), ('UNSUBDIV', 'Un-Subdivide', 'UNSUBDIV'), ('DISSOLVE', 'Planar', 'DISSOLVE')]})¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.io.
ExportModelOperator
¶ Bases:
bpy_types.Operator
Export the selected model
-
bl_idname
= 'phobos.export_model'¶
-
bl_label
= 'Export Model'¶
-
bl_options
= {'REGISTER'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
exportall
= (<built-in function BoolProperty>, {'default': False, 'name': 'Export all', 'description': 'Export all (selected) models in the scene.'})¶
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
modelname
= (<built-in function EnumProperty>, {'items': <function getModelListForEnumProp>, 'name': 'Model', 'description': 'Model to export'})¶
-
-
class
phobos.operators.io.
ExportSceneOperator
¶ Bases:
bpy_types.Operator
Export the selected model(s) in a scene
-
bl_idname
= 'phobos.export_scene'¶
-
bl_label
= 'Export Scene'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
exportModels
= (<built-in function BoolProperty>, {'name': 'Export models in scene'})¶
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
sceneName
= (<built-in function StringProperty>, {'name': 'Scene name'})¶
-
-
class
phobos.operators.io.
ImportLibRobot
¶ Bases:
bpy_types.Operator
Import a baked robot into the robot library
-
bl_idname
= 'phobos.import_lib_robot'¶
-
bl_label
= 'Import Baked Robot'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
filepath
= (<built-in function StringProperty>, {'subtype': 'FILE_PATH'})¶
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
-
class
phobos.operators.io.
ImportModelOperator
¶ Bases:
bpy_types.Operator
Import robot model file from various formats
-
bl_idname
= 'phobos.import_robot_model'¶
-
bl_label
= 'Import Robot Model'¶
-
bl_region_type
= 'FILE'¶
-
bl_space_type
= 'VIEW_3D'¶
-
entitytype
= (<built-in function EnumProperty>, {'name': 'Entity type', 'items': (('urdf', 'urdf', "file extensions: ('urdf', 'xml')"), ('sdf', 'sdf', "file extensions: ('sdf', 'xml')")), 'description': 'Type of entity to import from file'})¶
-
execute
(context)¶ Parameters: context – Returns:
-
filepath
= (<built-in function StringProperty>, {'subtype': 'FILE_PATH'})¶
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.io.
ImportSelectedLibRobot
¶ Bases:
bpy_types.Operator
Import a baked robot into the robot library
-
bl_idname
= 'scene.phobos_import_selected_lib_robot'¶
-
bl_label
= 'Import Baked Robot'¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
obj_name
= (<built-in function StringProperty>, {'name': 'New Smurf Entity Name', 'default': 'New Robot', 'description': 'Name of new Smurf Entity'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.io.
ReloadModelsAndPosesOperator
¶ Bases:
bpy_types.Operator
Tooltip
-
bl_idname
= 'scene.reload_models_and_poses_operator'¶
-
bl_label
= 'Reload Models and Poses'¶
-
execute
(context)¶ Parameters: context – Returns:
-
-
phobos.operators.io.
generateLibEntries
(param1, param2)¶ Parameters: - param1 –
- param2 –
Returns:
-
phobos.operators.io.
loadModelsAndPoses
()¶ TODO Missing documentation
-
phobos.operators.io.
register
()¶ TODO Missing documentation
-
phobos.operators.io.
unregister
()¶ TODO Missing documentation
phobos.operators.naming module¶
Contains all Blender operators for naming of models/objects/properties.
-
class
phobos.operators.naming.
BatchRename
¶ Bases:
bpy_types.Operator
Replace part of the name of selected object(s)
-
add
= (<built-in function StringProperty>, {'name': 'Add/Embed:', 'default': '*', 'description': "Add any string by representing the old name with '*'."})¶
-
bl_idname
= 'phobos.batch_rename'¶
-
bl_label
= 'Batch Rename'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
find
= (<built-in function StringProperty>, {'name': 'Find:', 'default': '', 'description': 'A string to be replaced.'})¶
-
include_properties
= (<built-in function BoolProperty>, {'name': 'Include Properties', 'default': False, 'description': "Replace names stored in '*/name' properties?"})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
replace
= (<built-in function StringProperty>, {'name': 'Replace:', 'default': '', 'description': "A string to replace the 'Find' string."})¶
-
-
class
phobos.operators.naming.
ChangeObjectName
¶ Bases:
bpy_types.Operator
Changes the name of the object
-
bl_idname
= 'phobos.change_object_name'¶
-
bl_label
= 'Change Object Name'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
draw
(context)¶ Parameters: context – Returns:
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
jointname
= (<built-in function StringProperty>, {'name': 'Joint name', 'description': 'Name of the joint', 'default': ''})¶
-
newname
= (<built-in function StringProperty>, {'name': 'New name', 'description': 'New name of the object', 'default': ''})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.naming.
FixObjectNames
¶ Bases:
bpy_types.Operator
Cleans up the redundant names of the active object
-
bl_idname
= 'phobos.fix_object_names'¶
-
bl_label
= 'Rename Object'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.naming.
NameModelOperator
¶ Bases:
bpy_types.Operator
Name model by assigning ‘modelname’ property to root node
-
bl_idname
= 'phobos.name_model'¶
-
bl_label
= 'Name Model'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
modelname
= (<built-in function StringProperty>, {'name': 'Model Name', 'default': '', 'description': 'Name of the robot model to be assigned'})¶
-
-
class
phobos.operators.naming.
SetModelVersionOperator
¶ Bases:
bpy_types.Operator
Set model version by assigning ‘version’ property to root node
-
bl_idname
= 'phobos.set_version'¶
-
bl_label
= 'Set Model Version'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
usegitbranch
= (<built-in function BoolProperty>, {'name': 'Use Git branch name', 'default': False, 'description': 'Insert Git branch name in place of *?'})¶
-
version
= (<built-in function StringProperty>, {'name': 'Version', 'default': '', 'description': 'Version of the model to be assigned'})¶
-
-
class
phobos.operators.naming.
ToggleNamespaces
¶ Bases:
bpy_types.Operator
Toggle the use of namespaces for the selected objects
-
bl_idname
= 'phobos.toggle_namespaces'¶
-
bl_label
= 'Toggle Namespaces'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
complete
= (<built-in function BoolProperty>, {'name': 'Convert Complete Robot', 'default': False, 'description': 'Convert the complete robot'})¶
-
execute
(context)¶ Parameters: context – Returns:
-
namespace
= (<built-in function StringProperty>, {})¶
-
-
phobos.operators.naming.
register
()¶ TODO Missing documentation
-
phobos.operators.naming.
unregister
()¶ TODO Missing documentation
phobos.operators.poses module¶
Contains the Blender operators used to edit/add poses for Phobos models.
-
class
phobos.operators.poses.
ChangePreviewOperator
¶ Bases:
bpy_types.Operator
TODO Missing documentation
-
bl_idname
= 'scene.change_preview'¶
-
bl_label
= 'Change the preview texture'¶
-
execute
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.poses.
DrawPreviewOperator
¶ Bases:
bpy_types.Operator
TODO Missing documentation
-
bl_idname
= 'view3d.draw_preview_operator'¶
-
bl_label
= 'Draw preview to the View3D'¶
-
execute
(context)¶ Parameters: context – Returns:
-
modal
(context, event)¶ Parameters: - context –
- event –
Returns:
-
-
class
phobos.operators.poses.
LoadPoseOperator
¶ Bases:
bpy_types.Operator
Load a previously stored pose for one of the scene’s robots
-
bl_idname
= 'phobos.load_pose'¶
-
bl_label
= 'Load Pose'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
pose_name
= (<built-in function EnumProperty>, {'items': <function get_pose_names>, 'name': 'Pose Name', 'description': 'Name of pose to load'})¶
-
robot_name
= (<built-in function EnumProperty>, {'items': <function get_robot_names>, 'name': 'Robot Name', 'description': 'Robot to load a pose for'})¶
-
-
class
phobos.operators.poses.
StorePoseOperator
¶ Bases:
bpy_types.Operator
Store the current pose of selected links in one of the scene’s robots
-
bl_idname
= 'phobos.store_pose'¶
-
bl_label
= 'Store Current Pose'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
pose_name
= (<built-in function StringProperty>, {'name': 'Pose Name', 'default': 'New Pose', 'description': 'Name of new pose'})¶
-
robot_name
= (<built-in function EnumProperty>, {'items': <function get_robot_names>, 'name': 'Robot', 'description': 'Robot to store pose for'})¶
-
-
phobos.operators.poses.
draw_preview_callback
(self)¶ TODO Missing documentation
-
phobos.operators.poses.
get_pose_names
(scene, context)¶ Parameters: - scene –
- context –
Returns:
-
phobos.operators.poses.
get_robot_names
(scene, context)¶ Parameters: - scene –
- context –
Returns:
-
phobos.operators.poses.
register
()¶ TODO Missing documentation
-
phobos.operators.poses.
unregister
()¶ TODO Missing documentation
phobos.operators.selection module¶
Contains all Blender operators used to select objects by different criteria.
-
class
phobos.operators.selection.
GotoObjectOperator
¶ Bases:
bpy_types.Operator
Selection operator for buttons to jump to the specified object
-
bl_idname
= 'phobos.goto_object'¶
-
bl_label
= 'Goto Object'¶
-
bl_options
= {'INTERNAL', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
objectname
= (<built-in function StringProperty>, {'name': 'Object Name', 'default': '', 'description': 'The name of the object to jump to'})¶
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
class
phobos.operators.selection.
SelectModelOperator
¶ Bases:
bpy_types.Operator
Select all objects of model(s) containing the currently selected object(s)
-
bl_idname
= 'phobos.select_model'¶
-
bl_label
= 'Select Model'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
modelname
= (<built-in function StringProperty>, {'name': 'Model Name', 'default': '', 'description': 'Name of the model to be selected'})¶
-
-
class
phobos.operators.selection.
SelectObjectsByName
¶ Bases:
bpy_types.Operator
Select objects in the scene by their name
-
bl_idname
= 'phobos.select_objects_by_name'¶
-
bl_label
= 'Select by Name'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
namefragment
= (<built-in function StringProperty>, {'name': 'Name Contains', 'default': '', 'description': 'Part of a Phobos object name'})¶
-
-
class
phobos.operators.selection.
SelectObjectsByPhobosType
¶ Bases:
bpy_types.Operator
Select objects in the scene by phobostype
-
bl_idname
= 'phobos.select_objects_by_phobostype'¶
-
bl_label
= 'Select by Phobostype'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
invoke
(context, event)¶ Parameters: - context –
- event –
Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
seltype
= (<built-in function EnumProperty>, {'items': (('undefined', 'undefined', 'undefined'), ('link', 'link', 'link'), ('inertial', 'inertial', 'inertial'), ('visual', 'visual', 'visual'), ('collision', 'collision', 'collision'), ('sensor', 'sensor', 'sensor'), ('motor', 'motor', 'motor'), ('controller', 'controller', 'controller'), ('approxsphere', 'approxsphere', 'approxsphere'), ('light', 'light', 'light'), ('entity', 'entity', 'entity'), ('frame', 'frame', 'frame'), ('interface', 'interface', 'interface'), ('submodel', 'submodel', 'submodel'), ('annotation', 'annotation', 'annotation')), 'name': 'Phobostype', 'default': 'link', 'description': 'Phobos object type'})¶
-
-
class
phobos.operators.selection.
SelectRootOperator
¶ Bases:
bpy_types.Operator
Select root object(s) of currently selected object(s)
-
bl_idname
= 'phobos.select_root'¶
-
bl_label
= 'Select Roots'¶
-
bl_options
= {'REGISTER', 'UNDO'}¶
-
execute
(context)¶ Parameters: context – Returns:
-
classmethod
poll
(context)¶ Parameters: context – Returns:
-
-
phobos.operators.selection.
register
()¶ TODO Missing documentation
-
phobos.operators.selection.
unregister
()¶ TODO Missing documentation