diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-06-19 20:45:48 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-06-19 20:45:48 +0400 |
commit | 69e07714b901c47e0d3c7e4a92d72de65197cd48 (patch) | |
tree | 4baf44ccbc1f9619da4d9f179172e4afb5c80a01 | |
parent | 8796c3eff1c3019513fbf3a00e573a24fcd56a7d (diff) |
Fix part 1 of [#31840] Quick Explode Bugs related to it's fade option.
Patch by Philipp Oeser (lichtwerk), just did style change (better to not define a value twice, so only affecting the three color components, not the alpha, also using the slice syntax makes things much more compact ;) ), thanks!
-rw-r--r-- | release/scripts/startup/bl_operators/object_quick_effects.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py index a062ac6f4c5..62844d11443 100644 --- a/release/scripts/startup/bl_operators/object_quick_effects.py +++ b/release/scripts/startup/bl_operators/object_quick_effects.py @@ -174,6 +174,7 @@ class QuickExplode(Operator): if self.style == 'BLEND' and len(mesh_objects) != 2: self.report({'ERROR'}, "Select two mesh objects") + self.style = 'EXPLODE' return {'CANCELLED'} elif not mesh_objects: self.report({'ERROR'}, "Select at least one mesh object") @@ -241,10 +242,10 @@ class QuickExplode(Operator): if obj == to_obj: tex_slot.alpha_factor = -1.0 elem = tex.color_ramp.elements[1] - elem.color = mat.diffuse_color else: elem = tex.color_ramp.elements[0] - elem.color = mat.diffuse_color + # Keep already defined alpha! + elem.color[:3] = mat.diffuse_color else: tex_slot.use_map_color_diffuse = False |