Filesystem utility nodes#6750
Conversation
|
I've rebased this on |
|
Would be good to get some 👀 on this before I completely forget what it was I was doing :) |
|
Rebased on |
murraystevenson
left a comment
There was a problem hiding this comment.
Thanks John, I've noted a few small things inline but overall this is looking like another great addition for 1.7.
As we touched on this morning, one thing that might be worth improving in the future is making it easier to rename sequences. Currently RenameFiles is a bit awkward for that purpose, but it's still possible via the find and replace plugs...
| "extensions" : { | ||
|
|
||
| "description" : | ||
| """ | ||
| A list of file extensions to filter on. Extension comparison | ||
| is case-insensitive. | ||
| """, | ||
|
|
||
| "preset:All" : "*", | ||
|
|
||
| "plugValueWidget:type" : "GafferUI.PresetsPlugValueWidget", | ||
| "presetsPlugValueWidget:allowCustom" : True, | ||
|
|
||
| }, |
There was a problem hiding this comment.
Would it be worth having a way to only list directories? You can sort of do that currently by setting extensions to "", but it's not bullet-proof if there are also files without extensions. Maybe this could be a mode plug that could also allow only returning files so when setting extensions to "*" you could avoid a mix of files of directories. Though I wouldn't call this a huge priority and we could always add a plug later and default it to "files and directories" mode...
There was a problem hiding this comment.
Yeah, that sounds useful. I wonder if two separate files and directories checkboxes would be easier to use than mode? If you don't mind, I'd rather do this as a followup at some point, so I can focus on the bigger stuff needed for 1.7.
There was a problem hiding this comment.
Separate files and directories checkboxes as a later followup sounds good to me.
|
Note to self : Changes.md needs work when squashing - everything is under the wrong version. |
Added to GafferDispatch rather than Gaffer because it is a natural companion for an upcoming series of nodes that manipulates files (and because Gaffer is fairly cluttered already).
This just registers some metadata to add extension presets and menu items for creating FileList nodes.
3769d4d to
6149ffb
Compare
I squashed this down and updated Changes.md thinking we might be able to merge this today, though once the tests were able to run we hit an issue on Windows with RenameFilesTest.testRenameSymlink where |
This adds a little set of TaskNodes for renaming, copying and deleting files, as well as a FileList node for finding files matching certain criteria. Nothing too exciting, but hopefully a bit friendlier than doing the same stuff with SystemCommand/PythonCommand all the time.