blob: 10de6853fe13893979d7edca8f5f30c47d935bf5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_get_tool_target_name(target_name materialeditor)
set(materialeditor_uri "QtQuick3D.MaterialEditor")
set(materialeditor_asset_prefix "/qt-project.org/imports/QtQuick3D/MaterialEditor")
qt_internal_add_tool(${target_name}
TOOLS_TARGET Quick3D
SOURCES
main.cpp
LIBRARIES
Qt::Core
Qt::Gui
Qt::Quick
Qt::Quick3D
Qt::Quick3DUtils
Qt::Quick3DGlslParserPrivate
Qt::Quick3DAssetUtilsPrivate
Qt::Quick3DRuntimeRenderPrivate
)
qt_internal_return_unless_building_tools()
qt_internal_add_resource(${target_name} "assets"
PREFIX
${materialeditor_asset_prefix}
FILES
assets/meshes/suzanne.mesh
assets/skybox/OpenfootageNET_lowerAustria01-1024.hdr
assets/icons/lightdirectional.png
assets/icons/lightdirectional@2x.png
assets/icons/lightpoint.png
assets/icons/lightpoint@2x.png
assets/icons/lightspot.png
assets/icons/lightspot@2x.png
assets/icons/texture.png
assets/icons/texture@2x.png
assets/images/noise.png
)
qt_internal_add_qml_module(${target_name}
VERSION 1.0
URI ${materialeditor_uri}
SOURCES
materialadapter.h materialadapter.cpp
syntaxhighlighter.h syntaxhighlighter.cpp
uniformmodel.h uniformmodel.cpp
buildmessage.h buildmessage.cpp
materialadapter.h materialadapter.cpp
resourceserver.h resourceserver.cpp
resourceclient.h resourceclient.cpp
syntaxhighlighter.h syntaxhighlighter.cpp
uniformmodel.h uniformmodel.cpp
custommaterial.h custommaterial.cpp
message.h message.cpp
buildmessage.h buildmessage.cpp
QML_FILES
main.qml
ShaderEditor.qml
EditorView.qml
Preview.qml
PreviewControls.qml
FrostedGlass.qml
AboutDialog.qml
MaterialPropertiesPane.qml
InstancingPropertiesPane.qml
SaveChangesDialog.qml
UniformManagerPane.qml
NO_PLUGIN
IMPORTS
QtQuick3D
)
qt_add_resources(${target_name}
PREFIX "/"
FILES
qtquickcontrols2.conf
)
qt_add_shaders(${target_name} "shaders"
PREFIX
${materialeditor_asset_prefix}
FILES
"assets/shaders/frostedGlass.frag"
SILENT
)
|