Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r--source/blender/makesrna/intern/rna_object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index a7f5c21cc76..5dc4bbd83dd 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -718,10 +718,10 @@ static int rna_Object_active_material_editable(PointerRNA *ptr)
bool is_editable;
if ((ob->matbits == NULL) || (ob->actcol == 0) || ob->matbits[ob->actcol - 1]) {
- is_editable = (ob->id.lib == NULL);
+ is_editable = !ID_IS_LINKED_DATABLOCK(ob);
}
else {
- is_editable = ob->data ? (((ID *)ob->data)->lib == NULL) : false;
+ is_editable = ob->data ? !ID_IS_LINKED_DATABLOCK(ob->data) : false;
}
return is_editable ? PROP_EDITABLE : 0;