Saving a material preset without maps

SotoSoto Posts: 1,440
edited December 1969 in Daz Studio Discussion

Hi.
Someone knows how to save a material preset that doesn't includes maps info?
I want something that applies only the values without changing maps.

I tried diting the preset file by hand, but I'm getting an error.
Thanks.

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,778
    edited December 1969

    It isn't possible with a .dsa preset, without adding new code. I haven't tried very hard with a .duf preset. Which were you using?

  • SotoSoto Posts: 1,440
    edited December 1969

    I tried first with duf in a text editor.
    Then I tried with dsa inside DAZ Studio, but both attempts gave me an error message.

  • wancowwancow Posts: 2,708
    edited December 1969

    Hellboy, is this something you're intending to distribute?

  • SotoSoto Posts: 1,440
    edited April 2013

    Eventualy, yes.
    But for now I also want to avoid the ctr+double click.

    Post edited by Soto on
  • wancowwancow Posts: 2,708
    edited December 1969

    damn, I never really thought about it before... there really is no way to do this... :( Was just trying myself...

  • scorpioscorpio Posts: 8,413
    edited December 1969

    Just an idea - if you remove the maps and then save as a material preset will that work

  • millighostmillighost Posts: 261
    edited December 1969

    Hellboy said:
    Hi.
    Someone knows how to save a material preset that doesn't includes maps info?
    I want something that applies only the values without changing maps.

    I tried diting the preset file by hand, but I'm getting an error.
    Thanks.


    You can save it as a "Material Preset". This is like a pose preset, only for material settings. Here is how to remove the diffuse image from it: Open it in your editor and search for the "scene" section. It looks somewhat like this:
    
    "scene" : {
                    "materials" : [
                            {
                                    "url" : "#Default",
                                    "groups" : [ "Default" ]
                            }
                    ],
                    "animations" : [
                            {
                                    "url" : "name://@selection#materials/Default:?diffuse/value",
                                    "keys" : [ [ 0, [ 0.9294118, 1, 0.8313725 ] ] ]
                            },
                            {
                                    "url" : "name://@selection#materials/Default:?diffuse/image_file",
                                    "keys" : [ [ 0, "/C:/users/millighost/My Documents/image/texture/10x10-measure.png" ] ]
                            },
    ....
    

    The "animations section contains keys for the various parameters. In the example above, the parameter that contains the image is
    
    {
           "url" : "name://@selection#materials/Default:?diffuse/image_file",
           "keys" : [ [ 0, "/C:/users/millighost/My Documents/image/texture/10x10-measure.png" ] ]
    },
    

    If you remove it (the 4 lines with the curly braces around it (and the "url" and the "keys" in it), this preset file will not overwrite the diffuse image anymore. For other parameters the procedure is the same. One minor detail to remember: if you remove the very last key in the "animations", you also need to remove the comma at the end of the previous key, otherwise it will give an error.
  • vwranglervwrangler Posts: 4,885
    edited April 2013

    EDIT: Never mind. Misread the post before mine.

    Post edited by vwrangler on
Sign In or Register to comment.