`FileDef` doesn't work properly
Is there an existing issue for this?
- [x] I have searched the existing issues
Current Behavior:
when using a FileDef e.g.
FileDef(
"reviewable_image",
folders=False,
extensions=[".jpg", ".png", ".tif", ".exr"],
single_item=True,
allow_sequences=True,
label="Image reviewable representations",
extensions_label="Multiple Image reviewable items",
),
Tested in Maya and Houdini:
- clicking on this icon, result in this Error:
TypeError: FilesWidget._on_context_menu_requested() missing 1 required positional argument: 'valid_index'
In Houdini :
- Drag and drop a new item doesn't replace the existing item. (when having
single_item=True) - Drag and drop a new item doesn't add the item to the existing list. (when having
single_item=False)
Expected Behavior:
It should work normally.
Version
1.0.0
What platform you are running on?
Windows
Steps To Reproduce:
- Add a
FileDefin a Houdini plugin - Try steps mentioned above.
Are there any labels you wish to add?
- [x] I have added the relevant labels to the bug report.
Relevant log output:
Additional context:
No response
This pull request doesn't solve the original issue
https://github.com/user-attachments/assets/77e9525a-892c-4718-9dc4-b4d1a7baab90
Tested on Houdini 19.5 py3.7, Houdini 20.5 py10 and Houdini 20.5 py3.11
The behavior is the same. So it is not dependent on the QT or python version
@vivimage could you provide the file definition you're using so we can easily replicate the issue?
Like:
FileDef("some_key", ...)
@iLLiCiTiT Its provided in the description of the ticket. Here is another example from my addon.
@classmethod
def get_attribute_defs(cls):
return [
FileDef(
"reviewable_image",
folders=False,
extensions=IMAGE_EXTENSIONS,
single_item=False,
label="Image reviewable representations",
extensions_label="Image reviewable item",
),
TextDef(
"comment",
multiline=True,
label="Было сделано",
),
]
bumping up