reset pars to defaults

Seems like this must exist as a method for operators, but I can’t seem to find the method.

It’d be just lovely if there was a method to reset all of an operators parameters to defaults. I know that you can loop through the pars collection and then reset from there, but it seems like there are a few holes in that approach. Namely that there are some pars that don’t seem to have default vals.

For example, looking at a level TOP there are 8 pars from the common page that are missing defaults - which breaks an effort to loop through pars, and re-set them to their default vals. :confused:

From the level TOP the missing defaults are:

Here’s a tox to illustrate what I’m seeing
base_missing_defaults.tox (670 Bytes)

In reality I guess there are two items on this wish-list:

  1. defaults for all parameter vals
  2. a built in python method for resetting all pars to their default vals

Hi Thanks.
We’re having a look now.
There are a few issues both with menus and parameters that don’t explicitly define a default (ie, assume 0, or first menu entry).

Okay, the next posted build of 99 will contain proper default values for all parameters.
You may still see some blank entries, when they are genuinely blank by default (example: Geo COMP, SOP Path parameter).

Please note however, that these default values are the actual operator default values, and not necessarily the values when you place one down from the OP Create menu.
In those cases, often parameters are set with more useful values, such as the Movie In TOP path pointing to a sample image, instead of its default blank path.

The RFE for an OP.resetAllParameters() is on our list however,

Cheers
Rob

2 Likes

YESSSSSSSSSSSS!

Great great news! Thanks Rob.

did some sort of OP.resetAllParameters() ever get implemented?

would like to bump for a method for resetAllParameters()

1 Like