DazStudio To GLB exporter Testers Wanted

So i'm creating a DazStudio dsa script that exports from daz to glb formate nothing extra is needed for it to work just the single script and DazStudio which I currently have it running in Daz4.2X and Daz6.0 I have no other versions on my end to test. and what this can do so far is pretty huge in itself, why I need a couple testers I have stuff mainly for G8 and don't use 8.1, 9 or any of the others and i'm curiuse how it will work for other users

I included a list of everything it's currently capable of but the main thing that made me want want to build this is that Daz does not really support exporting merged anatomy with full moph support and this does it really well check out the list below for all the features

This exporter can:

* **Export DAZ models to GLB/glTF**

  * `.glb` single file

* **Export character geometry**

  * body mesh
  * clothing
  * hair
  * eyelashes
  * accessories
  * fitted items

* **Export props and environments**

  * rooms
  * furniture
  * scene props
  * static environment meshes
  * grouped/null-parented scene objects

* **Export rigging**

  * bones
  * skeleton hierarchy
  * skin weights
  * inverse bind matrices
  * skinned meshes

* **Export morph targets**

  * figure morphs
  * clothing morphs
  * attachment morphs
  * anatomy/geograft morphs

* **Export animation**

  * BVH skeletal animation
  * root/hip translation
  * DAZ morph animation
  * environment mesh animation as morph-cache targets

* **Handle geografts/anatomy**

  * export grafts separately
  * merge grafts/anatomy into the body
  * remove hidden/overlapping body faces
  * smooth seams
  * harmonize skin-like materials

* **Handle clothing/body cleanup**

  * remove body polygons under clothing
  * reduce poke-through
  * repair or rebuild fitted clothing weights

* **Export materials**

  * DAZ/Iray-to-glTF PBR conversion
  * base color
  * roughness
  * metallic
  * normal maps
  * emissive maps
  * opacity/cutout materials
  * glass/wet/eye material handling

* **Export and process textures**

  * embed textures in GLB
  * resize textures
  * bake opacity maps into PNG alpha
  * include or skip character/environment textures separately

* **Exclude specific content**

  * exact-name exclusion for nodes, meshes, objects, shapes, geometry, materials, and surfaces
  * wildcard exclusions when wanted

* **Generate helper lists**

  * mesh/node/surface name list
  * morph target list
  * bone hierarchy tree

* **Save presets**

  * full exporter settings
  * morph lists
  * exclusion lists
  * anatomy merge lists
  * environment animation lists

Updated with link to anyones who wants to try it


https://drive.google.com/drive/folders/1bSCZKy6I030F71l56IRMQ7j8qA9FPGnY?usp=sharing

Post edited by RedDragoon78_dc96eaefcd on

