diff options
author | Kaj Grönholm <kaj.gronholm@qt.io> | 2020-09-16 17:30:39 +0300 |
---|---|---|
committer | Kaj Grönholm <kaj.gronholm@qt.io> | 2020-09-21 07:47:10 +0300 |
commit | 7761f86cec898a0a38ed2e3adddc5ef0fdbdea89 (patch) | |
tree | fc08bf2827a5fa797e380408e60459e7d3fc2cd3 /tests/auto/studio3d/shared/presentation/activateactions.uip | |
parent | 05eb20d0b7e46101dd79d3f5788681f5a2a9446e (diff) |
Add support for onActivate and onDeactivate Actions
Add new Action types onActivate and onDeactivate. When assigned, these
will get triggered at object timeline start and end times. Using these
it is possible to trigger events at specific times during animation.
Example and autotest case included.
Task-number: QT3DS-4128
Change-Id: Ib973b479a1de47745089d41c5764c2a1747ec95e
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'tests/auto/studio3d/shared/presentation/activateactions.uip')
-rw-r--r-- | tests/auto/studio3d/shared/presentation/activateactions.uip | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/tests/auto/studio3d/shared/presentation/activateactions.uip b/tests/auto/studio3d/shared/presentation/activateactions.uip new file mode 100644 index 0000000..52ca81a --- /dev/null +++ b/tests/auto/studio3d/shared/presentation/activateactions.uip @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<UIP version="6" > + <Project > + <ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" preferKtx="False" flipCompressedTextures="False" > + <CustomColors count="16" >#969696 #780000 #ff0055 #ffffff #0a0a0a #ffffff #a0a8b2 #ffffff #ff643a #ffffff #4694ff #ffffff #ff0800 #ffffff #280000 #ffffff</CustomColors> + </ProjectSettings> + <Graph > + <Scene id="Scene_u31923" backgroundcolor="1 0 0 1" bgcolorenable="False" > + <Layer id="Layer_u40191" variants="" > + <Camera id="Camera_u60961" /> + <Light id="Light_u46987" /> + <Model id="Cube_u48840" variants="" > + <ReferencedMaterial id="Default_u50569" name="Default" /> + </Model> + <Group id="Events1_u28102" variants="" /> + <Group id="Events2_u17296" variants="" /> + </Layer> + <Material id="__Container_u55481" > + <Material id="materials//Default_u19189" /> + </Material> + </Scene> + </Graph> + <Logic > + <State name="Master Slide" component="#Scene_u31923" > + <Add ref="#Layer_u40191" /> + <Add ref="#Camera_u60961" /> + <Add ref="#Light_u46987" /> + <Add ref="#__Container_u55481" name="__Container" /> + <Add ref="#materials//Default_u19189" name="materials//Default" /> + <State id="Scene-Slide1_u54514" name="Slide1" > + <Add ref="#Cube_u48840" name="Cube" rotation="20 360 20" sourcepath="#Cube" /> + <Add ref="#Default_u50569" name="Default" referencedmaterial="#materials//Default_u19189" sourcepath="/Default" /> + <Add ref="#Events1_u28102" name="Events1" endtime="3000" starttime="1000" > + <Action id="Events1-Action_u22921" eyeball="True" triggerObject="#Events1_u28102" event="onActivate" targetObject="#Scene_u31923" handler="Set Property" > + <HandlerArgument name="Property Name" type="String" argtype="Property" value="bgcolorenable" /> + <HandlerArgument name="Property Value" type="Bool" argtype="Dependent" value="True" /> + </Action> + <Action id="Events1-Action_u62890" eyeball="True" triggerObject="#Events1_u28102" event="onDeactivate" targetObject="#Scene_u31923" handler="Set Property" > + <HandlerArgument name="Property Name" type="String" argtype="Property" value="bgcolorenable" /> + <HandlerArgument name="Property Value" type="Bool" argtype="Dependent" /> + </Action> + </Add> + <Add ref="#Events2_u17296" name="Events2" endtime="3000" starttime="1000" > + <Action id="Events2-Action_u55956" eyeball="True" triggerObject="#Events2_u17296" event="onActivate" targetObject="#Events2_u17296" handler="Emit Signal" > + <HandlerArgument name="Signal Name" type="String" argtype="Signal" value="mySignal1" /> + </Action> + <Action id="Events2-Action_u17879" eyeball="True" triggerObject="#Events2_u17296" event="onDeactivate" targetObject="#Events2_u17296" handler="Emit Signal" > + <HandlerArgument name="Signal Name" type="String" argtype="Signal" value="mySignal2" /> + </Action> + </Add> + </State> + </State> + </Logic> + </Project> +</UIP> |