IDType: Add `BKE_idtype_idcode_is_localizable`.
This is the same as `BKE_idtype_idcode_is_linkable` currently, used only in one place in UI code of IDtemplate.
This commit is contained in:
parent
95c2f0bea8
commit
4f38624bf5
|
@ -281,9 +281,13 @@ const struct IDTypeInfo *BKE_idtype_get_info_from_id(const struct ID *id);
|
|||
const char *BKE_idtype_idcode_to_name(const short idcode);
|
||||
const char *BKE_idtype_idcode_to_name_plural(const short idcode);
|
||||
const char *BKE_idtype_idcode_to_translation_context(const short idcode);
|
||||
bool BKE_idtype_idcode_is_linkable(const short idcode);
|
||||
|
||||
bool BKE_idtype_idcode_is_valid(const short idcode);
|
||||
|
||||
bool BKE_idtype_idcode_is_linkable(const short idcode);
|
||||
/* Macro currently, since any linkable IDtype should be localizable. */
|
||||
#define BKE_idtype_idcode_is_localizable BKE_idtype_idcode_is_linkable
|
||||
|
||||
short BKE_idtype_idcode_from_name(const char *idtype_name);
|
||||
|
||||
uint64_t BKE_idtype_idcode_to_idfilter(const short idcode);
|
||||
|
|
|
@ -1031,7 +1031,7 @@ static void template_ID(const bContext *C,
|
|||
UI_but_flag_enable(but, UI_BUT_DISABLED);
|
||||
}
|
||||
else {
|
||||
const bool disabled = (!BKE_lib_id_make_local(CTX_data_main(C), id, true /* test */, 0) ||
|
||||
const bool disabled = (!BKE_idtype_idcode_is_localizable(GS(id->name)) ||
|
||||
(idfrom && idfrom->lib));
|
||||
but = uiDefIconBut(block,
|
||||
UI_BTYPE_BUT,
|
||||
|
|
Loading…
Reference in New Issue