Post #5407: Does anybody know how to make Select Tools update?

📋 Metadata

🏷️ Tags

property-editor custom-properties advanced unsolved

  • Property Editor
  • Custom boolean properties
  • Tool activation via scripting

💬 Content

Does anybody know how to make Select Tools update?

I have custom boolean properties to help display which tool is currently active (Box Select, Lasso Select, Circle Select, Move, Rotate, Scale)

I have this on my get:

return bpy.context.workspace.tools.from_space_view3d_mode(bpy.context.mode, create=False).idname == 'builtin.move'

and on my set:

bpy.ops.wm.tool_set_by_id('EXEC_DEFAULT', True, name='builtin.move', space_type='VIEW_3D')

Now it works fine for Move, Scale, and Rotate. However, it kind of fails with the select tools (the set works, but the get doesn’t always).

imageimage1314×493 34.8 KB

Checking via the console returns the proper/expected output

imageimage859×619 48.6 KB

Anybody know why the select tools aren’t updating and displaying properly?

Let me just add, when I go to the toolbar where I have the properties displayed, it “updates” and finally selects the active select tool.


🔗 View on Blender Artists