Skip to content

Commit

Permalink
Updates to MDL implementations
Browse files Browse the repository at this point in the history
- Add missing exports for mx_ifgreater, mx_ifgreatereq, and mx_ifequal.
- Remove unused functions for mx_convert, mx_combine2, mx_combine3, and mx_combine4.
  • Loading branch information
jstone-lucasfilm committed Jun 9, 2024
1 parent 2352013 commit 458d33b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 301 deletions.
275 changes: 0 additions & 275 deletions source/MaterialXGenMdl/mdl/materialx/stdlib_1_6.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -3983,281 +3983,6 @@ export bool mx_ifequal_booleanB(
if (mxp_value1 == mxp_value2) { return true; } return false;
}

export color mx_convert_float_color3(
float mxp_in = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return color(mxp_in);
}

export core::color4 mx_convert_float_color4(
float mxp_in = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return core::mk_color4(mxp_in);
}

export float2 mx_convert_float_vector2(
float mxp_in = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float2(mxp_in);
}

export float3 mx_convert_float_vector3(
float mxp_in = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float3(mxp_in);
}

export float4 mx_convert_float_vector4(
float mxp_in = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float4(mxp_in);
}

export float3 mx_convert_vector2_vector3(
float2 mxp_in = float2(0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float3(mxp_in.x, mxp_in.y, 0.0);
}

export color mx_convert_vector3_color3(
float3 mxp_in = float3(0.0, 0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return color(mxp_in);
}

export float2 mx_convert_vector3_vector2(
float3 mxp_in = float3(0.0, 0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float2(mxp_in.x, mxp_in.y);
}

export float4 mx_convert_vector3_vector4(
float3 mxp_in = float3(0.0, 0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float4(mxp_in.x, mxp_in.y, mxp_in.z, 0.0);
}

export core::color4 mx_convert_vector4_color4(
float4 mxp_in = float4(0.0, 0.0, 0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return core::mk_color4(mxp_in);
}

export float3 mx_convert_vector4_vector3(
float4 mxp_in = float4(0.0, 0.0, 0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float3(mxp_in.x, mxp_in.y, mxp_in.z);
}

export float3 mx_convert_color3_vector3(
color mxp_in = color(0.0, 0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float3(mxp_in);
}

export float4 mx_convert_color4_vector4(
core::color4 mxp_in = core::mk_color4(0.0, 0.0, 0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return core::mk_float4(mxp_in);
}

export core::color4 mx_convert_color3_color4(
color mxp_in = color(0.0, 0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return core::mk_color4(mxp_in);
}

export color mx_convert_color4_color3(
core::color4 mxp_in = core::mk_color4(0.0, 0.0, 0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return mxp_in.rgb;
}

export float mx_convert_boolean_float(
bool mxp_in = bool(false)
)
[[
anno::description("Node Group: channel")
]]
{
return float(mxp_in);
}

export float mx_convert_integer_float(
int mxp_in = int(0)
)
[[
anno::description("Node Group: channel")
]]
{
return float(mxp_in);
}

export float2 mx_combine2_vector2(
float mxp_in1 = float(0.0),
float mxp_in2 = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float2(mxp_in1, mxp_in2);
}

export core::color4 mx_combine2_color4CF(
color mxp_in1 = color(0.0, 0.0, 0.0),
float mxp_in2 = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return core::color4(mxp_in1, mxp_in2);
}

export float4 mx_combine2_vector4VF(
float3 mxp_in1 = float3(0.0, 0.0, 0.0),
float mxp_in2 = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float4(mxp_in1.x, mxp_in1.y, mxp_in1.z, mxp_in2);
}

export core::color4 mx_combine2_color4CC(
float2 mxp_in1 = float2(0.0, 0.0),
float2 mxp_in2 = float2(0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return core::color4(color(mxp_in1.x, mxp_in1.y, mxp_in2.x), mxp_in2.y);
}

export float4 mx_combine2_vector4VV(
float2 mxp_in1 = float2(0.0, 0.0),
float2 mxp_in2 = float2(0.0, 0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float4(mxp_in1.x, mxp_in1.y, mxp_in2.x, mxp_in2.y);
}

export color mx_combine3_color3(
float mxp_in1 = float(0.0),
float mxp_in2 = float(0.0),
float mxp_in3 = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return color(mxp_in1, mxp_in2, mxp_in3);
}

export float3 mx_combine3_vector3(
float mxp_in1 = float(0.0),
float mxp_in2 = float(0.0),
float mxp_in3 = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float3(mxp_in1, mxp_in2, mxp_in3);
}

export core::color4 mx_combine4_color4(
float mxp_in1 = float(0.0),
float mxp_in2 = float(0.0),
float mxp_in3 = float(0.0),
float mxp_in4 = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return core::mk_color4(mxp_in1, mxp_in2, mxp_in3, mxp_in4);
}

export float4 mx_combine4_vector4(
float mxp_in1 = float(0.0),
float mxp_in2 = float(0.0),
float mxp_in3 = float(0.0),
float mxp_in4 = float(0.0)
)
[[
anno::description("Node Group: channel")
]]
{
return float4(mxp_in1, mxp_in2, mxp_in3, mxp_in4);
}

export float3x3 mx_creatematrix_vector3_matrix33(
float3 mxp_in1 = float3(1.0, 0.0, 0.0),
float3 mxp_in2 = float3(0.0, 1.0, 0.0),
Expand Down
47 changes: 21 additions & 26 deletions source/MaterialXGenMdl/mdl/materialx/stdlib_1_8.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -223,74 +223,69 @@ export using .::stdlib_1_7 import mx_ifgreater_color4;
export using .::stdlib_1_7 import mx_ifgreater_vector2;
export using .::stdlib_1_7 import mx_ifgreater_vector3;
export using .::stdlib_1_7 import mx_ifgreater_vector4;
export using .::stdlib_1_7 import mx_ifgreater_matrix33;
export using .::stdlib_1_7 import mx_ifgreater_matrix44;
export using .::stdlib_1_7 import mx_ifgreater_boolean;
export using .::stdlib_1_7 import mx_ifgreater_floatI;
export using .::stdlib_1_7 import mx_ifgreater_integerI;
export using .::stdlib_1_7 import mx_ifgreater_color3I;
export using .::stdlib_1_7 import mx_ifgreater_color4I;
export using .::stdlib_1_7 import mx_ifgreater_vector2I;
export using .::stdlib_1_7 import mx_ifgreater_vector3I;
export using .::stdlib_1_7 import mx_ifgreater_vector4I;
export using .::stdlib_1_7 import mx_ifgreater_matrix33I;
export using .::stdlib_1_7 import mx_ifgreater_matrix44I;
export using .::stdlib_1_7 import mx_ifgreater_booleanI;
export using .::stdlib_1_7 import mx_ifgreatereq_float;
export using .::stdlib_1_7 import mx_ifgreatereq_integer;
export using .::stdlib_1_7 import mx_ifgreatereq_color3;
export using .::stdlib_1_7 import mx_ifgreatereq_color4;
export using .::stdlib_1_7 import mx_ifgreatereq_vector2;
export using .::stdlib_1_7 import mx_ifgreatereq_vector3;
export using .::stdlib_1_7 import mx_ifgreatereq_vector4;
export using .::stdlib_1_7 import mx_ifgreatereq_matrix33;
export using .::stdlib_1_7 import mx_ifgreatereq_matrix44;
export using .::stdlib_1_7 import mx_ifgreatereq_boolean;
export using .::stdlib_1_7 import mx_ifgreatereq_floatI;
export using .::stdlib_1_7 import mx_ifgreatereq_integerI;
export using .::stdlib_1_7 import mx_ifgreatereq_color3I;
export using .::stdlib_1_7 import mx_ifgreatereq_color4I;
export using .::stdlib_1_7 import mx_ifgreatereq_vector2I;
export using .::stdlib_1_7 import mx_ifgreatereq_vector3I;
export using .::stdlib_1_7 import mx_ifgreatereq_vector4I;
export using .::stdlib_1_7 import mx_ifgreatereq_matrix33I;
export using .::stdlib_1_7 import mx_ifgreatereq_matrix44I;
export using .::stdlib_1_7 import mx_ifgreatereq_booleanI;
export using .::stdlib_1_7 import mx_ifequal_float;
export using .::stdlib_1_7 import mx_ifequal_integer;
export using .::stdlib_1_7 import mx_ifequal_color3;
export using .::stdlib_1_7 import mx_ifequal_color4;
export using .::stdlib_1_7 import mx_ifequal_vector2;
export using .::stdlib_1_7 import mx_ifequal_vector3;
export using .::stdlib_1_7 import mx_ifequal_vector4;
export using .::stdlib_1_7 import mx_ifequal_matrix33;
export using .::stdlib_1_7 import mx_ifequal_matrix44;
export using .::stdlib_1_7 import mx_ifequal_boolean;
export using .::stdlib_1_7 import mx_ifequal_floatI;
export using .::stdlib_1_7 import mx_ifequal_integerI;
export using .::stdlib_1_7 import mx_ifequal_color3I;
export using .::stdlib_1_7 import mx_ifequal_color4I;
export using .::stdlib_1_7 import mx_ifequal_vector2I;
export using .::stdlib_1_7 import mx_ifequal_vector3I;
export using .::stdlib_1_7 import mx_ifequal_vector4I;
export using .::stdlib_1_7 import mx_ifequal_matrix33I;
export using .::stdlib_1_7 import mx_ifequal_matrix44I;
export using .::stdlib_1_7 import mx_ifequal_booleanI;
export using .::stdlib_1_7 import mx_ifequal_floatB;
export using .::stdlib_1_7 import mx_ifequal_integerB;
export using .::stdlib_1_7 import mx_ifequal_color3B;
export using .::stdlib_1_7 import mx_ifequal_color4B;
export using .::stdlib_1_7 import mx_ifequal_vector2B;
export using .::stdlib_1_7 import mx_ifequal_vector3B;
export using .::stdlib_1_7 import mx_ifequal_vector4B;
export using .::stdlib_1_7 import mx_convert_float_color3;
export using .::stdlib_1_7 import mx_convert_float_color4;
export using .::stdlib_1_7 import mx_convert_float_vector2;
export using .::stdlib_1_7 import mx_convert_float_vector3;
export using .::stdlib_1_7 import mx_convert_float_vector4;
export using .::stdlib_1_7 import mx_convert_vector2_vector3;
export using .::stdlib_1_7 import mx_convert_vector3_color3;
export using .::stdlib_1_7 import mx_convert_vector3_vector2;
export using .::stdlib_1_7 import mx_convert_vector3_vector4;
export using .::stdlib_1_7 import mx_convert_vector4_color4;
export using .::stdlib_1_7 import mx_convert_vector4_vector3;
export using .::stdlib_1_7 import mx_convert_color3_vector3;
export using .::stdlib_1_7 import mx_convert_color4_vector4;
export using .::stdlib_1_7 import mx_convert_color3_color4;
export using .::stdlib_1_7 import mx_convert_color4_color3;
export using .::stdlib_1_7 import mx_convert_boolean_float;
export using .::stdlib_1_7 import mx_convert_integer_float;
export using .::stdlib_1_7 import mx_combine2_vector2;
export using .::stdlib_1_7 import mx_combine2_color4CF;
export using .::stdlib_1_7 import mx_combine2_vector4VF;
export using .::stdlib_1_7 import mx_combine2_color4CC;
export using .::stdlib_1_7 import mx_combine2_vector4VV;
export using .::stdlib_1_7 import mx_combine3_color3;
export using .::stdlib_1_7 import mx_combine3_vector3;
export using .::stdlib_1_7 import mx_combine4_color4;
export using .::stdlib_1_7 import mx_combine4_vector4;
export using .::stdlib_1_7 import mx_ifequal_matrix33B;
export using .::stdlib_1_7 import mx_ifequal_matrix44B;
export using .::stdlib_1_7 import mx_ifequal_booleanB;
export using .::stdlib_1_7 import mx_creatematrix_vector3_matrix33;
export using .::stdlib_1_7 import mx_creatematrix_vector3_matrix44;
export using .::stdlib_1_7 import mx_creatematrix_vector4_matrix44;
Expand Down

0 comments on commit 458d33b

Please sign in to comment.