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-03-30 17:35:54 +0400
committerJanne Karhu <jhkarh@gmail.com>2011-03-30 17:35:54 +0400
commitce2be370262830db6f0c32b0771c5e42f9072d8a (patch)
tree7d880c04557ffc15bbc593945eb2ec3cd054db4c /release/scripts
parenta462f7880b3927612553dbd86cdb4d73fb74a204 (diff)
Small update to the quick effects operators:
* "Make fur" now creates a basic fur material for each object (smaller strand tip width and a little bit of surface diffuse) * If fluid/smoke emitters aren't rendered the objects are also set to draw only in wire mode so that the fluid/smoke can be clearly seen.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index 332b7ebae42..65d3854fab9 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -75,6 +75,14 @@ class MakeFur(bpy.types.Operator):
self.report({'ERROR'}, "Select at least one mesh object.")
return {'CANCELLED'}
+ mat = bpy.data.materials.new("Fur Material")
+ mat.strand.tip_size = 0.25
+ mat.strand.blend_distance = 0.5
+
+ for ob in context.selected_objects:
+ ob.data.materials.append(mat)
+ ob.particle_systems[-1].settings.material = len(ob.material_slots)
+
return {'FINISHED'}
class MakeSmoke(bpy.types.Operator):
@@ -123,6 +131,8 @@ class MakeSmoke(bpy.types.Operator):
ob.modifiers[-2].flow_settings.temperature = 2
psys.settings.use_render_emitter = self.show_flows
+ if not self.show_flows:
+ ob.draw_type = 'WIRE'
# store bounding box min/max for the domain object
for i in range(0, 8):
@@ -249,6 +259,8 @@ class MakeFluid(bpy.types.Operator):
ob.modifiers[-1].settings.initial_velocity = self.initial_velocity.copy()
ob.hide_render = not self.show_flows
+ if not self.show_flows:
+ ob.draw_type = 'WIRE'
# store bounding box min/max for the domain object
for i in range(0, 8):