Paste Material Rather Than Material Settings

I have used Daz Studio for some time but tend to quit due to a critical problem with trying to use the program and I want to see if anyone knows a way around it or if there is a script to deal with it.

As best I can tell, there is no way to paste a material to a surface.  The function with that name seems to actually just change the value of the available options on the existing shader to those in the material you are attempting to paste.  Thus, if the existing shader has an option called "color" with a value of an image and the material you want to "paste" has that same value it will set the image to the one in the shader you are "pasting" to the surface.  If, however, there is no metalicity in the shader you are "pasting" to but there is in the one you are pasting from, it will do nothing with that data.  Thus, the material won't look the way it is supposed to because it isn't applying the full shader, just switching values in the existing shader if/when it finds something that happends to exist in both (if any).  So, if I have two hair products and I want to apply the same shader to both it will only work if they both have a shader with exactly the same options and the material I am trying to apply to it has exactly the same options.  If the material is something custom on one, that's it.  You can't change it to some standard material.  If someone somehow deleted an option such as metalicity from one, forget it.  That change appears to be permanent and nothing can be done about it.  

Does anyone know a way to add a paste material (IE: completely replace the shader whether the options on the new shader are the same or not including the type of shader it is) to a material or does Daz Studio not have this capability?  Do any Add Ons/Scripts exist that can do this?  Could an Add On/Script be written that could handle such a task?  This has long since been a core problem with Daz Studio and makes it almost impossible for me to use.

Comments

  • crosswindcrosswind Posts: 9,543
    edited July 28

    Well, I'm not sure if I really got it but it seems you mean Copy / Paste... across surfaces with different shaders ... Is that the case you have ?

    Copy Selected Surfaces / Paste to Selected Surfaces only work on the surfaces that have the very same Shader. If they have different shaders, you either apply the same shader beforehand, or do it with Shader Preset(s).

    Technically, a script definitely can make it but I'm not aware of any existing one so far ~~~

    Post edited by crosswind on
  • Richard HaseltineRichard Haseltine Posts: 107,926

    Although there isn't a built-in command, there is a sample script to do a deep copy (including shader) which you could make into a Custom Action and add to a menu or toolbar. http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/material/deep_copy/start

  • jbowlerjbowler Posts: 841

    Richard Haseltine said:

    Although there isn't a built-in command, there is a sample script to do a deep copy (including shader) which you could make into a Custom Action and add to a menu or toolbar. http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/material/deep_copy/start

    I encounter this quite a lot, I guess I have older products that use the 3DL shaders.  It would be good to have it have a way to set the script behaviour as the "normal" action for copy of a surface paste to another, rather than the the current of "fixing up" the old shader settings to the new surface new shader.

    At present when I notice it going wrong I just set the shader on the _target_ surface before the copy'n'paste.

    IRC the same issue occurs when using a simple apply of a set of Iray shader settings to a 3DL (3DU?) shaded surface.  That's more obviously wrong to my mind (assuming I got this right); if I double click on a shader preset I expect it to change the shader too, not just the settings!

  • crosswindcrosswind Posts: 9,543

    Richard Haseltine said:

    Although there isn't a built-in command, there is a sample script to do a deep copy (including shader) which you could make into a Custom Action and add to a menu or toolbar. http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/material/deep_copy/start

    The script does nothing on my side, it neither copy materials across surfaces nor arcoss selected nodes. How to use it ? 

  • Richard HaseltineRichard Haseltine Posts: 107,926

    It appears to be set up to copy from the Face Surface group to a Default surface group (so from a human with suitable surface names to a primitive) - it would need adjusting for general use (copy selected surface on the Primary seelction to all selected surfaces on other selected items, for example).

  • crosswindcrosswind Posts: 9,543

    Richard Haseltine said:

    It appears to be set up to copy from the Face Surface group to a Default surface group (so from a human with suitable surface names to a primitive) - it would need adjusting for general use (copy selected surface on the Primary seelction to all selected surfaces on other selected items, for example).

    I still couldn't make it work and couldn't see any change either...odd.

  • Trake118Trake118 Posts: 84

    Richard Haseltine said:

    It appears to be set up to copy from the Face Surface group to a Default surface group (so from a human with suitable surface names to a primitive) - it would need adjusting for general use (copy selected surface on the Primary seelction to all selected surfaces on other selected items, for example).

    OK, so I need to learn how to write scripts and use this as a starting point to create a script that will copy and paste?  This is a function that is REALLY basic and constantly needed, but extroardinarily difficult to achieve from the looks of it.  Every time I want to get into Daz Studio this just stumps me and I generally just quit because I can't copy and paste materials.  I tried to use the script, but it appears to corrupt the scene such that when I try to render it just creates an error.  I realize this thread is old so I'm hoping there is some new developments?  Are there any plans to add a copy/paste material function to Daz Studio that actually copies and pastes the material rather than copies values and pastes whatever values happen to exist in both shaders?  Is there a work around?  I have on many occasions sought to find a way around it, but I can never find a way to make the program function and just quit because I can't copy and paste shaders.  I assume this is what most people spend most of their time in Daz Studio attempting to work around.

  • ZiconZicon Posts: 388

    Trake118 said:

    Does anyone know a way to add a paste material (IE: completely replace the shader whether the options on the new shader are the same or not including the type of shader it is) to a material or does Daz Studio not have this capability?  

    The easy way to work around this is to save out a temporary shader preset of the surface you want to copy, then apply that preset to the surface you want to paste to.

  • crosswindcrosswind Posts: 9,543

    Shader Preset can only work for one selected surface ~~ which turns out to be cumbersome if one wants to copy / paste multiple surfaces.

    Still, the commonly-used way which is very easy is to apply the same Shader to the target surfaces first of all... before copy / paste surfaces.

Sign In or Register to comment.