Skip to content

Commit

Permalink
tool preset editor
Browse files Browse the repository at this point in the history
  • Loading branch information
script-fu committed Dec 18, 2024
1 parent 16e0bc6 commit d2f8ed8
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 56 deletions.
6 changes: 3 additions & 3 deletions content/hub/feature-test/folder/Brush-Aspect-Ratio-Range.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ The brush aspect ratio should be easily understood, and predictable to use. A fi

### Changes

1. **Normalized Aspect Ratio**:
- **Normalized Aspect Ratio**:
- Replaced the old non-linear aspect ratio range of `-20 to 20` with a simplified linear range from `-1 to 1`, where `1` means undistorted, `0` represents high distortion, and `-1` flips the brush stamp.
- The aspect ratio is now applied directly, and non-linear clamping behavior is removed.
- Special handling for `0` aspect ratio is introduced to prevent problematic behavior, ensuring a minimal distortion of `0.005` when set to `0`.

2. **Code Adjustments for Consistency**:
- **Code Adjustments for Consistency**:
- Updated the aspect ratio scaling logic in the `gimp_brush_transform_get_scale`, `gimp_brush_generated_transform_size`, and related functions to reflect the linear aspect ratio system.
- Refactored the calculation logic to remove historical non-linear clamps and simplify the math, providing a clearer, more predictable transformation.

3. **UI Simplifications**:
- **UI Simplifications**:
- The brush editor now uses a `-1 to 1` range for the aspect ratio, with linear steps for finer control.
- Updated the PDB interface to reflect the new range, removing the old `-20 to 20` bounds for both internal and user-accessible API calls.

Expand Down
8 changes: 4 additions & 4 deletions content/hub/feature-test/folder/Curves-View.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ Enhance the Curve View in the Dynamics Editor and Curves Filter.

#### **Key Changes**

1. **Grid Line Visibility**:
- **Grid Line Visibility**:
- Implemented rendering modes for grid lines, ensuring consistent visibility across various background tones in the Curve View.

2. **Refined Coordinate Display**:
- **Refined Coordinate Display**:
- Redesigned the X, Y coordinate display to eliminate block highlighting, improving readability and reducing visual distraction.

3. **Improved Curve Point Visibility**:
- **Improved Curve Point Visibility**:
- Enhanced the visibility and selection of curve points, particularly on high-resolution (e.g., 4K) displays, for a more accessible user experience.

4. **Shift-Key Curve Movement**:
- **Shift-Key Curve Movement**:
- Introduced the ability to move all curve points simultaneously by holding down the Shift key, providing a quick and efficient way to adjust the entire curve.

---
Expand Down
8 changes: 4 additions & 4 deletions content/hub/feature-test/folder/Dynamics-Editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ Enhance the Dynamics Editor.

#### **Key Changes**

1. **Mapping Matrix Improvements**:
- **Mapping Matrix Improvements**:
- Renamed awkward labels like `Aspect Ratio` and `Rotation/Wheel` for clarity.
- Added margins to checkboxes to prevent label overlap and improve layout consistency.
- Included tooltips for each checkbox to explain its function.
- Enclosed the Mapping Matrix in a scrollable window, reducing the minimum size of the Dynamics Editor dock and enhancing interface flexibility.

2. **Output Editor Reset Confirmation**:
- **Output Editor Reset Confirmation**:
- Implemented a confirmation dialog that warns users before resetting curves.
- This ensures that user data is not lost unintentionally, improving overall reliability.

3. **Copy and Paste Curve Functionality**:
- **Copy and Paste Curve Functionality**:
- Introduced `Copy Curve` and `Paste Curve` buttons for reusing and sharing curve data.
- Enabled saving curve points to text files, allowing persistence between sessions and simplifying data management.

4. **Dynamic Attributes Treeview**:
- **Dynamic Attributes Treeview**:
- Enclosed the Dynamic Attributes treeview in a scrollable window, reducing the size constraints of the Dynamics Editor dock.
- This update provides a more flexible layout and ensures that the interface remains compact and manageable.

Expand Down
6 changes: 3 additions & 3 deletions content/hub/feature-test/folder/Paint-Tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ Improve the quality of the painting experience in Artbox

### Changes

