Extensions: refactor CommandBatch.exec_non_blocking return value
[blender-addons-contrib.git] / automat / __init__.py
blob436effb71cb35f373d4f6aeed095816c8118f572
1 # Copyright 2015 Théo Friberg under GNU GPL 3
3 bl_info = {
4 "name": "Cycles Automatic Materials",
5 "author": "Théo Friberg",
6 "blender": (2, 80, 0),
7 "version": (0, 39),
8 "location": "Space > Automatic / Adjustable Material from Image",
9 "description": "One-click material setup from texture for Cycles. Blur from b°wide node pack.",
10 "warning": "Still a work in progress",
11 "doc_url": "",
12 "tracker_url": "mailto:theo.friberg@gmail.com?subject="
13 "Bug report for Cycles Automatic Materials addon&body="
14 "I have come across the following error while using the Cycles automatic"
15 " materials addon (Please explain both the symptoms of the error and"
16 " what you were doing when the error occured. If you think a specific"
17 " action of yours is related to the error, please include a description"
18 " of it too.):",
19 "support": "COMMUNITY",
20 "category": "Render"
23 if "bpy" in locals():
24 import importlib
25 importlib.reload(JSONOps)
26 importlib.reload(AutoOp)
27 importlib.reload(AdjOp)
29 else:
30 from . import JSONOps
31 from . import AutoOp
32 from . import AdjOp
35 import bpy
36 import json
37 import os
39 def menu_draw(self, context):
40 self.layout.operator("com.new_automat", text="Automatic Material from Image", icon="FILE_IMAGE")
43 def register():
45 """This method registers the AutomatOperatorFromTexture
46 operator and the AdjustableOperatorFromTexture operator. """
48 bpy.utils.register_class(AutoOp.AutomatOperatorFromTexture)
49 bpy.utils.register_class(AdjOp.AdjustableOperatorFromTexture)
50 bpy.types.TOPBAR_MT_file_import.append(menu_draw)
52 def unregister():
54 """This method unregisters the AutomatOperatorFromTexture
55 operator and the AdjustableOperatorFromTexture operator. """
57 bpy.types.TOPBAR_MT_file_import.remove(menu_draw)
58 bpy.utils.unregister_class(AutoOp.AutomatOperatorFromTexture)
59 bpy.utils.unregister_class(AdjOp.AdjustableOperatorFromTexture)
61 # Run register if the file is ran from blenders text editor
63 if __name__ == "__main__":
64 register()