Post #4025: In command tab:

📋 Metadata

🏷️ Tags

macro scripting intermediate

  • Macro Editor
  • Python Scripting

💬 Content

In command tab:

Math

bpy.ops.node.add_node('INVOKE_DEFAULT', True, type='ShaderNodeMath', use_transform=True); C.active_object.active_material.node_tree.nodes[-1].operation = 'MULTIPLY'

MixRGB

bpy.ops.node.add_node('INVOKE_DEFAULT', True, type='ShaderNodeMixRGB', use_transform=True); C.active_object.active_material.node_tree.nodes[-1].blend_type = 'MULTIPLY'

To get a specific function change the last part that says 'MULTIPLY' to the one you want.
If you dont know the name just create the node and change the function, in the script mode you will be able to see the correct name

image


❤️ 2 likes


🔗 View on Blender Artists