Request for Blender Script Modification: Auto-Reloading Quick Edit with Destructive Texture Painting Layers
This request outlines a modification to a Blender "Quick Edit" addon/script, introducing two primary enhancements:
Automated "Quick Edit" and "Apply" Workflow: 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.
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.
Core Functionality Breakdown:
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 Photoshop) 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, 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.