Skip to content

Commit 033004e

Browse files
authored
Implement frame node for MDL via scene data (#2823)
As discussed in Slack.
1 parent 14b9c7c commit 033004e

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ export using .::stdlib_1_7 import mx_texcoord_vector3;
8383
export using .::stdlib_1_7 import mx_geomcolor_float;
8484
export using .::stdlib_1_7 import mx_geomcolor_color3;
8585
export using .::stdlib_1_7 import mx_geomcolor_color4;
86-
export using .::stdlib_1_7 import mx_frame_float;
8786
export using .::stdlib_1_7 import mx_time_float;
8887
export using .::stdlib_1_7 import mx_modulo_color3;
8988
export using .::stdlib_1_7 import mx_modulo_color4;
@@ -447,3 +446,11 @@ export float3 mx_viewdirection_vector3(
447446
::state::coordinate_object,
448447
internal_space_direction));
449448
}
449+
450+
export float mx_frame_float()
451+
[[
452+
anno::description("Node Group: application")
453+
]]
454+
{
455+
return scene::data_lookup_float("FRAME", 1.0);
456+
}

source/MaterialXGenMdl/mdl/materialx/stdlib_1_9.mdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export using .::stdlib_1_7 import mx_texcoord_vector3;
8484
export using .::stdlib_1_7 import mx_geomcolor_float;
8585
export using .::stdlib_1_7 import mx_geomcolor_color3;
8686
export using .::stdlib_1_7 import mx_geomcolor_color4;
87-
export using .::stdlib_1_7 import mx_frame_float;
8887
export using .::stdlib_1_7 import mx_time_float;
8988
export using .::stdlib_1_7 import mx_modulo_color3;
9089
export using .::stdlib_1_7 import mx_modulo_color4;
@@ -339,6 +338,7 @@ export using .::stdlib_1_8 import mx_geompropvalue_vector2;
339338
export using .::stdlib_1_8 import mx_geompropvalue_vector3;
340339
export using .::stdlib_1_8 import mx_geompropvalue_vector4;
341340
export using .::stdlib_1_8 import mx_viewdirection_vector3;
341+
export using .::stdlib_1_8 import mx_frame_float;
342342

343343

344344

0 commit comments

Comments
 (0)