Page MenuHome

File Metadata

Nick Keeline (nrk)
Nov 13 2013, 4:28 PM

#Select default cube and run this script
import bpy
MatObj = bpy.context.active_object
Mat ="Test_Material")
if len(MatObj.material_slots) == 0:
Slot = MatObj.material_slots[0]
Slot.material = Mat
Mat.use_nodes = True
Nodes = Mat.node_tree
#Create a Node
MathPower ='MATH')
MathPower.location = [100,100]
#Create another node Node
MathPower2 ='MATH')
MathPower2.location = [100,400]
#Create an output Node
MathPower3 ='MATH')
MathPower3.location = [300,250]
#This is weird that this works??????[0],MathPower.outputs[0])[0],MathPower2.outputs[0])
#But this doesn't
#Create a Node
MathPower4 ='MATH')
MathPower4.location = [600,100]
#Create another node Node
MathPower5 ='MATH')
MathPower5.location = [600,400]
#Create an output Node
MathPower6 ='MATH')
MathPower6.location = [450,250]
#This should tie one output to two inputs but it doesn't!!!!![0],MathPower6.outputs[0])
#this one deletes the one above it and it doesn't[0],MathPower6.outputs[0])

Event Timeline