Comments

  • Hey, I'm trying to do that exact export right now! Using 8.1 currently. Let me know if you want to share the script

  • TugpsxTugpsx Posts: 894

    Definately something of interest. 

  • umblefuglyumblefugly Posts: 128

    I actually have glTF 2 export in my shattering plugin, tailored for the plugin of course, but very cool stuff man. Any examples?

    glTF2.PNG
    1920 x 1080 - 1M
  • TugpsxTugpsx Posts: 894

    umblefugly said:

    I actually have glTF 2 export in my shattering plugin, tailored for the plugin of course, but very cool stuff man. Any examples?

    Where is the shattering plugin available? 

  • TugpsxTugpsx Posts: 894

    RedDragoon78_dc96eaefcd said:

    So i'm creating a DazStudio dsa script that exports from daz to glb formate nothing extra is needed for it to work just the single script and DazStudio which I currently have it running in Daz4.2X and Daz6.0 I have no other versions on my end to test. and what this can do so far is pretty huge in itself, why I need a couple testers I have stuff mainly for G8 and don't use 8.1, 9 or any of the others and i'm curiuse how it will work for other users

    I included a list of everything it's currently capable of but the main thing that made me want want to build this is that Daz does not really support exporting merged anatomy with full moph support and this does it really well check out the list below for all the features

    This exporter can:

    * **Export DAZ models to GLB/glTF**

      * `.glb` single file

    * **Export character geometry**

      * body mesh
      * clothing
      * hair
      * eyelashes
      * accessories
      * fitted items

    * **Export props and environments**

      * rooms
      * furniture
      * scene props
      * static environment meshes
      * grouped/null-parented scene objects

    * **Export rigging**

      * bones
      * skeleton hierarchy
      * skin weights
      * inverse bind matrices
      * skinned meshes

    * **Export morph targets**

      * figure morphs
      * clothing morphs
      * attachment morphs
      * anatomy/geograft morphs

    * **Export animation**

      * BVH skeletal animation
      * root/hip translation
      * DAZ morph animation
      * environment mesh animation as morph-cache targets

    * **Handle geografts/anatomy**

      * export grafts separately
      * merge grafts/anatomy into the body
      * remove hidden/overlapping body faces
      * smooth seams
      * harmonize skin-like materials

    * **Handle clothing/body cleanup**

      * remove body polygons under clothing
      * reduce poke-through
      * repair or rebuild fitted clothing weights

    * **Export materials**

      * DAZ/Iray-to-glTF PBR conversion
      * base color
      * roughness
      * metallic
      * normal maps
      * emissive maps
      * opacity/cutout materials
      * glass/wet/eye material handling

    * **Export and process textures**

      * embed textures in GLB
      * resize textures
      * bake opacity maps into PNG alpha
      * include or skip character/environment textures separately

    * **Exclude specific content**

      * exact-name exclusion for nodes, meshes, objects, shapes, geometry, materials, and surfaces
      * wildcard exclusions when wanted

    * **Generate helper lists**

      * mesh/node/surface name list
      * morph target list
      * bone hierarchy tree

    * **Save presets**

      * full exporter settings
      * morph lists
      * exclusion lists
      * anatomy merge lists
      * environment animation lists

    Updated with link to anyones who wants to try it


    https://drive.google.com/drive/folders/1bSCZKy6I030F71l56IRMQ7j8qA9FPGnY?usp=sharing

    The link only shows the png images not the script or plugin files. 

  • open the studiobridge folder copy the 2 files in there into your scripts folder in daz then run the script from your scripts folder

  • umblefuglyumblefugly Posts: 128

    Tugpsx said:

    umblefugly said:

    I actually have glTF 2 export in my shattering plugin, tailored for the plugin of course, but very cool stuff man. Any examples?

    Where is the shattering plugin available? 

    It is currently submitted here at DAZ still in PASS. 

  • TugpsxTugpsx Posts: 894

    RedDragoon78_dc96eaefcd said:

    open the studiobridge folder copy the 2 files in there into your scripts folder in daz then run the script from your scripts folder

    Thanks for sharing, the script file is now showin in the folder. You may want to create a document folder and move the png image files into that folder to reduce the confusion.
    Interesting enough there is too much information in a single  interface. Consider making Tabs for the various sections and have the user reference the readme document for further information.

    First run, the aniamtion did not export. On a read through it appears the user will have to export the animation as BVH and reimport into the tool for it to work, lets discuss. I sent you a PM.
     

  • TugpsxTugpsx Posts: 894

    umblefugly said:

    Tugpsx said:

    umblefugly said:

    I actually have glTF 2 export in my shattering plugin, tailored for the plugin of course, but very cool stuff man. Any examples?

    Where is the shattering plugin available? 

    It is currently submitted here at DAZ still in PASS. 

    Thanks for the update. 

  • TugpsxTugpsx Posts: 894
    edited June 18

    This is the image of an updated DS6 version of Daz Widget Tester as a sampler. I have not shared the code, I'll wait on Rechards response before moving forward.

    Screenshot 2026-06-17 185630.png
    403 x 613 - 41K
    Post edited by Tugpsx on
  • umblefuglyumblefugly Posts: 128

    Tugpsx said:

    This is the image of an updated DS6 version of Daz Widget Tester as a sampler. I have not shared the code, I'll wait on Rechards response before moving forward.

    Nice, is that for addition to the SDK examples? I don't want to derail the OPs thread, we can chat via PM if you like.

  • umblefuglyumblefugly Posts: 128

    This script is AI generated so it is going to need alot of cleanup. Not knocking AI, it has its uses.

  • TugpsxTugpsx Posts: 894

    Here is the code for the Widget Sampler, the original is an old Daz code updated to work in DS6.

    // DAZ Studio version 6.25.2026.12107 filetype DAZ Script/**********************************************************************	File: widgetTest.dsa	Copyright (C) 2002-2010 DAZ Productions. All Rights Reserved.	This file is part of the DAZ Script Documentation.	This file may be used only in accordance with the DAZ Script 	license provided with the DAZ Script Documentation.	The contents of this file may not be disclosed to third parties, 	copied or duplicated in any form, in whole or in part, without the 	prior written permission of DAZ Productions, except as explicitly	allowed in the DAZ Script license.	See http://www.daz3d.com to contact DAZ Productions or for more 	information about DAZ Script.**********************************************************************/var oSTYLE = App.getStyle();var nMARGIN = oSTYLE.pixelMetric( "DZ_GeneralMargin" );var nSPACING = nMARGIN;var nMIN_BTN_WIDTH = oSTYLE.pixelMetric( "DZ_ButtonMinWidth" );var nMAX_BTN_HEIGHT = oSTYLE.pixelMetric( "DZ_ButtonHeight" );var clrBLACK = new Color( 0, 0, 0 );var clrWHITE = new Color( 255, 255, 255 );var clrRED = new Color( 255, 0, 0 );var clrGREEN = new Color( 0, 255, 0 );var clrBLUE = new Color( 0, 0, 255 );// Get the Help Manager for "What's This?" and tool tipsvar oHelpMgr = App.getHelpMgr();// find the "What's This?" action; for the help buttonvar oActionMgr = MainWindow.getActionMgr();var oHelpAction = oActionMgr ? oActionMgr.findAction( "DzWhatsThisAction" ) : undefined;/*****************************   Dialog*****************************/var wDlg = new DzDialog;wDlg.caption = "DAZ Script Widget Test";// Main Layoutvar wDlgLyt = new DzVBoxLayout( wDlg );wDlgLyt.autoAdd = true;wDlgLyt.margin = nMARGIN;wDlgLyt.spacing = nSPACING;// Create a check boxvar wBtn = new DzCheckBox( wDlg );wBtn.text = "DzCheckBox 0";// Create a combo boxvar wComboBox = new DzComboBox( wDlg );wComboBox.insertItem( "DzComboBox Item 0" );wComboBox.insertItem( "DzComboBox Item 1" );wComboBox.insertItem( "DzComboBox Item 2" );wComboBox.currentItem = 1;// Create a date editvar wDateEdit = new DzDateEdit( wDlg );wDateEdit.date = new Date;// Create a time editvar wTimeEdit = new DzTimeEdit( wDlg );wTimeEdit.date = new Date;// Create a date time editvar wDateTimeEdit = new DzDateTimeEdit( wDlg );wDateTimeEdit.date = wDateEdit.date;// Create a group boxvar wHBox = new DzHGroupBox( wDlg );// Create a dialvar wDial = new DzDial( wHBox );wDial.minWidth = 100;wDial.minHeight = 100;wDial.min = 0;wDial.max = 255;wDial.notchesVisible = true;wDial.notchTarget = nSPACING;wDial.wrapping = false;// Create a LCD numbervar wLCD = new DzLCDNumber( wHBox );wLCD.value = wDial.value;wLCD.segmentStyle = wLCD.Flat;setLCDValue( wDial.value );function setLCDValue( nValue ){	wLCD.value = nValue;	if( nValue < 85 )	{		wLCD.paletteForegroundColor = clrRED;	}	else if( nValue < 170 )	{		wLCD.paletteForegroundColor = clrGREEN;	}	else	{		wLCD.paletteForegroundColor = clrBLUE;	}}connect( wDial, "valueChanged(int)", setLCDValue );// Create a color widgetvar wColor = new DzColorWgt( wDlg );wColor.value = clrRED;// Create a int slidervar wSlider = new DzIntSlider( wDlg );wSlider.min = 0;wSlider.max = 9;wSlider.clamped = true;wSlider.sensitivity = 1;wSlider.value = 2;wSlider.textEditable = true;wSlider.textVisible = true;// Create a enum sliderwSlider = new DzEnumSlider( wDlg );wSlider.addItem( "Zero" );wSlider.addItem( "One" );wSlider.addItem( "Two" );wSlider.addItem( "Three" );wSlider.addItem( "Four" );wSlider.addItem( "Five" );wSlider.addItem( "Six" );wSlider.addItem( "Seven" );wSlider.addItem( "Eight" );wSlider.addItem( "Nine" );wSlider.value = 2;// Create a float sliderwSlider = new DzFloatSlider( wDlg );wSlider.min = 0;wSlider.max = 9;wSlider.clamped = true;wSlider.sensitivity = 0.5;wSlider.value = 2;wSlider.textEditable = true;wSlider.textVisible = true;// Create a button groupvar wBtnGrp = new DzVButtonGroup( wDlg );wBtnGrp.title = "DzVButtonGroup";wBtnGrp.columns = 2;wBtnGrp.title += String( " (columns = %1)" ).arg( wBtnGrp.columns );wBtnGrp.checkable = true;// Create some radio buttonswBtn = new DzRadioButton( wBtnGrp );wBtn.text = "DzRadioButton 0";wBtn = new DzRadioButton( wBtnGrp );wBtn.text = "DzRadioButton 1";wBtn = new DzRadioButton( wBtnGrp );wBtn.text = "DzRadioButton 2";wBtn = new DzRadioButton( wBtnGrp );wBtn.text = "DzRadioButton 3";wBtn = new DzRadioButton( wBtnGrp );wBtn.text = "DzRadioButton 4";wBtn = new DzRadioButton( wBtnGrp );wBtn.text = "DzRadioButton 5";wBtnGrp.selected = 3;// Create a labelvar wLbl = new DzLabel( wDlg );wLbl.text = "This is a DzLabel.";//  Create a line editvar wLineEdit = new DzLineEdit( wDlg );wLineEdit.text = "DzLineEdit Highlighted";wLineEdit.setSelection( 11, wLineEdit.text.length - 1 );// Create a listboxvar wListBox = new DzListBox( wDlg );wListBox.insertItem( "DzListBox Item 0" );wListBox.insertItem( "DzListBox Item 1" );wListBox.insertItem( "DzListBox Item 2" );wListBox.setSelected( 1, true );// Create a listviewvar wListView = new DzListView( wDlg );wListView.rootIsDecorated = true;wListView.allColumnsShowFocus = true;wListView.addColumn( "Column 0" );wListView.addColumn( "Column 1" );var wListviewItem;for( var i = 0; i < 3; i++ ){	wListViewItem = new DzListViewItem( wListView );	wListViewItem.setText( 0, String( "DzListViewItem %1" ).arg( i ) );	var wListViewItemChild;	for( var j = 0; j < 3; j++ )	{		wListViewItemChild = new DzListViewItem( wListViewItem );		wListViewItemChild.setText( 0, String( "DzListViewItem %1 Child %2" ).arg( i ).arg( j ) );	}}// Create a group box for the dialog buttonsvar wDlgBtnsGB = new DzGroupBox( wDlg );wDlgBtnsGB.flat = true;// Create a layout for the dialog buttonsvar wDlgBtnsLyt = new DzGridLayout( wDlgBtnsGB );wDlgBtnsLyt.margin = nMARGIN;wDlgBtnsLyt.spacing = nSPACING;// Create the interactive help ("What's This?") push buttonvar wHelpBtn = new DzPushButton( wDlgBtnsGB );wHelpBtn.pixmap = new Pixmap( String( "%1/images/icons/whatsthissmallicon.png" ).arg( App.getResourcesPath() ) );wHelpBtn.maxHeight = nMAX_BTN_HEIGHT;if( oHelpAction )	wHelpBtn.clicked.connect(function() { oHelpAction.activate(); });wHelpBtn.toolTip = oHelpMgr.getToolTip( "WhatsThis" );wHelpBtn.whatsThis = oHelpMgr.getHelpString( "WhatsThis" );wDlgBtnsLyt.addWidget( wHelpBtn, 0, 0 );// Stretch the column between the left and right sideswDlgBtnsLyt.setColStretch( 1, 1 );// Create the accept push buttonvar wAcceptBtn = new DzPushButton( wDlgBtnsGB );wAcceptBtn.text = "&Accept";wAcceptBtn.minWidth = nMIN_BTN_WIDTH;wAcceptBtn.maxHeight = nMAX_BTN_HEIGHT;wDlg.setAcceptButton( wAcceptBtn );wAcceptBtn.toolTip = oHelpMgr.getToolTip( "AcceptDialog" );wAcceptBtn.whatsThis = oHelpMgr.getHelpString( "AcceptDialog" );wDlgBtnsLyt.addWidget( wAcceptBtn, 0, 2 );// Create the cancel push buttonvar wCancelBtn = new DzPushButton( wDlgBtnsGB );wCancelBtn.text = "&Cancel";wCancelBtn.minWidth = nMIN_BTN_WIDTH;wCancelBtn.maxHeight = nMAX_BTN_HEIGHT;wDlg.setRejectButton( wCancelBtn );wCancelBtn.toolTip = oHelpMgr.getToolTip( "CancelDialog" );wCancelBtn.whatsThis = oHelpMgr.getHelpString( "CancelDialog" );wDlgBtnsLyt.addWidget( wCancelBtn, 0, 3 );// PolishwDlg.width = wDlg.minWidth > 400 ? wDlg.minWidth : 400;wDlg.height = wDlg.minHeight;// LaunchwDlg.exec();

     

  • TugpsxTugpsx Posts: 894

    ...

    // DAZ Studio version 6.25.2026.12107 filetype DAZ Script

     

    /**********************************************************************

    File: widgetTest.dsa

     

    Copyright (C) 2002-2010 DAZ Productions. All Rights Reserved.

     

    This file is part of the DAZ Script Documentation.

     

    This file may be used only in accordance with the DAZ Script

    license provided with the DAZ Script Documentation.

     

    The contents of this file may not be disclosed to third parties,

    copied or duplicated in any form, in whole or in part, without the

    prior written permission of DAZ Productions, except as explicitly

    allowed in the DAZ Script license.

     

    See http://www.daz3d.com to contact DAZ Productions or for more

    information about DAZ Script.

    **********************************************************************/

    var oSTYLE = App.getStyle();

    var nMARGIN = oSTYLE.pixelMetric( "DZ_GeneralMargin" );

    var nSPACING = nMARGIN;

    var nMIN_BTN_WIDTH = oSTYLE.pixelMetric( "DZ_ButtonMinWidth" );

    var nMAX_BTN_HEIGHT = oSTYLE.pixelMetric( "DZ_ButtonHeight" );

     

    var clrBLACK = new Color( 0, 0, 0 );

    var clrWHITE = new Color( 255, 255, 255 );

    var clrRED = new Color( 255, 0, 0 );

    var clrGREEN = new Color( 0, 255, 0 );

    var clrBLUE = new Color( 0, 0, 255 );

     

    // Get the Help Manager for "What's This?" and tool tips

    var oHelpMgr = App.getHelpMgr();

     

    // find the "What's This?" action; for the help button

    var oActionMgr = MainWindow.getActionMgr();

    var oHelpAction = oActionMgr ? oActionMgr.findAction( "DzWhatsThisAction" ) : undefined;

     

    /*****************************

    Dialog

    *****************************/

    var wDlg = new DzDialog;

    wDlg.caption = "DAZ Script Widget Test";

     

    // Main Layout

    var wDlgLyt = new DzVBoxLayout( wDlg );

    wDlgLyt.autoAdd = true;

    wDlgLyt.margin = nMARGIN;

    wDlgLyt.spacing = nSPACING;

     

    // Create a check box

    var wBtn = new DzCheckBox( wDlg );

    wBtn.text = "DzCheckBox 0";

     

    // Create a combo box

    var wComboBox = new DzComboBox( wDlg );

    wComboBox.insertItem( "DzComboBox Item 0" );

    wComboBox.insertItem( "DzComboBox Item 1" );

    wComboBox.insertItem( "DzComboBox Item 2" );

    wComboBox.currentItem = 1;

     

    // Create a date edit

    var wDateEdit = new DzDateEdit( wDlg );

    wDateEdit.date = new Date;

     

    // Create a time edit

    var wTimeEdit = new DzTimeEdit( wDlg );

    wTimeEdit.date = new Date;

     

    // Create a date time edit

    var wDateTimeEdit = new DzDateTimeEdit( wDlg );

    wDateTimeEdit.date = wDateEdit.date;

     

    // Create a group box

    var wHBox = new DzHGroupBox( wDlg );

     

    // Create a dial

    var wDial = new DzDial( wHBox );

    wDial.minWidth = 100;

    wDial.minHeight = 100;

    wDial.min = 0;

    wDial.max = 255;

    wDial.notchesVisible = true;

    wDial.notchTarget = nSPACING;

    wDial.wrapping = false;

     

    // Create a LCD number

    var wLCD = new DzLCDNumber( wHBox );

    wLCD.value = wDial.value;

    wLCD.segmentStyle = wLCD.Flat;

    setLCDValue( wDial.value );

     

    function setLCDValue( nValue )

    {

    wLCD.value = nValue;

    if( nValue < 85 )

    {

    wLCD.paletteForegroundColor = clrRED;

    }

    else if( nValue < 170 )

    {

    wLCD.paletteForegroundColor = clrGREEN;

    }

    else

    {

    wLCD.paletteForegroundColor = clrBLUE;

    }

    }

    connect( wDial, "valueChanged(int)", setLCDValue );

     

    // Create a color widget

    var wColor = new DzColorWgt( wDlg );

    wColor.value = clrRED;

     

    // Create a int slider

    var wSlider = new DzIntSlider( wDlg );

    wSlider.min = 0;

    wSlider.max = 9;

    wSlider.clamped = true;

    wSlider.sensitivity = 1;

    wSlider.value = 2;

    wSlider.textEditable = true;

    wSlider.textVisible = true;

     

    // Create a enum slider

    wSlider = new DzEnumSlider( wDlg );

    wSlider.addItem( "Zero" );

    wSlider.addItem( "One" );

    wSlider.addItem( "Two" );

    wSlider.addItem( "Three" );

    wSlider.addItem( "Four" );

    wSlider.addItem( "Five" );

    wSlider.addItem( "Six" );

    wSlider.addItem( "Seven" );

    wSlider.addItem( "Eight" );

    wSlider.addItem( "Nine" );

    wSlider.value = 2;

     

    // Create a float slider

    wSlider = new DzFloatSlider( wDlg );

    wSlider.min = 0;

    wSlider.max = 9;

    wSlider.clamped = true;

    wSlider.sensitivity = 0.5;

    wSlider.value = 2;

    wSlider.textEditable = true;

    wSlider.textVisible = true;

     

    // Create a button group

    var wBtnGrp = new DzVButtonGroup( wDlg );

    wBtnGrp.title = "DzVButtonGroup";

    wBtnGrp.columns = 2;

    wBtnGrp.title += String( " (columns = %1)" ).arg( wBtnGrp.columns );

    wBtnGrp.checkable = true;

     

    // Create some radio buttons

    wBtn = new DzRadioButton( wBtnGrp );

    wBtn.text = "DzRadioButton 0";

    wBtn = new DzRadioButton( wBtnGrp );

    wBtn.text = "DzRadioButton 1";

    wBtn = new DzRadioButton( wBtnGrp );

    wBtn.text = "DzRadioButton 2";

    wBtn = new DzRadioButton( wBtnGrp );

    wBtn.text = "DzRadioButton 3";

    wBtn = new DzRadioButton( wBtnGrp );

    wBtn.text = "DzRadioButton 4";

    wBtn = new DzRadioButton( wBtnGrp );

    wBtn.text = "DzRadioButton 5";

     

    wBtnGrp.selected = 3;

     

    // Create a label

    var wLbl = new DzLabel( wDlg );

    wLbl.text = "This is a DzLabel.";

     

    // Create a line edit

    var wLineEdit = new DzLineEdit( wDlg );

    wLineEdit.text = "DzLineEdit Highlighted";

    wLineEdit.setSelection( 11, wLineEdit.text.length - 1 );

     

    // Create a listbox

    var wListBox = new DzListBox( wDlg );

    wListBox.insertItem( "DzListBox Item 0" );

    wListBox.insertItem( "DzListBox Item 1" );

    wListBox.insertItem( "DzListBox Item 2" );

    wListBox.setSelected( 1, true );

     

    // Create a listview

    var wListView = new DzListView( wDlg );

    wListView.rootIsDecorated = true;

    wListView.allColumnsShowFocus = true;

    wListView.addColumn( "Column 0" );

    wListView.addColumn( "Column 1" );

    var wListviewItem;

    for( var i = 0; i < 3; i++ )

    {

    wListViewItem = new DzListViewItem( wListView );

    wListViewItem.setText( 0, String( "DzListViewItem %1" ).arg( i ) );

    var wListViewItemChild;

    for( var j = 0; j < 3; j++ )

    {

    wListViewItemChild = new DzListViewItem( wListViewItem );

    wListViewItemChild.setText( 0, String( "DzListViewItem %1 Child %2" ).arg( i ).arg( j ) );

    }

    }

     

    // Create a group box for the dialog buttons

    var wDlgBtnsGB = new DzGroupBox( wDlg );

    wDlgBtnsGB.flat = true;

     

    // Create a layout for the dialog buttons

    var wDlgBtnsLyt = new DzGridLayout( wDlgBtnsGB );

    wDlgBtnsLyt.margin = nMARGIN;

    wDlgBtnsLyt.spacing = nSPACING;

     

    // Create the interactive help ("What's This?") push button

    var wHelpBtn = new DzPushButton( wDlgBtnsGB );

    wHelpBtn.pixmap = new Pixmap( String( "%1/images/icons/whatsthissmallicon.png" ).arg( App.getResourcesPath() ) );

    wHelpBtn.maxHeight = nMAX_BTN_HEIGHT;

    if( oHelpAction )

    wHelpBtn.clicked.connect(function() { oHelpAction.activate(); });

    wHelpBtn.toolTip = oHelpMgr.getToolTip( "WhatsThis" );

    wHelpBtn.whatsThis = oHelpMgr.getHelpString( "WhatsThis" );

    wDlgBtnsLyt.addWidget( wHelpBtn, 0, 0 );

     

    // Stretch the column between the left and right sides

    wDlgBtnsLyt.setColStretch( 1, 1 );

     

    // Create the accept push button

    var wAcceptBtn = new DzPushButton( wDlgBtnsGB );

    wAcceptBtn.text = "&Accept";

    wAcceptBtn.minWidth = nMIN_BTN_WIDTH;

    wAcceptBtn.maxHeight = nMAX_BTN_HEIGHT;

    wDlg.setAcceptButton( wAcceptBtn );

    wAcceptBtn.toolTip = oHelpMgr.getToolTip( "AcceptDialog" );

    wAcceptBtn.whatsThis = oHelpMgr.getHelpString( "AcceptDialog" );

    wDlgBtnsLyt.addWidget( wAcceptBtn, 0, 2 );

     

    // Create the cancel push button

    var wCancelBtn = new DzPushButton( wDlgBtnsGB );

    wCancelBtn.text = "&Cancel";

    wCancelBtn.minWidth = nMIN_BTN_WIDTH;

    wCancelBtn.maxHeight = nMAX_BTN_HEIGHT;

    wDlg.setRejectButton( wCancelBtn );

    wCancelBtn.toolTip = oHelpMgr.getToolTip( "CancelDialog" );

    wCancelBtn.whatsThis = oHelpMgr.getHelpString( "CancelDialog" );

    wDlgBtnsLyt.addWidget( wCancelBtn, 0, 3 );

     

    // Polish

    wDlg.width = wDlg.minWidth > 400 ? wDlg.minWidth : 400;

    wDlg.height = wDlg.minHeight;

     

    // Launch

    wDlg.exec();

    ...

Sign In or Register to comment.