use context member rather then modifier name in presets
authorCampbell Barton <ideasman42@gmail.com>
Sun, 22 Nov 2009 11:33:44 +0000 (11:33 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 22 Nov 2009 11:33:44 +0000 (11:33 +0000)
release/scripts/op/presets.py
release/scripts/presets/cloth/cotton.py
release/scripts/presets/cloth/denim.py
release/scripts/presets/cloth/leather.py
release/scripts/presets/cloth/silk.py

index dbc7b71b9160b18d3d5c3f19a2da26fbe82241ec..64c709b08aeb1ab146dab08534b4f55fbcb0b1bb 100644 (file)
@@ -72,12 +72,12 @@ class AddPresetCloth(AddPresetBase):
     name = AddPresetBase.name
     
     preset_values = [
-        "bpy.context.active_object.modifiers['Cloth'].settings.quality",
-        "bpy.context.active_object.modifiers['Cloth'].settings.mass",
-        "bpy.context.active_object.modifiers['Cloth'].settings.structural_stiffness",
-        "bpy.context.active_object.modifiers['Cloth'].settings.bending_stiffness",
-        "bpy.context.active_object.modifiers['Cloth'].settings.spring_damping",
-        "bpy.context.active_object.modifiers['Cloth'].settings.air_damping",
+        "bpy.context.cloth.settings.quality",
+        "bpy.context.cloth.settings.mass",
+        "bpy.context.cloth.settings.structural_stiffness",
+        "bpy.context.cloth.settings.bending_stiffness",
+        "bpy.context.cloth.settings.spring_damping",
+        "bpy.context.cloth.settings.air_damping",
     ]
     
     preset_path = os.path.join("presets", "cloth")
index 27717495e99d60b7202382f75943e3cf44e771e9..7fe8b890b38265d9eb292ccd861235ad685427f8 100644 (file)
@@ -1,6 +1,6 @@
-bpy.context.active_object.modifiers['Cloth'].settings.quality = 5
-bpy.context.active_object.modifiers['Cloth'].settings.mass = 0.300
-bpy.context.active_object.modifiers['Cloth'].settings.structural_stiffness = 15.000
-bpy.context.active_object.modifiers['Cloth'].settings.bending_stiffness = 0.500
-bpy.context.active_object.modifiers['Cloth'].settings.spring_damping = 5.000
-bpy.context.active_object.modifiers['Cloth'].settings.air_damping = 1.000
+bpy.context.cloth.settings.quality = 5
+bpy.context.cloth.settings.mass = 0.300
+bpy.context.cloth.settings.structural_stiffness = 15.000
+bpy.context.cloth.settings.bending_stiffness = 0.500
+bpy.context.cloth.settings.spring_damping = 5.000
+bpy.context.cloth.settings.air_damping = 1.000
index 0d9be3cb5831515cf5da3a937b473bf1a467d28c..4cad384a0140a61ca02fa840fb1056607ce87493 100644 (file)
@@ -1,6 +1,6 @@
-bpy.context.active_object.modifiers['Cloth'].settings.quality = 12
-bpy.context.active_object.modifiers['Cloth'].settings.mass = 1
-bpy.context.active_object.modifiers['Cloth'].settings.structural_stiffness = 40
-bpy.context.active_object.modifiers['Cloth'].settings.bending_stiffness = 10
-bpy.context.active_object.modifiers['Cloth'].settings.spring_damping = 25
-bpy.context.active_object.modifiers['Cloth'].settings.air_damping = 1
+bpy.context.cloth.settings.quality = 12
+bpy.context.cloth.settings.mass = 1
+bpy.context.cloth.settings.structural_stiffness = 40
+bpy.context.cloth.settings.bending_stiffness = 10
+bpy.context.cloth.settings.spring_damping = 25
+bpy.context.cloth.settings.air_damping = 1
index f64608b24c7e47590bb110553208df27c06a42cc..11176c7e81489114633694971519d49c51e13c77 100644 (file)
@@ -1,6 +1,6 @@
-bpy.context.active_object.modifiers['Cloth'].settings.quality = 15
-bpy.context.active_object.modifiers['Cloth'].settings.mass = 0.4
-bpy.context.active_object.modifiers['Cloth'].settings.structural_stiffness = 80
-bpy.context.active_object.modifiers['Cloth'].settings.bending_stiffness = 150
-bpy.context.active_object.modifiers['Cloth'].settings.spring_damping = 25
-bpy.context.active_object.modifiers['Cloth'].settings.air_damping = 1
+bpy.context.cloth.settings.quality = 15
+bpy.context.cloth.settings.mass = 0.4
+bpy.context.cloth.settings.structural_stiffness = 80
+bpy.context.cloth.settings.bending_stiffness = 150
+bpy.context.cloth.settings.spring_damping = 25
+bpy.context.cloth.settings.air_damping = 1
index 21de166adf9191b946e34f95d7896279ea31e2e3..a0dea5f1fd3fc25b7cf3add7edf1299b5e7e80e6 100644 (file)
@@ -1,6 +1,6 @@
-bpy.context.active_object.modifiers["Cloth"].settings.quality = 5
-bpy.context.active_object.modifiers["Cloth"].settings.mass = 0.150
-bpy.context.active_object.modifiers["Cloth"].settings.structural_stiffness = 5
-bpy.context.active_object.modifiers["Cloth"].settings.bending_stiffness = 0.05
-bpy.context.active_object.modifiers["Cloth"].settings.spring_damping = 0
-bpy.context.active_object.modifiers["Cloth"].settings.air_damping = 1
+bpy.context.cloth.settings.quality = 5
+bpy.context.cloth.settings.mass = 0.150
+bpy.context.cloth.settings.structural_stiffness = 5
+bpy.context.cloth.settings.bending_stiffness = 0.05
+bpy.context.cloth.settings.spring_damping = 0
+bpy.context.cloth.settings.air_damping = 1