Page MenuHome

UI: Add template_search (version of template_ID for non-IDs)
ClosedPublic

Authored by Julian Eisel (Severin) on May 10 2017, 6:05 PM.

Details

Summary

Adds a version of template_ID that can be used for non-ID properties.
The property to search for and the collection to search in has to be
passed to it.
Like template_ID it also takes arguments to define a 'new' and 'unlink'
operator. They will be displayed as icon-only buttons then.
Also added a version that can display preview thumbnails.

Had to do some additional changes to make text-buttons support
displaying/modifying empty RNA properties.

This will be needed for workspaces, see D2451.

Patch based on blender2.8.

Diff Detail

Repository
rB Blender

Event Timeline

Raised an issues with strange boolean/int pointer use, otherwise LGTM.

source/blender/editors/interface/interface_intern.h
764

Either it should be a bool with no link to the original, or use as a pointer and remove pointer macro use.

AFAICS this is being used as a regular boolean, just being cast from a pointer.

This revision is now accepted and ready to land.May 11 2017, 11:29 PM
This revision was automatically updated to reflect the committed changes.