Daz Studio 2025 (6.25.2025.x) - "evergreen"

rbtwhizrbtwhiz Posts: 2,470
edited October 31 in Daz Studio Discussion
  • This thread is "evergreen" - the posts within it are updated frequently
  • This thread is used to provide important Daz Studio 6.25.2025.x information
  • This thread is closed for comment to avoid the information being buried in conversation

 

Installation

 

  • In Install Manager, if you filter using sku::109051, you should see a package labeled Public Build Install Modules
    • When installed, this package causes an Install Modules > Public Build... action to appear in the Settings (cog - top right) menu of Install Manager
      • Clicking the action will cause a Public Builds Install Sets dialog to appear
        • Much like the Default Install Set, this dialog provides options for a specific subset of packages to download/install - in a "playlist" like manner
        • There are Install Sets for Daz Studio 2025 (6.x) Public Build, as well as Daz Studio 4.x Public Build

 

Application Framework

 

  • Qt 6.10.0:
    • Execute the following script in the Script IDE pane of any Daz Studio build to see which version of Qt is in use:
      App.aboutQt();

 

Supported Operating Systems / Architectures

 

  • Windows: 10 (1809 or newer), 11
    • 64-bit Intel/AMD (x86_64)
  • macOS: Ventura (13), Sonoma (14), Sequoia (15), Tahoe (26)
    • 64-bit Intel (x86_64)
    • Apple Silicon (arm64) is currently supported through Rosetta emulation
      • Native support is pending

 

Graphics Requirements

 

  • Windows:
    • OpenGL 4.5 (minimum)
    • OpenGL Shading Language (GLSL) 450 (minimum)
  • macOS:
    • Metal 1.2 (minimum)

 

Renderers

 

  • NVIDIA Iray 2025.0.1:
    • Adds support for Blackwell (50 series) NVIDIA GPUs
    • Deprecates support for pre-Turing (pre 16/20 series) GPUs
      • Support for pre-Turing (pre 16/20 series) GPUs may vanish in one of the next major Iray version releases
      • See Release Notes
    • Requires a R575 (or newer) branch driver on Windows
  • Retired:
    • 3Delight
      • Automatic "on the fly" (at render-time) conversion of certain RSL-based materials, to their respective equivalent MDL-based materials, when NVIDIA Iray is the active engine, remains functional
        • DzDefaultMaterial
        • AoA_Subsurface
        • omUberSurface
        • omHumanSurface
        • omUberAreaLight
        • omSimpleSurface
        • Custom - uses property name matching
          • ...

 

DrawStyles

 

  • Added:
  • Retired:
    • Cartoon Shaded
      • Superseded by Filament with FilaToon shaders applied

 

Daz 3D Developed Plugins

 

  • Questionable:
    • Decimator
  • Retired:
    • 3DConnection
      • Moving compilable source to SDK as DzDevice API sample (requires 3DxWare SDK)
    • 3Delight Renderer
    • Collada Exporter
      • *.dae format is handled by the FBX Importer/Exporter (via the FBX SDK)
    • Dynamic Clothing Basic (Optitex)
    • Dynamic Clothing Control (Optitex)
    • Mimic
    • Mimic Live!
    • Photoshop 3D Bridge
    • Render Album (not to be confused with Render Library)
    • Sandio 3D Mouse
    • Scripted 3Delight Renderer
    • Shader Baker
    • Shader Builder (not to be confused with Shader Mixer)

 

3rd Party Developed Plugins

(... in the standard distribution footprint)

  • Pending:
    • aniMate

 

File Formats

 

  • Retired:
    • Native serialized binary
      • *.daz - Daz Studio Scene
      • *.dso - Daz Studio Object
      • *.dsd - Daz Studio Deltas
      • *.dsv - Daz Studio Vertex Map
      • Have been deprecated since the introduction of DSON
    • Daz Script 1
      • *.ds - Daz Script 1 Ascii
      • *.dsb - Daz Script 1 Binary
        • Potentially Encrypted if file version is < 3.0
      • Has been deprecated since the introduction of Daz Script 2
      • The format itself has not been removed (yet), automatic conversion has
Post edited by rbtwhiz on

