Merge pull request #3849 from pypeclub/feature/transcoding_float2_attr_type

General: Transcoding handle float2 attr type
This commit is contained in:
Jakub Trllo 2022-09-22 09:37:13 +02:00 committed by GitHub
commit 022b6c6f54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -139,7 +139,7 @@ def convert_value_by_type_name(value_type, value, logger=None):
return float(value)
# Vectors will probably have more types
if value_type == "vec2f":
if value_type in ("vec2f", "float2"):
return [float(item) for item in value.split(",")]
# Matrix should be always have square size of element 3x3, 4x4
@ -204,8 +204,8 @@ def convert_value_by_type_name(value_type, value, logger=None):
)
return output
logger.info((
"MISSING IMPLEMENTATION:"
logger.debug((
"Dev note (missing implementation):"
" Unknown attrib type \"{}\". Value: {}"
).format(value_type, value))
return value
@ -263,8 +263,8 @@ def parse_oiio_xml_output(xml_string, logger=None):
# - feel free to add more tags
else:
value = child.text
logger.info((
"MISSING IMPLEMENTATION:"
logger.debug((
"Dev note (missing implementation):"
" Unknown tag \"{}\". Value \"{}\""
).format(tag_name, value))

View file

@ -56,7 +56,7 @@ def convert_value_by_type_name(value_type, value):
return float(value)
# Vectors will probably have more types
if value_type == "vec2f":
if value_type in ("vec2f", "float2"):
return [float(item) for item in value.split(",")]
# Matrix should be always have square size of element 3x3, 4x4
@ -127,7 +127,7 @@ def convert_value_by_type_name(value_type, value):
return output
print((
"MISSING IMPLEMENTATION:"
"Dev note (missing implementation):"
" Unknown attrib type \"{}\". Value: {}"
).format(value_type, value))
return value
@ -183,7 +183,7 @@ def parse_oiio_xml_output(xml_string):
else:
value = child.text
print((
"MISSING IMPLEMENTATION:"
"Dev note (missing implementation):"
" Unknown tag \"{}\". Value \"{}\""
).format(tag_name, value))