Community
VRED Forum
Welcome to Autodesk’s VRED Forums. Share your knowledge, ask questions, and explore popular VRED topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Metadata entry list does not show pure string lists when created via Python

1 REPLY 1
Reply
Message 1 of 2
benfabian.bekemeier
260 Views, 1 Reply

Metadata entry list does not show pure string lists when created via Python

Hi all,

I'm trying to save some lists to a metadata entry via the python.

# Selected is a manually created Metadata Set.
# It contains a manually created list entry that
# contains the string entries ['test', 'TEST']

meta = vrMetadataService.getSelection()[0]
entry = meta.getEntries().data()[0]
print(f'<{entry.getValue()}>, <{entry.getValueType()}>')
# prints: <['test', 'Test']>, <vrKernelServices.vrMetadataTypes.ValueType.List>

entry.setValueType(vrMetadataTypes.ValueType.List)
entry.setValue([0, 0])
print(f'<{entry.getValue()}>, <{entry.getValueType()}>')
# prints: <[0, 0]>, <vrKernelServices.vrMetadataTypes.ValueType.List>

entry.setValueType(vrMetadataTypes.ValueType.List)
entry.setValue([0, 'test'])
print(f'<{entry.getValue()}>, <{entry.getValueType()}>')
# prints: <[0, 'test']>, <vrKernelServices.vrMetadataTypes.ValueType.List>

entry.setValueType(vrMetadataTypes.ValueType.List)
entry.setValue(['test', 0])
print(f'<{entry.getValue()}>, <{entry.getValueType()}>')
# prints: <['test', 0]>, <vrKernelServices.vrMetadataTypes.ValueType.List>

entry.setValueType(vrMetadataTypes.ValueType.List)
entry.setValue(['test', 'test'])
print(f'<{entry.getValue()}>, <{entry.getValueType()}>')
# prints <['test', 'test']>, <vrKernelServices.vrMetadataTypes.ValueType.String>

Whenever I pass it a list thats purely constisting of strings, VRED sets the type of the entry from <vrKernelServices.vrMetadataTypes.ValueType.List> to <vrKernelServices.vrMetadataTypes.ValueType.String>. If the list consisted of a single string, it is then handled like a regular sting. If it were multiple strings, VRED starts acting weired. It seems like it still returns the list when getting the value via Python, but if I interact with the metadata window it shows an empty <vrKernelServices.vrMetadataTypes.ValueType.String> entry, without the possibility to edit its value. The list can still be retrieved and edited via Python.

benfabianbekemeier_1-1718379214804.png

Is this a bug? Is it a feature? Am I missing something?

1 REPLY 1
Message 2 of 2

Hi,

 

Thanks for reporting this issue. Yes, I can reproduce this and I will create the bug ticket for it.

 

Best regards,

Anton

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report