Your Digital Media Has Never Looked So Good

  • 1
  • 2
  • 3
  • 4
  • 5
  • 16
 
User avatar
RokuKevin
Roku Engineering
Topic Author
Posts: 796
Joined: Tue Sep 22, 2009 2:29 pm

Beta Scene Graph Components

Mon Aug 17, 2015 5:04 pm

Roku is adding new Scene Graph SDK Components to enable more productivity in creating custom layouts of screens.

In the past, developers have been forced to choose between using screen templates with an optimized implementation designed by Roku or writing “custom” screens using the low-level drawing apis of roScreen. Our new Scene Graph components enable designers to quickly create screens using declarative XML and developers to implement the design with the support of higher level objects, layouts, events, and focus management.

The best place to start learning is with the“Scene Graph XML Guide” and “Scene Graph XML Tutorial” sections in our online documentation:
http://sdkdocs.roku.com/display/sdkdoc/Scene+Graph+XML+Guide
http://sdkdocs.roku.com/display/sdkdoc/Scene+Graph+XML+Tutorial

We’re excited to see how quickly you can implement new designs and look forward to your feedback on improvements we could make.

Please send a private message to RokuShawnS with the subject “beta scene graph serial number” and a body containing serial numbers you’d like to receive the beta firmware.

Please respond to this announcement with any questions or feedback regarding our beta scene graph components.

--Kevin
 
MatroxRT
Posts: 27
Joined: Thu Mar 12, 2015 2:03 pm

Re: Beta Scene Graph Components

Tue Aug 18, 2015 10:45 am

This is incredibly amazing. Thank you! I can't wait to start building apps with this.
 
User avatar
RokuShawnS
Roku Engineering
Posts: 6627
Joined: Thu Mar 10, 2011 2:21 pm

Re: Beta Scene Graph Components

Tue Aug 18, 2015 6:27 pm

Please, guys ... don't send me questions about the Scene Graph SDK. I have no knowledge of it whatsoever. I'm only facilitating gathering your serial numbers for the public test :)

C. Shawn Smith
C. Shawn Smith
Community Liaison

------------
The Cosmos is all that is, and all that was, and ever will be. -- Carl Sagan
 
adamkaz
Posts: 116
Joined: Sun Jan 11, 2009 2:23 pm

Re: Beta Scene Graph Components

Wed Aug 19, 2015 11:11 am

I just loaded this up. I went through the sample apps just to take a look. After loading and playing with the "videobanner" one, I went to the home screen on my Roku 3. When I scrolled left and right, it alternates between:

Left: "home" is selected, channels fill up the rest of the screen, no ad is shown.
Right: menu disappears, first channel is selected, and the ad comes on screen from the right (on top of channel icons)

up/down don't work.

After pressing home a couple of times, it went back to nominal behavior. Haven't been able to replicate (best kind of bug). SW version 7.0 build 1306.

Adam
 
dratio
Posts: 17
Joined: Thu Sep 11, 2014 11:29 am

Re: Beta Scene Graph Components

Wed Aug 19, 2015 11:45 am

I am building an item with multiple labels on the same line. There will be dynamic content in the labels, so the width of the labels will be changing based on what the text is, so I have the width set to zero for both. However, when I need the final width of the first label in order to properly place the second label, it is still returning as zero. Is there a way to access the final width of the label in order to determine where the second label should go. I am assuming that this will be done via translation, but I need an x-value to put into the translation.
 
lumpenprole
Posts: 15
Joined: Wed Apr 22, 2015 10:37 am

Re: Beta Scene Graph Components

Wed Aug 19, 2015 12:24 pm

adamkaz wrote:
I just loaded this up. I went through the sample apps just to take a look. After loading and playing with the "videobanner" one, I went to the home screen on my Roku 3. When I scrolled left and right, it alternates between:

Left: "home" is selected, channels fill up the rest of the screen, no ad is shown.
Right: menu disappears, first channel is selected, and the ad comes on screen from the right (on top of channel icons)

up/down don't work.

After pressing home a couple of times, it went back to nominal behavior. Haven't been able to replicate (best kind of bug). SW version 7.0 build 1306.

Adam

Had the same thing happen to me once. Replicated it once, then never again.
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Beta Scene Graph Components

Wed Aug 19, 2015 1:41 pm

RokuKevin wrote:
Please send a private message to RokuShawnS with the subject “beta scene graph serial number” and a body containing serial numbers you’d like to receive the beta firmware.

Joining a player to scenic-graph-beta, how would that mesh with the S/N being previously added to beta firmware list, Marma-dev authorization etc?

Is it likely i shoot myself in the foot doing this - or would it be wiser to dedicate a virgin player instead?
 
