Post #792: ![](https://blenderartists.org/user_avatar/blenderartists.org/pior/48/491810_2.p

📋 Metadata

  • Author: roaoao
  • Date: 2017-08-23 02:03:36
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_00791

🏷️ Tags

v1-14-0 macro pie-menu grease-pencil intermediate solved

  • Macro Operator
  • Command tab
  • Menu tab
  • Pie Menu
  • Python Scripting

💬 Content

Pior:

However there seems to be no documentation. The addon does link to a series to unnarrated videos but there is no proper manual to speak of that one can read to directly access the information. For a paid addon this is a problem.

Hi, Pior, thanks for the feedback.
PME 1.14.0 will be released this week with extended documentation, new videos (unnarrated but with annotations and no bg music ;)) and tons of new features which make PME much easier to use.

Pior:

GreasePencil draw / stroke type : Poly / data source : scene / stroke placement : Surface / additive drawing : on. How do I make it so that the editor captures all these extra parameters, as opposed to just capturing bpy.ops.gpencil.draw(mode=‘DRAW_POLY’) ?

Editor can’t capture more than 1 buttons at once. In this case you can use Macro Operator, capture the buttons as separate macro items and use the Macro as a sub-menu (Menu tab) in your Pie Menu:
1 item (Command tab): data source : scene

bpy.context.scene.tool_settings.grease_pencil_source = 'SCENE'

2 item (Command tab): stroke placement : Surface

bpy.context.scene.tool_settings.gpencil_stroke_placement_view3d = 'SURFACE'

3 item (Command tab): additive drawing : on

bpy.context.scene.tool_settings.use_gpencil_additive_drawing = True

4 item (Command tab): draw / stroke type : Poly

bpy.ops.gpencil.draw(mode='DRAW_POLY')

Or combine them into one single-line command separated by semicolon and use it in you pie directly (Command tab):

bpy.context.scene.tool_settings.grease_pencil_source = 'SCENE'; bpy.context.scene.tool_settings.gpencil_stroke_placement_view3d = 'SURFACE'; bpy.context.scene.tool_settings.use_gpencil_additive_drawing = True; bpy.ops.gpencil.draw('INVOKE_DEFAULT', True, mode='DRAW_POLY')

Note that for complex commands (2nd example) we have to add ‘INVOKE_DEFAULT’, True arguments to bpy.ops.gpencil.draw operator. These arguments are required for interactive tools like Grease Pencil. PME adds them automatically when there is only one operator in Command tab (1st example).

Pior:

note that once all this is cleared up I would be very willing to help you designing some helper text that could be integrated directly into the addon in order to walk first time users through the early steps. It really doesn’t take much - it’s just a matter of clearly explaining things directly in the UI panel

I’ve added some helper messages/buttons in PME 1.14.0. But any help will be appreciated.


🔗 View on Blender Artists