0
$\begingroup$

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.

$\endgroup$

1 Answer 1

3
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ how can i see what the already properties are, and how do i call them from the _op() $\endgroup$ Commented Jul 19, 2016 at 20:28
  • $\begingroup$ @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. $\endgroup$
    – doomslug
    Commented Jul 19, 2016 at 20:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .