Enhance image editing tests and functionality
- Added parameterized tests for image edit replacement to ensure alpha mode preservation. - Refactored existing tests to utilize new image editing methods and improve clarity. - Introduced new tests for image target functionality, ensuring proper handling of shared textures and context. - Updated various tests to validate alpha mode handling across different scenarios. - Improved undo/redo functionality in image operators to maintain state consistency. - Added support for texture node actions, enhancing integration with Blender's node system. - Ensured that image properties are preserved during operations and that invalid contexts are handled gracefully.
This commit is contained in:
@@ -439,6 +439,7 @@ class PreferencesTest(BlenderTestCase):
|
||||
type="EMPTY",
|
||||
empty_display_type="IMAGE",
|
||||
data=source_image,
|
||||
image_user=None,
|
||||
)
|
||||
context = SimpleNamespace(
|
||||
object=source_object,
|
||||
@@ -457,8 +458,8 @@ class PreferencesTest(BlenderTestCase):
|
||||
return_value=1024,
|
||||
),
|
||||
patch.object(
|
||||
self.upscale,
|
||||
"prepare_image_input",
|
||||
self.upscale.ImageEditTarget,
|
||||
"prepare",
|
||||
return_value=(Path("input.png"), False),
|
||||
),
|
||||
patch.object(
|
||||
|
||||
Reference in New Issue
Block a user