Comments

  • rbtwhizrbtwhiz Posts: 2,470
    edited April 24

    Versioning

     

    Technical Version:

    • The version scheme consists of 4 components:
      • The Major number
      • The Minor number
      • The Revision number
      • The Build number
      • In the following order: Major.Minor.Revision.Build
    • The Major component represents the type of changes that are likely (nearly guaranteed) to break binary compatibility and potentially break source compatibility, although efforts are typically made to maintain source compatibility where possible
    • The Minor component represents the type of changes that implement a set of new features (including bug fixes during the same timeframe), but avoid breaking backward binary compatibility or source compatibility
    • The Revision component represents the type of changes that implement new features or address bugs, but are in the process of being vetted - until they reach a point that warrants incrementing the Minor component
      • Prior to Daz Studio 2025/6.x, the value of this component was incremented to indicate progression toward a feature set and reset to 0 when the Minor component value was incremented
      • Beginning with Daz Studio 2025/6.x, the value of this component represents the Gregorian year that the build occurred
    • Prior to Daz Studio 2025/6.x, the Build component represents sequential incrementation of an automated process to differentiate one build from the next - this value was reset to 0 when any of the preceding components were incremented
      • Beginning with Daz Studio 2025/6.x, the value of this component marks the day of year and hour of day that the build occurred
        • The last 2 digits represent the UTC (24) hour of the day
        • The 1-3 preceding digits represent the Gregorian day of year
    • Given the information above, the version scheme can be understood as SDK.FeatureSet.Year.DayHour

    Marketing Version:

    • The plan/intention is for Marketing to use the Year (Revision) and the FeatureSet (Minor) components to refer to and promote this and future builds of Daz Studio
      • The desktop/start menu shortcut is labeled Daz Studio Year (64-bit) [Release Channel] [Development Phase]
        • "Year" tracks the year that the build occurred - e.g. 2025, 2026, 2027, etc
        • "[Release Channel]" tracks the name of the release channel that the build is provided through, except for General Release where it will be removed entirely
        • "[Development Phase]" is currently "+ALPHA+", but will be replaced with "+BETA+" once we are "feature complete" and then removed entirely for General Release
      • The caption (text in the title bar) for the Main Window of the application displays as Daz Studio Year (Major.Minor) [Premier Status] [Release Channel]
        • "Year" displays the year that the build occurred - e.g. 2025, 2026, 2027, etc
        • "Major" displays the SDK/Qt/ABI version - e.g., 6, 7, 8, etc
        • "Minor" displays the feature set - e.g., 25, 26, 27, etc
        • "[Premier Status]" displays "Premier" for accounts with an active subscription, but is removed entirely for accounts with an inactive subscription
        • "[Release Channel]" displays the name of the release channel that the build is provided through, except for General Release where it is removed entirely
      • The header of the splash/about screens display Studio Year [| Premier Status]
        • "Year" displays the year that the build occurred - e.g. 2025, 2026, 2027, etc
        • "[| Premier Status]" displays "| Premier" for accounts with an active subscription, but is removed entirely for accounts with an inactive subscription
      • The footer of the splash/about screens display the entire (technical) version
    Post edited by rbtwhiz on
  • rbtwhizrbtwhiz Posts: 2,470
    edited October 9

    New Features

     

    (... that were not made available in a 4.20, 4.21, 4.22, 4.23, or 4.24 build)

    DrawStyles:

    • Filament
      • Now available on macOS
    • NVIDIA Iray
      • Added a Drawing > Draw Node Wireframe property that toggles drawing of the wireframe for a mesh over the top of the rendered surface
        • Provides "like-kind" parity with the Filament DrawStyle (since 4.12.2.51)
    • Texture Shaded
      • Now draws a temporary blue surface when the images for a textured surface are still loading
        • Provides "like-kind" parity with the Filament DrawStyle (since near inception)
        • Improves loading speed, as it allows objects to be drawn before all images are loaded/resampled
    • Wire Texture Shaded
      • Now draws a temporary blue surface when the images for a textured surface are still loading
        • Provides "like-kind" parity with the Filament DrawStyle (since near inception)
        • Improves loading speed, as it allows objects to be drawn before all images are loaded/resampled
    • Universal
      • Allows a base DrawStyle to be selected for the scene
        • Draw Settings > Display > Scene View > Scene DrawStyle
          • Default (Texture Shaded)
          • Wireframe
          • Lit Wireframe
          • Hidden Line
          • Wire Shaded
          • Smooth Shaded
          • Wire Texture Shaded
          • Texture Shaded
      • Allows individual objects to override the base DrawStyle
        • Parameters > %ObjectRoot% > Display > Scene View > DrawStyle Override
          • None (use Scene DrawStyle)
          • Wireframe
          • Lit Wireframe
          • Hidden Line
          • Wire Shaded
          • Smooth Shaded
          • Wire Texture Shaded
          • Texture Shaded
      • Allows individual surfaces to override the object override
        • Surfaces > %ObjectRoot% > %Surface% > Display > Scene View > DrawStyle Override
          • None (use object DrawStyle Override)
          • Wireframe
          • Lit Wireframe
          • Hidden Line
          • Wire Shaded
          • Smooth Shaded
          • Wire Texture Shaded
          • Texture Shaded
    • Depth
      • Allows Near and Far distances to be adjusted in Draw Settings > Depth Adjust

     

    Render Engines:

    • NVIDIA Iray 2024.1.6
      • See Release Notes
      • Adds support for Blackwell (50 Series) GPUs
      • Adds support for Adaptive Displacement/Subdivision (see NVIDIA Iray - Programmer's Manual : 7.8.4 Displacement - Fig. 7.7)
        • Added support to the Iray Uber (MDL) shader
        • Added support to the MDL Surface brick in Shader Mixer
        • Control via Surfaces > %ObjectRoot% > %Surface% > Geometry > Displacement > Displacement Adaptive Quality
          • 0.0 = no additional subdivision
          • 1.0 = up to 32 additional subdivisions per edge, as needed
      • ...

     

    View Tools:

    • Strand-Based Hair Editor
      • Now a fully integrated View Tool instead of a modal dialog
      • View multiple viewports, from different angles, concurrently
      • View different DrawStyles, per viewport
      • Work directly in the viewport
      • Quickly switch between tools
      • Hide/Show nodes
      • Dock, undock, move, resize Tool Settings
      • ...
    • Universal Tool (and derivatives: Rotate, Translate, Scale)
      • Now provides a Selected Style setting in the Tool Settings pane that provides options for how visual feedback for selected nodes is drawn
        • Cues - Draws bounding box corners (same as 4.x - default)
        • Wireframe & Cues - Draws the wireframe of the geometry associated with the selected node(s), using the style highlight color, and bounding box corners
        • Halo & Cues - Draws a halo around the perimeter of the geometry associated with the selected node(s), using the style highlight color, and bounding box corners
          • Similar to the way selection is drawn for the Surface Selection tool
      • Each derivative tool (Rotate, Translate, Scale) maintains its own Selected Style setting
    • Node Weight Map Brush
      • Added an Automatically Convert Selection action
        • Controls whether geometry selection is automatically converted from one type to another when the active type is changed
        • Viewport Context Menu > Geometry Selection > Convert Selection > Automatically Convert Selection
        • Tool Settings Option Menu > Geometry Selection > Convert Selection > Automatically Convert Selection
    • Geometry Editor
      • Added an Automatically Convert Selection action
        • Controls whether geometry selection is automatically converted from one type to another when the active type is changed
        • Viewport Context Menu > Geometry Selection > Convert Selection > Automatically Convert Selection
        • Tool Settings Option Menu > Geometry Selection > Convert Selection > Automatically Convert Selection
    • Geometry Sculptor (Premier)
      • ...

     

    Panes:

    • Content Library
      • Now provides the ability to have multiple Manage pages
        • A Duplicate Page action has been added to the context menu for a given container in the Container View
          • Clicking the action causes a new instance of the 'current' Manage page (sub-pane), labeled Manage (#) where # is the i'th instance, to be created as a sibling to the primary Manage page
        • When 2 or more pages exist, a tab bar near the top of the pane is revealed
        • Pages labeled Manage (#) can be detached into custom panes
        • The primary Manage page cannot be detached or deleted
        • Closing a detached Manage (#) page causes it to reattach
        • Pages labeled Manage (#) can be deleted via a Delete action in their respective context/option menu
          • Deleting a Manage (#) page causes numbering of the pages created after it to adjust
        • Preference actions in the Options Menu apply to all Manage page instances
        • API calls apply to the 'current' Manage page instance
        • Assets in Results Views can be dragged/dropped onto containers in Container Views on different Manage pages
          • Assets in Results Views can be dragged/dropped onto a category in Category Views on the Smart Content pane (or Presets pages of the various property-based panes)
      • Now provides the ability to discretely hide/unhide products
        • A Hide Product action has been added to the context menu for a given product in the Container View, when the product is not discretely hidden
          • Clicking the action causes the product to be marked as hidden
        • An Unhide Product action has been added to the context menu for a given product in the Container View, when the product is discretely hidden
          • The Show Hidden Products preference must be checked to see hidden products (see below)
          • Clicking the action causes the product to be marked as unhidden
      • Now provides the ability to discretely hide/unhide assets
        • A Hide Asset action has been added to the context menu for a given asset in the Results View, when the asset is not discretely hidden
        • An Unhide Asset action has been added to the context menu for a given asset in the Results View, when the asset is discretely hidden
          • The Show Hidden Assets preference must be checked to see hidden assets (see below)
          • Clicking the action causes the product to be marked as unhidden
      • Now provides the ability to change the label of a product
        • A Relabel... action has been added to the context menu for a given product in the Container View
          • Clicking the action causes a dialog to appear
        • Changing the label of a product does not modify its name, only what is displayed
        • A relabeled product displays the original name in the Info page of the Information Panel when selected
        • ...
      • Now provides the ability to change the label of an asset
        • A Relabel... action has been added to the context menu for a given asset in the Results View
          • Clicking the action places the asset into edit mode
          • The change is committed when the [Enter] key is pressed or any area outside the edit field is clicked
        • Changing the label of an asset does not modify the name of the asset, or the file that an asset references, only what is displayed
        • A relabeled asset displays the original name in the Info page of the Information Panel when selected
        • ...
      • ...
    • Smart Content
      • Now provides the Compatibility Selector that is present in the primary Files and Products views, when viewing the contents of a product
      • Now provides the Filter By Context option that is present in the primary Files and Products views, when viewing the contents of a product
        • Unchecked by default
        • Checked state does not persist between sessions
      • Now provides an Add-Ons page in the Information Panel
        • Elevates functionality provided by the Explore Add-Ons... action, in the context menu of an asset, to a higher level of the UI
        • Selecting an asset on the Files page, or within a product on the Products page, populates the page with categorized assets that are compatible with the selected asset
      • Now provides a Targets page in the Information Panel
        • Elevates functionality provided by the Explore Targets... action, in the context menu of an asset, to a higher level of the UI
        • Selecting an asset on the Files page, or within a product on the Products page, populates the page with categorized assets that the selected asset is compatible with
      • Now displays the hidden state of a product in the Info page of the Information Panel when a product is selected
      • Now displays the metadata file path for a product in the Info page of the Information Panel when a product is selected and the file that provides metadata can be found
      • Now displays the hidden state of an asset in the Info page of the Information Panel when an asset is selected
      • ...
    • Parameters
      • Added a Display > Scene View > Node Color property to all node types
        • When set to a non-black (0, 0, 0) value on a bone, the value of this property overrides the Display > Scene View > Node Color property on the associated skeleton, causing the bone to be drawn in the color chosen when the Display > Scene View > Bones > Show Bones property on a skeleton is active
        • ...
        • See the Scene pane (below) for other potential uses of this property
    • Scene
      • Added a Node Color (C) column
        • Provides a means of classifying/grouping nodes in the scene by color
          • Allows the use of color to quickly (at a glance) distinguish left, from center/trunk, from right
          • Allows the use of color to quickly (at a glance) distinguish node types from one another
          • Allows the use of color to quickly (at a glance) distinguish bones belonging to the same skeleton from other/parented objects
        • Clicking a color swatch prompts for a color to assign to the Node Color property
        • Holding [Ctrl/Cmd] while clicking applies the selected color recursively to each Node Color property of each decedent node
        • Holding [Alt/Option] while clicking resets the Node Color property
        • Holding [Ctrl/Cmd] + [Alt/Option] while clicking resets the Node Color property, and recursively each Node Color property of each decedent node
        • Clicking the icon creates an undo item - the same as changing the Node Color property in the Parameters pane
      • Selectable (S) Column
        • Clicking the icon now creates an undo item - the same as changing the Selectable in Viewport property in the Parameters pane
      • Visible (V) Column
        • Clicking the icon now creates an undo item - the same as changing the Visible property in the Parameters pane
    • Timeline
      • Now provides the ability to filter/search the Dopesheet
        • Functions similarly to filtering/searching in the Scene pane
        • Operates on the labels of properties
        • Supports the common Syntax Selectors and Syntax Modifiers used throughout the application for Advanced Filtering
          • Wildcard (wc::)
          • Regular Expression (rx::)
            • Case Insensitive (ci::)
    • DForm
      • Clicking the "Spawn Morph..." button now presents a familiar dialog that allows greater configuration at creation time
    • Script IDE

     

    Actions:

    • Customize...
      • Accessible via the Window > Workspace menu
      • Added support for filtering/searching the views in the dialog
        • Operates on the Action (Label) column of the Actions page
        • Operates on the Item column of the Activities, Menus, and Tool Bars pages
        • Supports the common Syntax Selectors and Syntax Modifiers used throughout the application for Advanced Filtering
          • Wildcard (wc::)
          • Regular Expression (rx::)
            • Case Insensitive (ci::)
    • Duplicate Node(s)
      • Accessible via the Edit > Duplicate menu
      • Now detaches the geometry of duplicates from the object being duplicated if the [Ctrl/Cmd] key is pressed when the action is triggered
    • Duplicate Node Hierarchies
      • Accessible via the Edit > Duplicate menu
      • Now detaches the geometry of duplicates from the objects being duplicated if the [Ctrl/Cmd] key is pressed when the action is triggered
    • Content DB Editor...
      • ...
    • New actions that operate on the values of properties in the Parameters pane:
      • Memorize Figure By Type...
        • Accessible via:
          • Edit > Figure > Memorize menu
          • Parameters pane Options > Memorize menu
        • ...
      • Memorize Figure By Path...
        • Accessible via:
          • Edit > Figure > Memorize menu
          • Parameters pane Options > Memorize menu
        • ...
      • Memorize Selected Item(s) By Type...
        • Accessible via:
          • Edit > Object > Memorize menu
          • Edit > Figure > Memorize menu
          • Parameters pane Options > Memorize menu
        • ...
      • Memorize Selected Item(s) By Path...
        • Accessible via:
          • Edit > Object > Memorize menu
          • Edit > Figure > Memorize menu
          • Parameters pane Options > Memorize menu
        • ...
      • Restore Figure By Type...
        • Accessible via:
          • Edit > Figure > Restore menu
          • Parameters pane Options > Restore menu
        • ...
      • Restore Figure By Path...
        • Accessible via:
          • Edit > Figure > Restore menu
          • Parameters pane Options > Restore menu
        • ...
      • Restore Selected Item(s) By Type...
        • Accessible via:
          • Edit > Object > Restore menu
          • Edit > Figure > Restore menu
          • Parameters pane Options > Restore menu
        • ...
      • Restore Selected Item(s) By Path...
        • Accessible via:
          • Edit > Object > Restore menu
          • Edit > Figure > Restore menu
          • Parameters pane Options > Restore menu
        • ...
      • Zero Figure By Type...
        • Accessible via:
          • Edit > Figure > Zero menu
          • Parameters pane Options > Zero menu
        • ...
      • Zero Figure By Path...
        • Accessible via:
          • Edit > Figure > Zero menu
          • Parameters pane Options > Zero menu
        • ...
      • Zero Selected Item(s) By Type...
        • Accessible via:
          • Edit > Object > Zero menu
          • Edit > Figure > Zero menu
          • Parameters pane Options > Zero menu
        • ...
      • Zero Selected Item(s) By Path...
        • Accessible via:
          • Edit > Object > Zero menu
          • Edit > Figure > Zero menu
          • Parameters pane Options > Zero menu
        • ...
      • Clear Figure By Type...
        • Accessible via
          • Edit > FIgure > Clear Animation menu
          • Parameters pane Options > Clear Animation menu
          • Timeline pane Options > Clear Animation menu
        • ...
      • Clear Figure By Path...
        • Accessible via:
          • Edit > Figure > Clear Animation menu
          • Parameters pane Options > Clear Animation menu
          • Timeline pane Options > Clear Animation menu
        • ...
      • Clear Selected Item(s) By Type...
        • Accessible via:
          • Edit > Object > Clear Animation menu
          • Edit > FIgure > Clear Animation menu
          • Parameters pane Options > Clear Animation menu
          • Timeline pane Options > Clear Animation menu
        • ...
      • Clear Selected Item(s) By Path...
        • Accessible via:
          • Edit > Object > Clear Animation menu
          • Edit > FIgure > Clear Animation menu
          • Parameters pane Options > Clear Animation menu
          • Timeline pane Options > Clear Animation menu
        • ...
      • Lock Selected Node(s) By Type...
        • Accessible via:
          • Edit > Object > Lock menu
          • Edit > Figure > Lock menu
          • Parameters pane Options > Lock menu
        • ...
      • Lock Selected Node(s) By Path...
        • Accessible via:
          • Edit > Object > Lock menu
          • Edit > Figure > Lock menu
          • Parameters pane Options > Lock menu
        • ...
      • Unlock Selected Node(s) By Type...
        • Accessible via:
          • Edit > Object > Lock menu
          • Edit > Figure > Lock menu
          • Parameters pane Options > Lock menu
        • ...
      • Unlock Selected Node(s) By Path...
        • Accessible via:
          • Edit > Object > Lock menu
          • Edit > Figure > Lock menu
          • Parameters pane Options > Lock menu
        • ...

     

    Importers/Exporters:

    • Wavefront Object (*.obj) Importer
      • Added a Read Objects option
        • Adds support for parsing "o" (object) statements during import
        • When enabled, multiple objects within the same file are imported as separate objects/nodes in the scene
        • When disabled, multiple objects within the same file are consolidated into a single object/node (previous behavior)
      • ...
    • Wavefront Object (*.obj) Exporter
      • ...

     

    Preferences:

    • Content
      • Now provides a Show Hidden Products preference
        • Unchecked by default
        • When checked, causes products that have been discretely hidden to be displayed in Product Views
          • e.g., Smart Content > Products, Content Library > Products
      • Now provides a Show Orphaned Products preference
        • Checked by default
        • An "orphaned product" is any product where the metadata file path for the product cannot be resolved
        • ...
      • Now provides a Show Hidden Assets preference
        • Unchecked by default
        • When checked, causes assets that have been discretely hidden to be displayed in Asset Views
          • e.g., Smart Content > Files, Presets pages of various property-based panes, Content Library
      • Now provides a Show Orphaned Assets preference
        • Checked by default
        • An "orphaned asset" is any asset where the path of the file that the asset references cannot be resolved
        • ...
      • Now provides a Thumbnail Saving preference for the creation size of tip images (if creating tip images)

     

    Miscellaneous:

    • Image Button Menus (mappable properties)
      • The applied/active image is now positioned at the top of the image list, instead of its alpha-numerically sorted position
      • Each image (short name) listed in the menu now displays its absolute filename in a tootip when the cursor is hovered
    • ...
    Post edited by rbtwhiz on
  • rbtwhizrbtwhiz Posts: 2,470
    edited July 17

    Interface Styling

     

    • Now respects High DPI scaling settings
    • Qt 5 introduced a number of changes (from Qt 4) to widget styling
    • Qt 6 introduced even more changes (from Qt 4) to widget styling
    • The Qt 4 based styles (i.e., Daz Studio 4.x) have been recompiled for 2025/6.x with minimal compatibility changes so far
    • Styling changes/issues will be addressed in due course
    • ...
    Post edited by rbtwhiz on
  • rbtwhizrbtwhiz Posts: 2,470
    edited November 18

    Script Engine

     

    • ECMAScript Version(s):
      • The script engine in Daz Studio 4.x supports ECMAScript 5.1 (aka ES5.1)
      • The script engine in Daz Studio 2025/6.x supports ECMAScript 7th Edition (aka ES7, ECMAScript 2016), and a sprinkling from more recent editions
        • Adds or re-introduces several concepts, keywords, and types
        • Constructor Properties
          • ArrayBuffer
          • DataView
          • Promise
          • Map
          • WeakMap
          • Set
          • WeakSet
          • SharedArrayBuffer (from ES8)
          • Symbol
          • TypedArray
            • Int8Array
            • Uint8Array
            • Uint8ClampedArray
            • Int16Array
            • Uint16Array
            • Int32Array
            • Uint32Array
            • Float32Array
            • Float64Array
          • Global Variables
            • Atomics (from ES8)
            • Reflect
            • Proxy
          • Declarations
            • class (re-introduced)
            • const (re-introduced)
            • let
          • Operators
            • => (Arrow Function, aka Lambda)
            • ** (Exponentiation)
            • ... (Spread)
            • ?? (Nullish Coalescing - from ES11)
            • ?. (Optional Chaining - from ES11)
          • Control Statements
            • for...of
          • Default Parameters
          • Function Rest Parameter
          • Destructuring
          • Tagged Templates
          • Template Literals
          • Modules
          • ...
    • Strict Mode:
      • See the MDN/W3C descriptions
      • Example:
        // Declare global strict mode
        "use strict";
        
        function strictFunction() {
        	// Declare local strict mode
        	"use strict";
        
        	// Statements within this function are executed in strict mode
        }
        
        function nonStrictFunction() {
        	// Statements within this function are executed in non-strict mode
        }
        
      • Can be used to help find mis-typed variable names that result in global variables
    • Scoping:
      • In Daz Studio 2025/6.x, all "normally executed" scripts are automatically wrapped in an anonymous function prior to execution
        • (function(exports, require, module, __filename, __dirname[, ...]){
              // script code is inserted here
          });
        • The exportsrequiremodule__filename, and __dirname arguments to this anonymous function implement core concepts of CommonJS modules - see Daz Script 2 : Modular Code (below)
        • Optional values, represented by [, ...] above, are defined under specific conditions and are passed to the script as global transient variables
        • This wrapper preserves compatibility with the concept of a script context in 4.x
        • Script syntax entered into value fields that support it (e.g., numeric properties) are not considered to be "normally executed" - they are not evaluated in the same context
        • ES6 Modules are not considered to be "normally executed" - they are imported directly by the script engine and follow their own set of scoping/lifetime rules - see Daz Script 2 : Modular Code (below)
    • Hoisting:
      • See the MDN/W3C descriptions
      • ECMAScript 5.1 (Qt 4, Daz Studio 4.x)
        • Variables are declared with the var keyword, and are function-scoped (visible throughout the function they are declared in)
          • Variables that are implicitly declared (defined without using the keyword) are global-scoped (generally frowned upon and should be avoided)
        • Variables are automatically moved to the top of their respective scopes, and initialized to undefined
        • Attempting to access a variable before it is assigned a value can lead to unexpected behavior
      • ECMAScript 7 (Qt 6, Daz Studio 2025/6.x)
        • Variables declared with const or let are block-scoped - (visible within the set of { and } they are declared in)
        • Variables are automatically moved to the top of their respective scope, but they are not initialized
        • Attempting to access a variable before it is assigned a value will result in a ReferenceError
      • The Qt 6 script engine will warn (not throw) if a variable declared with var is hoisted "to promote better coding practices"
        • This warning does not prevent the script from executing, but can be rather "noisy"
    • Array vs Array-Like:
      • The script engine in Qt 4 conveniently/automatically converts several array-like C++ template classes (e.g., QList<T>, QVector<T>) to/from ECMAScript Array objects in the script environment
        • Calling Array.isArray( aList ) on such a list returns true, and all Array functions/properties are available for use
        • Consequently, documentation for many function parameters and/or return values in the Daz Studio 4.5+ API indicate that they are an Array, and the types of objects contained in them is provided in their respective descriptions
      • The script engine in Qt 6 does not conveniently/automatically convert array-like C++ template classes (e.g., QList<T>, QVector<T>) that cannot be coerced into ECMAScript types to/from Array objects in the script environment
        • Calling Array.isArray( aList ) on such a list returns false, and certain functions/properties described for Array are not available
      • To help ease the transition between Daz Studio 4.x and 2025/6.x
        • Added in 4.23.1.41 :
          • DzArrayHelper::isArrayLike() ...
          • Array.from() ...
            • Native in ECMAScript 7th Edition (Qt 6 - Daz Studio 2025)
        • instanceof operator (notice the output differences when the following script is executed in the Script IDE pane of both versions)
        • Example:
          (function(){
          	
          	var aLiteral = [ Scene.getPrimarySelection() ]; //Array<DzNode*>
          	print( aLiteral, aLiteral instanceof Array, Array.isArray( aLiteral ) );
          	
          	var lNodes = Scene.getSelectedNodeList(); //QList<DzNode*>
          	print( lNodes, lNodes instanceof Array, Array.isArray( lNodes ) );
          	
          	var aNodes = Array.from( lNodes ); //Array<DzNode*>
          	print( aNodes, aNodes instanceof Array, Array.isArray( aNodes ) );
          	
          })();
          
    • Object vs Object-Like:
      • The script engine in Qt 4 conveniently/automatically converts object-like C++ template classes (e.g., QMap<QString,QVariant>) to/from ECMAScript Object in the script environment
        • All Object functions/properties are available for use
      • The script engine in Qt 6 does not conveniently/automatically convert object-like C++ template classes (e.g., QMap<QString,QVariant>) to/from ECMAScript Object in the script environment
        • Object functions/properties are not available
        • These types of objects most closely resemble a C++ Structure (Struct) - see the W3C description
        • Example:
          (function(){
          	
          	let oAssetMgr = App.getAssetMgr();
          	let strctCMSOptions = oAssetMgr.getCMSOptions(); // QVariantMap - not converted to Object
          	
          	for ( let sMember in strctCMSOptions ){
          		let vValue = strctCMSOptions[sMember];
          		print( typeof vValue, sMember, vValue );
          	}
          	
          })();
          
    • Signal/Slot Connections:
      • The script engine in Qt 4 supports overloaded signals
        • The way the lookup for signals is performed when establishing a connection considers the function signature
          • Two or more signals with the same name, with different parameters, can be distinguished from one another
      • The script engine in Qt 6 does not support overloaded signals
        • The way the lookup for signals is performed when establishing a connection considers the function name, not the function signature
          • Two or more signals with the same name, with different parameters, cannot be distinguished from one another
        • To help ease transition, where there are classes in the Daz Studio 4.x API with overloaded signals, the connection mechanism in Daz Studio 2025/6.x will detect attempts to use these signatures and strip the arguments portion of the signature, leaving only the function name
          • In such a scenario, a warning is logged to alert the developer of the situation and a suggestion is made for formally addressing the ambiguity
    • Script Return Value:
      • ​In Daz Studio 4.x, the return value of a script is the value of the last statement.
      • In Daz Studio 2025/6.x, the return value of a script is undefined unless the return keyword is used.
    Post edited by rbtwhiz on
  • rbtwhizrbtwhiz Posts: 2,470
    edited October 31

    Daz Script 2

     

    • Automatic Conversion:
      • Automatic conversion of Daz Script 1 (based on QSA - an ECMAScript 3.0/4.0 Proposal hybrid) to Daz Script 2 (based on ECMAScript 5.1 until 2025/6.x)
        • Daz Script 1 has been deprecated since the introduction of Daz Script 2
        • Automatic conversion was dependent on a Qt 3 support library provided with Qt 4
        • The Qt 3 support library is retired (in Qt 5), therefore automatic conversion of Daz Script 1 to Daz Script 2 is likewise retired
        • Some concepts/keywords found in Daz Script 1 scripts, such as class and const, are reconstituted in Daz Script 2 as of Daz Studio 2025/6.x (ECMAScript 7th Edition)
    • Deprecated APIs:
      • Usage of deprecated Daz Studio 4.x objects, functions, and properties report themselves to the log when encountered by Daz Studio 2025/6.x
        • This helps developers identify where these objects, functions, and properties are used so that they can update their code to use non-deprecated APIs in order to provide the widest range of compatibility (backward and forward)
        • Many of the deprecated Daz Studio 4.x objects, functions, and properties are annotated in the Object Index, and individual object pages
    • Object Lifetime:
    • Modular Code:
      • Global::include()
        • Deprecated due to behavioral changes resulting from underlying engine differences
          • An includee (inner) script no longer has visibility of variables in the scope of the includer (outer) script
        • Superseded by support for a much more robust CommonJS Module framework and ECMAScript (ES) Modules
      • CommonJS Module framework (subset)
        • Lifetime of imported modules is limited to the lifetime of the executing script
        • ...
      • ECMAScript (ES) Modules
        • Lifetime of imported modules coincide with the lifetime of the script engine (application)
        • ...
    Post edited by rbtwhiz on
  • rbtwhizrbtwhiz Posts: 2,470
    edited May 13

    New Noteworthy Script APIs

     

    • Application Restart:
      • Simple example
        (function(){
        	
        	let aCommandLineArgs = [
        		"absolute/path/of/a/file/to/open.ext"
        	];
        	let nExitCode = 0;
        	
        	App.restartOnClose( true, { "arguments": aCommandLineArgs } );
        	App.delayedExit( nExitCode );
        	
        })();
      • If you execute the script above in the Script IDE pane, you will be asked if you want to save the script (if you did not save already), the application will close and then relaunch, and the path specified in aCommandLineArgs will be passed in as though you had double clicked it to launch the app
        • Replace absolute/path/of/a/file/to/open.ext with the path of an actual file you would like the application to open, otherwise you will see a message indicating that the file could not be found
      • The aCommandLineArgs Array can consist of any combination of the options described in Command Line Options (version specific public documentation will eventually exist in its own parallel "6" namespace), in their respective appropriate order
      • By default, the instance name of the running application will be used for the relaunched application
    • Temporary Prompt Suppression:
      • Simple example
        (function(){
        	
        	let oHandler = new DzScriptPromptSuppressionHandler();
        	oHandler.handleFunction = function( wDialog ){
        		try
        		{
        			if( wDialog.inherits( "QMessageBox" ) ){
        				let oWidget = new DzWidget( wDialog );
        				//let wButton = oWidget.findChildOfWidget( "Button0" ); // Yes
        				let oButton = oWidget.findChildOfWidget( "Button1" ); // No
        				//let oButton = oWidget.findChildOfWidget( "Button2" ); // Cancel
        				if( oButton ){
        					oButton.click();
        				}
        			} else if( wDialog.inherits( "DzBasicDialog" ) ){
        				//wDialog.done( 0 ); // Reject
        				wDialog.done( 1 ); // Accept
        			} else if( wDialog.inherits( "QDialog" ) ){
        				wDialog.done( 0 ); // Reject
        				//wDialog.done( 1 ); // Accept
        			} else {
        				print( wDialog );
        			}
        		}
        		catch( e )
        		{
        			print( e );
        		}
        		
        		return true;
        	};
        	
        	startPromptSuppression( oHandler );
        	
        	print( "MessageBox", MessageBox.question( "Message", "Title", "Yes", "No", "Cancel" ) );
        	
        	let wDlg = new DzBasicDialog();
        	print( "DzBasicDialog", wDlg.exec() );
        	
        	wDlg = new DzDialog();
        	print( "DzDialog", wDlg.exec() );
        	
        	print( "askSaveChanges", MainWindow.askSaveChanges() );
        	
        	endPromptSuppression();
        	
        })();
        
      • If you execute the script above in the Script IDE pane, you will see a series of dialogs pop up and then immediately hide without having to click on them
      • The DzScriptPromptSuppressionHandler object provides a handleFunction member that holds a function to be called by the framework when the dialog/messagebox is in the process of being shown
        • If the type of dialog can be detected, the dialog (or the buttons on it) is manipulated to provide a discrete answer and close
      • The output console at the bottom of the Script IDE pane provides feedback indicating how the dialog was handled - whether it was accepted/rejected, or which button (and therefore which answer) was chosen
      • ...
    Post edited by rbtwhiz on
  • rbtwhizrbtwhiz Posts: 2,470
    edited April 22

    Script IDE Pane

     

    • Syntax Highlighting:
      • Updated to reflect the ECMAScript editions supported by the script engine supplied by Qt 6 - see Script Engine
        • ECMAScript 7th Edition
        • ECMAScript 8th Edition - Partial
        • ECMAScript 11th Edition - Partial
    • Debugger:
      • The debugger provided by Qt 4 is not present in Qt 6 (or Qt 5 before it), therefore debugging functionality that exists in Daz Studio 4.x is not available in Daz Studio 2025/6.x
    • Drag-n-Drop:
      • Dragging script files from an OS file browser and dropping them on the tabbar immediately above the document area will open the scripts as though the File > Open... action were used
      • Dragging files from an OS file browser and dropping them onto the body of an unencrypted script presents a contextual menu with options for what to do
        • Open (as though the drop occured on the tabbar immediately above the document area)
          • If all dropped files are scripts
        • Insert URL String Literal ("file:///path/to/some/file.ext")
        • Insert Path String Literal ("path/to/some/file.ext")
      • Dragging folders from an OS file browser and dropping them onto the body of an unencrypted script presents a contextual menu with options for what to do
        • Insert URL String Literal ("file:///path/to/some/folder")
        • Insert Path String Literal ("path/to/some/folder")
      • Dragging script files from an OS file browser and dropping them onto the body of an encrypted script will open the scripts as though the File > Open... action were used
      • Dragging a pane from a pane group in the UI and dropping it onto the body of an unencrypted script presents a contextual menu with options for what to do
        • Undock "<pane_label>" Pane
        • Insert Classname String Literal ("DzPane")
    • ...
    Post edited by rbtwhiz on
This discussion has been closed.