Log in

View Full Version : Scenarist: How to return to the same menu page after a clip has played?


Scubasteve2365
13th May 2011, 16:35
Hello all,

Last year I received some help on this site for my project of making a Blu-ray disc that contains scenes from my favorite movies for the sole purpose of demoing my home theater system. I had to use Scenarist, although not formally trained to use to accomplish this because I wanted to retain the complete TrueHD and DTS-HD audio tracks for the clips.

http://sphotos.ak.fbcdn.net/hphotos-ak-ash2/hs333.ash2/61288_10100163201674468_13754840_56104087_3867370_n.jpg

http://sphotos.ak.fbcdn.net/hphotos-ak-ash2/hs320.ash2/60064_10100163201789238_13754840_56104091_3611388_n.jpg

My project was successful, however there were some short sights that I'm now attempting to correct with Version2.0

The menu on Disc Version1.0 is basically has a main menu page which has 4 category buttons (LFE, Surround, Visual, and Music). Upon clicking each button you are taken to a new menu page that has clips for that category.

One problem is that when a clip is chosen and completed, it returns to the main menu page. I'd rather it return to the previous category page that I was on. For example, like in one of the images above, If I choose the Avatar clip from my LFE menu, when the clip is finished I want it to return to the LFE category menu instead of the main menu page with the four categories.

Any help?

Thanks in advance.

mp3dom
13th May 2011, 19:45
Since you can't directly return to a particular page, you need to use GPRs. Store in a GPR the pageID you want to return and (if you want) in another GPR the button number (to highlight it). You need to simply store the values when you're starting the clip (in its MO command). In your Page0 of the main menu create an auto-action button and set to go to page<gpr value> and highligh<gpr value> button. It's a common usage to use page0 for initialization (or In-effects), and start the true main menu at page1. This is good choice because if you use the gpr you risk to set both page/button in the actual page (for example, in page1 a command of set page<gpr=1>, highlight button<gpr=1>) which is not allowed by specs and create problems on standalone players (can freeze the playback)

Scubasteve2365
13th May 2011, 20:15
Thanks for the response mp3dom including the tip regarding the phantom first menu page. While I'm able to understand what you're saying from fundamental basic level, I still need help in executing it.

For the button that takes me to a clip, under NaviCommand would this be correct?

------------------------------------------
ObjectName: Avatar [BO_ID:17]

1) JumpObject MO#1[ID:15]
2) SetButtonPage Page:LFE Page[ID:1]
-------------------------------------------

If this is correct, I didn't actually do anything with the GSR entried or intermediate options. I simply added the command under the SetSystem options.

If this is correct, so I have a better working knowledge of Scenarist, does this simply mean that the player will execute the two commands above in order, which is to first play the movie object and then second to set the button page?

mp3dom
13th May 2011, 21:43
It's wrong, because Jumps/Calls commands will terminate the execution of all the next commands. This means that your SetButtonPage will never be executed.

Scubasteve2365
13th May 2011, 21:53
Ok, thanks for that understanding.

I'm still unclear on actually how to set the GPRs.

If I understand correctly the process is like this: On first play

- Menu page 0 = AutoAction button which automatically goes to Menu Page 1
- When I click on a button that plays a video, at that point I store a GPR value which corresponds to that particular menu page value. If for example I'm on menu page 7, I store the value of 7 into this GPR registry
-When the video clip is done playing I redirect it back to the main menu (Page 0). This auto-action button will have a command that tells it to set the page for the gpr value (which in this case would be 7).
-Page 7 is loaded

Two primary questions that I have are?

Can you tell me exactly how to write the value into the GPR registry. Scenarist isn't exactly intuitive and in playing around with the "SET" command window the sub commands seem to want to move, add, subtract, ect. I can't find an actual write or generic set command. I'm also confused by the GPR entried and GPR intermediate meanings.

If the auto-action button in page0 is set to make the page the gpr value, upon first play what makes it go to menu page 1? Is that the default value for the gpr registry?

Sorry for the noob questions, I'm actually an electrical engineer and have programming experience on various different platforms. I feel if I just get the basics understood a whole world of authoring will open up. I'm still searching for that "ah-ha" moment.

rik1138
13th May 2011, 23:03
Move is the command you want. In the Set command, if you 'Move' a value of 7 into GRP 1, that stores a 7 in GPR 1. (No math, just over-writes whatever was there with the 7).

