• Hi Guest!

    We are extremely excited to announce the release of our first Beta for VaM2, the next generation of Virt-A-Mate which is currently in development.
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. 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.

How to restore a hair sim setting to its default?

PrettyFrank

Well-known member
Joined
Jul 26, 2021
Messages
72
Reactions
378
Background:
I'm writing a plugin that needs to control a hair's density setting.

Question:
Does anyone know how to set the hairDensity back to its default setting (each hair item will be unique in this)?

Thanks in advance!
 
There should be a button on the main Customize screen that says, "Load Defaults." It will reset the color settings too, though.
 
Ahh yes, thanks for the reply, but I mean how to achieve this through code/programmatically! :)

I very much should have specified that in the headline, my bad!!
 
(i'm trying to write a plugin that modified/restores a particular setting)
 
I don't write plugins (I should learn). I created a button trigger that does the same thing. For the Roac Autumn hair, it's Roac:AutumnPreset LoadDefaults. I could also access Roac:AutumnSim curlScale and curlFrequency. If they are available as triggers, you should be able to get to them with a plugin.
 
Something like this maybe?
C#:
hairControl.SetFloatJSONParam("hairMultiplier", hairControl.GetFloatJSONParam("hairMultiplier").defaultVal);

I think it's either "hairMultiplier" or "curveDensity", not sure.
 
Back
Top Bottom