ValuePresets (obvpm):
The ValuePresets node is designed to manage and apply predefined sets of values, known as presets, within a workflow. This node serves as a crucial tool for ensuring consistency and efficiency in your projects by allowing you to save, load, and apply specific configurations quickly. The primary goal of the ValuePresets node is to provide a reliable mechanism for embedding workflows with specific settings, ensuring that any changes or customizations are accurately reflected and documented. This node checks the integrity of presets against the actual values being used, preventing discrepancies that could arise from manual edits. By doing so, it maintains the integrity of the workflow and ensures that the labels and settings are truthful and consistent. This is particularly beneficial in complex projects where maintaining a clear and accurate record of configurations is essential.
ValuePresets (obvpm) Input Parameters:
values
The values parameter is a JSON string that represents the current set of values being used in the workflow. It acts as the primary source of truth for the node, ensuring that the actual values being executed match the intended configuration. This parameter is crucial for maintaining consistency and accuracy in the workflow, as it prevents any discrepancies between the preset label and the actual values. The default value is an empty JSON object {}, and it supports multiline input for ease of editing.
presets
The presets parameter is a JSON string that contains predefined sets of values, allowing you to quickly apply specific configurations to your workflow. This parameter is optional and defaults to an empty JSON object {}. It supports multiline input, making it easier to manage complex presets. By using this parameter, you can streamline your workflow by quickly switching between different configurations without manually adjusting each value.
names
The names parameter is a string that mirrors the schema's field names, ensuring that the node's output can be accurately traced and matched with the corresponding input fields. This parameter is essential for maintaining the integrity of the workflow, as it allows downstream nodes to correctly interpret and utilize the output from the ValuePresets node. The default value is an empty string, and it supports multiline input for better readability and management.
ValuePresets (obvpm) Output Parameters:
packed
The packed output parameter is a dictionary that contains the final set of values after applying the selected preset and any additional modifications. This output is crucial for ensuring that the workflow executes with the correct configuration, as it reflects the actual values being used. By providing a clear and accurate representation of the current settings, the packed parameter helps maintain consistency and transparency in the workflow.
extra
The extra output parameter is a list of field names that are present in the stored values but not included in the packed output. This parameter is important for identifying any discrepancies or additional fields that may not be part of the current preset configuration. By highlighting these extra fields, the extra parameter helps you ensure that all relevant values are accounted for and that the workflow remains consistent and accurate.
ValuePresets (obvpm) Usage Tips:
- Ensure that your
valuesandpresetsparameters are correctly formatted as JSON strings to avoid parsing errors and ensure smooth execution. - Regularly update and maintain your presets to reflect any changes in your workflow, ensuring that the configurations remain accurate and relevant.
- Use the
namesparameter to maintain a clear mapping between input fields and output values, facilitating easier debugging and workflow management.
ValuePresets (obvpm) Common Errors and Solutions:
Value Presets: %s %r for field %r is not %s.
- Explanation: This error occurs when a value provided does not match the expected type, such as providing a string where a number is expected.
- Solution: Ensure that all values match the expected data types as defined in the schema. Double-check the input values for any discrepancies.
Value Presets: numbers must be finite
- Explanation: This error indicates that a non-finite number, such as infinity or NaN, was provided where a finite number is required.
- Solution: Verify that all numerical inputs are finite values. Avoid using operations that could result in infinite or undefined numbers.
Value Presets: %s for field %r is %d characters; the limit is %d.
- Explanation: This error occurs when a text input exceeds the maximum allowed character limit.
- Solution: Reduce the length of the text input to comply with the character limit. Consider breaking down long strings into smaller parts if necessary.
Value Presets: field %r borrows its choices from node %r, which is not installed.
- Explanation: This error indicates that a required node or package is missing, preventing the field from accessing its choices.
- Solution: Install the necessary node or package that provides the required choices for the field. Ensure all dependencies are correctly installed.
