Edit: This method is not 100% accurate because some Geometry nodes have not yet had their classes evaluated when GeometryNode subclasses are enumerated. The workaround is to explicitly import those classes.
Thanks to a commenter this list is now closer to complete. But also, it turns out that there are many classes not yet instantiated. The solution seems to be creating a Geometry Node modifier by hand that has one instance of every group. So I guess the actual answer is "No, there's no way to get the list, but here's how to get part of it."
Rather than relying on name similarity here's how to derive the complete list of names for node types that are valid in a Geometry Node Tree, provided that all such node types derive from either GeometryNode or ShaderNode:
import bpy
# This script assumes that
# 1) All valid Geometry Nodes are derived from bpy.types.GeometryNode
# 2) All valid Shader Nodes are derived from bpy.types.ShaderNode
# 3) Some but not all Shader Nodes are valid in a Geometry Node tree.
# 4) Attempting to use an invalid Shader Node generates a RuntimeError exception.
# There is a bug. These two types don't show up as subtypes of geometry nodes
# unless they've been explicitly imported. (Thanks Chris)
from bpy.types import GeometryNodeSubdivideMesh
from bpy.types import GeometryNodeTransform
# Create an object (any will do) and add GeometryNodes modifier to it.
bpy.ops.mesh.primitive_cube_add()
bpy.ops.object.modifier_add(type='NODES')
# Find the geometry node tree
curve = bpy.context.active_object
node_group = curve.modifiers['GeometryNodes'].node_group
nodes = node_group.nodes
# Find out which shader node classes are supported
Crossover_subClasses = [cls.__name__ for cls in bpy.types.GeometryNode.__subclasses__()]
Shader_Node_subClasses = [cls.__name__ for cls in bpy.types.ShaderNode.__subclasses__()]
Crossover_subClasses = Geometry_Node_subClasses
for node_type in Shader_Node_subClasses:
try:
nodes.new(node_type)
Crossover_subClasses.append(node_type)
except RuntimeError:
print(f"Shader Node RuntimeError: {node_type}")
# Print the list
Crossover_subClasses.sort()
for node_type in Crossover_subClasses:
print(node_type)
The (now more accurate) list follows, in sorted order
GeometryNodeAttributeRemove
GeometryNodeAttributeStatistic
GeometryNodeAttributeTransfer
GeometryNodeCaptureAttribute
GeometryNodeCurvePrimitiveBezierSegment
GeometryNodeCurvePrimitiveCircle
GeometryNodeCurvePrimitiveLine
GeometryNodeCurvePrimitiveQuadrilateral
GeometryNodeCurveQuadraticBezier
GeometryNodeCurveSpiral
GeometryNodeCurveStar
GeometryNodeImageTexture
GeometryNodeInstanceOnPoints
GeometryNodeInstancesToPoints
GeometryNodeLegacyAttributeClamp
GeometryNodeLegacyAttributeColorRamp
GeometryNodeLegacyAttributeCombineXYZ
GeometryNodeLegacyAttributeCompare
GeometryNodeLegacyAttributeConvert
GeometryNodeLegacyAttributeCurveMap
GeometryNodeLegacyAttributeFill
GeometryNodeLegacyAttributeMapRange
GeometryNodeLegacyAttributeMath
GeometryNodeLegacyAttributeMix
GeometryNodeLegacyAttributeProximity
GeometryNodeLegacyAttributeRandomize
GeometryNodeLegacyAttributeSampleTexture
GeometryNodeLegacyAttributeSeparateXYZ
GeometryNodeLegacyAttributeTransfer
GeometryNodeLegacyAttributeVectorMath
GeometryNodeLegacyAttributeVectorRotate
GeometryNodeLegacyPointsToVolume
GeometryNodeLegacyVolumeToMesh
GeometryNodeMeshCircle
GeometryNodeMeshCone
GeometryNodeMeshCube
GeometryNodeMeshCylinder
GeometryNodeMeshGrid
GeometryNodeMeshIcoSphere
GeometryNodeMeshLine
GeometryNodeMeshUVSphere
GeometryNodeRealizeInstances
GeometryNodeRotateInstances
GeometryNodeScaleInstances
GeometryNodeStringJoin
GeometryNodeStringToCurves
GeometryNodeSubdivideMesh
GeometryNodeSwitch
GeometryNodeTransform
GeometryNodeTranslateInstances
GeometryNodeViewer
GeometryNodeVolumeToMesh
ShaderNodeClamp
ShaderNodeCombineRGB
ShaderNodeCombineXYZ
ShaderNodeFloatCurve
ShaderNodeMapRange
ShaderNodeMath
ShaderNodeMixRGB
ShaderNodeRGBCurve
ShaderNodeSeparateRGB
ShaderNodeSeparateXYZ
ShaderNodeTexBrick
ShaderNodeTexChecker
ShaderNodeTexGradient
ShaderNodeTexMagic
ShaderNodeTexMusgrave
ShaderNodeTexNoise
ShaderNodeTexVoronoi
ShaderNodeTexWave
ShaderNodeTexWhiteNoise
ShaderNodeValToRGB
ShaderNodeValue
ShaderNodeVectorCurve
ShaderNodeVectorMath
ShaderNodeVectorRotate
There are many Shader nodes that will trip the RuntimeError, even in 3.0.0. If you run this version of the code it will print their names.
type
andname
. But there should be a way to get the type from inside the environment ? $\endgroup$