Add tests for clipboard image functionality and mesh plane asset creation
- Implemented a comprehensive test suite for the clipboard image module, covering various functionalities including operator registration, context handling, and image processing. - Created a new mesh plane asset with customizable parameters and integrated it into the geometry node system. - Developed a validation script to ensure the correct behavior of the mesh plane asset, including input handling and output verification.
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
import bpy
|
||||
|
||||
from . import clipboard_image
|
||||
from .clipboard_image import CLASSES as CLIPBOARD_CLASSES
|
||||
|
||||
from .runtime import runtime
|
||||
from .operators import CLASSES as OPERATOR_CLASSES
|
||||
from .operators.balloon import BalloonTool
|
||||
from .operators.image_lasso import ImageBoxTool, ImageLassoTool
|
||||
from .preferences import AnyImagePreferences
|
||||
from .properties import AnyImageSettings
|
||||
from .menu import AnyImageImageMenu, draw_image_context_menu
|
||||
@@ -10,7 +14,6 @@ from .panel import (
|
||||
Ben2RemovalDebugPanel,
|
||||
Da3OutputDebugPanel,
|
||||
DebugPanel,
|
||||
ModelsPanel,
|
||||
Moge2ApiDebugPanel,
|
||||
ServerPanel,
|
||||
)
|
||||
@@ -19,10 +22,10 @@ from .panel import (
|
||||
CLASSES = (
|
||||
AnyImagePreferences,
|
||||
AnyImageSettings,
|
||||
*CLIPBOARD_CLASSES,
|
||||
*OPERATOR_CLASSES,
|
||||
AnyImageImageMenu,
|
||||
ServerPanel,
|
||||
ModelsPanel,
|
||||
DebugPanel,
|
||||
Moge2ApiDebugPanel,
|
||||
Da3OutputDebugPanel,
|
||||
@@ -34,20 +37,31 @@ def register():
|
||||
for class_type in CLASSES:
|
||||
bpy.utils.register_class(class_type)
|
||||
bpy.utils.register_tool(
|
||||
BalloonTool,
|
||||
ImageBoxTool,
|
||||
separator=True,
|
||||
group=True,
|
||||
)
|
||||
bpy.utils.register_tool(
|
||||
ImageLassoTool,
|
||||
after={ImageBoxTool.bl_idname},
|
||||
separator=False,
|
||||
)
|
||||
bpy.utils.register_tool(BalloonTool, separator=False)
|
||||
bpy.types.Scene.anyimage_settings = bpy.props.PointerProperty(
|
||||
type=AnyImageSettings,
|
||||
)
|
||||
bpy.types.VIEW3D_MT_object_context_menu.append(draw_image_context_menu)
|
||||
bpy.types.OUTLINER_MT_object.append(draw_image_context_menu)
|
||||
clipboard_image.register_keymaps()
|
||||
runtime.register()
|
||||
|
||||
|
||||
def unregister():
|
||||
runtime.unregister()
|
||||
clipboard_image.unregister_keymaps()
|
||||
bpy.utils.unregister_tool(BalloonTool)
|
||||
bpy.utils.unregister_tool(ImageLassoTool)
|
||||
bpy.utils.unregister_tool(ImageBoxTool)
|
||||
bpy.types.VIEW3D_MT_object_context_menu.remove(draw_image_context_menu)
|
||||
bpy.types.OUTLINER_MT_object.remove(draw_image_context_menu)
|
||||
if hasattr(bpy.types.Scene, "anyimage_settings"):
|
||||
|
||||
Reference in New Issue
Block a user