New to the scripting IDE...

Hi all,

I am new to the DAZ Scripting IDE, just opened it for the first time a couple days ago but I am a software developer by trade so not new to the scripting aspect of it. The coding constructs of DAZScript seem very intuitive and easy enough to pick up. However, I see that documentation of the object methods and members is a bit, um, sparse -

So is there a way to have the IDE turn on auto-fill of an object so when I start typing in object names it gives me a flyout menu of all the possible members/methods to use for that specific object? If I had that working I can figure out the methods by trial and error without a manual. Otherwise this is going to be a really painful exercise in futility.

How do people new to the IDE write scripts here with only part of a manual and part of the classes/objects fleshed out in documentation? Do we just come here for all of our questions to be answered or do we flood support with trouble tickets? Sorry for the frustrated tone, finding definiteive answers has been frustrating...

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,888

    Have you grabbed the DS3 scripting docs? The DS 4 docs are filling out but for most of the basics those are still useful http://docs.daz3d.com/doku.php/public/software/dazstudio/3/start

  • pfunkyfizepfunkyfize Posts: 475

    Have you grabbed the DS3 scripting docs? The DS 4 docs are filling out but for most of the basics those are still useful http://docs.daz3d.com/doku.php/public/software/dazstudio/3/start

    Thanks for that Richard,

    I have been using that documentation but some of it is hit or miss depending if the syntax has changed in the latest revision. Until all the documentation gets filled out I seriously hope nothing freakishly tragic happens to the handful of DS4 scripting experts here since they're the only resource.

    I trudge on ever forward then...

    Thanks!

     

  • pfunkyfizepfunkyfize Posts: 475

    I take it that there is no object auto-fill functionality when typing in object structures?

  • Richard HaseltineRichard Haseltine Posts: 100,888

    I take it that there is no object auto-fill functionality when typing in object structures?

    No, we used to have that in the oldest versions but the change of scripting engine (due to Qt changing) from DS2 to DS3 took it away.

  • pfunkyfizepfunkyfize Posts: 475

    No, we used to have that in the oldest versions but the change of scripting engine (due to Qt changing) from DS2 to DS3 took it away.

    Ah ok, bummer-

    Is there a way to run DML SQL so that I can query/update the contensts of the content database via script? Or can I do that in the SDK or both?

    Thanks Richard

  • Richard HaseltineRichard Haseltine Posts: 100,888

    I'm afraid I don't understand the question - but yes, there is a lot of access to the database via scripting.

  • pfunkyfizepfunkyfize Posts: 475
    edited June 2016

    I'm afraid I don't understand the question - but yes, there is a lot of access to the database via scripting.

    Ok that is good to know that DB access is possible through scripting.

    To explain a little more I was wondering if Data Manipulation Language (SELCT,UPDATE,INSERT,DELETE...) of SQL is allowable in DAZ script writing. If the database is PostgreSQL I am trying to figure out a way to pull data out and possibly update data via SQL. Also what would help would be a table schema and their respective columns but I am thinking that may be an SDK question...

    I guess all this would be moot though if the database is not PostgreSQL or any flavor of relational database...

    Ultimately, I need to pull content data from the content database. I can 'speak' SQL natively to a relational database with DML language in a PostgreSQL RDBMS but you have confirmed that data can be pulled from the DB with scripting commands but if there is scripting syntax that allows for data manipulation from the content database, I need to find out what that syntax looks like. I am building a stand alone piece of software that can drill into the Studio content database. It seems that if the software executes a script to grab DB data, it would be a very slow performance bottleneck than actually having the software access the PostgreSQL database directly with SQL commands.

    Post edited by pfunkyfize on
  • djigneodjigneo Posts: 283

    I'm also a Software engineer by profession and have ran into similar annoyances in writing scripts for DAZ Studio.

    The best way I've found is: use TypeScript in Visual Studio to get intellisense / API information.

    I'm contributing to this github project which has a bunch of TypeScript definition files.

    So, in my workflow, I create TypeScript files for the eventual DAZ script files in Visual Studio and the "Build" step in Visual Studio is configured to change them into DAZ script files (instead of the default JavaScript). It's the best way I've found to code without heavily referencing the API for every little thing.

  • pfunkyfizepfunkyfize Posts: 475
    djigneo said:

    I'm also a Software engineer by profession and have ran into similar annoyances in writing scripts for DAZ Studio.

    The best way I've found is: use TypeScript in Visual Studio to get intellisense / API information.

    I'm contributing to this github project which has a bunch of TypeScript definition files.

    So, in my workflow, I create TypeScript files for the eventual DAZ script files in Visual Studio and the "Build" step in Visual Studio is configured to change them into DAZ script files (instead of the default JavaScript). It's the best way I've found to code without heavily referencing the API for every little thing.

    Great idea, very creative! Thanks!

Sign In or Register to comment.