User avatar
RokuKevin
Roku Engineering
Topic Author
Posts: 796
Joined: Tue Sep 22, 2009 2:29 pm

Re: Beta Scene Graph Components

Wed Aug 19, 2015 5:34 pm

Joining the Beta Scene Graph group will not affect whitelisting for Marmalade development.

--Kevin
 
renojim
** Valued Community Member **
Posts: 3491
Joined: Mon Feb 15, 2010 1:35 pm

Re: Beta Scene Graph Components

Wed Aug 19, 2015 10:00 pm

Since getting the v7.0 firmware, I'm unable to hit Ctrl-C in the console without it dumping me back to the home screen. Anyone else?

I also get double prompts after a stop which persist:
BrightScript Debugger> BrightScript Debugger>

-JT
 
lumpenprole
Posts: 15
Joined: Wed Apr 22, 2015 10:37 am

Re: Beta Scene Graph Components

Thu Aug 20, 2015 9:27 am

renojim wrote:
Since getting the v7.0 firmware, I'm unable to hit Ctrl-C in the console without it dumping me back to the home screen. Anyone else?

I also get double prompts after a stop which persist:
BrightScript Debugger> BrightScript Debugger>

-JT


So, it seems that there are two ports to watch for debugging now. 8085 is the classic port and anything that gets run in your main.brs is going to output there. The scene graph components, otoh seem to be running on 8089. personally I'm just running two telnets to those ports at the same time and ignoring eclipse altogether.
 
lumpenprole
Posts: 15
Joined: Wed Apr 22, 2015 10:37 am

Re: Beta Scene Graph Components / Row List problem

Thu Aug 20, 2015 9:36 am

So, I'm trying out the Row List component. Running this code doesn't throw any errors, but it immediately restarts the roku box.

Here's the xml:

<?xml version="1.0" encoding="utf-8" ?> 
<component name="carouselScene" extends="Scene" >

    <script type="text/brightscript" uri="pkg:/components/scripts/CarouselSceneScript.brs" />

    <children>

        <RowList
            id="contentRow1"
            itemComponentName="Poster"
            translation="[0, 50]" />


    </children>
</component>


And here's the script:

Sub init()
    ?"CarouselSceneScript:init()"
    m.contentRow1 = m.top.findNode("contentRow1")
    configureRowList()
    m.top.setFocus(true)
end Sub

Sub configureRowList()

    content = createObject("RoSGNode", "ContentNode")
    content.TITLE = "Test Row"

    for x = 1 to 21
        thisCon = content.createChild("ContentNode")
        thisCon.HDPOSTERURL = "pkg:/locale/default/images/book-covers-" + x.ToStr() + ".jpg"
    end for

    m.contentRow1.rowItemSize = [[335,463]]
    m.contentRow1.content = content

end Sub


I've put stops in and stepped through it. It doesn't throw errors and crashes the box when it goes to draw.
 
EnTerr
** Valued Community Member **
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: Beta Scene Graph Components

Thu Aug 20, 2015 1:42 pm

@Roku - do you guys have a significant number of developers in North California?

If so, organize a meetup to present this new paradigm. Otherwise, make it a webinar/web conference.

Free bonus: record that presentation and make it available for future play.
 
dratio
Posts: 17
Joined: Thu Sep 11, 2014 11:29 am

Re: Beta Scene Graph Components

Fri Aug 21, 2015 10:27 am

could you provide code for a working sample of a button node?
 
lumpenprole
Posts: 15
Joined: Wed Apr 22, 2015 10:37 am

Re: Beta Scene Graph Components

Fri Aug 21, 2015 11:53 am

dratio wrote:
could you provide code for a working sample of a button node?


And maybe a simple RowList?
 
User avatar
RokuRobB
Posts: 85
Joined: Tue Jul 10, 2012 3:07 pm

Re: Beta Scene Graph Components

Sat Aug 22, 2015 9:43 am

Here is a button sample. You basically need to define an observer for the buttonSelected field:

SimpleButtonScene.xml
<?xml version="1.0" encoding="utf-8" ?>

<component name="SimpleButtonScene" extends="Scene" >

<script type="text/brightscript" uri="pkg:/components/SimpleButtonScene.brs" />

<children>
<Button id="button" text="Press Me!" />
</children>

</component>

SimpleButtonScene.brs
function init()
m.button = m.top.findNode("button")
m.button.ObserveField("buttonSelected", "onButtonSelected")
m.button.SetFocus(true)
end function

function onButtonSelected() as void
print "Button Pressed"
end function

A RowList sample is coming soon.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 16

Who is online

Users browsing this forum: No registered users and 4 guests