Skip to content

anim_picker: Reading data file which uses ANIM_PICKER_PATH token is not working #210

@mattschwarzAnim

Description

@mattschwarzAnim

The PICKER_DATA node which you can see in the pictures doesn´t return any error. However, the picker window is empty as it returns no data:
image

The problem seems to be two different issues:

  1. No token conversion is currently happening on the path.exists check.
    https://github.com/mgear-dev/mgear4/blob/f6046994b586395c067a0dd3c6c13d31a240123f/release/scripts/mgear/anim_picker/picker_node.py#L264

As a quick test I used the protected method to add the conversion:
if not os.path.exists(file_handlers._convert_path_token(file_path)):

  1. The @convert_path_token decorator does not seems to work if the file_path variable is passed as a arg.
    https://github.com/mgear-dev/mgear4/blob/f6046994b586395c067a0dd3c6c13d31a240123f/release/scripts/mgear/anim_picker/picker_node.py#L267

When I pass it as a kwarg it returns the expected result
return file_handlers.read_data_file(file_path=file_path)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

5.0.7

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions