Merge branch 'blender-v4.4-release'
This commit is contained in:
@@ -2100,10 +2100,15 @@ static void rna_GreasePencilModifier_material_set(PointerRNA *ptr,
|
||||
Material **ma_target)
|
||||
{
|
||||
Object *ob = reinterpret_cast<Object *>(ptr->owner_id);
|
||||
Material *ma_old = *ma_target;
|
||||
Material *ma = reinterpret_cast<Material *>(value.data);
|
||||
|
||||
if (ma == nullptr || BKE_object_material_index_get(ob, ma) != -1) {
|
||||
id_lib_extern(reinterpret_cast<ID *>(ob));
|
||||
id_us_min(&ma_old->id);
|
||||
id_us_plus_no_lib(&ma->id);
|
||||
if (!ID_IS_LINKED(&ob->id)) {
|
||||
id_lib_extern(&ma->id);
|
||||
}
|
||||
*ma_target = ma;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user