UI widget questions--hopefully now in correct forum

I'll try to collect and collate what I've already got into this forum thread.

For starters:

What this thread is all about:


Here's a PDF from a presentation from Jeremy Ernst given at the 2011 Game
Developer's Conference, called "Fast and Efficient Facial RIgging." He
describes the system he created for Gears of War 3, including using FACS for
the face.

http://jeremyernst.wordpress.com/2011/03/30/fast-and-efficient-facial-rigginggdc-2011-talk/

http://www.unrealengine.com/files/downloads/Jeremy_Ernst_FastAndEfficietFacialRigging2.pdf

I want it.


Except I want it as a semi-transparent widget overlaying the 3D window.

Like this:

Screen_Shot_2012-12-05_at_7.43_.17_AM_.png
1280 x 800 - 718K
Post edited by athenenoctua on

Comments

  • athenenoctuaathenenoctua Posts: 0
    edited December 2012

    I made that widget ui in Qt Designer, an app included with DAZ Studio 4.5.

    But now I have to hook up the sliders of this _non-standard_ interface to manipulate the morph values (not the deltas).

    I have considered the SDK, but the simplest, most straightforward way seems to be to use Daz Script.
    In doing so, the widget will be customizable. Just go into Qt Designer, move the sliders to where you want them, then hook up the code to the parameters you want to move.

    What I know so far:

    The code should probably be put into a .dsa file.

    I don't want to iterate through morph names. I want a one-to-one correspondence, coded out in longhand. In that way, idiots such as myself can simply go in and change the morphname in the .dsa when they put a different morphname in the .ui. See Jeremy Ernst's presentation for the reason why.

    In the first line I want to tell the script to use the user interface FACS.ui, which will be located in the folder FACS, the same folder as the script file, FACS.dsa. The way to do that may or may not be:


    //Declare and hook up the ui

    var sUiPath = String(“FACS/FACS.ui”);
    var oUiFile = new DzFileInfo( sUiPath );

    // Call the FACS widget into existence.

    Then make sure it exists.

    if( oUiFile.exists() )

    Then make it appear in the pane, or nested inside the nested widgets.


    // Call the sliders QSliders into existence.
    // Connect morphvalue names such as CTRLMouthOpen to the corresponding QSlider with that name
    // Use Signals/Slots concept to make the sliders do exactly what the Parameters controls would do

    } else {
    MessageBox.information( sUiPath, “The Cake is a Lie”, “&OK;” );
    }

    -=-=-

    Hopefully this script will change and develop as I learn more.


    Problems and issues:

    I can’t find the syntax to call the .ui file. Rob’s coding examples show how to call nested .ui’s. I successfully tested this theory by replacing “Select the property group from the list on the left” with “THE CAKE IS A LIE” in the “What do I do?” widget.

    Also, the example code formats the widget to match the other panes/widgets in the user interface. That formatting would make this widget useless.

    Post edited by athenenoctua on
  • athenenoctuaathenenoctua Posts: 0
    edited December 2012

    Tugpsx was kind enough to contribute a slider script.

    // DAZ Studio version 3.1 filetype DAZ Script

    var wDlg = new DzDialog;
    var box = new DzVGroupBox(wDlg);
    box.width=300
    box.height=200
    var w = new DzEnumSlider( box )
    w.addItem( "oh" )
    w.addItem( "my" )
    w.addItem( "Bob" )
    w.value = 2;

    // setup button to update debug results
    but = new DzPushButton( box );
    but.text = "debug";
    connect( but, "clicked()", butclicked )// click button to show update in debug
    wDlg.width=300
    wDlg.height=200
    wDlg.exec()

    function butclicked()
    {
    debug( "val = " + w.value );
    }


    I put this into a .dsa file, put the .dsa file into the Sripts folder in the content directory ran it from Content Manager, and this popped up:
    Very cool.

    Screen_Shot_2012-12-20_at_11.31_.05_AM_.png
    337 x 257 - 17K
    Screen_Shot_2012-12-20_at_11.30_.48_AM_.png
    353 x 268 - 19K
    Screen_Shot_2012-12-20_at_11.30_.21_AM_.png
    376 x 286 - 15K
    Post edited by athenenoctua on
  • athenenoctuaathenenoctua Posts: 0
    edited December 1969

    I have gone to Window/Tabs/Script IDE and pasted in the script as follows, and got the following results.

    Note: As a former technical writer, a parent, and a current student of all that is DAZ, I know it's important to start excruciatingly simple and to be visual. So here goes:

    Screen_Shot_2012-12-20_at_12.18_.48_PM_.png
    516 x 300 - 23K
  • athenenoctuaathenenoctua Posts: 0
    edited December 1969

    Some screenshots playing around with the standard widget examples in the documentation:

    Screen_Shot_2012-12-20_at_1.01_.32_PM_.png
    671 x 433 - 39K
    Screen_Shot_2012-12-20_at_12.41_.20_PM_.png
    658 x 393 - 33K
    Screen_Shot_2012-12-20_at_12.40_.28_PM_.png
    635 x 328 - 31K
    Screen_Shot_2012-12-20_at_12.39_.52_PM_.png
    638 x 336 - 24K
  • athenenoctuaathenenoctua Posts: 0
    edited December 2012

    http://forumarchive.daz3d.com/viewtopic.php?t=160742
    This link might be helpful.

    http://doc.qt.digia.com/qsa-1.2.2/language.html
    And this one.

    So does the DAZ Script IDE window equal the QSA Workbench, then?

    http://doc.qt.digia.com/qsa-1.2.2/getting-started.html

    Post edited by athenenoctua on
Sign In or Register to comment.
Rocket Fuel