This version (2012/11/08 13:29) is a Draft.
Samples
This page is a WIP. There is likely to be incomplete and or missing information while the page is being built.
Several sample scripts are provided below to illustrate some of the most common methods of extending DAZ Studio and to help get you started developing your own scripts. You are free to modify, and use the scripts for yourself. You may not redistribute any portion or derivation of the samples, without prior written permission from DAZ 3D. Please see the End User License Agreement for full details.
Education/Assistance
- Guide Pages - An overview of the concept behind Guide Pages, and the folder/files used to implement the concept.
- Tip Pages - An overview of the concept behind Tip Pages, and the folder/files used to implement the concept.
- Lesson Strips - An overview of the concept behind the Lesson Strips, and the folder/files used to implement the concept.
File Input/Output
Setting Discovery
- Importer Settings - The source of a script that will allow you to inspect the script accessible settings of all importers.
- Exporter Settings - The source of a script that will allow you to inspect the script accessible settings of all exporters.
Asset IO Save Filters
- Save a Scene - An example of how to save a Scene... via script.
- save_duf_scene_subset - An example of how to save a Scene Subset... via script, with or without displaying its output settings dialog.
- save_duf_hierarchical_materials - An example of how to save a Hierarchical Material(s) Preset... via script, with or without displaying its output settings dialog.
- save_duf_wearable - An example of how to save a Wearable(s) Preset... via script, with or without displaying its output settings dialog.
- Save a Character Preset - An example of how to save a Character Preset... via script, with or without displaying its output settings dialog.
- save_duf_properties - An example of how to save a Properties Preset... via script, with or without displaying its output settings dialog.
- Save a Shaping Preset -An example of how to save a Shaping Preset... via script, with or without displaying its output settings dialog.
- Save a Pose Preset - An example of how to save a Pose Preset... via script, with or without displaying its output settings dialog.
- Save a Material(s) Preset - An example of how to save a Material(s) Preset... via script, with or without displaying its output settings dialog.
- Save a Shader Preset - An example of how to save a Shader Preset... via script, with or without displaying its output settings dialog.
- save_duf_cameras - An example of how to save a Camera(s) Preset... via script, with or without displaying its output settings dialog.
- save_duf_lights - An example of how to save a Light(s) Preset... via script, with or without displaying its output settings dialog.
- Save a Render Settings Preset - An example of how to save a Render Settings Preset... via script.
- save_duf_dform - An example of how to save a D-Former(s) Preset... via script, with or without displaying its output settings dialog.
- save_duf_layered_image - An example of how to save a Layered Image(s) Preset... via script, with or without displaying its output settings dialog.
Support Assets
- save_dsf_scene - An example of how to save Scene Asset(s)... via script, with or without displaying its output settings dialog.
- save_dsf_figure_prop - An example of how to save Figure/Prop Assets... via script, with or without displaying its output settings dialog.
- save_dsf_morph - An example of how to save Morph Asset(s)... via script, with or without displaying its output settings dialog.
- save_dsf_uv - An example of how to save UV Asset(s)... via script, with or without displaying its output settings dialog.
- save_dsf_shader_definition - An example of how to save Shader Definition Asset... via script, with or without displaying its output settings dialog.
OBJ Import/Export
- Silent OBJ Import - An example of how to import a Wavefront Object (*.obj), without displaying the importer settings dialog.
- Silent OBJ Export - An example of how to export a Wavefront Object (*.obj), without displaying the exporter settings dialog.
Poser Export
- Export TriAx to Poser - An example of how to export a TriAx Weight Mapped figure (i.e. Genesis) to Poser 9 and/or Pro 2012, without displaying the settings dialog for the Poser Character (*.cr2) exporter or the Wavefront Object (*.obj) exporter.
Conversion
- DSA Converter - The source for a simple DAZ Script that will convert ascii scripts (*.dsa) to their binary (*.dsb) or encrypted (*.dse) counterpart.
Listing
- File Listing - The source for a simple DAZ Script that will recursively list the files in a folder.
Directory Mapping
- Save Mapped Paths - The source for a simple DAZ Script that produces another script that will clear any currently mapped content directories and subsequently set the mapped content directories to those that were mapped at the time the script was saved.
Nodes
- Create Instance - The source of a script that will create an instance.
Properties
- Node Properties - The source of a script that will allow you to access all properties associated with a given node.
- Node Property Presentations - The source of a script that will allow you to change colors used by all properties associated with a given node.
- set_default_property_groups - The source for a DAZ Script that will arrange specific properties into their “default” groups.
Geometry
- Geometry Info - The source for a script that will print geometry information for the selected node.
- generate_cube - The source for a script that will generate a geometric cube, demonstrating use of the geometry pipeline.
- generate_cylinder - The source for a script that will generate a geometric cylinder, demonstrating use of the geometry pipeline.
- generate_cone - The source for a script that will generate a geometric cone, demonstrating use of the geometry pipeline.
- Generate Sphere - The source for a script that will generate a geometric sphere, demonstrating use of the geometry pipeline.
- generate_torus - The source for a script that will generate a geometric torus, demonstrating use of the geometry pipeline.
- Generate Plane - The source for a script that will generate a geometric plane, demonstrating use of the geometry pipeline.
Core Functionality
- move_to_floor - The source for a script that mimics the Move To Floor functionality in DAZ Studio.
- aim_camera - The source for a script that mimics the Aim at Selection functionality in DAZ Studio.
- frame_camera - The source for a script that mimics the Frame Selection functionality in DAZ Studio.
General Interface
- simple_dialog - The source for a simple script that provides the standard dialog button layout of dialogs in DAZ Studio.
- widget_test - The source for a simple script that tests various aspects of the widget types.
- Progress - The source for a simple script that causes a modal progress dialog to be displayed and report progress.
- Background Progress - The source for a simple script that causes the background_progress indicator to be displayed in the Status Bar and report progress.
Specific Interface
- Set Content Library Container - The source for a script that sets the active path/container in the Content Library pane.
Tools
- calculator - The source for a calculator, written completely using DAZ Script' intrinsic types.
Utilities
- Version Conversion - The source for a script that will convert a DAZ Studio version string into its 32 and 64 bit hexadecimal and decimal values.
Custom Shaders
Presets
- constant_shader_preset - The source for a Shader Preset that applies a DzShaderMaterial definition (below) for the standard RenderMan Constant Surface Shader. The file is as written by the SaveFilter at File > Save As > Deprecated > Shader Preset (.ds*)....
Material Definitions
- constant_material_definition - The source for a material definition script, a support file required by the Shader Preset sample linked above, that builds the DzRSLShader objects that interface with a shader.
- example_material_definition - The source for an example material definition script, showing shader object creation.
Shader Definitions
- constant_shader_definition - The source for a shader definition script, a support file required by the Material Definition sample linked above, that builds the properties accessible to users, in the UI, via the Surface tab.
- example_shader_definition - The source for an example shader definition script, showing property creation for passing tokens to the shader and alternatively for use in setting attributes via the rendertime script(s).
Shaders
- constant_surface_shader - The RenderMan Shading Language (RSL) source for the standard RenderMan Constant Surface Shader.
Render-Time
- default_rendertime_script - The source for a render time script, a support file required by the sample linked above, that sets object attributes.
Rendering
General
- Render To RIB - The source for a script that will allow you to “render” to a RenderMan® Interface Bytestream (RIB) file.
- Render To Backdrop - The source for a script that will allow you to render to an image that is immediately set as the backdrop.
- Render To Viewport - The source for a script that will allow you to render to the viewport.
Scripted Renderer
The Scripted Renderer is only provided in DAZ Studio Advanced and Pro editions.
- scripted_renderer_load - The source for a script that prepares the DzScriptedRenderer for rendering operations.
- scripted_renderer_pass - The source for a script that controls the rendering process for the DzScriptedRenderer.
