# Load data to cloth simulation setting

I want to write a program that can write a json file that record values for cloth simulation setting and read the json file.

For example, when I finish a good cloth simulation, I can export a json file that contains all the values assigned in quality, mass, air and sprint etc.

Or when I load the json file, blender assign 3 to air_damping in ClothSettings if "air_damping":3 is read. If there is no "mass" key in the json, blender use the default mass value or the assigned value in blender.

OK, I am silly.... setattr(settings, "mass", 0.5) makes it......
• If settings is a blender ClothSettings instance could also use settings.mass = 0.5 ... which is IMO more readable, I'd use set attribute when you have key, value pairs setattr(settings, key, value) – batFINGER Mar 16 '18 at 6:09