Cleanup: use default ID type's name instead of generic 'Untitled' for new IDs.
This commit is contained in:
parent
173c023197
commit
ac40cf76e5
|
@ -227,9 +227,6 @@ bool BKE_id_is_in_global_main(struct ID *id);
|
|||
void BKE_id_ordered_list(struct ListBase *ordered_lb, const struct ListBase *lb);
|
||||
void BKE_id_reorder(const struct ListBase *lb, struct ID *id, struct ID *relative, bool after);
|
||||
|
||||
/* use when "" is given to BKE_id_new_name_validate() */
|
||||
#define ID_FALLBACK_NAME N_("Untitled")
|
||||
|
||||
#define IS_TAGGED(_id) ((_id) && (((ID *)_id)->tag & LIB_TAG_DOIT))
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -1595,8 +1595,8 @@ bool BKE_id_new_name_validate(ListBase *lb, ID *id, const char *tname)
|
|||
BLI_strncpy(name, tname, sizeof(name));
|
||||
|
||||
if (name[0] == '\0') {
|
||||
/* disallow empty names */
|
||||
BLI_strncpy(name, DATA_(ID_FALLBACK_NAME), sizeof(name));
|
||||
/* Disallow empty names. */
|
||||
BLI_strncpy(name, DATA_(BKE_idcode_to_name(GS(id->name))), sizeof(name));
|
||||
}
|
||||
else {
|
||||
/* disallow non utf8 chars,
|
||||
|
|
Loading…
Reference in New Issue