Page MenuHome

Rewrite of "Edit Operator Source" Addon for 2.80, plus a new feature
Open, Confirmed, MediumPublic

Description

This is a rewrite of the Edit Operator Source Addon for 2.80. It takes an API change into account (Operator.get_rna() -> Operator.get_rna_type() and it also adds a new feature.
For internal C Operators, where no python source can be found obviously, it will try to find locations in the ui code (bl_ui) where the operator is being called (via layout.operator() for example).
For each of this found locations, another operator button will be drawn in the Edit Operator Panel. If you click one of those, it will jump to the according draw function in the bl_ui code instead of to the source of the operator.
This is useful to find out where existing operators are being used in the blender UI.

Details

Type
Patch

Event Timeline

added context.area.tag_redraw() after executing the operator. This correctly now draws the populated box layout without need to hover over it.

Brendon Murphy (meta-androcto) triaged this task as Normal priority.Sun, Aug 11, 1:37 PM

thanks for the update, I will attend to soon

Now showing both the source and the call locations of the operator for addon python operators and included python operators like uv smart project.
Also added a "Source" button to toggle back to the source if you changed to one of the call locations.
Furthermore now (mostly) pointing to the correct line of the call in the according draw function.

Brendon Murphy (meta-androcto) raised the priority of this task from Normal to Confirmed, Medium.

@Campbell Barton (campbellbarton) hi, this addon was in contrib and removed non updated. Now it's back and reworked, we would add back to contrib but also ask you to review for release as this is a useful development tool.
Thanks.
@Martin Felke (scorpion81) I can add back to contrib but it's preferable if you get access to the addons repo and then your free to update yourself when needed. Thanks.