mirror of
https://github.com/blender/blender
synced 2026-10-25 03:07:01 +03:00
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
11 lines
279 B
Text
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);
|
|
}
|