Joe Rice

Hi -

I've been noticing a lot of warnings about nodes/nodesets being empty when markup containing <seq>'s is played in the Sonic Emulator. A search here yielded one similar thread that didn't seem to have a resolution.

When our menu pages are loaded, the following warnings show up in the Sonic Debugger:

: CueNode : No search node for 'select'
: CueNode : No search node for 'select'
: CueNode : No search node for 'select'
: CueNode : No search node for 'select'
: CueNode : No search node for 'select'
: CueNode : No search node for 'select'
: CueNode : No search node for 'select'
: CueNode : No search node for 'select'
: EventNode : Empty default node set, <event> ignored.


There's one of those CueNode statements for each button on the page. (All of which use similar cues.

Here's an example of the actioned timing code for a menu button. All the various button code is wrapped within a <par> not shown here:


Code Snippet

<seq begin="id('btn5')[state:actioned()=true()]" dur="2s">

<cue select="id('btn5')" dur="500ms" use="activated">
<event name="fadeOut"/>
</cue>
<cue select="id('btn5')" dur="200ms">
<event name="gotoTitle">
<param name="myTitle" value="HDLoop"/>
</event>
</cue>
</seq>

That <seq> block seems to cause the problems. If I change it to a <par> block, the warnings go away, but then the events don't fire in order.

Is there something inherently wrong with the way that's done

As an aside, I'd originally done the fade out in markup, with a definition to animate opacity from 1 to 0, using that definition in one of the cues within the seq block. When that was there, the emulator threw a warning several times per second about trying to animate an empty default node set, so that fade was moved to script.

Thanks in advance.

Cheers,
Joe


Re: HD DVD Interactivity Authoring "No search node for 'select'" warning in Sonic Emulator

Peter Torr - MSFT

Unfortunately there is some ambiguity about the explanation of the cue element and the relationship between the use attribute and any child animations in section 7.7.2.9.2 of the spec.

Using both the use attribute on a cue and having child elements that define animations can cause problems on some players, so I recommend using only use or only child elements for the time being.






Re: HD DVD Interactivity Authoring "No search node for 'select'" warning in Sonic Emulator

Joe Rice

Peter, thanks much for the response. I notice the Toshiba verifier warns about this as well.

I take it that something like this is acceptable

<seq begin="id('state')[style:x()!='10px]" dur="1s">
<cue select="id('All_Buttons')" dur="600ms" use="fadeIn"/>
<cue select="id('All_Buttons')" dur="200ms">
<event name="setPopupHighlight"/>
</cue>
</seq>

Cheers,
Joe





Re: HD DVD Interactivity Authoring "No search node for 'select'" warning in Sonic Emulator

Joe Rice

Perhaps related to this, if trying to do animation in markup in a <seq> block, the Sonic emulator throws constant warnings - looks like maybe once per tick.

Here's an example of the code:

Code Snippet

<seq begin="id('btn1')[state:actioned()=true()]" dur="2s">
<cue dur="0.5s" >
<set style:backgroundFrame="1"/>
</cue>

<cue select="id('All_Buttons')" dur="0.5s" >
<set style:display="auto" />
<animate style:opacity="1;0" />
</cue>

<cue dur="0.5s">
<event name="stopMenuTimer" />
</cue>

<cue dur="0.5s">
<event name="gotoTitle">
<param name="myTitle" value="SOHD"/>
</event>
</cue>
</seq>

<body>
<div id="All_Buttons" style:opacity="0">
<button id="btn1" state:focused="true" style:navRight="btn2" style:navLeft="btn12" style:navUp="btn13" style:navDown="btn13" style:position="absolute" style:x="211px" style:y="797px" style:width="125px" style:height="72px" style:opacity="inherit" style:backgroundImage="url('n1_sound_pp.png') url('a1_sound_pp.png') url('s1_sound_pp.png')"/>

... (more btns, similar to above)


In the Sonic Emulator, I get constant warnings:

SetNode: Trying to <set> with an empty default node set.
: AnimateNode : Trying to <animate> with an empty default node set.
SetNode: Trying to <set> with an empty default node set.
: AnimateNode : Trying to <animate> with an empty default node set.

Seems there's something wrong with the XPath

Cheers,
Joe




Re: HD DVD Interactivity Authoring "No search node for 'select'" warning in Sonic Emulator

Amy Dullard - MSFT

I don't think the problem there is with using a seq. On your first cue, you are calling set, but you have no select in the cue. On your second cue, you are calling set and animate in the same cue. I think this is acceptable in the spec, however I believe that some players will not handle this correctly - you might want to break that up into 2 cues.






Re: HD DVD Interactivity Authoring "No search node for 'select'" warning in Sonic Emulator

Amy Dullard - MSFT

I think I would try...

