Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2011-04-04 18:35:22 +0400
committerJanne Karhu <jhkarh@gmail.com>2011-04-04 18:35:22 +0400
commit2f3758e6d1c7c4d145650d475d54ab46f1e4a4f8 (patch)
tree332e1ba27ec63a5c5239d896b0b1a67c9f368799 /release/scripts
parentf2fd9d11bc9cb7e208a45268203721d45c2223f2 (diff)
Bug fix: The quick effect operators got broken a bit by the new material slot behavior.
* The operators now add new materials and assign them to the created material slots explicitly.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index b50bb2dc3cc..c3de0a289a3 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -163,8 +163,8 @@ class MakeSmoke(bpy.types.Operator):
# create a volume material with a voxel data texture for the domain
bpy.ops.object.material_slot_add({"object": obj})
- mat = obj.material_slots[0].material
- mat.name = "Smoke Domain Material"
+ mat = bpy.data.materials.new("Smoke Domain Material");
+ obj.material_slots[0].material = mat
mat.type = 'VOLUME'
mat.volume.density = 0
mat.volume.density_scale = 5
@@ -274,9 +274,10 @@ class MakeFluid(bpy.types.Operator):
# create a ray-transparent material for the domain
bpy.ops.object.material_slot_add({"object": obj})
+
+ mat = bpy.data.materials.new("Fluid Domain Material");
+ obj.material_slots[0].material = mat
- mat = obj.material_slots[0].material
- mat.name = "Fluid Domain Material"
mat.specular_intensity = 1
mat.specular_hardness = 100
mat.use_transparency = True