[Bf-committers] uiList: ctrl-clic-edit name
dfelinto at gmail.com
Mon Nov 11 12:34:00 CET 2013
For multiview I have two items in the list that are not rename-able (i.e.,
left and right).
Is there a way to make them non-clickable (or at least to manually write
the rename function), while the others views are still
2013/11/10 Bastien Montagne <montagne29 at wanadoo.fr>
> Hi devs,
> Here is a patch enabling clic-edit of items' names in an uiList:
> The only change needed from user POV is to add the "rename_propname"
> parameter to its template_list() call.
> The proposed solution is a bit hackish (but works perfectly afaict), but
> I can't see any who wouldn't, given the fact that we want to avoid
> having to change all uiLists code to use something else than label() for
> items' names... What it does basically is:
> * In uilist handler, detect ctrl-lmb clic on a listrow button;
> * Mark the uiList as pending renaming on related item;
> * In draw function, change first LISTLABEL of the relevant item in a TEX
> one, and add a fake event to force uilist handler to be run again.
> * Back in uilist handler, when a rename is pending, try to find our TEX
> button (which abuses UI_BUT_COLOR_CUBIC as marker) and activate it.
> As usual, any feedback is much welcomed! :)
> PS: Do not take into account changes in properties_data_mesh.py, these
> are mostly used for testing, not to be committed!
> Best regards,
> Bf-committers mailing list
> Bf-committers at blender.org
More information about the Bf-committers