Page MenuHome

Reorganize RMB menu and add option "Copy Full Data Path"
AcceptedPublic

Authored by Julian Eisel (Severin) on Aug 26 2014, 2:35 AM.

Details

Summary

Reorganize RMB menu and add option 'Copy Full Data Path'

Reorganize RMB menu

As per @Campbell Barton (campbellbarton)'s suggestion, this patch adds a submenu "Scripting" to the right click menu. This contains:

  • Edit Source
  • Copy Data Path
  • Copy Full Data Path
  • Online Python Reference

The "Edit Translations" entry will only be visible for non-release builds, also following the suggestion from @Campbell Barton (campbellbarton).

Copy Full Data Path

An operator is added to the RMB-menu „Copy Full Data Path“, to copy the full RNA path to the clipboard. It aims to complement the „Copy Data Path“, which only copies the part of the path that is needed for drivers, but for writing addons, etc. it is useful to have an option that gives the full data path.

The changes made here should be committed separately.

Diff Detail

Repository
rB Blender
Branch
arcpatch-D763

Event Timeline

Julian Eisel (Severin) retitled this revision from to RMB-menu: 'Copy Full Data Path'.
Julian Eisel (Severin) updated this object.
Julian Eisel (Severin) set the repository for this revision to rB Blender.
Julian Eisel (Severin) updated this object.
Julian Eisel (Severin) set the repository for this revision to rB Blender.

I just learned that a RNA boolean can be used here to make the code much cleaner. Thanks @venomgfx for the hint :).

Grabz added a subscriber: Grabz.Oct 18 2014, 8:25 AM
This revision is now accepted and ready to land.Oct 21 2014, 9:42 PM

Note, this patch is fine (in principle),

but I really want to see this menu made more manageable before adding more items.

Eg:

  • Move Edit Translations into a submenu, or only enable for non-release builds.
  • Move Online Manual, Online Python Reference into a submenu.

... with the exceptions of Copy to Selected the last 6 options for the RMB menu are quite obscure.

Suggest we have a Scripting submenu.

It can contain...

  • Edit Source
  • Copy Data Path
  • Copy Data Path (Full)
  • Online API Reference.

... Edit Translations could be moved out too... but it doesn't really fit anywhere else AFAIKS.

Suggest we have a Scripting submenu.
It can contain...

  • Edit Source
  • Copy Data Path
  • Copy Data Path (Full)
  • Online API Reference.

... Edit Translations could be moved out too... but it doesn't really fit anywhere else AFAIKS.

+1 for a Scripting menu.

Edit Translations is quite an obscure item to be on such a prominent menu indeed, +1 to only have it on non-release builds.

Julian Eisel (Severin) retitled this revision from RMB-menu: 'Copy Full Data Path' to Reorganize RMB menu and add option "Copy Full Data Path".
Julian Eisel (Severin) updated this object.
Julian Eisel (Severin) edited edge metadata.
Julian Eisel (Severin) updated this revision to Diff 3527.EditedFeb 15 2015, 3:19 AM
Julian Eisel (Severin) updated this object.
  • Updated for latest master
  • Fix cases where menu entry is greyed out while not being greyed out in master

@Campbell Barton (campbellbarton) It's not so nice that I had to create another flag for this, but it's the only good solution I can think of. We can't search for an already existing flag, we cant search for but->active, ... So think adding a new flag is fine.

Julian Eisel (Severin) set the repository for this revision to rB Blender.Feb 15 2015, 3:20 AM

Still wishing this was on master! Especially the reorganizing of the menus and getting the Edit Translation only on non-release builds.

What's do you think about this @Campbell Barton (campbellbarton) ? Will test this on the gooseberry branch to get feedback.

Update patch to master, make some stuff a bit less ugly

source/blender/editors/interface/interface_utils.c
347

Could also add bool for reverse search, not sure if that's useful though

Guys, I am looking forward to see it in the master, as soon as possible ;). Many thanx.

@Julian Eisel (Severin), Can you give an example of where the menu is grayed out?
Would be nice to avoid adding extra special-case flags if possible, I tested the patch and it seemed to work properly, even from pop-ups like the color picker. - See: P301

Lapineige added a subscriber: Lapineige.
  • Merge branch 'master' into arcpatch-D763
  • Fix wrongly grayed out copy data path buttons
  • Minor tweaks
  • Use mixed code & declarations

Actually, the last patch version wasn't working correctly either (missing break in loop, grrr!). Now you should be able to see the difference in the 3D view properties region, mainly in the location, rotation, scale and dimension buttons.