1. **Easy Cursor Location**:
- **Easy Cursor Location**:
- Introduced a new function `gimp_draw_brush_cursor` that ensures a minimum cursor size, even when the brush is very small or not visible (e.g., zero-pressure).
- Defined constants `FINDER_SIZE` and `CORE_SIZE` to ensure a small 'filled' contact circle is always drawn, making the cursor easier to locate.
- If the brush outline is too small, `should_locate` triggers a fallback locator circle.

2. **Indicate Erase Mode**:
- **Indicate Erase Mode**:
- The new `gimp_is_erasing_paint` function detects when the user is in 'Eraser Tool' mode or the 'Erase Paint' blending mode.
- When erasing is active, the cursor switches to a dashed circle by invoking `gimp_draw_arc_circle`, providing clear visual feedback.
- A small filled circle is also drawn at the center to help users identify the brush's contact point.

3. **Simple Brush Boundary**:
- **Simple Brush Boundary**:
- Added a new boolean option `brush_simple_boundary` in the Paintbrush Options GUI.
- In the `gimp_paint_tool_draw` function, the standard complex outline of the brush (derived from the image brush mask) is bypassed when this option is enabled.
- Instead, a simple circular boundary is drawn by the `draw_brush_circle` function, providing a cleaner, less noisy visual representation for large or complex brushes.
Expand Down
16 changes: 8 additions & 8 deletions content/hub/feature-test/folder/Paintbrush-Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@ Improve the usability of the Paintbrush GUI.

### Changes

1. **Remove Reset Brush Button**:
- **Remove Reset Brush Button**:
- Made the `Reset to brush default` buttons optional. Added a new feature to <kbd>Ctrl + Click</kbd> to also reset
the Tool Option to the brush defined setting.

2. **Remove Brush Link Button**:
- **Remove Brush Link Button**:
- Made the 'Link to Brush Editor' button optional, which previously allowed linking the Paintbrush options to the Brush Editor options. This simplifies the GUI for those that do not use this feature.

3. **Add Expander for Additional Options**:
- **Add Expander for Additional Options**:
- Introduced a new "Additional Options" expander in the Paintbrush options panel. This organizes less frequently used options (such as 'Lock Brush to View' and 'Simple Brush Boundary' toggles) into a collapsible section, saving space and reducing clutter in the GUI.

4. **Separate Dynamics (Fade and Colour)**:
- **Separate Dynamics (Fade and Colour)**:
- Moved the 'Fade and Colour' options (related to brush dynamics) into a separate expander that appears only when 'Enable Dynamics' is checked. This keeps the interface cleaner by hiding these advanced options when dynamics are not in use.
- Added `fade-multiply` and `brush-pressure-multiply` toggles to enable pressure and fade dynamics, providing more fine-tuned control.

5. **Compact Resource Chooser**:
- **Compact Resource Chooser**:
- Removed the label from the resource chooser (used for selecting brushes, dynamics, etc.), making the chooser more compact and saving space in the dockable panel. The chooser’s function is self-explanatory, so the label was deemed unnecessary.

6. **Smooth Stroke Position**:
- **Smooth Stroke Position**:
- Moved the 'Smooth Stroke' options higher up in the Paintbrush options panel, reflecting its frequent use. This improves accessibility and better aligns with user expectations.

7. **Stroke Effects Expander**:
- **Stroke Effects Expander**:
- Added a new "Stroke Effects" expander to group related stroke options into one collapsible section. The state of the expander is saved and restored across sessions, preserving the user's preference for a consistent experience.

8. **Pick Layer**:
- **Pick Layer**:
- Added a new "Pick Layer" option in the **Additional Options** expander. This feature allows users to hold the <kbd>Alt</kbd> key to automatically select the layer under the brush cursor. This option simplifies workflows with complex layer stacks by enabling quick access to the correct layer without manually searching through the layers panel.

