ID 135776 - nuke.removeFavoriteDir() does not work if it's not given a type

Follow

Problem summary
nuke.removeFavoriteDir() does not work if it's not given a type.

The Nuke Python API Reference Guide states that the type argument is optional:

https://learn.foundry.com/nuke/developers/latest/pythondevguide/_autosummary/nuke.removeFavoriteDir.html 

 

This issue only appears to occur on Windows and macOS.

 

Customer reported version
Nuke 13.2v4

 

Customer reported platform
Windows 10

 

Steps to reproduce

 

1) Open Nuke.

 

2) Open the Script Editor and execute the following line of code. You may need to replace 'C:/Program Files'with a path that exists on your machine:

nuke.addFavoriteDir('Test', 'C:/Program Files')

 

3) Press the R key in the Node Graph and notice that a new favorite directory has been added, named "Test".

 

 

4) Close the Read File(s) dialog, then execute the following line of code in the Script Editor:

nuke.removeFavoriteDir('Test')

 

5) Press the R key in the Node Graph and notice that the "Test" folder has not been removed.

 

6) Close the Read File(s) dialog, then execute the following line of code in the Script Editor:

nuke.removeFavoriteDir('Test', 0)

 

7) Press the R key in the Node Graph and notice that the "Test" folder has now been removed.

 

Expected behaviour
nuke.removeFavoriteDir() should not require the type argument, as the Nuke Python API Reference Guide states that it is optional:

https://learn.foundry.com/nuke/developers/latest/pythondevguide/_autosummary/nuke.removeFavoriteDir.html 

 

Actual behaviour
nuke.removeFavoriteDir() does not work if it's not given a type.

 

Workaround
Providing nuke.removeFavoriteDir() with a type argument of 0 should remove the favorite directory from all file browsers. For example:

nuke.removeFavoriteDir('Test', 0)

 

Reproduced by support
This bug has been reproduced in:
Nuke 13.2v5 - Windows 10 - macOS 11.6 (Big Sur)

Nuke 13.0v1 - Windows 10 - macOS 11.6 (Big Sur) - Windows Regression

Nuke 12.2v11 - macOS 11.6 (Big Sur)

Nuke 12.0v1  - macOS 11.6 (Big Sur) - macOS Regression

 

Unable to reproduce bug in:

Nuke 13.2v5 - Linux CentOS 7

Nuke 12.2v11 - Windows 10

Nuke 9.0v1 - macOS 11.6 (Big Sur)

 

Earliest version tested
Nuke 12.2v11 - Windows 10
- This issue doesn't appear in this version and has regressed on Windows.

 

Nuke 9.0v1 - macOS 11.6 (Big Sur)

- This issue doesn't appear in this version and has regressed between Nuke 9.0v1 and Nuke 12.0v1 on macOS.

    We're sorry to hear that

    Please tell us why