12#include <QRegularExpression>
13#include <QtCore/qdir.h>
14#include <QtCore/qfile.h>
15#include <QtCore/qbuffer.h>
17#include <QtGui/qimage.h>
18#include <QtGui/qimagereader.h>
20#include <QtQuick3DUtils/private/qssgmesh_p.h>
21#include <QtQuick3DUtils/private/qssgassert_p.h>
23#include <QtQuick3DRuntimeRender/private/qssgrenderbuffermanager_p.h>
25#ifdef QT_QUICK3D_ENABLE_RT_ANIMATIONS
26#include <QtCore/QCborStreamWriter>
27#include <QtQuickTimeline/private/qquicktimeline_p.h>
50 QHash<QSSGSceneDesc::Node::RuntimeType, PropertiesMap> m_properties;
56 if (nameCopy.isEmpty())
61 if (nameCopy[0].isLower())
62 nameCopy[0] = nameCopy[0].toUpper();
75 case QMetaType::Float: {
79 case QMetaType::QVector2D: {
85 case QMetaType::QVector3D: {
92 case QMetaType::QVector4D: {
100 case QMetaType::QColor: {
104 case QMetaType::QQuaternion: {
121 if (!idCopy.isEmpty() && idCopy.at(0).isNumber())
125 if (idCopy.startsWith(QChar::fromLatin1(
'#')))
134 if (!idCopy.isEmpty() && idCopy[0].isUpper()) {
137 int len = idCopy.length();
138 while (
i <
len && idCopy[
i].isUpper()) {
139 idCopy[
i] = idCopy[
i].toLower();
241 if (
keywords.contains(idCopy.toUtf8())) {
246 if (idCopy.isEmpty())
256 if (removeParentDirectory)
259 sourceCopy.replace(QChar::fromLatin1(
'\\'), QChar::fromLatin1(
'/'));
273 return m_properties[
type];
280 if (m_properties.contains(
type)) {
299 const auto name =
property.name();
300 const auto value =
property.read(
object);
303 return propertiesMap;
306PropertyMap::PropertyMap()
315 m_properties.insert(QSSGSceneDesc::Node::RuntimeType::PrincipledMaterial,
getObjectPropertiesMap(&principledMaterial));
319 m_properties.insert(QSSGSceneDesc::Node::RuntimeType::SpecularGlossyMaterial,
getObjectPropertiesMap(&specularGlossyMaterial));
323 m_properties.insert(QSSGSceneDesc::Node::RuntimeType::CustomMaterial,
getObjectPropertiesMap(&customMaterial));
331 m_properties.insert(QSSGSceneDesc::Node::RuntimeType::ImageCube,
getObjectPropertiesMap(&cubeMapTexture));
343 m_properties.insert(QSSGSceneDesc::Node::RuntimeType::OrthographicCamera,
getObjectPropertiesMap(&orthographicCamera));
347 m_properties.insert(QSSGSceneDesc::Node::RuntimeType::PerspectiveCamera,
getObjectPropertiesMap(&perspectiveCamera));
351 m_properties.insert(QSSGSceneDesc::Node::RuntimeType::DirectionalLight,
getObjectPropertiesMap(&directionalLight));
397template<QSSGSceneDesc::Material::RuntimeType T>
398const char *
qmlElementName() {
static_assert(!std::is_same_v<
decltype(T),
decltype(T)>,
"Unknown type");
return nullptr; }
426 case RuntimeType::Node:
427 return qmlElementName<RuntimeType::Node>();
428 case RuntimeType::PrincipledMaterial:
429 return qmlElementName<RuntimeType::PrincipledMaterial>();
430 case RuntimeType::SpecularGlossyMaterial:
431 return qmlElementName<RuntimeType::SpecularGlossyMaterial>();
432 case RuntimeType::CustomMaterial:
433 return qmlElementName<RuntimeType::CustomMaterial>();
434 case RuntimeType::Image2D:
435 return qmlElementName<RuntimeType::Image2D>();
436 case RuntimeType::ImageCube:
437 return qmlElementName<RuntimeType::ImageCube>();
438 case RuntimeType::TextureData:
439 return qmlElementName<RuntimeType::TextureData>();
440 case RuntimeType::Model:
441 return qmlElementName<RuntimeType::Model>();
442 case RuntimeType::OrthographicCamera:
443 return qmlElementName<RuntimeType::OrthographicCamera>();
444 case RuntimeType::PerspectiveCamera:
445 return qmlElementName<RuntimeType::PerspectiveCamera>();
446 case RuntimeType::DirectionalLight:
447 return qmlElementName<RuntimeType::DirectionalLight>();
448 case RuntimeType::PointLight:
449 return qmlElementName<RuntimeType::PointLight>();
450 case RuntimeType::SpotLight:
451 return qmlElementName<RuntimeType::SpotLight>();
452 case RuntimeType::Skeleton:
453 return qmlElementName<RuntimeType::Skeleton>();
454 case RuntimeType::Joint:
455 return qmlElementName<RuntimeType::Joint>();
456 case RuntimeType::Skin:
457 return qmlElementName<RuntimeType::Skin>();
458 case RuntimeType::MorphTarget:
459 return qmlElementName<RuntimeType::MorphTarget>();
461 return "UNKNOWN_TYPE";
516 case QMetaType::Bool:
518 case QMetaType::Char:
519 case QMetaType::SChar:
520 case QMetaType::UChar:
521 case QMetaType::Char16:
522 case QMetaType::Char32:
523 case QMetaType::QChar:
524 case QMetaType::Short:
525 case QMetaType::UShort:
527 case QMetaType::UInt:
528 case QMetaType::Long:
529 case QMetaType::ULong:
530 case QMetaType::LongLong:
531 case QMetaType::ULongLong:
533 case QMetaType::Float:
534 case QMetaType::Double:
536 case QMetaType::QByteArray:
537 case QMetaType::QString:
539 case QMetaType::QDate:
540 case QMetaType::QTime:
541 case QMetaType::QDateTime:
543 case QMetaType::QUrl:
545 case QMetaType::QRect:
546 case QMetaType::QRectF:
548 case QMetaType::QSize:
549 case QMetaType::QSizeF:
551 case QMetaType::QPoint:
552 case QMetaType::QPointF:
556 case QMetaType::QColor:
558 case QMetaType::QMatrix4x4:
560 case QMetaType::QVector2D:
562 case QMetaType::QVector3D:
564 case QMetaType::QVector4D:
566 case QMetaType::QQuaternion:
568 case QMetaType::QFont:
589 static constexpr const char *
typeNames[] = {
603 constexpr uint nameCount =
sizeof(
typeNames)/
sizeof(
const char*);
604 const bool nodeHasName = (node.name.size() > 0);
615 QString candidate = sanitizedName;
618 g_idMap->
insert(candidate, &node);
619 g_nodeNameMap->
insert(&node, candidate);
624 }
while (--attempts);
636 QString candidate = sanitizedName;
639 if (
const auto oIt = g_idOthers->constFind(candidate); oIt == g_idOthers->constEnd()) {
640 g_idOthers->
insert(candidate);
646 }
while (--attempts);
653 while (sourceCopy.startsWith(QChar::fromLatin1(
'.')) || sourceCopy.startsWith(QChar::fromLatin1(
'/')) || sourceCopy.startsWith(QChar::fromLatin1(
'\\')))
661static const char *
indent() {
return " "; }
700 output.stream <<
"import QtQuick\n"
701 <<
"import QtQuick3D\n\n";
703 output.stream <<
"import QtQuick.Timeline\n\n";
740 case QMetaType::QVector2D: {
741 const auto vec2 = qvariant_cast<QVector2D>(
var);
744 case QMetaType::QVector3D: {
745 const auto vec3 = qvariant_cast<QVector3D>(
var);
750 case QMetaType::QVector4D: {
751 const auto vec4 = qvariant_cast<QVector4D>(
var);
757 case QMetaType::QColor: {
758 const auto color = qvariant_cast<QColor>(
var);
761 case QMetaType::QQuaternion: {
762 const auto &quat = qvariant_cast<QQuaternion>(
var);
768 case QMetaType::QMatrix4x4: {
769 const auto mat44 = qvariant_cast<QMatrix4x4>(
var);
776 case QMetaType::Float:
777 case QMetaType::Double:
779 case QMetaType::Char:
780 case QMetaType::Long:
781 case QMetaType::LongLong:
782 case QMetaType::ULong:
783 case QMetaType::ULongLong:
784 case QMetaType::Bool:
786 case QMetaType::QUrl:
816 const auto &mesh =
scene.meshStorage.at(meshNode.idx);
819 if (!outdir.
exists(meshFolder) && !outdir.
mkdir(meshFolder)) {
820 qDebug() <<
"Failed to create meshes folder at" << outdir;
830 if (mesh.save(&
file) == 0) {
834 return {meshSourceName,
QString()};
842 QString assetPath =
output.outdir.isAbsolutePath(texturePath.path()) ? texturePath.toString() : texturePath.path();
844 if (fi.isRelative() && !
output.sourceDir.isEmpty()) {
854 if (!
output.outdir.exists(mapsFolder) && !
output.outdir.mkdir(mapsFolder)) {
855 qDebug() <<
"Failed to create maps folder at" <<
output.outdir;
859 const QString relpath = mapsFolder + fi.fileName();
862 qDebug() <<
"Failed to copy file from" << fi.canonicalFilePath() <<
"to" << newfilepath;
875 case QMetaType::QVector2D: {
877 if (
match.hasMatch()) {
879 if (comp.size() == 2) {
886 case QMetaType::QVector3D: {
888 if (
match.hasMatch()) {
890 if (comp.size() == 3) {
898 case QMetaType::QVector4D: {
900 if (
match.hasMatch()) {
902 if (comp.size() == 4) {
911 case QMetaType::QQuaternion: {
913 if (
match.hasMatch()) {
915 if (comp.size() == 4) {
934 if (mt.
id() != QMetaType::QQuaternion)
960 result.isDynamicProperty =
property.type == QSSGSceneDesc::Property::Type::Dynamic;
964 if (valueAsString.size() > 0) {
965 result.value = valueAsString;
973 if (enumValue.
size() > 0) {
977 }
else if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::Flag>()) {
979 if (element.
size() > 0) {
980 const auto flag = qvariant_cast<QSSGSceneDesc::Flag>(
value);
981 QByteArray keysString = flag.me.valueToKeys(
int(flag.value));
982 if (keysString.size() > 0) {
983 keysString.
prepend(element +
'.');
984 QByteArray replacement(
" | " + element +
'.');
985 keysString.replace(
'|', replacement);
990 }
else if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::NodeList *>()) {
991 const auto *
list = qvariant_cast<QSSGSceneDesc::NodeList *>(
value);
1012 }
else if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::ListView *>()) {
1013 const auto &
list = *qvariant_cast<QSSGSceneDesc::ListView *>(
value);
1022 char *vptr =
reinterpret_cast<char *
>(
list.
data);
1043 }
else if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::Node *>()) {
1044 if (
const auto node = qvariant_cast<QSSGSceneDesc::Node *>(
value)) {
1052 if (node->runtimeType == QSSGSceneDesc::Node::RuntimeType::TextureData) {
1060 }
else if (
value.metaType() == QMetaType::fromType<QSSGSceneDesc::Mesh *>()) {
1061 if (
const auto meshNode = qvariant_cast<const QSSGSceneDesc::Mesh *>(
value)) {
1062 Q_ASSERT(meshNode->nodeType == QSSGSceneDesc::Node::Type::Mesh);
1064 const auto &
scene = *meshNode->scene;
1066 result.notValidReason = notValidReason;
1067 if (!meshSourceName.isEmpty()) {
1072 }
else if (
value.metaType() == QMetaType::fromType<QUrl>()) {
1078 result.notValidReason = notValidReason;
1079 if (!relpath.isEmpty()) {
1085 if (!
path.isEmpty()) {
1090 }
else if (
target.runtimeType == QSSGSceneDesc::Material::RuntimeType::CustomMaterial) {
1092 if (
value.metaType().id() == qMetaTypeId<QSSGSceneDesc::Texture *>()) {
1093 if (
const auto texture = qvariant_cast<QSSGSceneDesc::Texture *>(
value)) {
1100 }
else if (
value.metaType() == QMetaType::fromType<QString>()) {
1136 const auto &
property = *
it;
1140 if (
result.isDynamicProperty) {
1143 if (
result.expandedProperties.size() > 1) {
1144 for (
const auto &va :
result.expandedProperties)
1150 }
else if (!
result.isDynamicProperty) {
1152 if (!
result.notValidReason.isEmpty())
1163 Q_ASSERT(
transform.nodeType == QSSGSceneDesc::Node::Type::Transform &&
transform.runtimeType == QSSGSceneDesc::Node::RuntimeType::Node);
1172 if (material.
runtimeType == QSSGSceneDesc::Model::RuntimeType::SpecularGlossyMaterial) {
1174 }
else if (material.
runtimeType == Model::RuntimeType::PrincipledMaterial) {
1176 }
else if (material.
runtimeType == Material::RuntimeType::CustomMaterial) {
1178 }
else if (material.
runtimeType == Material::RuntimeType::SpecularGlossyMaterial) {
1199 if (
camera.runtimeType == Camera::RuntimeType::PerspectiveCamera)
1201 else if (
camera.runtimeType == Camera::RuntimeType::OrthographicCamera)
1212 if (
texture.runtimeType == Texture::RuntimeType::Image2D)
1214 else if (
texture.runtimeType == Texture::RuntimeType::ImageCube)
1230 Q_ASSERT(morphTarget.nodeType == Node::Type::MorphTarget);
1240 const auto ext = (
fmt.length() != 3) ? u
".png"_s
1243 return QString(textureFolder + sanitizedName + ext);
1255 const bool isCompressed = ((textureData.
flgs &
quint8(QSSGSceneDesc::TextureData::Flags::Compressed)) != 0);
1258 if (!outdir.
exists(mapsFolder) && !outdir.
mkdir(mapsFolder))
1269 const auto &texData = textureData.
data;
1270 const auto &
size = textureData.
sz;
1273 if (!
image.save(imagePath))
1277 return textureSourceName;
1291 if (!textureSourcePath.isEmpty()) {
1303 if (light.
runtimeType == Light::RuntimeType::DirectionalLight)
1305 else if (light.
runtimeType == Light::RuntimeType::SpotLight)
1307 else if (light.
runtimeType == Light::RuntimeType::PointLight)
1325 Q_ASSERT(joint.nodeType == Node::Type::Joint && joint.runtimeType == Node::RuntimeType::Joint);
1340 case Node::Type::Skin:
1343 case Node::Type::MorphTarget:
1346 case Node::Type::Skeleton:
1349 case Node::Type::Texture:
1350 if (node.
runtimeType == Node::RuntimeType::Image2D)
1352 else if (node.
runtimeType == Node::RuntimeType::ImageCube)
1354 else if (node.
runtimeType == Node::RuntimeType::TextureData)
1359 case Node::Type::Material:
1362 case Node::Type::Mesh:
1373 const bool skipBlockEnd = (node.
runtimeType == Node::RuntimeType::TextureData || node.
nodeType == Node::Type::Mesh);
1389 case Node::Type::Skeleton:
1392 case Node::Type::Joint:
1395 case Node::Type::Light:
1398 case Node::Type::Transform:
1401 case Node::Type::Camera:
1404 case Node::Type::Model:
1412 for (
const auto &cld : node.
children) {
1421 const bool skipBlockEnd = (node.
runtimeType == Node::RuntimeType::TextureData || node.
nodeType == Node::Type::Mesh);
1430 auto sortedResources = resources;
1432 using RType = QSSGSceneDesc::Node::RuntimeType;
1433 if (a->runtimeType == RType::TextureData && b->runtimeType != RType::TextureData)
1435 if (a->runtimeType == RType::ImageCube && (b->runtimeType != RType::TextureData && b->runtimeType != RType::ImageCube))
1437 if (a->runtimeType == RType::Image2D && (b->runtimeType != RType::TextureData && b->runtimeType != RType::Image2D))
1442 for (
const auto &
res : std::as_const(sortedResources))
1448#ifdef QT_QUICK3D_ENABLE_RT_ANIMATIONS
1451 writer.startArray();
1453 writer.append(
"QTimelineKeyframes");
1455 const int keyframesDataVersion = 1;
1456 writer.append(keyframesDataVersion);
1457 writer.append(
int(
channel.keys.at(0)->getValueQMetaType()));
1460 writer.startArray();
1462 bool isQuaternion =
false;
1464 isQuaternion =
true;
1470 writer.append(
key->time);
1474 writer.append(
key->value[3]);
1476 writer.append(
key->value[
i]);
1498 QString animationName = animationId;
1501 indent(
output) <<
"objectName: \"" << animationName <<
"\"\n";
1509 if (generateTimelineAnimations) {
1532 if (useBinaryKeyframes &&
channel->keys.size() != 1) {
1535 if (!
output.outdir.exists(animFolder) && !
output.outdir.mkdir(animFolder)) {
1565 return {animationName, animationId};
1571 const auto it = options.constFind(optionName);
1572 const auto end = options.constEnd();
1580 return value.toBool(defaultValue);
1583 auto root =
scene.root;
1589 options =
it->toObject();
1599 const bool useBinaryKeyframes =
checkBooleanOption(
"useBinaryKeyframes"_L1, options);
1600 const bool generateTimelineAnimations = !
checkBooleanOption(
"manualAnimations"_L1, options);
1615 for (
const auto &cld : root->children)
1622 QList<QPair<QString, QString>> animationMap;
1623 for (
const auto &cld :
scene.animations) {
1626 animationMap.append(mapValues);
1630 if (!generateTimelineAnimations) {
1633 stream <<
indent() <<
"// An exported mapping of Timelines (--manualAnimations)\n";
1636 for (
const auto &mapValues : animationMap) {
1638 indent(
output) <<
"\"" << mapValues.first <<
"\": " << mapValues.second <<
",\n";
1641 stream <<
indent() <<
"// A simple list of Timelines (--manualAnimations)\n";
1642 stream <<
indent() <<
"property var timelineList: [\n";
1643 for (
const auto &mapValues : animationMap) {
1657#ifdef QT_QUICK3D_ENABLE_RT_ANIMATIONS
1658 auto timeline =
new QQuickTimeline(parent);
1659 auto timelineKeyframeGroup = timeline->keyframeGroups();
1661 auto keyframeGroup =
new QQuickKeyframeGroup(timeline);
1662 keyframeGroup->setTargetObject(
channel->target->obj);
1666 if (useBinaryKeyframes) {
1670 keyframeGroup->setKeyframeData(keyframeData);
1672 auto keyframes = keyframeGroup->keyframes();
1674 auto keyframe =
new QQuickKeyframe(keyframeGroup);
1675 keyframe->setFrame(
key->time);
1676 keyframe->setValue(
key->getValue());
1677 keyframes.append(&keyframes, keyframe);
1680 (qobject_cast<QQmlParserStatus *>(keyframeGroup))->componentComplete();
1681 timelineKeyframeGroup.append(&timelineKeyframeGroup, keyframeGroup);
1683 timeline->setEndFrame(anim.
length);
1684 timeline->setEnabled(isEnabled);
1686 auto timelineAnimation =
new QQuickTimelineAnimation(timeline);
1687 timelineAnimation->setObjectName(anim.
name);
1688 timelineAnimation->setDuration(
int(anim.
length));
1689 timelineAnimation->setFrom(0.0f);
1690 timelineAnimation->setTo(anim.
length);
1691 timelineAnimation->setLoops(QQuickTimelineAnimation::Infinite);
1692 timelineAnimation->setTargetObject(timeline);
1694 (qobject_cast<QQmlParserStatus *>(timeline))->componentComplete();
1696 timelineAnimation->setRunning(
true);
1711 if (node.
runtimeType == Material::RuntimeType::CustomMaterial) {
static void processNode(const SceneInfo &sceneInfo, const aiNode &source, QSSGSceneDesc::Node &parent, const NodeMap &nodeMap, AnimationNodeMap &animationNodes)
static bool checkBooleanOption(const QString &optionName, const QJsonObject &options)
IOBluetoothL2CAPChannel * channel
QByteArray & prepend(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
\inmodule QtCore\reentrant
The QColor class provides colors based on RGB, HSV or CMYK values.
bool mkdir(const QString &dirName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString path() const
Returns the path.
static QChar separator()
Returns the native directory separator: "/" under Unix and "\\" under Windows.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void close() override
Calls QFileDevice::flush() and closes the file.
QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
bool copy(const QString &newName)
Copies the file named fileName() to newName.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr QLatin1Char at(qsizetype i) const
bool isEmpty() const noexcept
qsizetype count() const noexcept
The QQuaternion class represents a quaternion consisting of a vector and scalar.
\qmltype TextureData \inherits Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DTextureData
\inmodule QtCore \reentrant
\inmodule QtCore \reentrant
bool isDefaultValue(QSSGSceneDesc::Node::RuntimeType type, const char *property, const QVariant &value)
PropertiesMap propertiesForType(QSSGSceneDesc::Node::RuntimeType type)
static PropertyMap * instance()
QVariant getDefaultValue(QSSGSceneDesc::Node::RuntimeType type, const char *property)
QHash< QByteArray, QVariant > PropertiesMap
static constexpr bool isResource(Type type) noexcept
static constexpr bool isTexture(Type type) noexcept
const_iterator constEnd() const noexcept
const_iterator constFind(const T &value) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString fromLocal8Bit(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
qsizetype size() const noexcept
Returns the number of characters in this string.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString & insert(qsizetype i, QChar c)
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString & append(QChar c)
QString & remove(qsizetype i, qsizetype len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
QString & prepend(QChar c)
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
QString path(ComponentFormattingOptions options=FullyDecoded) const
Returns the path of the URL.
double toDouble(bool *ok=nullptr) const
Returns the variant as a double if the variant has userType() \l QMetaType::Double,...
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
int typeId() const
Returns the storage type of the value stored in the variant.
QMetaType metaType() const
The QVector2D class represents a vector or vertex in 2D space.
constexpr float y() const noexcept
Returns the y coordinate of this point.
constexpr float x() const noexcept
Returns the x coordinate of this point.
The QVector3D class represents a vector or vertex in 3D space.
constexpr float y() const noexcept
Returns the y coordinate of this point.
constexpr float x() const noexcept
Returns the x coordinate of this point.
constexpr float z() const noexcept
Returns the z coordinate of this point.
The QVector4D class represents a vector or vertex in 4D space.
constexpr float x() const noexcept
Returns the x coordinate of this point.
constexpr float w() const noexcept
Returns the w coordinate of this point.
constexpr float y() const noexcept
Returns the y coordinate of this point.
constexpr float z() const noexcept
Returns the z coordinate of this point.
QSet< QString >::iterator it
static const struct @480 keywords[]
const char * qmlElementName< QSSGSceneDesc::Camera::RuntimeType::PointLight >()
static const char * blockEnd()
QString builtinQmlType(const QVariant &var)
QString colorToQml(const QColor &color)
static void generateKeyframeData(const QSSGSceneDesc::Animation::Channel &channel, QByteArray &keyframeData)
static QString getIdForNode(const QSSGSceneDesc::Node &node)
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::PrincipledMaterial >()
const char * qmlElementName< QSSGSceneDesc::Node::RuntimeType::Node >()
QString asString(const QVariant &var)
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::PerspectiveCamera >()
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::CustomMaterial >()
const char * qmlElementName< QSSGSceneDesc::Node::RuntimeType::Skin >()
QHash< const QSSGSceneDesc::Node *, QString > NodeNameMap
QString variantToQml(const QVariant &variant)
static QString getTextureFolder()
const char * qmlElementName< QSSGSceneDesc::Camera::RuntimeType::SpotLight >()
static PropertyMap::PropertiesMap getObjectPropertiesMap(QObject *object)
static QString getAnimationFolder()
const char * qmlElementName< QSSGSceneDesc::Texture::RuntimeType::TextureData >()
static QString getAnimationExtension()
static ValueToQmlResult valueToQml(const QSSGSceneDesc::Node &target, const QSSGSceneDesc::Property &property, OutputContext &output)
QHash< QString, const QSSGSceneDesc::Node * > UniqueIdMap
static QString getMeshExtension()
static const char * blockBegin()
QString stripParentDirectory(const QString &filePath)
static void writeQml(const QSSGSceneDesc::Node &transform, OutputContext &output)
static QStringList expandComponents(const QString &value, QMetaType mt)
void writeQmlForResources(const QSSGSceneDesc::Scene::ResourceNodes &resources, OutputContext &output)
const char * qmlElementName()
void writeQmlComponent(const QSSGSceneDesc::Node &node, QTextStream &stream, const QDir &outDir)
const char * qmlElementName< QSSGSceneDesc::Node::RuntimeType::Model >()
void createTimelineAnimation(const QSSGSceneDesc::Animation &anim, QObject *parent, bool isEnabled, bool useBinaryKeyframes)
static QString outputTextureAsset(const QSSGSceneDesc::TextureData &textureData, const QDir &outdir)
static const char * comment()
static QString toQuotedString(const QString &text)
QString sanitizeQmlId(const QString &id)
static QString getIdForAnimation(const QByteArray &inName)
static QString getMeshFolder()
static void writeImportHeader(OutputContext &output, bool hasAnimation=false)
static QStringList expandComponentsPartially(const QString &value, QMetaType mt)
static void writeNodeProperties(const QSSGSceneDesc::Node &node, OutputContext &output)
QPair< QString, QString > writeQmlForAnimation(const QSSGSceneDesc::Animation &anim, qsizetype index, OutputContext &output, bool useBinaryKeyframes=true, bool generateTimelineAnimations=true)
static std::pair< QString, QString > copyTextureAsset(const QUrl &texturePath, OutputContext &output)
static std::pair< QString, QString > meshAssetName(const QSSGSceneDesc::Scene &scene, const QSSGSceneDesc::Mesh &meshNode, const QDir &outdir)
static const char * getQmlElementName(const QSSGSceneDesc::Node &node)
const char * qmlElementName< QSSGSceneDesc::Skeleton::RuntimeType::Skeleton >()
static const char * typeNames[]
static const char * indent()
QString getAnimationSourceName(const QString &id, const QString &property, qsizetype index)
QString getMeshSourceName(const QString &name)
const char * qmlElementName< QSSGSceneDesc::Joint::RuntimeType::Joint >()
static constexpr QByteArrayView qml_basic_types[]
const char * qmlElementName< QSSGSceneDesc::Texture::RuntimeType::Image2D >()
static void writeQmlForResourceNode(const QSSGSceneDesc::Node &node, OutputContext &output)
QString qmlComponentName(const QString &name)
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::SpecularGlossyMaterial >()
QString getTextureSourceName(const QString &name, const QString &fmt)
const char * qmlElementName< QSSGSceneDesc::Node::RuntimeType::MorphTarget >()
const char * qmlElementName< QSSGSceneDesc::Material::RuntimeType::OrthographicCamera >()
const char * qmlElementName< QSSGSceneDesc::Camera::RuntimeType::DirectionalLight >()
const char * qmlElementName< QSSGSceneDesc::Texture::RuntimeType::ImageCube >()
static QString indentString(OutputContext &output)
QString sanitizeQmlSourcePath(const QString &source, bool removeParentDirectory)
static void writeQmlForNode(const QSSGSceneDesc::Node &node, OutputContext &output)
Combined button and popup list for selecting options.
static const QCssKnownValue properties[NumProperties - 1]
static int writeProperty(QObject *obj, const QByteArray &property_name, QVariant value, int propFlags=QDBusConnection::ExportAllProperties)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLsizei const GLchar * message
GLsizei GLsizei GLchar * source
GLuint GLenum GLenum transform
GLsizei const GLchar *const * path
#define QSSG_ASSERT(cond, action)
QLatin1StringView QLatin1String
#define QStringLiteral(str)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
unsigned long long quint64
QVideoFrameFormat::PixelFormat fmt
QT_BEGIN_NAMESPACE typedef uchar * output
QSqlQueryModel * model
[16]
QTextStream out(stdout)
[7]
QUrl url("example.com")
[constructor-url-reference]
obj metaObject() -> className()
\inmodule QtCore \reentrant
@ DesignStudioWorkarounds
QSSGQmlScopedIndent(OutputContext &out)
QStringList expandedProperties
QSSGRenderGraphObject::Type RuntimeType