• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.

How to restore a hair sim setting to its default?

PrettyFrank

Well-known member
Featured Contributor
Joined
Jul 26, 2021
Messages
99
Reactions
454
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