[Bf-extensions-cvs] [36671a4e] master: Fix: Material Library VX add-on cannot apply library materials to selected object
Iyad Ahmed
noreply at git.blender.org
Tue Aug 31 10:14:58 CEST 2021
Commit: 36671a4e21b2e2ad7fd381a0529cde2a63505097
Author: Iyad Ahmed
Date: Tue Aug 31 10:12:52 2021 +0200
Branches: master
https://developer.blender.org/rBA36671a4e21b2e2ad7fd381a0529cde2a63505097
Fix: Material Library VX add-on cannot apply library materials to selected object
Fix https://developer.blender.org/T90483, https://developer.blender.org/T89680
Reviewed By: mont29, dfelinto, campbellbarton
Maniphest Tasks: T89740, T90483, T89680
Differential Revision: https://developer.blender.org/D12214
===================================================================
M materials_library_vx/__init__.py
===================================================================
diff --git a/materials_library_vx/__init__.py b/materials_library_vx/__init__.py
index 8df8e2b9..cc469d84 100644
--- a/materials_library_vx/__init__.py
+++ b/materials_library_vx/__init__.py
@@ -489,7 +489,7 @@ if mat:
return "WARNING", "Select a material"
def get_material(self, name, link=False):
- with bpy.data.libraries.load(self.current_library.path, link, False) as (data_from, data_to):
+ with bpy.data.libraries.load(self.current_library.path, link=link, relative=False) as (data_from, data_to):
data_to.materials = [name]
if link:
print(name + " linked.")
@@ -523,7 +523,7 @@ if mat:
return "INFO", "Please select an object"
if dummy == context.object and not preview:
- if (len(objects)==1 and dummy.select):
+ if (len(objects)==1 and dummy.select_get()):
return "ERROR", "Apply is disabled for the Material Preview Object"
try:
last = context.scene.objects[self.last_selected]
More information about the Bf-extensions-cvs
mailing list