[Bf-blender-cvs] [b9ad0b9] object_nodes: Simple coordinate input node for texture nodes.
Lukas Tönne
noreply at git.blender.org
Sat May 14 09:55:47 CEST 2016
Commit: b9ad0b94c0681a154bbec81b2b38ad822795f744
Author: Lukas Tönne
Date: Sat May 14 09:55:20 2016 +0200
Branches: object_nodes
https://developer.blender.org/rBb9ad0b94c0681a154bbec81b2b38ad822795f744
Simple coordinate input node for texture nodes.
===================================================================
M release/scripts/nodes/texture_nodes.py
===================================================================
diff --git a/release/scripts/nodes/texture_nodes.py b/release/scripts/nodes/texture_nodes.py
index 6bb0de0..c7f4988 100644
--- a/release/scripts/nodes/texture_nodes.py
+++ b/release/scripts/nodes/texture_nodes.py
@@ -119,6 +119,18 @@ class TextureOutputNode(TextureNodeBase, ObjectNode, DynamicSocketListNode):
compiler.map_input(0, compiler.graph_output("color"))
compiler.map_input(1, compiler.graph_output("normal"))
+
+class TextureCoordinateNode(TextureNodeBase, ObjectNode):
+ '''Texture coordinate'''
+ bl_idname = 'TextureCoordinateNode'
+ bl_label = 'Coordinate'
+
+ def init(self, context):
+ self.outputs.new('NodeSocketVector', "Location")
+
+ def compile(self, compiler):
+ compiler.map_output(0, compiler.graph_input("texture.co"))
+
###############################################################################
def register():
@@ -128,6 +140,7 @@ def register():
node_categories = [
TextureNodeCategory("TEX_INPUT", "Input", items=[
+ NodeItem("TextureCoordinateNode"),
NodeItem(ginput.bl_idname),
NodeItem("ObjectValueFloatNode"),
NodeItem("ObjectValueIntNode"),
More information about the Bf-blender-cvs
mailing list