Running a script stored in the data folder from a file in the content directory

Hi, I'm working with MikeDs Hierarchy Preset suite, specifically the MS Load (Hier) Material Preset Script Maker.   In the help file it states the following:

"Moving the new script into another folder

If you need to transfer the script into another folder, you have to move the used assets into the same folder as well. What about if you are a content creator and you don’t want to show all the files to the customers? For example, you may have a cloth item, and some buttons on it (like the example 1, in the “Tasks examples” paragraph), you don’t want to show every Material Preset file for the buttons to the customers. An easy way is to move the new script for the cloth with the Material Preset files it uses into a location in the /data/ folder of your product and then put a link for the saved script into the Material folder of the Content Library. In that way you can link only the scripts, the (Hier.) Material Presets files and/or the Layered Preset files you want to be shown. The new scripts will still be working as their new folder will include the assets, they used, as well."

Can anyone help with a practical example of how to accomplish this.   "Put a link" implies a relatively simple, non technical solution but an afternoon of researching and I'm none the wiser and ended up down a rabbit hole of calling scripts from other scripts and so on, hence the question here.   If there is a non-scripted solution to this all the better!!!

My thanks in advance!

 

 

 

Comments

  • OmnifluxOmniflux Posts: 377

    I don't have this product, and so cannot read the documentation, but it is probably referring to Daz JSON Link (*.djl) files.

    They can be created by right clicking on an asset in DAZ Studio and choosing "Create Link for Asset" or via script (see the sample script Create Asset Links)

     

    You can have a file structure like this

    • Content/data/Omni Flux/Example/Prop.dsf
    • Content/data/Omni Flux/Example/Prop.duf
    • Content/data/Omni Flux/Example/Prop.png
    • Content/data/Omni Flux/Example/SomePresetUsedByScript.duf
    • Content/data/Omni Flux/Example/RandomColorizer.dsa
    • Content/data/Omni Flux/Example/RandomColorizer.png

     

    • Content/People/Genesis 3 Female/Accessories/Example/Cool Prop.djl
    • Content/People/Genesis 3 Female/Accessories/Example/Recolorize Cool Prop.djl
    • Content/People/Genesis 8 Female/Accessories/Example/Cool Prop.djl
    • Content/People/Genesis 8 Female/Accessories/Example/Recolorize Cool Prop.djl

     

    The .djl file contents are

    • Content/People/Genesis 3 Female/Accessories/Example/Cool Prop.djl
    • Content/People/Genesis 8 Female/Accessories/Example/Cool Prop.djl
    { "path" : "data/Omni Flux/Example/Prop.duf" }
    • Content/People/Genesis 3 Female/Accessories/Example/Recolorize Cool Prop.djl
    • Content/People/Genesis 8 Female/Accessories/Example/Recolorize Cool Prop.djl
    { "path" : "data/Omni Flux/Example/RandomColorizer.dsa" }

     

    This way only "Cool Prop" and "Recolorize Cool Prop" are presented to the user, and not duplicated, and the script can still load "SomePresetUsedByScript.duf"

     

    I am not aware of a good documentation link for Daz JSON Link files other than the sample script above, unfortunately...

  • LZYLZY Posts: 30

    Thank you Omniflux, thats done the trick!    Daz has so many great features but the documentation seems to be almost deliberately obtuse...

Sign In or Register to comment.