mirror of
https://github.com/Ultimaker/Cura.git
synced 2026-03-02 00:14:39 -07:00
CURA-12660 The UV-unwrapping is now done in a background job, and the UI displays a waiting state. This fixes the issue where the user would start painting but the model was not ready yet, and the first stroke would be missing.
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
# Copyright (c) 2025 UltiMaker
|
|
# Cura is released under the terms of the LGPLv3 or higher.
|
|
|
|
from . import PaintTool
|
|
from . import PaintView
|
|
|
|
from PyQt6.QtQml import qmlRegisterUncreatableType
|
|
|
|
from UM.i18n import i18nCatalog
|
|
i18n_catalog = i18nCatalog("cura")
|
|
|
|
def getMetaData():
|
|
return {
|
|
"tool": {
|
|
"name": i18n_catalog.i18nc("@action:button", "Paint"),
|
|
"description": i18n_catalog.i18nc("@info:tooltip", "Paint Model"),
|
|
"icon": "Visual",
|
|
"tool_panel": "PaintTool.qml",
|
|
"weight": 0
|
|
},
|
|
"view": {
|
|
"name": i18n_catalog.i18nc("@item:inmenu", "Paint view"),
|
|
"weight": 0,
|
|
"visible": False
|
|
}
|
|
}
|
|
|
|
def register(app):
|
|
qmlRegisterUncreatableType(PaintTool.PaintTool.Brush, "Cura", 1, 0, "This is an enumeration class", "PaintToolBrush")
|
|
qmlRegisterUncreatableType(PaintTool.PaintTool.Paint, "Cura", 1, 0, "This is an enumeration class", "PaintToolState")
|
|
return {
|
|
"tool": PaintTool.PaintTool(),
|
|
"view": PaintView.PaintView()
|
|
}
|