forked from bartvdbraak/blender
Fix for #21209, Delete X for particle settings does nothing.
Disable ID default unlink button if the RNA property is set to never be null, as the unlink default action simply sets pointers to null
This commit is contained in:
parent
37b9c9fe4d
commit
835c353aaa
@ -449,6 +449,9 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
|
|||||||
else {
|
else {
|
||||||
but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
|
but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
|
||||||
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE));
|
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE));
|
||||||
|
|
||||||
|
if(RNA_property_flag(template->prop) & PROP_NEVER_NULL)
|
||||||
|
uiButSetFlag(but, UI_BUT_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((idfrom && idfrom->lib))
|
if((idfrom && idfrom->lib))
|
||||||
|
Loading…
Reference in New Issue
Block a user