Digital Art Zone

 
   
1 of 2
1
DAZ Studio 4.x Scripting Documentation
Posted: 03 October 2012 08:12 AM   [ Ignore ]   [ # 14 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  14003
Joined  2003-10-09

Thanks Rob.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 17 December 2012 11:04 AM   [ Ignore ]   [ # 15 ]
Member
Avatar
Rank
Total Posts:  51
Joined  2007-10-22

Just for the record—I’ve been a technical writer and a software tester at various times in my life—

Profile
 
 
Posted: 12 November 2013 01:52 AM   [ Ignore ]   [ # 16 ]
Member
Rank
Total Posts:  33
Joined  2012-09-22

Soooo…..

How is the documentation coming along?

Is it possible to, at least, publish a list of changes since DS3?

Profile
 
 
Posted: 12 November 2013 06:21 AM   [ Ignore ]   [ # 17 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  14003
Joined  2003-10-09

The object definitions are starting to be filled out http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/start

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 14 August 2014 02:08 PM   [ Ignore ]   [ # 18 ]
Member
Rank
Total Posts:  59
Joined  2010-06-28

Good to see, that there is at least a little documentation for the new scripting.

BUT:

There are still huge gaps (huge enough to drive a ocean liner threw them). Not only the many red links (that are not broken, but just not yet filled) but also the many topics just not touched or listed anywhere.

I stumbled along one: Loading of a scene file.

I have a script that works perfectly for DS 3.1, which loads a scene (.daz) and then renders the scene. This script works also fine under 4.5, **as long** as the scenes are .daz-Files ... but when I select a .duf-File, it just loads nothing (and also does not show any kind of error message, even in the log).

Could anybody please provide a documentation or at least an example, how a duf-Scene-File can be loaded in daz script. I hope, at least the rendering will then still be the same.

The class, I used in DS3.1 is not documented in the 4.5 scripting documentation any more and I even guess, that I need a different class now—but I could not find any fitting class in the documentation. Even the class that is used in the examples for saving is not documented at all.

PLEASE, PLEASE: The new scripting is now very old and you even don’t support DS 3.1 any more in any way—would you PLEASE provide adequate documentation with either a complete class documentation (all classes) or at least examples for *all* sensible usage scenarios (not only some selected ones).

At least, can somebody tell me, how loading is working now?

Profile
 
 
Posted: 14 August 2014 04:33 PM   [ Ignore ]   [ # 19 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  14003
Joined  2003-10-09

This is how I do it in my (in progressish) update to the script for making DS content loadable from a Poser content directory (where fullPath is the abslute path:

// Load content file helper script
// Copyright (c) Richard Haseltine, September 2013

// Load, by default, or browse to using the OS,
// if ctrl+shift (Win)/cmd+shift (Mac), a named 
// file. This is a helper script for PropDSFiles2

// Relative path to file
var fileName "/relative path/file.duf";
// State of the modifier keys, to check for ctrl+shift
var modKeys App.modifierKeyState();

// Content Manager, to get the absolute path
// and to import if needed
var cntMgr App.getContentMgr();
if ( 
cntMgr {
 
var fullPath cntMgr.findFile( fileName );
 if ( 
fullPath != "" {
  
// If ctrl and shift were both held, browse to file
  // otherwise load it
  
if ( ( modKeys 0x002000000 ) && ( modKeys 0x004000000 ) ) {
   App
.showInNativeBrowserfullPath );
  
}
  
else {
   cntMgr
.openFile( fullPath );
  
}
 }
 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
   
1 of 2
1