Show Artist name on specific Houdini file version in workfile window


Hi, Can we get artist’s saved file name on the details tab??

sometime multiple people works on same shots, It helps in understanding the versions

1 Like

Recently this was added for UNIX/Linux I believe but skipped for Windows. See General: Show user who created workfile PR.

As has been discussed in the PR there it’s unclear what the most trivial Windows-equivalent to that would be. Once that’s figured out and there’s good code logic for it we can implement it on the Windows-side too.

the way of getting file owner in that PR is as follows, which wasn’t compatible with windows as it hasn’t pwd module

import os 
import pwd
file_path = "A file path"
file_stat = os.stat(file_path)
file_owner = pwd.getpwuid(file_stat.st_uid).pw_name

so, to solve that we need to find the equivalent windows code.
but, I’m just curios why the username wasn’t saved to database in the first place ?

I’d say it’s likely due to the fact that I believe it’s currently not ensured are workfiles actually have a database entry because in a host a user can technically still save without the workfiles tool itself. (I believe that’s also why work files tool lists the files on disk rather than workfiles from the database.

Anyway, this seems to be what could be a Windows equivalent method: Howto determine file owner on windows using python without pywin32 - Stack Overflow which could avoid adding win32api, win32security, etc. dependencies that are required for e.g. this.