### **Benefits**
Expand Down
28 changes: 16 additions & 12 deletions content/hub/feature-test/folder/Resource-Control.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,41 +25,45 @@ Improve the usability and data saving of resources and Tool Presets in Artbox.
| **7. Edit Brush deals with Parametric and Image types** | See Brushes Menu items | Confusion over brush types | Double clicking an image type opens the image for editing, Double clicking a parametric type opens the Brush Editor |
| **8. Inform the user about locked resources** | Folder locked resources can not be edited | User confusion | An informative message is displayed in the Brush Editor if the resource is locked |
| **9. Copy and Paste as New Brush** | New Feature | Create a brush from the active drawable | Added to the Brushes Menu via a Script-Fu plug-in |
| **9. Tool Preset Name in Tool Options Title** | New Feature | See the active Tool Preset name requires the Tool Preset Editor to be open or the Tool Preset selector to be in list mode | Added the active Tool Preset name after the Tool name in the Tool Options title. Tool Name | Tool Preset Name |
| **10. Tool Preset Name in Tool Options Title** | New Feature | See the active Tool Preset name requires the Tool Preset Editor to be open or the Tool Preset selector to be in list mode | Added the active Tool Preset name after the Tool name in the Tool Options title. Tool Name | Tool Preset Name |
| **11. Preferences Folder Options** | New Feature | Folders have to be manually added or removed per resource | Added a GUI to add, deactivate, or remove folder paths to a set of resources, allowing quick control over active resources |

### Changes

1. **Resource Saving Preferences:**
- **Resource Saving Preferences:**
- Introduced a new preference to toggle automatic resource saving on exit, preventing unwanted overwriting of user-set Tool Options during a session. This allows users to disable automatic saving and manually save specific changes when needed.

2. **Immediate Resource Saving:**
- **Immediate Resource Saving:**
- Added functionality to save specific resource changes immediately upon request, ensuring that any modifications are persisted, even if the session ends unexpectedly. This avoids data loss in case of a crash.

3. **Save As:**
- **Save As:**
- A 'Save As' feature was added, allowing users to name and save resources with custom filenames, enhancing clarity and preventing confusion between resource names and file names.

4. **Save All:**
- **Save All:**
- Introduced a 'Save All' option to the Preset Editor, enabling users to save all active changes across tool presets, brushes, palettes, and other resources, reducing the need for manual per-resource saves.

5. **Simplified Menus and Button Bar:**
- **Simplified Menus and Button Bar:**
- Cleaned up the interface by providing an option to hide the 'Copy Resource Location' menu item, which was seldom used, thereby reducing menu clutter.
- Rearranged the Button Bar to reflect the new saving behaviors and align with the revised menus for consistency.

6. **Brush Editor Enhancements:**
- **Brush Editor Enhancements:**
- Adjusted the behavior for brush types so that double-clicking on image-type brushes opens the image for editing, while double-clicking on parametric brushes opens the Brush Editor. This resolves the confusion around brush types.

7. **Locked Resource Notification:**
- **Locked Resource Notification:**
- When a resource is locked (due to folder permissions), the user will now receive an informative message in the Brush Editor, improving clarity on why the resource cannot be modified.

8. **Create New Brush from Drawable:**
- **Create New Brush from Drawable:**
- Added the ability to copy and paste a drawable as a new brush via a Script-Fu plug-in, accessible from the Brushes Menu.

9. **Save Active Tool Assets:**
- Introduced a 'Save All Active Tool Assets' feature, allowing users to save all the active tool assets (brush, gradient, palette, dynamics) in a session for easier resource management. Note: the concept of saving a 'tool package' is not yet implemented.
- **Save Active Tool Assets:**
- Introduced a 'Save All Active Tool Assets' feature, allowing users to save all the active tool assets (brush, gradient, palette, dynamics) in a session for easier resource management.

10. **Tool Preset Name in Tool Options Title:**
- **Tool Preset Name in Tool Options Title:**
- Added the active Tool Preset name after the Tool name in the Tool Options title. Tool Name | Tool Preset Name. We can see which Tool Preset is active from the Tool Options Title.

- **Preferences Folder Options:**
- Added a GUI to add, deactivate, or remove folder paths for a sets of resources, allowing quick control over in session resources.

### **Benefits**

These changes aim to provide better control over resources and presets, allowing users to manage their assets more intuitively and prevent unintended modifications.
2 changes: 1 addition & 1 deletion content/hub/feature-test/folder/Script-Fu.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Extend Script-Fu to include additional functions that help the user.

### Changes

1. **New Script-Fu Functions**:
- **New Script-Fu Functions**:
- `(gimp-context-get-display)`: Retrieves the active display ID. This ID can then be used with other display-related functions like `(gimp-display-present display-id)`.
- `(gimp-context-eraser-toggle)`: Toggles the active tool between the eraser and the previously active tool.
- `(gimp-items-set-visible)`: Allows setting the visibility of a vector list of items in bulk. This can help streamline visibility management for layers, paths, or other drawable items.
Expand Down
6 changes: 3 additions & 3 deletions content/hub/feature-test/folder/Selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ Improve the quality of the painting experience in Artbox

