robot_designer_plugin.core.pluginmanager module

This sub module contains the PluginManager that handles automatic registration of classes.

class robot_designer_plugin.core.pluginmanager.PluginManager[source]

Bases: object

This class handles the automatic registration of classes to Blender.

PluginTypes

alias of robot_designer_plugin.core.pluginmanager.PluginType

classmethod clear()[source]

When a plugin is required to be reloadable (which it should be during development) each module is imported twice. Therefore, this method is called before the modules are reloaded.

classmethod getFilePlugins(type_=PluginType.FILE)[source]

Warning

The plugin system is still under development.

classmethod get_icon(id)[source]
Parameters

id (str) –

Returns

classmethod get_property(obj, prop)[source]
Parameters
  • obj

  • prop

Returns

classmethod load_icon(id, filename)[source]
Parameters
  • id (str) – ID of the label

  • filename (str) – Relative to config/resource_path

Returns

None

classmethod register()[source]

Called from the top-level robot_designer_plugin.register() function in the __init__.py of the plugin. Registers all data collected during import.

static register_class(*args)[source]

Class decorator for operators.RDOperator, bpy.types.Menu, bpy.types.PropertyGroup (and more bpy classes) and gui.CollapsibleBox.

An example of how to use this decorator is given in operators.RDOperator.

Parameters

args – For now, no arguments should be passed to the decorator.

classmethod register_collapsible(property_name)[source]

Called when a class of type gui.CollapsibleBox is created.

classmethod register_plugin(label, operators, draw_function=None, type_=PluginType.FILE)[source]

Warning

The plugin system is still under development.

static register_property_group(base=None)[source]
classmethod register_property_groups(property_group, btype)[source]

Properties have to be assigned to blender types. This function collects all properties and assigns them when register() is called and unloads them when unregister() is called.

Parameters
Returns

classmethod unregister()[source]

Called from the top-level robot_designer_plugin.unregister() function in the __init__.py of the plugin. Removes all data collected during import.