summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJere Tuliniemi <jere.tuliniemi@qt.io>2020-02-18 10:45:57 +0200
committerJere Tuliniemi <jere.tuliniemi@qt.io>2020-02-28 11:20:39 +0200
commitd9986892bf0cccc60c53d42dfc556d37226cf5d2 (patch)
treeebd6403f940544bf8aa1fea7c17bad2fa50cb4ed /res
parent7cb740b7dc1e7a660eaaab41cff2e4d76a9fd99f (diff)
Add dynamic layer resizing
Add a boolean property to layer that enables dynamic resizing. The screen space bounds of the layer content are calculated and the layer resized to fit the content and exclude empty space. Padding property is also added that pads the resized layer so that minimal changes to the content won't trigger another resize. Padding can be set by pixel amount or by percentage of the size. To provide accurate 2d bounds, each active objects bounds are projected separately to the screen. A boolean property to only project combined bounds is provided but lowers the accuracy while limiting projections to 8. Known issues: - Temporal AA doesn't work with resizing correctly - Temporal AA leaks GPU memory when resizing - Editor picking doesn't work correctly with dynamically resized layers - Render to viewport doesn't yet support resizing Task-number: QT3DS-4030 Change-Id: Ibc727e078129eee15021cc97105b4cdf9a5a3196 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'res')
-rw-r--r--res/DataModelMetadata/en-us/MetaData.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/res/DataModelMetadata/en-us/MetaData.xml b/res/DataModelMetadata/en-us/MetaData.xml
index 99a5254..b1085d4 100644
--- a/res/DataModelMetadata/en-us/MetaData.xml
+++ b/res/DataModelMetadata/en-us/MetaData.xml
@@ -307,6 +307,16 @@
<ShowIfEqual property="vertfields" value="Top/Bottom"/>
<ShowIfEqual property="vertfields" value="Height/Bottom"/>
</Property>
+ <Property name="dynamicresize" formalName="Dynamic Resize" description="Resize the layer dynamically\nbased on the content" type="Boolean" default="False" category="Size" />
+ <Property name="dynamicpadding" formalName="Padding" description="Pad the resized layer to prevent constant\nresizing when small changes are made." min="0" default="0" animatable="False" category="Size">
+ <ShowIfEqual property="dynamicresize" value="True"/>
+ </Property>
+ <Property name="dynamicpaddingunits" formalName="Padding Units" description="Padding is percent of overall\nwidth or absolute pixels" list="percent:pixels" default="percent" category="Size">
+ <ShowIfEqual property="dynamicresize" value="True"/>
+ </Property>
+ <Property name="dynamiccombine" formalName="Combine Bounds" description="Combine layer object bounds for faster\ncalculation, but lower accuracy." type="Boolean" default="False" category="Size">
+ <ShowIfEqual property="dynamicresize" value="True"/>
+ </Property>
<!-- Ambient Occlusion -->
<Property name="aoenabled" formalName="Ambient Occlusion" description="Use ambient occlusion" type="Boolean" default="False" category="Ambient Occlusion">