I have created a custom nodetree with python and to save time I am attempting to import some existing nodes. Specifically the math node from the texture node tree "bpy.types.TextureNodeMath".

I have imported it and added it to a category, it appears in the add node menu but upon attempting to add it i get the error:

"RuntimeError: Error: Cannot add node of type TextureNodeMath to node tree 'NodeTree' "

Any help is most appreciated.



1 Answer 1


Each "classic" node has poll() on its own editor type.

Before inserting a node, this function is first called for the node to be inserted, and if it returns a True, the node can be inserted.

Because TextureNodeTree.bl_idname does not equal the bl_idname of your node tree, you cannot add it.


You must log in to answer this question.

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