• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.

Change skin from code

hlover303030

New member
Joined
Aug 15, 2024
Messages
2
Reactions
1
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