From 08ab3cbcce1eb9c2de4953a83b50cabc44479d3c Mon Sep 17 00:00:00 2001 From: OmarSquircleArt Date: Thu, 22 Aug 2019 14:26:09 +0200 Subject: Shading: Add object color to Object Info node. The object color property is added as an additional output in the Object Info node. Reviewers: brecht Differential Revision: https://developer.blender.org/D5554 --- intern/cycles/kernel/shaders/node_object_info.osl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'intern/cycles/kernel/shaders') diff --git a/intern/cycles/kernel/shaders/node_object_info.osl b/intern/cycles/kernel/shaders/node_object_info.osl index 0904a30a53f..350404bb747 100644 --- a/intern/cycles/kernel/shaders/node_object_info.osl +++ b/intern/cycles/kernel/shaders/node_object_info.osl @@ -17,11 +17,13 @@ #include "stdosl.h" shader node_object_info(output point Location = point(0.0, 0.0, 0.0), + output color Color = color(1.0, 1.0, 1.0), output float ObjectIndex = 0.0, output float MaterialIndex = 0.0, output float Random = 0.0) { getattribute("object:location", Location); + getattribute("object:color", Color); getattribute("object:index", ObjectIndex); getattribute("material:index", MaterialIndex); getattribute("object:random", Random); -- cgit v1.2.3