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.


