This is a follow-up ticket on the Metadata naming issue. Basically, when Nuke imports the Layers, it replaces certain characters with an underscore, but does not update the metadata that comes with it. This is known and handled partially in the other report.
The problem is that Nuke replaces much more than just dots. Actually it seems that only alphanumeric digits plus underscores and dashes are ok. The fact that the default view layer name in Blender is View Layer, which Nuke turns into View_Layer, doesn't exactly help. To fix this, I suggest changing the def _legal_nuke_layer_name to the code below:
def _legal_nuke_layer_name(name):
""" Blender produces channels with certain characters in the name, which Nuke
changes to "_". We have to make sure we handle Cryptomattes
that are built this way. Doing this by only allowing alphanumeric
output plus dash and underscores
"""
return "".join([x if x.lower() in 'abcdefghijklmnopqrstuvwxyz1234567890_-' else '_' for x in name])
This reverses the logic. Instead of stripping out illegal characters, it allows the legal ones. We tested this internally and it proved to work for our cases.
The text was updated successfully, but these errors were encountered:
Hi there,
This is a follow-up ticket on the Metadata naming issue. Basically, when Nuke imports the Layers, it replaces certain characters with an underscore, but does not update the metadata that comes with it. This is known and handled partially in the other report.
The problem is that Nuke replaces much more than just dots. Actually it seems that only alphanumeric digits plus underscores and dashes are ok. The fact that the default view layer name in Blender is
View Layer, which Nuke turns intoView_Layer, doesn't exactly help. To fix this, I suggest changing thedef _legal_nuke_layer_nameto the code below:This reverses the logic. Instead of stripping out illegal characters, it allows the legal ones. We tested this internally and it proved to work for our cases.
The text was updated successfully, but these errors were encountered: