If I do:


I get things such as MIX_SHADER

but if I do:


I get

<bpy_struct, ShaderNodeMixShader("Mix Shader.001") at 0x7fdb7da7f808>

Barring the use of regexes, is there a way to get the type of the bpy_struct - in other words ShaderNodeMixShader?

so I can use it for templating code later?


1 Answer 1

>>> node.bl_idname

Alternatively, you can use the same way you get the name of anything's type in Python

>>> type(node)
<class 'bpy.types.ShaderNodeMixShader'>

>>> type(node).__name__

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .