• Hi Guest!

    Please be aware that we have released another critical security patch for VaM. We strongly recommend updating to version 1.22.0.12 using the VaM_Updater found in your installation folder.

    Details about the security patch can be found here.

How to restore a hair sim setting to its default?

PrettyFrank

Well-known member
Messages
72
Reactions
375
Points
53
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