Change skin from code

hlover303030

New member
Messages
2
Reactions
1
Points
3
Hey so i'm writing a plugin and have been trying to find how to change the skin from code i found these classes
DAZSkinControl
DAZMeshMaterialOptions
DAZCharacterMaterialOptions
But neither of them present functions that would work or i could be missing somethig idk
The ideal sollution would be something like the SetActiveHairItem function from the DAZCharacterSelector.
Thank you in advance!
 
In code, the skins in the Skin Select tab are DAZCharacter objects. While you can set the skin with DAZCharacterSelector's selectedCharacter property or with the SelectCharacterByName method, it's simple to just replicate the existing trigger in code:

1723731181630.png


C#:
var geometry = (DAZCharacterSelector) containingAtom.GetStorableByID("geometry"); // receiver
var characterChooser = geometry.GetStringChooserJSONParam("characterSelection"); // receiver target
characterChooser.val = "Evey"; // value
 
In code, the skins in the Skin Select tab are DAZCharacter objects. While you can set the skin with DAZCharacterSelector's selectedCharacter property or with the SelectCharacterByName method, it's simple to just replicate the existing trigger in code:

View attachment 400190

C#:
var geometry = (DAZCharacterSelector) containingAtom.GetStorableByID("geometry"); // receiver
var characterChooser = geometry.GetStringChooserJSONParam("characterSelection"); // receiver target
characterChooser.val = "Evey"; // value

Nice thank you for the info and a very quick reply just tested it and it works like a charm!
 
Back
Top Bottom