Wed, Nov 20, 7:59 AM CST

Renderosity Forums / DAZ|Studio



Welcome to the DAZ|Studio Forum

Forum Moderators: wheatpenny Forum Coordinators: Guardian_Angel_671, Daddyo3d

DAZ|Studio F.A.Q (Last Updated: 2024 Nov 20 6:51 am)



Subject: DS3: Correcting file/pathnames in self-generated Material/Shader Preset scripts


3dcheapskate ( ) posted Sun, 19 February 2012 at 1:48 AM · edited Thu, 14 November 2024 at 12:40 PM

How can I correct the pathnames in the .dsa material/shader presets I've created from within DS3 so that they'll work on other machines? This is the sort of thing I mean (from my Scale01.dsa shader preset):

...
DSsActions.prototype.setMaterialProperties = function( oMaterial, oShape ){
    ...
    g_oPresetHelper.setColorProperty( "Diffuse Color",  [ 255, 255, 255 ],
        "E:/Dev/Runtime/Textures/3DCheapskate/Armour/Scale01/Scale01.png" );

Obviously nobody else has their textures in the same place as mine, so I just want to make these paths generic.

In the Poser mt5/mc6 files it was simply a case of replacing the absolute pathnames that Poser created (e.g. "E:DevRuntimeTextures3DCheapskateArmourScale01Scale01.png") with Poser paths (":Runtime:Textures:3DCheapskate:Armour:Scale01:Scale01.png").

Can I do something similar here for DS?


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



3dcheapskate ( ) posted Sun, 19 February 2012 at 2:19 AM · edited Sun, 19 February 2012 at 2:20 AM

Just answered my own question!

Found the answer here http://forum.daz3d.com/viewtopic.php?t=67234

I had the textures in a temporary folder on my desktop, and since this isn't a mapped content folders DS uses the absolute path. I simply moved the textures to a mapped content folder and regenerated the shader preset - DS now uses a relative path.

...
DsActions.prototype.setMaterialProperties = function( oMaterial, oShape ){
    ...
    g_oPresetHelper.setColorProperty( "Diffuse Color",  [ 255, 255, 255 ],
        "/Runtime/Textures/3DCheapskate/Armour/Scale01/Scale01.png" );

 

Problem solved! And quite logical too!


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).



Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.