How to select two material groups and input them to the Deep Copy sample script

desleadeslea Posts: 27

I am trying to work with the material Deep Copy sample here: http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/material/deep_copy/start

I am having trouble figuring out how to select the Source and Target material in a way that the script will recognise. Intuitively it would make sense to do it the same way you'd transfer rigging - hold down CTRL, select the first material group, then select the second material group, then execute the script. But I can't figure out how to do it. Can someone give me a clue on where to start?

Many thanks!

Comments

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

    Do you have the same number of selected materials on each item?

  • rbtwhizrbtwhiz Posts: 2,250
    edited December 1969

    The only selection that matters to the Deep Copy sample is node selection; the deep copy of materials is performed on each of the selected objects.

    Materials are named in sequential 'pairs' across parallel arrays; see aSrcMaterials and aTgtMaterials. On the first iteration aSrcMaterials[ 0 ] is copied to aTgtMaterials[ 0 ]. On the next iteration aSrcMaterials[ 1 ] is copied to aTgtMaterials[ 1 ]... and so on... until the length of the arrays is reached.

    -Rob

Sign In or Register to comment.