diff --git a/materials_library_vx/__init__.py b/materials_library_vx/__init__.py index c25bb425a2203862f99dcb79c05c44abbb59ad68..01dac4945bf379a4a6c9dda1e3d5ba5ea28bf7ad 100644 --- a/materials_library_vx/__init__.py +++ b/materials_library_vx/__init__.py @@ -785,7 +785,7 @@ class MatlibRemove(bpy.types.Operator): def execute(self, context): matlib = context.scene.matlib - success = matlib.remove_material(context.object.active_material) + success = matlib.remove_material() if type(success).__name__ == "tuple": print(success) self.report({success[0]}, success[1]) diff --git a/materials_library_vx/createlib.py b/materials_library_vx/createlib.py deleted file mode 100644 index a98c68336442bea0fe5c075fa06ad98b4afc1bc1..0000000000000000000000000000000000000000 --- a/materials_library_vx/createlib.py +++ /dev/null @@ -1,3 +0,0 @@ - -import bpy -bpy.ops.wm.save_mainfile(filepath="D:\\Blender Foundation\\Blender\\2.73\\scripts\\addons\\matlib\\Otherlib.blend", check_existing=False, compress=True) \ No newline at end of file diff --git a/materials_library_vx/save_categories.py b/materials_library_vx/save_categories.py deleted file mode 100644 index 7f90fcdf795b10145972ba437a238b9423cf8ed8..0000000000000000000000000000000000000000 --- a/materials_library_vx/save_categories.py +++ /dev/null @@ -1,19 +0,0 @@ - -print(30*"+") -import bpy -if not hasattr(bpy.context.scene, "matlib_categories"): - class EmptyProps(bpy.types.PropertyGroup): - pass - bpy.utils.register_class(EmptyProps) - bpy.types.Scene.matlib_categories = bpy.props.CollectionProperty(type=EmptyProps) -cats = bpy.context.scene.matlib_categories -for cat in cats: - cats.remove(0) - -cat = cats.add() -cat.name = "Colors" -cat = cats.add() -cat.name = "Nature" -cat = cats.add() -cat.name = "Woods" -bpy.ops.wm.save_mainfile(filepath="D:\\Blender Foundation\\Blender\\2.73\\scripts\\addons\\matlib\\Otherlib.blend", check_existing=False, compress=True) \ No newline at end of file diff --git a/materials_library_vx/sendmat.py b/materials_library_vx/sendmat.py deleted file mode 100644 index 3cbb8aa78a28145da23010e918b489f92eba396c..0000000000000000000000000000000000000000 --- a/materials_library_vx/sendmat.py +++ /dev/null @@ -1,15 +0,0 @@ - -import bpy, json -class EmptyProps(bpy.types.PropertyGroup): - pass -bpy.utils.register_class(EmptyProps) -bpy.types.Scene.matlib_categories = bpy.props.CollectionProperty(type=EmptyProps) -cats = [] -for cat in bpy.context.scene.matlib_categories: - materials = [] - for mat in bpy.data.materials: - if "category" in mat.keys() and mat['category'] == cat.name: - materials.append(mat.name) - cats.append([cat.name, materials]) -with open("D:\Blender Foundation\Blender\2.78\scripts\addons\matlib\categories.txt", "w") as f: - f.write(json.dumps(cats, sort_keys=True, indent=4))