Page MenuHome

Fix T90866: Python operator templates are not accessible from menus
ClosedPublic

Authored by Diptangshu Dey (Tha_Hobbist) on Nov 11 2021, 5:30 AM.

Details

Summary

T90866: Python Operator templates made accessible from respective menus

Added Python Operators to respective Menus

Fixed Modal Draw Operator id_name

Diff Detail

Repository
rB Blender

Event Timeline

Diptangshu Dey (Tha_Hobbist) requested review of this revision.Nov 11 2021, 5:30 AM
Diptangshu Dey (Tha_Hobbist) created this revision.
Philipp Oeser (lichtwerk) retitled this revision from Fixed: Python operator templates are not accessible from menus to Fix T90866: Python operator templates are not accessible from menus.Nov 11 2021, 2:56 PM
Philipp Oeser (lichtwerk) requested changes to this revision.Nov 11 2021, 3:19 PM

Thx for this!

Regarding the code comments (lloks like this was just copy-pasted from export example, so "file selector" is not appropriate for all examples.):

# Register and add to the file selector

It would also be good to mention that adding to a menu is needed to show up in F3 search, suggest something like the following (and make sure this is placed in all files -- right now some have this, some dont)

# Register and add to the "XYZ" menu (required to also use F3 search "ZXY" for quick access)
Philipp Oeser (lichtwerk) requested changes to this revision.Nov 11 2021, 3:20 PM
This revision now requires changes to proceed.Nov 11 2021, 3:20 PM

The patch looks fine, agree with @Philipp Oeser (lichtwerk) 's comment.

doc/python_api/examples/bpy.types.Operator.1.py
49

please add the (required to use F3 search.... part here as well

doc/python_api/examples/bpy.types.Operator.3.py
35

please add the (required to use F3 search.... part here as well

doc/python_api/examples/bpy.types.Operator.4.py
48

please add the (required to use F3 search.... part here as well

doc/python_api/examples/bpy.types.Operator.5.py
62

please add the (required to use F3 search.... part here as well

doc/python_api/examples/bpy.types.Operator.6.py
38

please add the (required to use F3 search.... part here as well

doc/python_api/examples/bpy.types.Operator.py
29

please add the (required to use F3 search.... part here as well

  • added required comments
Philipp Oeser (lichtwerk) requested changes to this revision.Nov 16 2021, 9:03 AM
Philipp Oeser (lichtwerk) added inline comments.
release/scripts/templates_py/operator_node.py
50

must be self.layout (instead of self.layour)

This revision now requires changes to proceed.Nov 16 2021, 9:03 AM
Diptangshu Dey (Tha_Hobbist) marked 6 inline comments as done.
  • fixed typos
This revision is now accepted and ready to land.Nov 16 2021, 9:35 AM