forked from qt-creator/qt-creator
QmlDesigner: Add preview of pure 3D component in form editor
If the root node is a 3D node we show a preview similar to the state preview in the form editor. The size of the preview is hard coded as (640, 480). Change-Id: If7f96522b093c17422fa38102bffe11ede016063 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -133,6 +133,14 @@ void Qt5RenderNodeInstanceServer::collectItemChangesAndSendChangeCommands()
|
||||
nodeInstanceClient()->synchronizeWithClientProcess();
|
||||
}
|
||||
|
||||
if (rootNodeInstance().isSubclassOf("QQuick3DNode") && rootNodeInstance().contentItem()
|
||||
&& DesignerSupport::isDirty(rootNodeInstance().contentItem(),
|
||||
DesignerSupport::ContentUpdateMask)
|
||||
&& nodeInstanceClient()->bytesToWrite() < 10000) {
|
||||
Internal::QuickItemNodeInstance::updateDirtyNode(rootNodeInstance().contentItem());
|
||||
nodeInstanceClient()->pixmapChanged(createPixmapChangedCommand({rootNodeInstance()}));
|
||||
}
|
||||
|
||||
inFunction = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user