← All ideas

ShaderNodeX renamed to NodeX (python API)

With Geometry Nodes being reworked in 3.0, it's about time they cleanly used math nodes. For example, the current system uses ShaderMathNode to refer to math nodes inside a GeoNodes tree. We already have type-agnostic Node classes ( NodeReroute , NodeLink etc).

I've also noticed the compositor uses CompositorNodeMath and texture editor uses TextureNodeMath . This doesn't only apply to X NodeMath , but it's an easy example.

It would give us a better sense of what nodes are universally compatible between all node tree types.

I'd also like to see a "generic node editor" where you could make nodegroups that could then be used in any nodetree, without needing to manually copy it to a new type.

(passing mention that the input vector node is only a weaker version of the CombineXYZ node. Irrelevant redudancy that goes against the straight forward nature of nodes. As such it should be phased out, automatically switched out for its more versatile equivalent)

100%

Development Status: Open

Upvote 1 Downvote 0
syborg64
4 Nov 2021

3 Comments

jeroenbakker

Blender api doesn’t support inheritance of internal structures. This results in these names. Can you elaborate on what issue you try to solve and why it is important to make these nodes the same.

syborg64 Author

I'm not sure what you mean by the first part. All of these nodes inherit from the class "NodeInternal"

The issue is about reusing graph code in different tree types. Classically I will want a 'lerp' function, but it's absurd to have to create it 3 times (and maintain it, for larger functions)

An other issue solved is of cleanliness: it has all the same properties, the only exception being its name. That's poor practice

jeroenbakker

Blender uses a type-info based system. inheritance is only conceptual. If you request the subclass/class of a type you will see.

>>> bpy.types.ShaderNodeValue
<class 'bpy.types.ShaderNodeValue'>

>>> bpy.types.ShaderNodeValue.__class__.__name__
'RNAMetaPropGroup'

This shows that the conceptual inheritance isn't available in the implementation what is expected. Blender internally doens't support inheritance.

The case you want to address can easily be implemented by Python wrapper. These wrappers can become part of the bpy_utils packages.