user: Show practical ways to work with ShaderNode(NodeInternal) in a Blender add-on or script – include code.

assistant: # ShaderNode(NodeInternal)

base classes — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct"), [`Node`](bpy.types.Node.html#bpy.types.Node "bpy.types.Node"), [`NodeInternal`](bpy.types.NodeInternal.html#bpy.types.NodeInternal "bpy.types.NodeInternal")

subclasses —
[`ShaderNodeAddShader`](bpy.types.ShaderNodeAddShader.html#bpy.types.ShaderNodeAddShader "bpy.types.ShaderNodeAddShader"), [`ShaderNodeAmbientOcclusion`](bpy.types.ShaderNodeAmbientOcclusion.html#bpy.types.ShaderNodeAmbientOcclusion "bpy.types.ShaderNodeAmbientOcclusion"), [`ShaderNodeAttribute`](bpy.types.ShaderNodeAttribute.html#bpy.types.ShaderNodeAttribute "bpy.types.ShaderNodeAttribute"), [`ShaderNodeBackground`](bpy.types.ShaderNodeBackground.html#bpy.types.ShaderNodeBackground "bpy.types.ShaderNodeBackground"), [`ShaderNodeBevel`](bpy.types.ShaderNodeBevel.html#bpy.types.ShaderNodeBevel "bpy.types.ShaderNodeBevel"), [`ShaderNodeBlackbody`](bpy.types.ShaderNodeBlackbody.html#bpy.types.ShaderNodeBlackbody "bpy.types.ShaderNodeBlackbody"), [`ShaderNodeBrightContrast`](bpy.types.ShaderNodeBrightContrast.html#bpy.types.ShaderNodeBrightContrast "bpy.types.ShaderNodeBrightContrast"), [`ShaderNodeBsdfAnisotropic`](bpy.types.ShaderNodeBsdfAnisotropic.html#bpy.types.ShaderNodeBsdfAnisotropic "bpy.types.ShaderNodeBsdfAnisotropic"), [`ShaderNodeBsdfDiffuse`](bpy.types.ShaderNodeBsdfDiffuse.html#bpy.types.ShaderNodeBsdfDiffuse "bpy.types.ShaderNodeBsdfDiffuse"), [`ShaderNodeBsdfGlass`](bpy.types.ShaderNodeBsdfGlass.html#bpy.types.ShaderNodeBsdfGlass "bpy.types.ShaderNodeBsdfGlass"), [`ShaderNodeBsdfHair`](bpy.types.ShaderNodeBsdfHair.html#bpy.types.ShaderNodeBsdfHair "bpy.types.ShaderNodeBsdfHair"), [`ShaderNodeBsdfHairPrincipled`](bpy.types.ShaderNodeBsdfHairPrincipled.html#bpy.types.ShaderNodeBsdfHairPrincipled "bpy.types.ShaderNodeBsdfHairPrincipled"), [`ShaderNodeBsdfMetallic`](bpy.types.ShaderNodeBsdfMetallic.html#bpy.types.ShaderNodeBsdfMetallic "bpy.types.ShaderNodeBsdfMetallic"), [`ShaderNodeBsdfPrincipled`](bpy.types.ShaderNodeBsdfPrincipled.html#bpy.types.ShaderNodeBsdfPrincipled "bpy.types.ShaderNodeBsdfPrincipled"), [`ShaderNodeBsdfRayPortal`](bpy.types.ShaderNodeBsdfRayPortal.html#bpy.types.ShaderNodeBsdfRayPortal "bpy.types.ShaderNodeBsdfRayPortal"), [`ShaderNodeBsdfRefraction`](bpy.types.ShaderNodeBsdfRefraction.html#bpy.types.ShaderNodeBsdfRefraction "bpy.types.ShaderNodeBsdfRefraction"), [`ShaderNodeBsdfSheen`](bpy.types.ShaderNodeBsdfSheen.html#bpy.types.ShaderNodeBsdfSheen "bpy.types.ShaderNodeBsdfSheen"), [`ShaderNodeBsdfToon`](bpy.types.ShaderNodeBsdfToon.html#bpy.types.ShaderNodeBsdfToon "bpy.types.ShaderNodeBsdfToon"), [`ShaderNodeBsdfTranslucent`](bpy.types.ShaderNodeBsdfTranslucent.html#bpy.types.ShaderNodeBsdfTranslucent "bpy.types.ShaderNodeBsdfTranslucent"), [`ShaderNodeBsdfTransparent`](bpy.types.ShaderNodeBsdfTransparent.html#bpy.types.ShaderNodeBsdfTransparent "bpy.types.ShaderNodeBsdfTransparent"), [`ShaderNodeBump`](bpy.types.ShaderNodeBump.html#bpy.types.ShaderNodeBump "bpy.types.ShaderNodeBump"), [`ShaderNodeCameraData`](bpy.types.ShaderNodeCameraData.html#bpy.types.ShaderNodeCameraData "bpy.types.ShaderNodeCameraData"), [`ShaderNodeClamp`](bpy.types.ShaderNodeClamp.html#bpy.types.ShaderNodeClamp "bpy.types.ShaderNodeClamp"), [`ShaderNodeCombineColor`](bpy.types.ShaderNodeCombineColor.html#bpy.types.ShaderNodeCombineColor "bpy.types.ShaderNodeCombineColor"), [`ShaderNodeCombineXYZ`](bpy.types.ShaderNodeCombineXYZ.html#bpy.types.ShaderNodeCombineXYZ "bpy.types.ShaderNodeCombineXYZ"), [`ShaderNodeCustomGroup`](bpy.types.ShaderNodeCustomGroup.html#bpy.types.ShaderNodeCustomGroup "bpy.types.ShaderNodeCustomGroup"), [`ShaderNodeDisplacement`](bpy.types.ShaderNodeDisplacement.html#bpy.types.ShaderNodeDisplacement "bpy.types.ShaderNodeDisplacement"), [`ShaderNodeEeveeSpecular`](bpy.types.ShaderNodeEeveeSpecular.html#bpy.types.ShaderNodeEeveeSpecular "bpy.types.ShaderNodeEeveeSpecular"), [`ShaderNodeEmission`](bpy.types.ShaderNodeEmission.html#bpy.types.ShaderNodeEmission "bpy.types.ShaderNodeEmission"), [`ShaderNodeFloatCurve`](bpy.types.ShaderNodeFloatCurve.html#bpy.types.ShaderNodeFloatCurve "bpy.types.ShaderNodeFloatCurve"), [`ShaderNodeFresnel`](bpy.types.ShaderNodeFresnel.html#bpy.types.ShaderNodeFresnel "bpy.types.ShaderNodeFresnel"), [`ShaderNodeGamma`](bpy.types.ShaderNodeGamma.html#bpy.types.ShaderNodeGamma "bpy.types.ShaderNodeGamma"), [`ShaderNodeGroup`](bpy.types.ShaderNodeGroup.html#bpy.types.ShaderNodeGroup "bpy.types.ShaderNodeGroup"), [`ShaderNodeHairInfo`](bpy.types.ShaderNodeHairInfo.html#bpy.types.ShaderNodeHairInfo "bpy.types.ShaderNodeHairInfo"), [`ShaderNodeHoldout`](bpy.types.ShaderNodeHoldout.html#bpy.types.ShaderNodeHoldout "bpy.types.ShaderNodeHoldout"), [`ShaderNodeHueSaturation`](bpy.types.ShaderNodeHueSaturation.html#bpy.types.ShaderNodeHueSaturation "bpy.types.ShaderNodeHueSaturation"), [`ShaderNodeInvert`](bpy.types.ShaderNodeInvert.html#bpy.types.ShaderNodeInvert "bpy.types.ShaderNodeInvert"), [`ShaderNodeLayerWeight`](bpy.types.ShaderNodeLayerWeight.html#bpy.types.ShaderNodeLayerWeight "bpy.types.ShaderNodeLayerWeight"), [`ShaderNodeLightFalloff`](bpy.types.ShaderNodeLightFalloff.html#bpy.types.ShaderNodeLightFalloff "bpy.types.ShaderNodeLightFalloff"), [`ShaderNodeLightPath`](bpy.types.ShaderNodeLightPath.html#bpy.types.ShaderNodeLightPath "bpy.types.ShaderNodeLightPath"), [`ShaderNodeMapRange`](bpy.types.ShaderNodeMapRange.html#bpy.types.ShaderNodeMapRange "bpy.types.ShaderNodeMapRange"), [`ShaderNodeMapping`](bpy.types.ShaderNodeMapping.html#bpy.types.ShaderNodeMapping "bpy.types.ShaderNodeMapping"), [`ShaderNodeMath`](bpy.types.ShaderNodeMath.html#bpy.types.ShaderNodeMath "bpy.types.ShaderNodeMath"), [`ShaderNodeMix`](bpy.types.ShaderNodeMix.html#bpy.types.ShaderNodeMix "bpy.types.ShaderNodeMix"), [`ShaderNodeMixRGB`](bpy.types.ShaderNodeMixRGB.html#bpy.types.ShaderNodeMixRGB "bpy.types.ShaderNodeMixRGB"), [`ShaderNodeMixShader`](bpy.types.ShaderNodeMixShader.html#bpy.types.ShaderNodeMixShader "bpy.types.ShaderNodeMixShader"), [`ShaderNodeNewGeometry`](bpy.types.ShaderNodeNewGeometry.html#bpy.types.ShaderNodeNewGeometry "bpy.types.ShaderNodeNewGeometry"), [`ShaderNodeNormal`](bpy.types.ShaderNodeNormal.html#bpy.types.ShaderNodeNormal "bpy.types.ShaderNodeNormal"), [`ShaderNodeNormalMap`](bpy.types.ShaderNodeNormalMap.html#bpy.types.ShaderNodeNormalMap "bpy.types.ShaderNodeNormalMap"), [`ShaderNodeObjectInfo`](bpy.types.ShaderNodeObjectInfo.html#bpy.types.ShaderNodeObjectInfo "bpy.types.ShaderNodeObjectInfo"), [`ShaderNodeOutputAOV`](bpy.types.ShaderNodeOutputAOV.html#bpy.types.ShaderNodeOutputAOV "bpy.types.ShaderNodeOutputAOV"), [`ShaderNodeOutputLight`](bpy.types.ShaderNodeOutputLight.html#bpy.types.ShaderNodeOutputLight "bpy.types.ShaderNodeOutputLight"), [`ShaderNodeOutputLineStyle`](bpy.types.ShaderNodeOutputLineStyle.html#bpy.types.ShaderNodeOutputLineStyle "bpy.types.ShaderNodeOutputLineStyle"), [`ShaderNodeOutputMaterial`](bpy.types.ShaderNodeOutputMaterial.html#bpy.types.ShaderNodeOutputMaterial "bpy.types.ShaderNodeOutputMaterial"), [`ShaderNodeOutputWorld`](bpy.types.ShaderNodeOutputWorld.html#bpy.types.ShaderNodeOutputWorld "bpy.types.ShaderNodeOutputWorld"), [`ShaderNodeParticleInfo`](bpy.types.ShaderNodeParticleInfo.html#bpy.types.ShaderNodeParticleInfo "bpy.types.ShaderNodeParticleInfo"), [`ShaderNodePointInfo`](bpy.types.ShaderNodePointInfo.html#bpy.types.ShaderNodePointInfo "bpy.types.ShaderNodePointInfo"), [`ShaderNodeRGB`](bpy.types.ShaderNodeRGB.html#bpy.types.ShaderNodeRGB "bpy.types.ShaderNodeRGB"), [`ShaderNodeRGBCurve`](bpy.types.ShaderNodeRGBCurve.html#bpy.types.ShaderNodeRGBCurve "bpy.types.ShaderNodeRGBCurve"), [`ShaderNodeRGBToBW`](bpy.types.ShaderNodeRGBToBW.html#bpy.types.ShaderNodeRGBToBW "bpy.types.ShaderNodeRGBToBW"), [`ShaderNodeRadialTiling`](bpy.types.ShaderNodeRadialTiling.html#bpy.types.ShaderNodeRadialTiling "bpy.types.ShaderNodeRadialTiling"), [`ShaderNodeScript`](bpy.types.ShaderNodeScript.html#bpy.types.ShaderNodeScript "bpy.types.ShaderNodeScript"), [`ShaderNodeSeparateColor`](bpy.types.ShaderNodeSeparateColor.html#bpy.types.ShaderNodeSeparateColor "bpy.types.ShaderNodeSeparateColor"), [`ShaderNodeSeparateXYZ`](bpy.types.ShaderNodeSeparateXYZ.html#bpy.types.ShaderNodeSeparateXYZ "bpy.types.ShaderNodeSeparateXYZ"), [`ShaderNodeShaderToRGB`](bpy.types.ShaderNodeShaderToRGB.html#bpy.types.ShaderNodeShaderToRGB "bpy.types.ShaderNodeShaderToRGB"), [`ShaderNodeSqueeze`](bpy.types.ShaderNodeSqueeze.html#bpy.types.ShaderNodeSqueeze "bpy.types.ShaderNodeSqueeze"), [`ShaderNodeSubsurfaceScattering`](bpy.types.ShaderNodeSubsurfaceScattering.html#bpy.types.ShaderNodeSubsurfaceScattering "bpy.types.ShaderNodeSubsurfaceScattering"), [`ShaderNodeTangent`](bpy.types.ShaderNodeTangent.html#bpy.types.ShaderNodeTangent "bpy.types.ShaderNodeTangent"), [`ShaderNodeTexBrick`](bpy.types.ShaderNodeTexBrick.html#bpy.types.ShaderNodeTexBrick "bpy.types.ShaderNodeTexBrick"), [`ShaderNodeTexChecker`](bpy.types.ShaderNodeTexChecker.html#bpy.types.ShaderNodeTexChecker "bpy.types.ShaderNodeTexChecker"), [`ShaderNodeTexCoord`](bpy.types.ShaderNodeTexCoord.html#bpy.types.ShaderNodeTexCoord "bpy.types.ShaderNodeTexCoord"), [`ShaderNodeTexEnvironment`](bpy.types.ShaderNodeTexEnvironment.html#bpy.types.ShaderNodeTexEnvironment "bpy.types.ShaderNodeTexEnvironment"), [`ShaderNodeTexGabor`](bpy.types.ShaderNodeTexGabor.html#bpy.types.ShaderNodeTexGabor "bpy.types.ShaderNodeTexGabor"), [`ShaderNodeTexGradient`](bpy.types.ShaderNodeTexGradient.html#bpy.types.ShaderNodeTexGradient "bpy.types.ShaderNodeTexGradient"), [`ShaderNodeTexIES`](bpy.types.ShaderNodeTexIES.html#bpy.types.ShaderNodeTexIES "bpy.types.ShaderNodeTexIES"), [`ShaderNodeTexImage`](bpy.types.ShaderNodeTexImage.html#bpy.types.ShaderNodeTexImage "bpy.types.ShaderNodeTexImage"), [`ShaderNodeTexMagic`](bpy.types.ShaderNodeTexMagic.html#bpy.types.ShaderNodeTexMagic "bpy.types.ShaderNodeTexMagic"), [`ShaderNodeTexNoise`](bpy.types.ShaderNodeTexNoise.html#bpy.types.ShaderNodeTexNoise "bpy.types.ShaderNodeTexNoise"), [`ShaderNodeTexSky`](bpy.types.ShaderNodeTexSky.html#bpy.types.ShaderNodeTexSky "bpy.types.ShaderNodeTexSky"), [`ShaderNodeTexVoronoi`](bpy.types.ShaderNodeTexVoronoi.html#bpy.types.ShaderNodeTexVoronoi "bpy.types.ShaderNodeTexVoronoi"), [`ShaderNodeTexWave`](bpy.types.ShaderNodeTexWave.html#bpy.types.ShaderNodeTexWave "bpy.types.ShaderNodeTexWave"), [`ShaderNodeTexWhiteNoise`](bpy.types.ShaderNodeTexWhiteNoise.html#bpy.types.ShaderNodeTexWhiteNoise "bpy.types.ShaderNodeTexWhiteNoise"), [`ShaderNodeUVAlongStroke`](bpy.types.ShaderNodeUVAlongStroke.html#bpy.types.ShaderNodeUVAlongStroke "bpy.types.ShaderNodeUVAlongStroke"), [`ShaderNodeUVMap`](bpy.types.ShaderNodeUVMap.html#bpy.types.ShaderNodeUVMap "bpy.types.ShaderNodeUVMap"), [`ShaderNodeValToRGB`](bpy.types.ShaderNodeValToRGB.html#bpy.types.ShaderNodeValToRGB "bpy.types.ShaderNodeValToRGB"), [`ShaderNodeValue`](bpy.types.ShaderNodeValue.html#bpy.types.ShaderNodeValue "bpy.types.ShaderNodeValue"), [`ShaderNodeVectorCurve`](bpy.types.ShaderNodeVectorCurve.html#bpy.types.ShaderNodeVectorCurve "bpy.types.ShaderNodeVectorCurve"), [`ShaderNodeVectorDisplacement`](bpy.types.ShaderNodeVectorDisplacement.html#bpy.types.ShaderNodeVectorDisplacement "bpy.types.ShaderNodeVectorDisplacement"), [`ShaderNodeVectorMath`](bpy.types.ShaderNodeVectorMath.html#bpy.types.ShaderNodeVectorMath "bpy.types.ShaderNodeVectorMath"), [`ShaderNodeVectorRotate`](bpy.types.ShaderNodeVectorRotate.html#bpy.types.ShaderNodeVectorRotate "bpy.types.ShaderNodeVectorRotate"), [`ShaderNodeVectorTransform`](bpy.types.ShaderNodeVectorTransform.html#bpy.types.ShaderNodeVectorTransform "bpy.types.ShaderNodeVectorTransform"), [`ShaderNodeVertexColor`](bpy.types.ShaderNodeVertexColor.html#bpy.types.ShaderNodeVertexColor "bpy.types.ShaderNodeVertexColor"), [`ShaderNodeVolumeAbsorption`](bpy.types.ShaderNodeVolumeAbsorption.html#bpy.types.ShaderNodeVolumeAbsorption "bpy.types.ShaderNodeVolumeAbsorption"), [`ShaderNodeVolumeCoefficients`](bpy.types.ShaderNodeVolumeCoefficients.html#bpy.types.ShaderNodeVolumeCoefficients "bpy.types.ShaderNodeVolumeCoefficients"), [`ShaderNodeVolumeInfo`](bpy.types.ShaderNodeVolumeInfo.html#bpy.types.ShaderNodeVolumeInfo "bpy.types.ShaderNodeVolumeInfo"), [`ShaderNodeVolumePrincipled`](bpy.types.ShaderNodeVolumePrincipled.html#bpy.types.ShaderNodeVolumePrincipled "bpy.types.ShaderNodeVolumePrincipled"), [`ShaderNodeVolumeScatter`](bpy.types.ShaderNodeVolumeScatter.html#bpy.types.ShaderNodeVolumeScatter "bpy.types.ShaderNodeVolumeScatter"), [`ShaderNodeWavelength`](bpy.types.ShaderNodeWavelength.html#bpy.types.ShaderNodeWavelength "bpy.types.ShaderNodeWavelength"), [`ShaderNodeWireframe`](bpy.types.ShaderNodeWireframe.html#bpy.types.ShaderNodeWireframe "bpy.types.ShaderNodeWireframe")

*class* bpy.types.ShaderNode(*NodeInternal*)
:   Material shader node

    *classmethod* bl_rna_get_subclass(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The RNA type or default when not found.

        Return type:
        :   [`bpy.types.Struct`](bpy.types.Struct.html#bpy.types.Struct "bpy.types.Struct") subclass

    *classmethod* bl_rna_get_subclass_py(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The class or default when not found.

        Return type:
        :   type