Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeEditor: Flag attributes with invalid values #2141

Merged
merged 6 commits into from
Aug 21, 2023

Commits on Aug 21, 2023

  1. [core] Add new desc parameters to flag attributes with erroneous values

    This commit adds two new description parameters:
    
    - `validValue`, which is true if the value of the attribute is not
    erroneous (i.e. valid for the type of the attribute but invalid in the
    context of that specific attribute) and false otherwise. This holds a
    different significance than the "validateValue" method, which only checks
    if the parameter's value is expected with respect to the attribute's type.
    For example, we could want an IntParam that flags any value that is not
    even: an odd integer value would successfully go through the
    "validateValue" method, but would then be flagged as an invalid value
    at the attribute's level.
    
    - `errorMessage`, an attribute-specific string that contains a message
    explaining why the attribute's `validValue` parameter might be set to
    false.
    
    By default, all the attributes' values are valid, and they have no error
    message.
    cbentejac authored and mugulmd committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    63bd6d6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d648fc9 View commit details
    Browse the repository at this point in the history
  3. [ui] GraphEditor: Flag an attribute's label when its value is invalid

    If an attribute's `validValue` is false, and it has a non-empty
    `errorMessage`, the following will happen:
    - An icon indicating an error will be added next to the attribute's name;
    - The color of the label's background will change to red to clearly
    indicate that something is wrong with the current value;
    - The error message that has been set for this attribute will be displayed
    in its tooltip, before its regular description.
    cbentejac authored and mugulmd committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    1e14b2c View commit details
    Browse the repository at this point in the history
  4. [nodes] HDR Fusion: Flag userNbBrackets as invalid if it isn't a mu…

    …ltiple of the number of inputs
    
    Add an error message for `userNbBrackets` and set `validValue` to false
    if the set number of brackets is not a multiple of the number of input
    images.
    cbentejac authored and mugulmd committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    fdd9d08 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8b48bb6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    363115b View commit details
    Browse the repository at this point in the history