Windows

< Previous | Contents | Manuals Home | Boris FX | Next >

Windows

Synthia has an extensive package of rules about windows that can be used to remote-control buttons, dropdowns, spinners, etc in the user interface. However, using them fully requires a programming background, and that's not something we can provide or support.

Here we'll give you some incantations (as part of a made-up procedure), which should also be starting points for your own investigation, if you have the requisite background.

define the procedure solve the zoom shot my way. click summary room.

click the "zoom lens" button. go!

wait for a solve completed. click the ok button.

click the "filtering control" button.

find the floating "path filtering control" window. click the window from the previous step's "x" button. click the active window's "y" button.

click the active window's "z" button.

set the active window's `Frequency(Hz)` spinner's spinner value to 2.5.

make the active window's "Strength" spinner's spinner value 0.9. click the active window's "Apply Filter Now" button.

close the window from step 7.

make the status line's text `Hi Mom! The solve is done.`. done.

Reading the procedure, ugly as it is, should be pretty self-explanatory, but there are some behind-the-scenes details.

You can reference buttons, checkboxes, spinners, dropdowns using the text associated with it, for example "zoom lens". For text consisting of a few simple words, it can be quoted, but for more complicated cases such as Frequency(Hz), it needs to be a literal string, as shown.

Once the solve is initiated with go!, the procedure needs to wait for it to complete as shown: without that the rest of the procedure will try—and fail—to run during solving.

Any modal popup window is searched first for the named item, for example the ok button on the solver popup. Once the popup closes, in the next step the main window is searched for the "filtering control" button.

Exercise: create a mesh, open the Duplicate Mesh script, then look at its children.

The path filtering control is a floating non-modal window, ie the rest of the application is not stopped when it is displayed. There can be multiple floating windows, such as a floating camera view or perspective view, solver locking, or one or more floating panels; you need to call out the one you want by name. If you are really sure the one you want is active (ie it just got opened), you can refer to active window.

Floating windows can be closed, hidden, minimized, or restored.

Notice the use of find as a silent version of say; the only point is to identify the desired window so that it can be used in the following and final steps. The following step references the window from the previous step: be careful, as window from the last step would refer not to the immediately previous step, but to the last step in the entire procedure, which hasn't even been performed yet.

You can use set or make to change the spinner value; both ways are shown for illustration.

To take a closer look, describe a window and show the children of the main window . The main window mainly holds other windows with yet more windows. You can see the individual viewports with

show the children of the child of the main window with class

`QuadView`.

For this next one, hit send, then put the mouse over some window in the SynthEyes UI:

wait 3 seconds, then say the mouse window's name, its class, and its id.

Exercise: what's different if you then click control-up-arrow

in the text entry window?

To see the individual control windows, show the children of the current panel. Windows have id numbers as well as name and class; you can use the id (carefully) to identify specific windows. That is necessary because the name (text) usually depends on the current value of the window; you can't find a window based on the value you don't know. This can be useful to determine IDs for SyPy programs.

Exercise: define a procedure to show all a window's children, and their

children...

Here we show how to set the Summary panel's motion configuration dropdown, which isn't available directly (its contents are dynamically generated from other data):

click summary room, show the children of the current panel. define a dropdownid with the value 1325 named "motion

configuration". // ...from the summary panel list

make the summary panel's motion configuration dropdown's option text `Low Detail`.

say the summary panel's motion configuration dropdown's option number.

Look for rules about edit text, spinner value, plus a windowid, a buttonid, a checkboxid, a spinnerid, and a dropdownid as well. In addition to changing the respective values, you can examine whether a window is enabled or disabled (grayed out)—but not override that.

Exercise: how does click ok work? What effect can that have? Exercise: turn on Corners on the Summary Panel, regardless of its prior state. Exercise: click the Set Seed button on the Coordinates panel using its id.

Exercise: the better approach: define a procedure for Set Seed directly.

Exercise: make an equivalent to create cones . Why is it less useful?

©2024 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.