0

I know how to enable the add-on through the script but I was wondering how to run the add-on. Meaning how do i use it through a script.

Alexander Pagan
  • 129
  • 2
  • 11

1 Answers1

3

Imagine there is an addon installed called "my addon". It has a couple properties to control in the toolshelf, and an operator.

The properties are all in bpy.context.scene.

In your script/addon, you can access all these properties.

You can set properties by

bpy.context.scene.my_addon_string = "hey"

And call operators

bpy.ops.object.my_addon_op()

So with a combination of editing properties and running operators, you should be able to run the addon from another addon or script.

doomslug
  • 1,809
  • 1
  • 18
  • 31
  • how can i see what the already properties are, and how do i call them from the _op() – Alexander Pagan Jul 19 '16 at 20:28
  • @AlexanderPagan if you hover over elements in the addon UI you can find source code paths and property names. Also you can read the source code of the addon. – doomslug Jul 19 '16 at 20:30