nuke.addBeforeUserRenameGsv

nuke.addBeforeUserRenameGsv(function)[source]

Add a callback to be called before the user renames a GSV via the UI or the python API.

Parameters

function (Callable[[path, name], bool]) – A callable function which takes parameters for the GSV path and new name. If this function returns false, the gsv rename will be aborted.

Raises

TypeError – If a single callable parameter is not provided.

Returns

True if the callback was added successfully.

Return type

bool