### Changes

1. **Auto Commit**:
- **Auto Commit**:
- Added a new option to automatically commit a selection once it is made, eliminating the need to manually commit before creating another selection.
- This enhancement removes interruptions, making the process of drawing multiple areas smoother.

2. **Fill Selection**:
- **Fill Selection**:
- Introduced an option to automatically fill a selection once it is made.
- This feature streamlines the workflow by simulating a painting-like experience, reducing the steps required to complete a filled selection.

3. **Auto Deselect**:
- **Auto Deselect**:
- Added an option to automatically deselect a selection after it has been auto-filled.
- This update enables a continuous workflow where users can effortlessly transition from selecting to filling and back to selecting again.

Expand Down
10 changes: 5 additions & 5 deletions content/hub/feature-test/folder/Tool-Preset-Editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ Enhance the Tool Preset Editor.

#### **Key Changes**

1. **Icon Picker Update**:
- **Icon Picker Update**:
- Added a new `icon_tool_preset` boolean property to dynamically adjust the icon picker's size in the Tool Preset Editor.
- Enlarged and centered the icon picker for better usability on HDPI screens.

2. **Tool Preset Information Table**:
- **Tool Preset Information Table**:
- Introduced an information table that displays both the saved and active states of resources linked to Tool Presets.
- This provides users with clear insights into linked resource configurations, enhancing editing and creation workflows.

3. **Resource Reloading Options**:
- **Resource Reloading Options**:
- Consolidated the Tool Preset Editor’s resource reloading options into a collapsible "Resource Reloading" frame using a GTK expander widget.
- Added tooltips to clarify the purpose of each option, improving usability and reducing interface clutter.

4. **Linked Resource Saving Options**:
- **Linked Resource Saving Options**:
- Added a collapsible "Linked Resource Saving" frame for managing linked resource options when saving Tool Presets.
- Ensures streamlined handling of linked resources for both new and existing presets.

5. **Save-As Feature for Linked Resources**:
- **Save-As Feature for Linked Resources**:
- Introduced a "Save As" button and menu option for saving linked resources with new names.
- Created an interactive dialog to guide users through naming linked resources and saving Tool Presets.

Expand Down
4 changes: 2 additions & 2 deletions content/hub/feature-test/folder/Tool-Tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Improve the quality of the user interface experience by optionally deactivating

### Changes

1. **Configurable Tooltip Property**:
- **Configurable Tooltip Property**:
- Added a new `show_tool_tips` property to the `GimpGuiConfig` structure, making tooltip display configurable through the codebase.

2. **Tooltip Preference Integration**:
- **Tooltip Preference Integration**:
- Integrated the tooltip preference under `Preferences -> Interface -> Help System -> General -> Show tool tips`, allowing users to toggle tooltip visibility easily within the UI.

### **Benefits**
Expand Down
6 changes: 3 additions & 3 deletions content/hub/feature-test/folder/Toolbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ Improve the usability of the Toolbox.

### Changes

1. **Optional Removal of Flowbox**:
- **Optional Removal of Flowbox**:
- The Flowbox, which arranges active resources, FG/BG color widget, and active image beneath the Tool Palette, is now optional. Users can choose to keep or remove the Flowbox based on their preferences.
- Removing the Flowbox allows for a more compact and efficient Toolbox layout by eliminating empty space when fewer elements are displayed.

2. **Position and Scale FG/BG Widget**:
- **Position and Scale FG/BG Widget**:
- The FG/BG color widget can now be positioned (Top, Bottom, Left, or Right) relative to the Tool Palette. This improves layout flexibility and user customization.
- The FG/BG widget can also be scaled, providing better usability for HDPI displays or different screen configurations.

3. **Revised Toolbox Preferences**:
- **Revised Toolbox Preferences**:
- Added preferences in the Toolbox Appearance settings:
- Control over showing the Flowbox with color, active resources, and active image.
- Set the preferred position of the FG/BG widget relative to the Tool Palette.
Expand Down
Loading

0 comments on commit d2f8ed8

Please sign in to comment.