CMake: add WITH_LINKER_LLD option for unix platforms
[blender-staging.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.type == 'NODE_EDITOR' and
44                 context.space_data.tree_type == 'CompositorNodeTree')
45
46
47 class ShaderNodeCategory(SortedNodeCategory):
48     @classmethod
49     def poll(cls, context):
50         return (context.space_data.type == 'NODE_EDITOR' and
51                 context.space_data.tree_type == 'ShaderNodeTree')
52
53
54 class TextureNodeCategory(SortedNodeCategory):
55     @classmethod
56     def poll(cls, context):
57         return (context.space_data.type == 'NODE_EDITOR' and
58                 context.space_data.tree_type == 'TextureNodeTree')
59
60
61 class SimulationNodeCategory(SortedNodeCategory):
62     @classmethod
63     def poll(cls, context):
64         return (context.space_data.type == 'NODE_EDITOR' and
65                 context.space_data.tree_type == 'SimulationNodeTree')
66
67
68 # menu entry for node group tools
69 def group_tools_draw(self, layout, context):
70     layout.operator("node.group_make")
71     layout.operator("node.group_ungroup")
72     layout.separator()
73
74
75 # maps node tree type to group node type
76 node_tree_group_type = {
77     'CompositorNodeTree': 'CompositorNodeGroup',
78     'ShaderNodeTree': 'ShaderNodeGroup',
79     'TextureNodeTree': 'TextureNodeGroup',
80     'SimulationNodeTree': 'SimulationNodeGroup',
81 }
82
83
84 # generic node group items generator for shader, compositor, simulation and texture node groups
85 def node_group_items(context):
86     if context is None:
87         return
88     space = context.space_data
89     if not space:
90         return
91     ntree = space.edit_tree
92     if not ntree:
93         return
94
95     yield NodeItemCustom(draw=group_tools_draw)
96
97     def contains_group(nodetree, group):
98         if nodetree == group:
99             return True
100         else:
101             for node in nodetree.nodes:
102                 if node.bl_idname in node_tree_group_type.values() and node.node_tree is not None:
103                     if contains_group(node.node_tree, group):
104                         return True
105         return False
106
107     for group in context.blend_data.node_groups:
108         if group.bl_idname != ntree.bl_idname:
109             continue
110         # filter out recursive groups
111         if contains_group(group, ntree):
112             continue
113         # filter out hidden nodetrees
114         if group.name.startswith('.'):
115             continue
116         yield NodeItem(node_tree_group_type[group.bl_idname],
117                        group.name,
118                        {"node_tree": "bpy.data.node_groups[%r]" % group.name})
119
120
121 # only show input/output nodes inside node groups
122 def group_input_output_item_poll(context):
123     space = context.space_data
124     if space.edit_tree in bpy.data.node_groups.values():
125         return True
126     return False
127
128
129 # only show input/output nodes when editing line style node trees
130 def line_style_shader_nodes_poll(context):
131     snode = context.space_data
132     return (snode.tree_type == 'ShaderNodeTree' and
133             snode.shader_type == 'LINESTYLE')
134
135
136 # only show nodes working in world node trees
137 def world_shader_nodes_poll(context):
138     snode = context.space_data
139     return (snode.tree_type == 'ShaderNodeTree' and
140             snode.shader_type == 'WORLD')
141
142
143 # only show nodes working in object node trees
144 def object_shader_nodes_poll(context):
145     snode = context.space_data
146     return (snode.tree_type == 'ShaderNodeTree' and
147             snode.shader_type == 'OBJECT')
148
149
150 def cycles_shader_nodes_poll(context):
151     return context.engine == 'CYCLES'
152
153
154 def eevee_shader_nodes_poll(context):
155     return context.engine == 'BLENDER_EEVEE'
156
157
158 def eevee_cycles_shader_nodes_poll(context):
159     return (cycles_shader_nodes_poll(context) or
160             eevee_shader_nodes_poll(context))
161
162
163 def object_cycles_shader_nodes_poll(context):
164     return (object_shader_nodes_poll(context) and
165             cycles_shader_nodes_poll(context))
166
167
168 def cycles_aov_node_poll(context):
169     return (object_cycles_shader_nodes_poll(context) or
170             world_shader_nodes_poll(context))
171
172
173 def object_eevee_shader_nodes_poll(context):
174     return (object_shader_nodes_poll(context) and
175             eevee_shader_nodes_poll(context))
176
177
178 def object_eevee_cycles_shader_nodes_poll(context):
179     return (object_shader_nodes_poll(context) and
180             eevee_cycles_shader_nodes_poll(context))
181
182
183 # All standard node categories currently used in nodes.
184
185 shader_node_categories = [
186     # Shader Nodes (Cycles and Eevee)
187     ShaderNodeCategory("SH_NEW_INPUT", "Input", items=[
188         NodeItem("ShaderNodeTexCoord"),
189         NodeItem("ShaderNodeAttribute"),
190         NodeItem("ShaderNodeLightPath"),
191         NodeItem("ShaderNodeFresnel"),
192         NodeItem("ShaderNodeLayerWeight"),
193         NodeItem("ShaderNodeRGB"),
194         NodeItem("ShaderNodeValue"),
195         NodeItem("ShaderNodeTangent"),
196         NodeItem("ShaderNodeNewGeometry"),
197         NodeItem("ShaderNodeWireframe"),
198         NodeItem("ShaderNodeBevel"),
199         NodeItem("ShaderNodeAmbientOcclusion"),
200         NodeItem("ShaderNodeObjectInfo"),
201         NodeItem("ShaderNodeHairInfo"),
202         NodeItem("ShaderNodeVolumeInfo"),
203         NodeItem("ShaderNodeParticleInfo"),
204         NodeItem("ShaderNodeCameraData"),
205         NodeItem("ShaderNodeUVMap"),
206         NodeItem("ShaderNodeVertexColor"),
207         NodeItem("ShaderNodeUVAlongStroke", poll=line_style_shader_nodes_poll),
208         NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
209     ]),
210     ShaderNodeCategory("SH_NEW_OUTPUT", "Output", items=[
211         NodeItem("ShaderNodeOutputMaterial", poll=object_eevee_cycles_shader_nodes_poll),
212         NodeItem("ShaderNodeOutputLight", poll=object_cycles_shader_nodes_poll),
213         NodeItem("ShaderNodeOutputAOV", poll=cycles_aov_node_poll),
214         NodeItem("ShaderNodeOutputWorld", poll=world_shader_nodes_poll),
215         NodeItem("ShaderNodeOutputLineStyle", poll=line_style_shader_nodes_poll),
216         NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
217     ]),
218     ShaderNodeCategory("SH_NEW_SHADER", "Shader", items=[
219         NodeItem("ShaderNodeMixShader", poll=eevee_cycles_shader_nodes_poll),
220         NodeItem("ShaderNodeAddShader", poll=eevee_cycles_shader_nodes_poll),
221         NodeItem("ShaderNodeBsdfDiffuse", poll=object_eevee_cycles_shader_nodes_poll),
222         NodeItem("ShaderNodeBsdfPrincipled", poll=object_eevee_cycles_shader_nodes_poll),
223         NodeItem("ShaderNodeBsdfGlossy", poll=object_eevee_cycles_shader_nodes_poll),
224         NodeItem("ShaderNodeBsdfTransparent", poll=object_eevee_cycles_shader_nodes_poll),
225         NodeItem("ShaderNodeBsdfRefraction", poll=object_eevee_cycles_shader_nodes_poll),
226         NodeItem("ShaderNodeBsdfGlass", poll=object_eevee_cycles_shader_nodes_poll),
227         NodeItem("ShaderNodeBsdfTranslucent", poll=object_eevee_cycles_shader_nodes_poll),
228         NodeItem("ShaderNodeBsdfAnisotropic", poll=object_cycles_shader_nodes_poll),
229         NodeItem("ShaderNodeBsdfVelvet", poll=object_cycles_shader_nodes_poll),
230         NodeItem("ShaderNodeBsdfToon", poll=object_cycles_shader_nodes_poll),
231         NodeItem("ShaderNodeSubsurfaceScattering", poll=object_eevee_cycles_shader_nodes_poll),
232         NodeItem("ShaderNodeEmission", poll=eevee_cycles_shader_nodes_poll),
233         NodeItem("ShaderNodeBsdfHair", poll=object_cycles_shader_nodes_poll),
234         NodeItem("ShaderNodeBackground", poll=world_shader_nodes_poll),
235         NodeItem("ShaderNodeHoldout", poll=object_eevee_cycles_shader_nodes_poll),
236         NodeItem("ShaderNodeVolumeAbsorption", poll=eevee_cycles_shader_nodes_poll),
237         NodeItem("ShaderNodeVolumeScatter", poll=eevee_cycles_shader_nodes_poll),
238         NodeItem("ShaderNodeVolumePrincipled"),
239         NodeItem("ShaderNodeEeveeSpecular", poll=object_eevee_shader_nodes_poll),
240         NodeItem("ShaderNodeBsdfHairPrincipled", poll=object_cycles_shader_nodes_poll)
241     ]),
242     ShaderNodeCategory("SH_NEW_TEXTURE", "Texture", items=[
243         NodeItem("ShaderNodeTexImage"),
244         NodeItem("ShaderNodeTexEnvironment"),
245         NodeItem("ShaderNodeTexSky"),
246         NodeItem("ShaderNodeTexNoise"),
247         NodeItem("ShaderNodeTexWave"),
248         NodeItem("ShaderNodeTexVoronoi"),
249         NodeItem("ShaderNodeTexMusgrave"),
250         NodeItem("ShaderNodeTexGradient"),
251         NodeItem("ShaderNodeTexMagic"),
252         NodeItem("ShaderNodeTexChecker"),
253         NodeItem("ShaderNodeTexBrick"),
254         NodeItem("ShaderNodeTexPointDensity"),
255         NodeItem("ShaderNodeTexIES"),
256         NodeItem("ShaderNodeTexWhiteNoise"),
257     ]),
258     ShaderNodeCategory("SH_NEW_OP_COLOR", "Color", items=[
259         NodeItem("ShaderNodeMixRGB"),
260         NodeItem("ShaderNodeRGBCurve"),
261         NodeItem("ShaderNodeInvert"),
262         NodeItem("ShaderNodeLightFalloff"),
263         NodeItem("ShaderNodeHueSaturation"),
264         NodeItem("ShaderNodeGamma"),
265         NodeItem("ShaderNodeBrightContrast"),
266     ]),
267     ShaderNodeCategory("SH_NEW_OP_VECTOR", "Vector", items=[
268         NodeItem("ShaderNodeMapping"),
269         NodeItem("ShaderNodeBump"),
270         NodeItem("ShaderNodeDisplacement"),
271         NodeItem("ShaderNodeVectorDisplacement"),
272         NodeItem("ShaderNodeNormalMap"),
273         NodeItem("ShaderNodeNormal"),
274         NodeItem("ShaderNodeVectorCurve"),
275         NodeItem("ShaderNodeVectorRotate"),
276         NodeItem("ShaderNodeVectorTransform"),
277     ]),
278     ShaderNodeCategory("SH_NEW_CONVERTOR", "Converter", items=[
279         NodeItem("ShaderNodeMapRange"),
280         NodeItem("ShaderNodeClamp"),
281         NodeItem("ShaderNodeMath"),
282         NodeItem("ShaderNodeValToRGB"),
283         NodeItem("ShaderNodeRGBToBW"),
284         NodeItem("ShaderNodeShaderToRGB", poll=object_eevee_shader_nodes_poll),
285         NodeItem("ShaderNodeVectorMath"),
286         NodeItem("ShaderNodeSeparateRGB"),
287         NodeItem("ShaderNodeCombineRGB"),
288         NodeItem("ShaderNodeSeparateXYZ"),
289         NodeItem("ShaderNodeCombineXYZ"),
290         NodeItem("ShaderNodeSeparateHSV"),
291         NodeItem("ShaderNodeCombineHSV"),
292         NodeItem("ShaderNodeWavelength"),
293         NodeItem("ShaderNodeBlackbody"),
294     ]),
295     ShaderNodeCategory("SH_NEW_SCRIPT", "Script", items=[
296         NodeItem("ShaderNodeScript"),
297     ]),
298     ShaderNodeCategory("SH_NEW_GROUP", "Group", items=node_group_items),
299     ShaderNodeCategory("SH_NEW_LAYOUT", "Layout", items=[
300         NodeItem("NodeFrame"),
301         NodeItem("NodeReroute"),
302     ]),
303 ]
304
305 compositor_node_categories = [
306     # Compositor Nodes
307     CompositorNodeCategory("CMP_INPUT", "Input", items=[
308         NodeItem("CompositorNodeRLayers"),
309         NodeItem("CompositorNodeImage"),
310         NodeItem("CompositorNodeMovieClip"),
311         NodeItem("CompositorNodeMask"),
312         NodeItem("CompositorNodeRGB"),
313         NodeItem("CompositorNodeValue"),
314         NodeItem("CompositorNodeTexture"),
315         NodeItem("CompositorNodeBokehImage"),
316         NodeItem("CompositorNodeTime"),
317         NodeItem("CompositorNodeTrackPos"),
318         NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
319     ]),
320     CompositorNodeCategory("CMP_OUTPUT", "Output", items=[
321         NodeItem("CompositorNodeComposite"),
322         NodeItem("CompositorNodeViewer"),
323         NodeItem("CompositorNodeSplitViewer"),
324         NodeItem("CompositorNodeOutputFile"),
325         NodeItem("CompositorNodeLevels"),
326         NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
327     ]),
328     CompositorNodeCategory("CMP_OP_COLOR", "Color", items=[
329         NodeItem("CompositorNodeMixRGB"),
330         NodeItem("CompositorNodeAlphaOver"),
331         NodeItem("CompositorNodeInvert"),
332         NodeItem("CompositorNodeCurveRGB"),
333         NodeItem("CompositorNodeHueSat"),
334         NodeItem("CompositorNodeColorBalance"),
335         NodeItem("CompositorNodeHueCorrect"),
336         NodeItem("CompositorNodeBrightContrast"),
337         NodeItem("CompositorNodeGamma"),
338         NodeItem("CompositorNodeColorCorrection"),
339         NodeItem("CompositorNodeTonemap"),
340         NodeItem("CompositorNodeZcombine"),
341     ]),
342     CompositorNodeCategory("CMP_CONVERTOR", "Converter", items=[
343         NodeItem("CompositorNodeMath"),
344         NodeItem("CompositorNodeValToRGB"),
345         NodeItem("CompositorNodeSetAlpha"),
346         NodeItem("CompositorNodePremulKey"),
347         NodeItem("CompositorNodeIDMask"),
348         NodeItem("CompositorNodeRGBToBW"),
349         NodeItem("CompositorNodeSepRGBA"),
350         NodeItem("CompositorNodeCombRGBA"),
351         NodeItem("CompositorNodeSepHSVA"),
352         NodeItem("CompositorNodeCombHSVA"),
353         NodeItem("CompositorNodeSepYUVA"),
354         NodeItem("CompositorNodeCombYUVA"),
355         NodeItem("CompositorNodeSepYCCA"),
356         NodeItem("CompositorNodeCombYCCA"),
357         NodeItem("CompositorNodeSwitchView"),
358     ]),
359     CompositorNodeCategory("CMP_OP_FILTER", "Filter", items=[
360         NodeItem("CompositorNodeBlur"),
361         NodeItem("CompositorNodeBilateralblur"),
362         NodeItem("CompositorNodeDilateErode"),
363         NodeItem("CompositorNodeDespeckle"),
364         NodeItem("CompositorNodeFilter"),
365         NodeItem("CompositorNodeBokehBlur"),
366         NodeItem("CompositorNodeVecBlur"),
367         NodeItem("CompositorNodeDefocus"),
368         NodeItem("CompositorNodeGlare"),
369         NodeItem("CompositorNodeInpaint"),
370         NodeItem("CompositorNodeDBlur"),
371         NodeItem("CompositorNodePixelate"),
372         NodeItem("CompositorNodeSunBeams"),
373         NodeItem("CompositorNodeDenoise"),
374     ]),
375     CompositorNodeCategory("CMP_OP_VECTOR", "Vector", items=[
376         NodeItem("CompositorNodeNormal"),
377         NodeItem("CompositorNodeMapValue"),
378         NodeItem("CompositorNodeMapRange"),
379         NodeItem("CompositorNodeNormalize"),
380         NodeItem("CompositorNodeCurveVec"),
381     ]),
382     CompositorNodeCategory("CMP_MATTE", "Matte", items=[
383         NodeItem("CompositorNodeKeying"),
384         NodeItem("CompositorNodeKeyingScreen"),
385         NodeItem("CompositorNodeChannelMatte"),
386         NodeItem("CompositorNodeColorSpill"),
387         NodeItem("CompositorNodeBoxMask"),
388         NodeItem("CompositorNodeEllipseMask"),
389         NodeItem("CompositorNodeLumaMatte"),
390         NodeItem("CompositorNodeDiffMatte"),
391         NodeItem("CompositorNodeDistanceMatte"),
392         NodeItem("CompositorNodeChromaMatte"),
393         NodeItem("CompositorNodeColorMatte"),
394         NodeItem("CompositorNodeDoubleEdgeMask"),
395         NodeItem("CompositorNodeCryptomatte"),
396     ]),
397     CompositorNodeCategory("CMP_DISTORT", "Distort", items=[
398         NodeItem("CompositorNodeScale"),
399         NodeItem("CompositorNodeLensdist"),
400         NodeItem("CompositorNodeMovieDistortion"),
401         NodeItem("CompositorNodeTranslate"),
402         NodeItem("CompositorNodeRotate"),
403         NodeItem("CompositorNodeFlip"),
404         NodeItem("CompositorNodeCrop"),
405         NodeItem("CompositorNodeDisplace"),
406         NodeItem("CompositorNodeMapUV"),
407         NodeItem("CompositorNodeTransform"),
408         NodeItem("CompositorNodeStabilize"),
409         NodeItem("CompositorNodePlaneTrackDeform"),
410         NodeItem("CompositorNodeCornerPin"),
411     ]),
412     CompositorNodeCategory("CMP_GROUP", "Group", items=node_group_items),
413     CompositorNodeCategory("CMP_LAYOUT", "Layout", items=[
414         NodeItem("NodeFrame"),
415         NodeItem("NodeReroute"),
416         NodeItem("CompositorNodeSwitch"),
417     ]),
418 ]
419
420 texture_node_categories = [
421     # Texture Nodes
422     TextureNodeCategory("TEX_INPUT", "Input", items=[
423         NodeItem("TextureNodeCurveTime"),
424         NodeItem("TextureNodeCoordinates"),
425         NodeItem("TextureNodeTexture"),
426         NodeItem("TextureNodeImage"),
427         NodeItem("NodeGroupInput", poll=group_input_output_item_poll),
428     ]),
429     TextureNodeCategory("TEX_OUTPUT", "Output", items=[
430         NodeItem("TextureNodeOutput"),
431         NodeItem("TextureNodeViewer"),
432         NodeItem("NodeGroupOutput", poll=group_input_output_item_poll),
433     ]),
434     TextureNodeCategory("TEX_OP_COLOR", "Color", items=[
435         NodeItem("TextureNodeMixRGB"),
436         NodeItem("TextureNodeCurveRGB"),
437         NodeItem("TextureNodeInvert"),
438         NodeItem("TextureNodeHueSaturation"),
439         NodeItem("TextureNodeCompose"),
440         NodeItem("TextureNodeDecompose"),
441     ]),
442     TextureNodeCategory("TEX_PATTERN", "Pattern", items=[
443         NodeItem("TextureNodeChecker"),
444         NodeItem("TextureNodeBricks"),
445     ]),
446     TextureNodeCategory("TEX_TEXTURE", "Textures", items=[
447         NodeItem("TextureNodeTexNoise"),
448         NodeItem("TextureNodeTexDistNoise"),
449         NodeItem("TextureNodeTexClouds"),
450         NodeItem("TextureNodeTexBlend"),
451         NodeItem("TextureNodeTexVoronoi"),
452         NodeItem("TextureNodeTexMagic"),
453         NodeItem("TextureNodeTexMarble"),
454         NodeItem("TextureNodeTexWood"),
455         NodeItem("TextureNodeTexMusgrave"),
456         NodeItem("TextureNodeTexStucci"),
457     ]),
458     TextureNodeCategory("TEX_CONVERTOR", "Converter", items=[
459         NodeItem("TextureNodeMath"),
460         NodeItem("TextureNodeValToRGB"),
461         NodeItem("TextureNodeRGBToBW"),
462         NodeItem("TextureNodeValToNor"),
463         NodeItem("TextureNodeDistance"),
464     ]),
465     TextureNodeCategory("TEX_DISTORT", "Distort", items=[
466         NodeItem("TextureNodeScale"),
467         NodeItem("TextureNodeTranslate"),
468         NodeItem("TextureNodeRotate"),
469         NodeItem("TextureNodeAt"),
470     ]),
471     TextureNodeCategory("TEX_GROUP", "Group", items=node_group_items),
472     TextureNodeCategory("TEX_LAYOUT", "Layout", items=[
473         NodeItem("NodeFrame"),
474         NodeItem("NodeReroute"),
475     ]),
476 ]
477
478 simulation_node_categories = [
479     # Simulation Nodes
480     SimulationNodeCategory("SIM_OUTPUT", "Output", items=[
481         NodeItem("SimulationNodeParticleSimulation"),
482     ]),
483     SimulationNodeCategory("SIM_INPUTS", "Input", items=[
484         NodeItem("SimulationNodeTime"),
485         NodeItem("SimulationNodeParticleAttribute"),
486     ]),
487     SimulationNodeCategory("SIM_EMITTERS", "Emitters", items=[
488         NodeItem("SimulationNodeParticleMeshEmitter"),
489         NodeItem("SimulationNodeEmitParticles"),
490     ]),
491     SimulationNodeCategory("SIM_EVENTS", "Events", items=[
492         NodeItem("SimulationNodeParticleBirthEvent"),
493         NodeItem("SimulationNodeParticleTimeStepEvent"),
494         NodeItem("SimulationNodeParticleMeshCollisionEvent"),
495     ]),
496     SimulationNodeCategory("SIM_FORCES", "Forces", items=[
497         NodeItem("SimulationNodeForce"),
498     ]),
499     SimulationNodeCategory("SIM_EXECUTE", "Execute", items=[
500         NodeItem("SimulationNodeSetParticleAttribute"),
501         NodeItem("SimulationNodeExecuteCondition"),
502         NodeItem("SimulationNodeMultiExecute"),
503     ]),
504     SimulationNodeCategory("SIM_NOISE", "Noise", items=[
505         NodeItem("ShaderNodeTexNoise"),
506         NodeItem("ShaderNodeTexWhiteNoise"),
507     ]),
508     SimulationNodeCategory("SIM_COLOR", "Color", items=[
509         NodeItem("ShaderNodeMixRGB"),
510         NodeItem("ShaderNodeInvert"),
511         NodeItem("ShaderNodeHueSaturation"),
512         NodeItem("ShaderNodeGamma"),
513         NodeItem("ShaderNodeBrightContrast"),
514     ]),
515     SimulationNodeCategory("SIM_CONVERTER", "Converter", items=[
516         NodeItem("ShaderNodeMapRange"),
517         NodeItem("ShaderNodeClamp"),
518         NodeItem("ShaderNodeMath"),
519         NodeItem("ShaderNodeValToRGB"),
520         NodeItem("ShaderNodeVectorMath"),
521         NodeItem("ShaderNodeSeparateRGB"),
522         NodeItem("ShaderNodeCombineRGB"),
523         NodeItem("ShaderNodeSeparateXYZ"),
524         NodeItem("ShaderNodeCombineXYZ"),
525         NodeItem("ShaderNodeSeparateHSV"),
526         NodeItem("ShaderNodeCombineHSV"),
527         NodeItem("FunctionNodeBooleanMath"),
528         NodeItem("FunctionNodeFloatCompare"),
529         NodeItem("FunctionNodeSwitch"),
530     ]),
531     SimulationNodeCategory("SIM_GROUP", "Group", items=node_group_items),
532     SimulationNodeCategory("SIM_LAYOUT", "Layout", items=[
533         NodeItem("NodeFrame"),
534         NodeItem("NodeReroute"),
535     ]),
536 ]
537
538
539 def register():
540     nodeitems_utils.register_node_categories('SHADER', shader_node_categories)
541     nodeitems_utils.register_node_categories('COMPOSITING', compositor_node_categories)
542     nodeitems_utils.register_node_categories('TEXTURE', texture_node_categories)
543     nodeitems_utils.register_node_categories('SIMULATION', simulation_node_categories)
544
545
546 def unregister():
547     nodeitems_utils.unregister_node_categories('SHADER')
548     nodeitems_utils.unregister_node_categories('COMPOSITING')
549     nodeitems_utils.unregister_node_categories('TEXTURE')
550     nodeitems_utils.unregister_node_categories('SIMULATION')
551
552
553 if __name__ == "__main__":
554     register()