GPRs are, in theory, all set to 0 when the disc starts playing. Just to be safe, I usually set the ones I'm using to 0 (or some default value) in the FirstPlayback 'title'. Never seen a player not set them all to 0, but you never know... :)
Your auto-action button should have several 'If' statements:
If GPRx = 1, go to page 1, if it's 2, go to page 2, etc. The very last line should be a straight 'SetButtonPage' to the main menu command, no if statement. They way, if for some reason there's a value stored there that you aren't expecting, the disc won't crash. Always make the last statement a catch-all of some kind... You may not _want_ the main menu, but it's better than crashing... :)

If you just have a command that says 'SetButtonPage to GPRx', and the value in that GPR isn't valid (for whatever reason), the disc will crash. It's a little more programming to have a group of If statements, but it's safer overall.

Scubasteve2365
14th May 2011, 14:27
Move is the command you want. In the Set command, if you 'Move' a value of 7 into GRP 1, that stores a 7 in GPR 1. (No math, just over-writes whatever was there with the 7).

GPRs are, in theory, all set to 0 when the disc starts playing. Just to be safe, I usually set the ones I'm using to 0 (or some default value) in the FirstPlayback 'title'. Never seen a player not set them all to 0, but you never know... :)
Your auto-action button should have several 'If' statements:
If GPRx = 1, go to page 1, if it's 2, go to page 2, etc. The very last line should be a straight 'SetButtonPage' to the main menu command, no if statement. They way, if for some reason there's a value stored there that you aren't expecting, the disc won't crash. Always make the last statement a catch-all of some kind... You may not _want_ the main menu, but it's better than crashing... :)

If you just have a command that says 'SetButtonPage to GPRx', and the value in that GPR isn't valid (for whatever reason), the disc will crash. It's a little more programming to have a group of If statements, but it's safer overall.

RIK,

10-4. Logically I understand exactly what you're saying.

I'm still clueless of how to actually put that into the NaviCommand editor. I'd much rather type out the script but all I have is drop-down boxes.

For example, the move command to write a value of 7 into GPR(1) isn't intuitive and I can't find anything that explains how to actually do it with NaviCommand. I did a search for GPR and I found a few discussions where people discuss logically how to program certain functions but nothing describing how to actually pull it off in NaviCommand.

Is this below image right for moving a 7 into GPR(1)? I'm confused by the layout. I assume the "data type" on the left corresponds with the "value" below it, and that the "data type" on the right corresponds with the "value" under it. Which is moving into which? Is the left moving into the right?

http://i56.tinypic.com/34nk3v4.png

Lastly,

I looked around and I don't even see an "if" command anywhere to establish the conditioning array on my auto-action button. I'm familiar with if commands in many programming languages but I have a feeling that I'm gonna have similar issues with setting those statements up as I do with simply moving a value into a variable.

I appreciate all of you help thus far immensely.

rik1138
15th May 2011, 01:15
Yes, that is the command you want. The first column is the GPR (and it's number, or label if you give them labels, which is done via the 'Register...' button on the far right. So instead of remembering GPR 1 is the menu value, you can actually call GPR 1 'Menu'. With 4096 available GPRs, it can make things easier... :) ), the second column is the value you want stored into that GPR. In this case, an Immediate of 7. You can also store the values in GPR/PSR's as well, if you want.

The 'If' statement is activated by checking the little box that says 'Compare' next to the Cmd box where you selected 'Set'.
Then you get more boxes (these arranged horizontally...) In the top row, you'd set GPR Immediate and the value 1, middle box set to ==, bottom row to Immediate and '7' to check that there's a 7 stored in GPR 1. Only if that's true will the command below be executed.

The 'Compare' check box should be there for every command.

Scubasteve2365
16th May 2011, 15:39
Thank you.

Last question:

Should I be concerned about the hexadecimal format for the compare/if statement? When moving immediate values into a GPR the format isn't defined (binary 0b, hex 0x or decimal) yet in the compare statement I seem to be locked into the hexadecimal format.

Thanks

rik1138
16th May 2011, 18:44
That's only for bitwise compares (the & symbol). Those types of comparisons are for checking if individual bits of the 32 GPR are flipped on or off... If you change the operand to anything else (==, <, >, etc) the 0x goes away, and it becomes a decimal value.