Code Snippet
<seq begin="id('state')[style:x()!='10px]" dur="1s">
<cue select="id('All_Buttons')" dur="600ms" use="fadeIn"/>
<cue select="id('All_Buttons')" end="false()">
<event name="setPopupHighlight"/>
</cue>
</seq>

to make sure your event fires. end="false()" keeps the cue active until its parent dies (1s according to your dur)





Re: HD DVD Interactivity Authoring "No search node for 'select'" warning in Sonic Emulator

Joe Rice

Thanks, Amy.

I thought that I didn't need a select, as the actioned button would be implicitly selected as the default node.

I imagine the tip about using set and animate within the same cue goes for using them in the same definitions as well

Eg:

Code Snippet


<g id="fadeIn">
<set style:display="auto"/>
<animate style:opacity="1;0"/>
</g>


Cheers,
Joe




Re: HD DVD Interactivity Authoring "No search node for 'select'" warning in Sonic Emulator

Joe Rice

Looks like that end="false()" statement may not be valid in a <seq>. The Sonic emulator complains:

: CueNode : Invalid 'end' attribute value, Inside <seq> node, <cue> node don't support XPath

Cheers,
Joe





Re: HD DVD Interactivity Authoring "No search node for 'select'" warning in Sonic Emulator

Joe Rice

I suspect I'm missing something basic. Wink

The following is a reduced version of the whole page. This should fade in when vk_menu is pressed, and fade out when btn1 is actioned.

Instead it pops in on vk_menu, and when btn1 is actioned, it pops out, and then pops right in again, pops out, and pops in again and holds.

And the warnings in the Sonic emulator continue...

: AnimateNode : Trying to <animate> with an empty default node set.
SetNode: Trying to <set> with an empty default node set.
SetNode: Trying to <set> with an empty default node set.
: AnimateNode : Trying to <animate> with an empty default node set.
SetNode: Trying to <set> with an empty default node set.
SetNode: Trying to <set> with an empty default node set.

I have this working in another version using script to do a lot of the display work, but would love to get it working all in markup if possible.

Cheers,
Joe

Code Snippet

< xml version="1.0" encoding="UTF-8" standalone="yes" >
<root xmlns="http://www.dvdforum.org/2005/ihd" xmlns:state="http://www.dvdforum.org/2005/ihd#state" xmlns:style="http://www.dvdforum.org/2005/ihd#style" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dvdforum.org/2005/ihd iHD.xsd" xml:lang="en-us">

<head>
<timing clock="page">

<defs>

<!-- Define what happens when a button has focus. Change the background frame, and trigger the button sound -->

<g id="selected">
<set style:backgroundFrame="2"/>
<event name="resetMenuTimer"/>
</g>

</defs>



<!-- Show the menu. Div ID 'state' is a flag -->
<par begin="(id('VK_MENU_btn')[state:actioned()] and id('state')[style:x()='0px'])" end="(id('VK_MENU_btn')[state:actioned()] and id('state')[style:x()='10px'])">

<!-- Update the state and animate the menu in -->
<cue select="id('state')" dur="200ms" fill="hold">
<set style:x="10px"/>
</cue>
</par>

<!-- Fade the buttons in and set the highlight-->

<seq begin="id('state')[style:x()!='0px']" end="id('state')[style:x()='0px']">

<!-- Set display on the containing div so we see the fade in-->
<cue select="id('All_Buttons')" dur="100ms" fill="hold">
<set style:display="auto"/>
</cue>

<!-- Animate the containing div opacity to fade in-->
<cue select="id('All_Buttons')" dur="500ms" fill="hold">
<animate style:opacity="0;1"/>
</cue>

<!-- Fire the script event to set the highlight-->
<cue select="id('All_Buttons')" dur="100s">
<event name="setPopupHighlight"/>
</cue>
</seq>

<par>


