• Hi Guest!

    This is a notice regarding recent upgrades to the Hub. Over the last month, we have added several new features to improve your experience.
    You can check out the details in our official announcement!

How to restore a hair sim setting to its default?

PrettyFrank

Active member
Messages
39
Reactions
172
Points
33
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 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