[Bf-python] Error when running nodes.new() in currrent SVN
Peter D. Cassetta
peter at fingertipsoft.com
Sat Apr 27 02:46:28 CEST 2013
Hi all,
I am encountering an error when adding new nodes to a material's node
tree (via Python).
I know there have been some API changes recently; I just rebuilt Blender
from SVN yesterday.
Here is the code I am running and the error I am getting.
>>> C.object.active_material.node_tree.nodes.new('MIX_SHADER')
Traceback (most recent call last):
File "/opt/blender-svn/2.66/python/lib/python3.3/code.py", line 90, in runcode
exec(code, self.locals)
File "<blender_console>", line 1, in <module>
RuntimeError: Error: Node type MIX_SHADER undefined
Is nodes.new() deprecated, or just broken at the moment?
I am getting this error for any node type, by the way.
Also, do I need to change my code to fix this, or just wait a bit?
Thanks for any assistance!
-Peter Cassetta
More information about the Bf-python
mailing list