RNA ID: forbid editing names of non-GMain IDs.
We even had an assert about that in setter callback! That means that we do not allow editing names of evaluated IDs, nor non-data-block IDs (mainly root nodetrees and scene master collections).
This commit is contained in:
parent
3d0383d259
commit
6cb5340e01
|
@ -169,7 +169,10 @@ static int rna_ID_name_editable(PointerRNA *ptr, const char **UNUSED(r_info))
|
|||
if (GS(id->name) == ID_VF) {
|
||||
VFont *vfont = (VFont *)id;
|
||||
if (BKE_vfont_is_builtin(vfont))
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
else if (!BKE_id_is_in_global_main(id)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return PROP_EDITABLE;
|
||||
|
|
Loading…
Reference in New Issue