Changeset View
Changeset View
Standalone View
Standalone View
materials_library_vx/__init__.py
| Context not available. | |||||
| print ("Material", material, force) | print ("Material", material, force) | ||||
| #if material: | #if material: | ||||
| #maybe some test cases doesnt return a material, gotta take care of that | #maybe some test cases doesn't return a material, gotta take care of that | ||||
| #i cannot think of any case like that right now | #i cannot think of any case like that right now | ||||
| #maybe import linked when the database isnt sync | #maybe import linked when the database isnt sync | ||||
| if context.mode == "EDIT_MESH": | if context.mode == "EDIT_MESH": | ||||
| Context not available. | |||||
| return 'INFO', "Material added." | return 'INFO', "Material added." | ||||
| else: | else: | ||||
| print("Save Material Error: Run Blender with administrative priviledges.") | print("Save Material Error: Run Blender with administrative privileges.") | ||||
| return 'WARNING', "There was an error saving the material" | return 'WARNING', "There was an error saving the material" | ||||
| def remove_material(self): | def remove_material(self): | ||||
| Context not available. | |||||
| return {'RUNNING_MODAL'} | return {'RUNNING_MODAL'} | ||||
| return self.execute(context) | return self.execute(context) | ||||
| ### TODO: execute doesnt trigger remove | ### TODO: execute doesn't trigger remove | ||||
| def execute(self, context): | def execute(self, context): | ||||
| success = "" | success = "" | ||||
| Context not available. | |||||
| # matlibProperties.init = False | # matlibProperties.init = False | ||||
| # matlib.__init__() | # matlib.__init__() | ||||
| #libaries | #libraries | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| if matlib.current_library: | if matlib.current_library: | ||||
| text = matlib.current_library.shortname | text = matlib.current_library.shortname | ||||
| Context not available. | |||||