Fix T48961: Material slots become easily desynced over linked duplicates.
Own mistake in recent changes (split to test_object_materials()/test_all_objects_materials()).
This commit is contained in:
parent
d60acd0e94
commit
d66a27de2e
Notes:
blender-bot
2024-01-31 11:35:08 +01:00
Referenced by issue #48961, Material slots become easily desynced over linked duplicates
|
@ -742,17 +742,18 @@ void assign_material(Object *ob, Material *ma, short act, int assign_type)
|
|||
if (mao)
|
||||
id_us_min(&mao->id);
|
||||
ob->mat[act - 1] = ma;
|
||||
test_object_materials(ob, ob->data);
|
||||
}
|
||||
else { /* in data */
|
||||
mao = (*matarar)[act - 1];
|
||||
if (mao)
|
||||
id_us_min(&mao->id);
|
||||
(*matarar)[act - 1] = ma;
|
||||
test_all_objects_materials(G.main, ob->data); /* Data may be used by several objects... */
|
||||
}
|
||||
|
||||
if (ma)
|
||||
id_us_plus(&ma->id);
|
||||
test_object_materials(ob, ob->data);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue