Workspace: Move engines to workspace and Properties Editor cleanup
[blender.git] / release / scripts / startup / nodeitems_builtins.py
1 # ##### BEGIN GPL LICENSE BLOCK #####
2 #
3 #  This program is free software; you can redistribute it and/or
4 #  modify it under the terms of the GNU General Public License
5 #  as published by the Free Software Foundation; either version 2
6 #  of the License, or (at your option) any later version.
7 #
8 #  This program is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 #  GNU General Public License for more details.
12 #
13 #  You should have received a copy of the GNU General Public License
14 #  along with this program; if not, write to the Free Software Foundation,
15 #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # ##### END GPL LICENSE BLOCK #####
18
19 # <pep8 compliant>
20 import bpy
21 import nodeitems_utils
22 from nodeitems_utils import (
23     NodeCategory,
24     NodeItem,
25     NodeItemCustom,
26 )
27
28
29 # Subclasses for standard node types
30
31 class SortedNodeCategory(NodeCategory):
32     def __init__(self, identifier, name, description="", items=None):
33         # for builtin nodes the convention is to sort by name
34         if isinstance(items, list):
35             items = sorted(items, key=lambda item: item.label.lower())
36
37         super().__init__(identifier, name, description, items)
38
39
40 class CompositorNodeCategory(SortedNodeCategory):
41     @classmethod
42     def poll(cls, context):
43         return (context.space_data.tree_type == 'CompositorNodeTree')
44
45
46 class ShaderNewNodeCategory(SortedNodeCategory):
47     @classmethod
48     def poll(cls, context):
49         return (context.space_data.tree_type == 'ShaderNodeTree' and
50                 context.view_render.use_shading_nodes)
51
52
53 class ShaderOldNodeCategory(SortedNodeCategory):
54     @classmethod
55     def poll(cls, context):
56         return (context.space_data.tree_type == 'ShaderNodeTree' and
57                 not context.view_render.use_shading_nodes)
58
59
60 class TextureNodeCategory(SortedNodeCategory):
61     @classmethod
62     def poll(cls, context):
63         return context.space_data.tree_type == 'TextureNodeTree'
64
65
66 # menu entry for node group tools
67 def group_tools_draw(self, layout, context):
68     layout.operator("node.group_make")
69     layout.operator("node.group_ungroup")
70     layout.separator()
71
72 # maps node tree type to group node type
73 node_tree_group_type = {
74     'CompositorNodeTree': 'CompositorNodeGroup',
75     'ShaderNodeTree': 'ShaderNodeGroup',
76     'TextureNodeTree': 'TextureNodeGroup',
77     }
78
79
80 # generic node group items generator for shader, compositor and texture node groups
81 def node_group_items(context):
82     if context is None:
83         return
84     space = context.space_data
85     if not space:
86         return
87     ntree = space.edit_tree
88     if not ntree:
89         return
90
91     yield NodeItemCustom(draw=group_tools_draw)
92
93     def contains_group(nodetree, group):
94         if nodetree == group:
95             return True
96         else:
97             for node in nodetree.nodes:
98                 if node.bl_idname in node_tree_group_type.values() and node.node_tree is not None:
99                     if contains_group(node.node_tree, group):
100                         return True
101         return False
102
103     for group in context.blend_data.node_groups:
104         if group.bl_idname != ntree.bl_idname:
105             continue
106         # filter out recursive groups
107         if contains_group(group, ntree):
108             continue
109
110         yield NodeItem(node_tree_group_type[group.bl_idname],
111                        group.name,
112                        {"node_tree": "bpy.data.node_groups[%r]" % group.name})
113
114
115 # only show input/output nodes inside node groups
116 def group_input_output_item_poll(context):
117     space = context.space_data
118     if space.edit_tree in bpy.data.node_groups.values():
119         return True
120     return False
121
122
123 # only show input/output nodes when editing line style node trees
124 def line_style_shader_nodes_poll(context):
125     snode = context.space_data
126     return (snode.tree_type == 'ShaderNodeTree' and
127             snode.shader_type == 'LINESTYLE')
128
129
130 # only show nodes working in world node trees
131 def world_shader_nodes_poll(context):
132     snode = context.space_data
133     return (snode.tree_type == 'ShaderNodeTree' and
134             snode.shader_type == 'WORLD')
135
136
137 # only show nodes working in object node trees
138 def object_shader_nodes_poll(context):
139     snode = context.space_data
140     return (snode.tree_type == 'ShaderNodeTree' and
141             snode.shader_type == 'OBJECT')
142
143
144 def cycles_shader_nodes_poll(context):
145     return context.view_render.engine == 'CYCLES'
146
147
148 def eevee_shader_nodes_poll(context):
149     return context.view_render.engine == 'BLENDER_EEVEE'
150
151
152 def eevee_cycles_shader_nodes_poll(context):
153     return (cycles_shader_nodes_poll(context) or
154             eevee_shader_nodes_poll(context))
155
156
157 def object_cycles_shader_nodes_poll(context):
158     return (object_shader_nodes_poll(context) and
159             cycles_shader_nodes_poll(context))
160
161
162 def object_eevee_shader_nodes_poll(context):
163     return (object_shader_nodes_poll(context) and
164             eevee_shader_nodes_poll(context))
165
166
167 def object_eevee_cycles_shader_nodes_poll(context):
168     return (object_shader_nodes_poll(context) and
169             eevee_cycles_shader_nodes_poll(context))
170
171
172 # Until volume shader on objects are supported in eevee.
173 def volume_shader_nodes_poll(context):
174     return (cycles_shader_nodes_poll(context) or
175            (eevee_shader_nodes_poll(context) and
176             world_shader_nodes_poll(context)))
177
178
179 # All standard node categories currently used in nodes.
180
181 shader_node_categories = [
182     # Shader Nodes
183     ShaderOldNodeCategory("SH_INPUT", "Input", items=[
184         NodeItem("ShaderNodeMaterial"),
185         NodeItem("ShaderNodeCameraData"),
186         NodeItem("ShaderNodeFresnel"),
187         NodeItem("ShaderNodeLayerWeight"),
188         NodeItem("ShaderNodeLampData"),
189         NodeItem("ShaderNodeValue"),
190         NodeItem("ShaderNodeRGB"),
191         NodeItem("ShaderNodeTexture"),
192         NodeItem("ShaderNodeGeometry"),
193         NodeItem("ShaderNodeExtendedMaterial"),
194         NodeItem("ShaderNodeParticleInfo"),
195         NodeItem("ShaderNodeObjectInfo"),
196         NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
197         ]),
198     ShaderOldNodeCategory("SH_OUTPUT", "Output", items=[
199         NodeItem("ShaderNodeOutput"),
200         NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
201         ]),
202     ShaderOldNodeCategory("SH_OP_COLOR", "Color", items=[
203         NodeItem("ShaderNodeMixRGB"),
204         NodeItem("ShaderNodeRGBCurve"),
205         NodeItem("ShaderNodeInvert"),
206         NodeItem("ShaderNodeHueSaturation"),
207         NodeItem("ShaderNodeGamma"),
208         ]),
209     ShaderOldNodeCategory("SH_OP_VECTOR", "Vector", items=[
210         NodeItem("ShaderNodeNormal"),
211         NodeItem("ShaderNodeMapping"),
212         NodeItem("ShaderNodeVectorCurve"),
213         NodeItem("ShaderNodeVectorTransform"),
214         NodeItem("ShaderNodeNormalMap"),
215         ]),
216     ShaderOldNodeCategory("SH_CONVERTOR", "Converter", items=[
217         NodeItem("ShaderNodeValToRGB"),
218         NodeItem("ShaderNodeRGBToBW"),
219         NodeItem("ShaderNodeMath"),
220         NodeItem("ShaderNodeVectorMath"),
221         NodeItem("ShaderNodeSqueeze"),
222         NodeItem("ShaderNodeSeparateRGB"),
223         NodeItem("ShaderNodeCombineRGB"),
224         NodeItem("ShaderNodeSeparateHSV"),
225         NodeItem("ShaderNodeCombineHSV"),
226         ]),
227     ShaderOldNodeCategory("SH_GROUP", "Group", items=node_group_items),
228     ShaderOldNodeCategory("SH_LAYOUT", "Layout", items=[
229         NodeItem("NodeFrame"),
230         NodeItem("NodeReroute"),
231         ]),
232
233     # New Shader Nodes (Cycles)
234     ShaderNewNodeCategory("SH_NEW_INPUT", "Input", items=[
235         NodeItem("ShaderNodeTexCoord"),
236         NodeItem("ShaderNodeAttribute"),
237         NodeItem("ShaderNodeLightPath"),
238         NodeItem("ShaderNodeFresnel"),
239         NodeItem("ShaderNodeLayerWeight"),
240         NodeItem("ShaderNodeRGB"),
241         NodeItem("ShaderNodeValue"),
242         NodeItem("ShaderNodeTangent"),
243         NodeItem("ShaderNodeNewGeometry"),
244         NodeItem("ShaderNodeWireframe"),
245         NodeItem("ShaderNodeObjectInfo"),
246         NodeItem("ShaderNodeHairInfo"),
247         NodeItem("ShaderNodeParticleInfo"),
248         NodeItem("ShaderNodeCameraData"),
249         NodeItem("ShaderNodeUVMap"),
250         NodeItem("ShaderNodeUVAlongStroke", poll=line_style_shader_nodes_poll),
251         NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
252         ]),
253     ShaderNewNodeCategory("SH_NEW_OUTPUT", "Output", items=[
254         NodeItem("ShaderNodeOutputMaterial", poll=object_eevee_cycles_shader_nodes_poll),
255         NodeItem("ShaderNodeOutputLamp", poll=object_cycles_shader_nodes_poll),
256         NodeItem("ShaderNodeOutputWorld", poll=world_shader_nodes_poll),
257         NodeItem("ShaderNodeOutputLineStyle", poll=line_style_shader_nodes_poll),
258         NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
259         ]),
260     ShaderNewNodeCategory("SH_NEW_SHADER", "Shader", items=[
261         NodeItem("ShaderNodeMixShader", poll=eevee_cycles_shader_nodes_poll),
262         NodeItem("ShaderNodeAddShader", poll=eevee_cycles_shader_nodes_poll),
263         NodeItem("ShaderNodeBsdfDiffuse", poll=object_eevee_cycles_shader_nodes_poll),
264         NodeItem("ShaderNodeBsdfPrincipled", poll=object_eevee_cycles_shader_nodes_poll),
265         NodeItem("ShaderNodeBsdfGlossy", poll=object_eevee_cycles_shader_nodes_poll),
266         NodeItem("ShaderNodeBsdfTransparent", poll=object_eevee_cycles_shader_nodes_poll),
267         NodeItem("ShaderNodeBsdfRefraction", poll=object_eevee_cycles_shader_nodes_poll),
268         NodeItem("ShaderNodeBsdfGlass", poll=object_eevee_cycles_shader_nodes_poll),
269         NodeItem("ShaderNodeBsdfTranslucent", poll=object_cycles_shader_nodes_poll),
270         NodeItem("ShaderNodeBsdfAnisotropic", poll=object_cycles_shader_nodes_poll),
271         NodeItem("ShaderNodeBsdfVelvet", poll=object_cycles_shader_nodes_poll),
272         NodeItem("ShaderNodeBsdfToon", poll=object_cycles_shader_nodes_poll),
273         NodeItem("ShaderNodeSubsurfaceScattering", poll=object_cycles_shader_nodes_poll),
274         NodeItem("ShaderNodeEmission", poll=object_eevee_cycles_shader_nodes_poll),
275         NodeItem("ShaderNodeBsdfHair", poll=object_cycles_shader_nodes_poll),
276         NodeItem("ShaderNodeBackground", poll=world_shader_nodes_poll),
277         NodeItem("ShaderNodeAmbientOcclusion", poll=object_cycles_shader_nodes_poll),
278         NodeItem("ShaderNodeHoldout", poll=object_cycles_shader_nodes_poll),
279         NodeItem("ShaderNodeVolumeAbsorption", poll=volume_shader_nodes_poll),
280         NodeItem("ShaderNodeVolumeScatter", poll=volume_shader_nodes_poll),
281         NodeItem("ShaderNodeEeveeSpecular", poll=object_eevee_shader_nodes_poll),
282         ]),
283     ShaderNewNodeCategory("SH_NEW_TEXTURE", "Texture", items=[
284         NodeItem("ShaderNodeTexImage"),
285         NodeItem("ShaderNodeTexEnvironment"),
286         NodeItem("ShaderNodeTexSky"),
287         NodeItem("ShaderNodeTexNoise"),
288         NodeItem("ShaderNodeTexWave"),
289         NodeItem("ShaderNodeTexVoronoi"),
290         NodeItem("ShaderNodeTexMusgrave"),
291         NodeItem("ShaderNodeTexGradient"),
292         NodeItem("ShaderNodeTexMagic"),
293         NodeItem("ShaderNodeTexChecker"),
294         NodeItem("ShaderNodeTexBrick"),
295         NodeItem("ShaderNodeTexPointDensity"),
296         ]),
297     ShaderNewNodeCategory("SH_NEW_OP_COLOR", "Color", items=[
298         NodeItem("ShaderNodeMixRGB"),
299         NodeItem("ShaderNodeRGBCurve"),
300         NodeItem("ShaderNodeInvert"),
301         NodeItem("ShaderNodeLightFalloff"),
302         NodeItem("ShaderNodeHueSaturation"),
303         NodeItem("ShaderNodeGamma"),
304         NodeItem("ShaderNodeBrightContrast"),
305         ]),
306     ShaderNewNodeCategory("SH_NEW_OP_VECTOR", "Vector", items=[
307         NodeItem("ShaderNodeMapping"),
308         NodeItem("ShaderNodeBump"),
309         NodeItem("ShaderNodeNormalMap"),
310         NodeItem("ShaderNodeNormal"),
311         NodeItem("ShaderNodeVectorCurve"),
312         NodeItem("ShaderNodeVectorTransform"),
313         ]),
314     ShaderNewNodeCategory("SH_NEW_CONVERTOR", "Converter", items=[
315         NodeItem("ShaderNodeMath"),
316         NodeItem("ShaderNodeValToRGB"),
317         NodeItem("ShaderNodeRGBToBW"),
318         NodeItem("ShaderNodeVectorMath"),
319         NodeItem("ShaderNodeSeparateRGB"),
320         NodeItem("ShaderNodeCombineRGB"),
321         NodeItem("ShaderNodeSeparateXYZ"),
322         NodeItem("ShaderNodeCombineXYZ"),
323         NodeItem("ShaderNodeSeparateHSV"),
324         NodeItem("ShaderNodeCombineHSV"),
325         NodeItem("ShaderNodeWavelength"),
326         NodeItem("ShaderNodeBlackbody"),
327         ]),
328     ShaderNewNodeCategory("SH_NEW_SCRIPT", "Script", items=[
329         NodeItem("ShaderNodeScript"),
330         ]),
331     ShaderNewNodeCategory("SH_NEW_GROUP", "Group", items=node_group_items),
332     ShaderNewNodeCategory("SH_NEW_LAYOUT", "Layout", items=[
333         NodeItem("NodeFrame"),
334         NodeItem("NodeReroute"),
335         ]),
336     ]
337
338 compositor_node_categories = [
339     # Compositor Nodes
340     CompositorNodeCategory("CMP_INPUT", "Input", items=[
341         NodeItem("CompositorNodeRLayers"),
342         NodeItem("CompositorNodeImage"),
343         NodeItem("CompositorNodeMovieClip"),
344         NodeItem("CompositorNodeMask"),
345         NodeItem("CompositorNodeRGB"),
346         NodeItem("CompositorNodeValue"),
347         NodeItem("CompositorNodeTexture"),
348         NodeItem("CompositorNodeBokehImage"),
349         NodeItem("CompositorNodeTime"),
350         NodeItem("CompositorNodeTrackPos"),
351         NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
352         ]),
353     CompositorNodeCategory("CMP_OUTPUT", "Output", items=[
354         NodeItem("CompositorNodeComposite"),
355         NodeItem("CompositorNodeViewer"),
356         NodeItem("CompositorNodeSplitViewer"),
357         NodeItem("CompositorNodeOutputFile"),
358         NodeItem("CompositorNodeLevels"),
359         NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
360         ]),
361     CompositorNodeCategory("CMP_OP_COLOR", "Color", items=[
362         NodeItem("CompositorNodeMixRGB"),
363         NodeItem("CompositorNodeAlphaOver"),
364         NodeItem("CompositorNodeInvert"),
365         NodeItem("CompositorNodeCurveRGB"),
366         NodeItem("CompositorNodeHueSat"),
367         NodeItem("CompositorNodeColorBalance"),
368         NodeItem("CompositorNodeHueCorrect"),
369         NodeItem("CompositorNodeBrightContrast"),
370         NodeItem("CompositorNodeGamma"),
371         NodeItem("CompositorNodeColorCorrection"),
372         NodeItem("CompositorNodeTonemap"),
373         NodeItem("CompositorNodeZcombine"),
374         ]),
375     CompositorNodeCategory("CMP_CONVERTOR", "Converter", items=[
376         NodeItem("CompositorNodeMath"),
377         NodeItem("CompositorNodeValToRGB"),
378         NodeItem("CompositorNodeSetAlpha"),
379         NodeItem("CompositorNodePremulKey"),
380         NodeItem("CompositorNodeIDMask"),
381         NodeItem("CompositorNodeRGBToBW"),
382         NodeItem("CompositorNodeSepRGBA"),
383         NodeItem("CompositorNodeCombRGBA"),
384         NodeItem("CompositorNodeSepHSVA"),
385         NodeItem("CompositorNodeCombHSVA"),
386         NodeItem("CompositorNodeSepYUVA"),
387         NodeItem("CompositorNodeCombYUVA"),
388         NodeItem("CompositorNodeSepYCCA"),
389         NodeItem("CompositorNodeCombYCCA"),
390         NodeItem("CompositorNodeSwitchView"),
391         ]),
392     CompositorNodeCategory("CMP_OP_FILTER", "Filter", items=[
393         NodeItem("CompositorNodeBlur"),
394         NodeItem("CompositorNodeBilateralblur"),
395         NodeItem("CompositorNodeDilateErode"),
396         NodeItem("CompositorNodeDespeckle"),
397         NodeItem("CompositorNodeFilter"),
398         NodeItem("CompositorNodeBokehBlur"),
399         NodeItem("CompositorNodeVecBlur"),
400         NodeItem("CompositorNodeDefocus"),
401         NodeItem("CompositorNodeGlare"),
402         NodeItem("CompositorNodeInpaint"),
403         NodeItem("CompositorNodeDBlur"),
404         NodeItem("CompositorNodePixelate"),
405         NodeItem("CompositorNodeSunBeams"),
406         ]),
407     CompositorNodeCategory("CMP_OP_VECTOR", "Vector", items=[
408         NodeItem("CompositorNodeNormal"),
409         NodeItem("CompositorNodeMapValue"),
410         NodeItem("CompositorNodeMapRange"),
411         NodeItem("CompositorNodeNormalize"),
412         NodeItem("CompositorNodeCurveVec"),
413         ]),
414     CompositorNodeCategory("CMP_MATTE", "Matte", items=[
415         NodeItem("CompositorNodeKeying"),
416         NodeItem("CompositorNodeKeyingScreen"),
417         NodeItem("CompositorNodeChannelMatte"),
418         NodeItem("CompositorNodeColorSpill"),
419         NodeItem("CompositorNodeBoxMask"),
420         NodeItem("CompositorNodeEllipseMask"),
421         NodeItem("CompositorNodeLumaMatte"),
422         NodeItem("CompositorNodeDiffMatte"),
423         NodeItem("CompositorNodeDistanceMatte"),
424         NodeItem("CompositorNodeChromaMatte"),
425         NodeItem("CompositorNodeColorMatte"),
426         NodeItem("CompositorNodeDoubleEdgeMask"),
427         ]),
428     CompositorNodeCategory("CMP_DISTORT", "Distort", items=[
429         NodeItem("CompositorNodeScale"),
430         NodeItem("CompositorNodeLensdist"),
431         NodeItem("CompositorNodeMovieDistortion"),
432         NodeItem("CompositorNodeTranslate"),
433         NodeItem("CompositorNodeRotate"),
434         NodeItem("CompositorNodeFlip"),
435         NodeItem("CompositorNodeCrop"),
436         NodeItem("CompositorNodeDisplace"),
437         NodeItem("CompositorNodeMapUV"),
438         NodeItem("CompositorNodeTransform"),
439         NodeItem("CompositorNodeStabilize"),
440         NodeItem("CompositorNodePlaneTrackDeform"),
441         NodeItem("CompositorNodeCornerPin"),
442         ]),
443     CompositorNodeCategory("CMP_GROUP", "Group", items=node_group_items),
444     CompositorNodeCategory("CMP_LAYOUT", "Layout", items=[
445         NodeItem("NodeFrame"),
446         NodeItem("NodeReroute"),
447         NodeItem("CompositorNodeSwitch"),
448         ]),
449     ]
450
451 texture_node_categories = [
452     # Texture Nodes
453     TextureNodeCategory("TEX_INPUT", "Input", items=[
454         NodeItem("TextureNodeCurveTime"),
455         NodeItem("TextureNodeCoordinates"),
456         NodeItem("TextureNodeTexture"),
457         NodeItem("TextureNodeImage"),
458         NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
459         ]),
460     TextureNodeCategory("TEX_OUTPUT", "Output", items=[
461         NodeItem("TextureNodeOutput"),
462         NodeItem("TextureNodeViewer"),
463         NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
464         ]),
465     TextureNodeCategory("TEX_OP_COLOR", "Color", items=[
466         NodeItem("TextureNodeMixRGB"),
467         NodeItem("TextureNodeCurveRGB"),
468         NodeItem("TextureNodeInvert"),
469         NodeItem("TextureNodeHueSaturation"),
470         NodeItem("TextureNodeCompose"),
471         NodeItem("TextureNodeDecompose"),
472         ]),
473     TextureNodeCategory("TEX_PATTERN", "Pattern", items=[
474         NodeItem("TextureNodeChecker"),
475         NodeItem("TextureNodeBricks"),
476         ]),
477     TextureNodeCategory("TEX_TEXTURE", "Textures", items=[
478         NodeItem("TextureNodeTexNoise"),
479         NodeItem("TextureNodeTexDistNoise"),
480         NodeItem("TextureNodeTexClouds"),
481         NodeItem("TextureNodeTexBlend"),
482         NodeItem("TextureNodeTexVoronoi"),
483         NodeItem("TextureNodeTexMagic"),
484         NodeItem("TextureNodeTexMarble"),
485         NodeItem("TextureNodeTexWood"),
486         NodeItem("TextureNodeTexMusgrave"),
487         NodeItem("TextureNodeTexStucci"),
488         ]),
489     TextureNodeCategory("TEX_CONVERTOR", "Converter", items=[
490         NodeItem("TextureNodeMath"),
491         NodeItem("TextureNodeValToRGB"),
492         NodeItem("TextureNodeRGBToBW"),
493         NodeItem("TextureNodeValToNor"),
494         NodeItem("TextureNodeDistance"),
495         ]),
496     TextureNodeCategory("TEX_DISTORT", "Distort", items=[
497         NodeItem("TextureNodeScale"),
498         NodeItem("TextureNodeTranslate"),
499         NodeItem("TextureNodeRotate"),
500         NodeItem("TextureNodeAt"),
501         ]),
502     TextureNodeCategory("TEX_GROUP", "Group", items=node_group_items),
503     TextureNodeCategory("TEX_LAYOUT", "Layout", items=[
504         NodeItem("NodeFrame"),
505         NodeItem("NodeReroute"),
506         ]),
507     ]
508
509
510 def register():
511     nodeitems_utils.register_node_categories('SHADER', shader_node_categories)
512     nodeitems_utils.register_node_categories('COMPOSITING', compositor_node_categories)
513     nodeitems_utils.register_node_categories('TEXTURE', texture_node_categories)
514
515
516 def unregister():
517     nodeitems_utils.unregister_node_categories('SHADER')
518     nodeitems_utils.unregister_node_categories('COMPOSITING')
519     nodeitems_utils.unregister_node_categories('TEXTURE')
520
521
522 if __name__ == "__main__":
523     register()