blender/intern/cycles/kernel/osl/shaders/node_scene_time.osl
Cartesian Caramel 2a732a3fba Shaders: Add Scene Time node
This PR adds a Scene Time node to the shader editor.
The goal is for parity with the Compositor and Geometry Nodes.

As recommended by Bretch, this also adds a SceneAttributes class owned
by Scene since there wasn't a good data structure to store scene data
in.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/156850
2026-05-21 15:22:05 +02:00

11 lines
279 B
Text

/* SPDX-FileCopyrightText: 2026 Blender Foundation
*
* SPDX-License-Identifier: Apache-2.0 */
#include "stdcycles.h"
shader node_scene_time(output float Seconds = 0.0, output float Frame = 0.0)
{
getattribute("scene:time", Seconds);
getattribute("scene:frame", Frame);
}