<!-- Timing for button 1. Focus changes background frame. Action changes background frame, fades out the all buttons
(acting on the containing <div>, sets the display of the containing div to none so that buttons can't be focused after
fading out, stops the menu timer, and fires event to change title. -->

<cue begin="id('btn1')[state:focused()=true()]" end="id('btn1')[state:focused()=false()]" use="selected"/>

<seq begin="id('btn1')[state:actioned()=true()]" dur="2s">

<!-- Set the backgroundFrame to the activated state image-->
<cue select="id('btn1')" dur="300ms">
<set style:backgroundFrame="1"/>
</cue>

<!-- Set the state to 0px to indicate menu is closed-->
<cue select="id('state')" dur="100ms">
<set style:x="0px"/>
</cue>

<!-- Animate the containing div opacity to fade out-->
<cue select="id('All_Buttons')" dur="500ms">
<animate style:opacity="1;0"/>
</cue>

<!-- Set the containing div diaplay to none-->
<cue select="id('All_Buttons')" dur="100ms">
<set style:display="none"/>
</cue>



<!-- Fire the events to stop the menu timer and go to the title-->
<cue select="id('All_Buttons')" dur="1s">
<event name="stopMenuTimer"/>
<event name="gotoTitle">
<param name="myTitle" value="SOHD"/>
</event>
</cue>
</seq>


</par>
</timing>
</head>

<body>
<div id="All_Buttons" style:opacity="0" style:display="none">
<button id="btn1" style:navRight="btn2" style:navLeft="btn12" style:navUp="btn13" style:navDown="btn13" style:position="absolute" style:x="211px" style:y="797px" style:width="125px" style:height="72px" style:opacity="inherit" style:backgroundImage="url('n1_sound_pp.png') url('a1_sound_pp.png') url('s1_sound_pp.png')"/>
<button id="btn2" style:navRight="btn3" style:navLeft="btn1" style:navUp="btn13" style:navDown="btn13" style:position="absolute" style:x="336px" style:y="797px" style:width="125px" style:height="72px" style:opacity="inherit" style:backgroundImage="url('n1_02_serenity_pp.png') url('a1_serenity_pp.png') url('s1_serenity_pp.png')"/>
<button id="btn3" style:navRight="btn4" style:navLeft="btn2" style:navUp="btn13" style:navDown="btn13" style:position="absolute" style:x="461px" style:y="797px" style:width="126px" style:height="72px" style:opacity="inherit" style:backgroundImage="url('n1_btn1.png') url('a1_btn1.png') url('s1_btn1.png')"/>

</div>

<div>
<button id="VK_MENU_btn" accessKey="VK_MENU"/>
</div>

<!-- Empty tag to store menu state as x position -->
<div id="state"/>

</body>

</root>






Re: HD DVD Interactivity Authoring "No search node for 'select'" warning in Sonic Emulator

Peter Torr - MSFT

I had a quick play around (catching a flight to Japan today...) and made a few minor changes to the timing section. Basically the trick is to use a 3rd state for the menu (style:x="20px" in this case).

Sorry for the (lack of) formatting:

<!-- Show the menu. Div ID 'state' is a flag -->

<par begin="(id('VK_MENU_btn')[state:actioned()] and id('state')[style:x()='0px'])" end="id('state')[style:x()='20px']">

<!-- Update the state and animate the menu in -->

<cue select="id('state')" dur="1s" fill="hold">

<set style:x="10px"/>

</cue>

<!-- Fade the buttons in and set the highlight-->

<seq begin="id('state')[style:x()!='0px']" end="id('state')[style:x()='20px']">

<!-- Set display on the containing div so we see the fade in-->

<cue select="id('All_Buttons')" dur="1s" fill="hold">

<set styleBig Smileisplay="auto"/>

</cue>

<!-- Animate the containing div opacity to fade in-->

<cue select="id('All_Buttons')" dur="500ms" fill="hold">

<animate styleSurprisepacity="0;1"/>

</cue>

<!-- Fire the script event to set the highlight-->

<cue select="id('All_Buttons')" dur="100s">

<event name="setPopupHighlight"/>

</cue>

</seq>

<!-- Timing for button 1. Focus changes background frame. Action changes background frame, fades out the all buttons

(acting on the containing <div>, sets the display of the containing div to none so that buttons can't be focused after

fading out, stops the menu timer, and fires event to change title. -->

<cue begin="id('btn1')[state:focused()=true()]" end="id('btn1')[state:focused()=false()]" use="selected"/>

<par begin="id('btn1')[state:actioned()=true()]" end="false()">

<seq dur="2s">

<!-- Set the backgroundFrame to the activated state image-->

<cue select="id('btn1')" dur="300ms">

<set style:backgroundColor="yellow"/>

</cue>

<!-- Set the state to 0px to indicate menu is closed-->

<!--<cue select="id('state')" dur="1s" fill="hold">

<set style:x="0px"/>

</cue>-->

<!-- Animate the containing div opacity to fade out-->

<cue select="id('All_Buttons')" dur="500ms">

<animate styleSurprisepacity="1;0"/>

</cue>

<!-- Set the containing div diaplay to none-->

<cue select="id('All_Buttons')" dur="100ms" fill="hold">

<set styleBig Smileisplay="none"/>

</cue>

<!-- Fire the events to stop the menu timer and go to the title-->

<cue select="id('All_Buttons')" dur="1s">

<event name="stopMenuTimer"/>

<event name="gotoTitle">

<param name="myTitle" value="SOHD"/>

</event>

</cue>

</seq>

<cue begin="1800ms" select="id('state')" end="false()">

<set style:x="20px"/>

</cue>

</par>

</par>