ucupaint icon indicating copy to clipboard operation
ucupaint copied to clipboard

Auto-Reloading Quick Edit in "ucupaint" with Destructive Texture Painting Layers

Open israelandrewbrown opened this issue 6 months ago • 0 comments

Pre-Flight checklist

  • [x] Did you check to see if this issue already exists?
  • [x] This is a single feature request. (Do not put multiple feature requests in one issue)

Describe The Feature Request Below

Hello,

Automated "Auto-Reload", "Quick Edit", and "ucupaint"Workflow for texture painting in external software (Krita): The script should incorporate an auto-reload functionality where the "Quick Edit" and "Apply" buttons are automatically triggered every second. This aims to streamline workflows by providing near real-time updates.

Core Functionality Breakdown:

Destructive Texture Painting with Layering: A destructive texture painting feature is requested. Each time the user returns to Blender from an external image editor (implied by the "Quick Edit" workflow), the script should automatically create a new "layer." This layer should be deletable, allowing users to revert changes or manage iterations of their texture work.

Toggle Functionality: The entire automated process should be controllable via a toggle button, allowing users to start and stop the script's activity as needed.

Automatic Button Triggering: The script will need to programmatically identify and "click" or execute the operators associated with the "Quick Edit" and "Apply" buttons within the target addon. This will likely involve inspecting the addon's Python code to find the relevant operator names.

Timed Execution: A timer mechanism will be required to trigger the "Quick Edit" and "Apply" sequence every second. Blender's bpy.app.timers module is the standard way to implement such recurring tasks.

Texture Layer Management: "Layer" Definition: In Blender's default texture painting system, true destructive layers (like those in Krita) are not a native feature for a single image. The script will likely need to simulate this. This could involve:

Duplicating Textures: Each "layer" could be a separate copy of the texture image. When returning to Blender (after editing in external program Krita), the script would duplicate the current texture, and the "Quick Edit" would operate on this new duplicate.

Managing Multiple Image Nodes: If using a node-based material, new image texture nodes could be created and linked.

Layer Deletion: The script must provide a way to delete these created "layers," effectively reverting the texture to a previous state. This would involve removing the corresponding texture data block or image node.

UI Toggle Button: A button will need to be added to a Blender UI panel (e.g., the 3D View's N-panel or the Properties panel) to start and stop the automated script. This button will control the activation and deactivation of the timer and the associated automated actions.

Context Sensitivity: The script should ideally be aware of the active object and its material/texture to ensure it operates on the correct data.

In summary this proposed section of ucupaint would have:

  • [ ] Automatic Button Triggering
  • [ ] Texture Layer Management
  • [ ] Duplicating Textures:
  • [ ] Managing Multiple Image Nodes:
  • [ ] Layer Deletion:
  • [ ] UI Toggle Button:
  • [ ] Context Sensitivity:

Image

P.S. Forgive the lengthy nature of this [FEATURE REQUEST]. Thanks for your consideration.

Regards, Israel Brown

israelandrewbrown avatar Jun 09 '25 10:06 israelandrewbrown