Post #643: Ho

📋 Metadata

  • Author: roaoao
  • Date: 2017-05-08 14:01:58
  • Type: answer
  • Quality Score: 8/10
  • Replies (1): post_00644

🏷️ Tags

pie-menu macro custom-scripting intermediate solved

  • Pie Menu Editor
  • Macro Editor
  • Custom Tab
  • Command Tab
  • Menu Tab
  • Python Scripting

💬 Content

HokusPokus:

Is it possible to have one slider for pressure and one slider for brushsize even though they’re set to individual settings?

Yes, use this code in Custom tab:
Size:

L.prop(paint_settings(C).brush, "size")

Strength:

L.prop(paint_settings(C).brush, "strength")

HokusPokus:

Btw is it possible to run a Macro from a slot in a Pie menu?

Yes, you can use Menu tab and select the name of the Macro.
Or use this code in Command tab:

open_menu("Macro Name")

HokusPokus:

I, currenlty trying to set up a default Texture paint scene… ( you know, a clean, new setup throws “Missing UV’s” and “Missing paint slot” ) ( see picture above )

Try this code in Command tab:

bpy.ops.paint.add_simple_uvs(); bpy.ops.paint.add_texture_paint_slot('INVOKE_DEFAULT', type='DIFFUSE_COLOR', name='Default UV Grid')

🔗 View on Blender Artists