Post #3121: Hi! I would appreciate a bit of help.

📋 Metadata

  • Author: Alphyn
  • Date: 2020-04-01 13:52:19
  • Type: question
  • Quality Score: 6/10
  • Replies (1): post_03124

🏷️ Tags

macro beginner unsolved

  • Macro Editor
  • Python Scripting

💬 Content

Hi! I would appreciate a bit of help.

I’m trying to make a simple macro that switches to Vertex Paint mode, makes a fill (Shift+K) and then switches back to the Edit mode. Here’s what I came up with.

  1. bpy.ops.object.mode_set(mode=‘VERTEX_PAINT’)
  2. bpy.ops.paint.vertex_color_set()
  3. bpy.ops.object.mode_set(mode=‘EDIT’)
    It gives me the “wrong context” error.

How can I make this work? Thanks! Vertex Fill Macro.json (657 Bytes)


🔗 View on Blender Artists