Script to Reset a Dial?

I was wondering if anyone knows what script command(s) will do the same thing as resetting a dial?  When I say 'reset' - it's the same as ALT-clicking on a dial, or clicking the little cog symbol and then clicking 'Reset' from the drop-down menu.  I don't think it's as simple as just setting the default value of the property, or zeroing the property, because the property might be controlled by another property.

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,888

    Restoring to memorised is actually setting to the default value, so if you have the property (and its Int or Float - those are the only ones that show a plain getDefault) then you'd use

    oDef = oProperty.getDefaultValue();

    oProperty.setValue( oDef );

    with suitable error checking and handling for possible keys, of course.

Sign In or Register to comment.