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>2009-10-05 17:25:56 +0400
committerJanne Karhu <jhkarh@gmail.com>2009-10-05 17:25:56 +0400
commit3816554cbc1a40dc5199c8e56e45817ec09128d5 (patch)
tree2005de53d609273352eb2d4054cc03b8df258610 /release
parenta3449771476955fd4a27eadd17ff4dce2655cc16 (diff)
General particle bug fixes + few small goodies
The goodies: * Curves can be used as normal dynamic effectors too with the new "curve" field shape. * Group visualization has optional duplication counts for each object in the specified group. * Object & group visualizations, which are done without taking the dupliobject's global position into account (unless the whole group is used). This is much nicer than the previous behavior, but I added a "Use Global Location" option for those who want to use it the old way. * The active particle system's particles are now drawn a with theme coloured outline instead of pure white. * Added object aligned velocity factors (buttons categorized and re-organized too). Bug fixes: * Absorption didn't work as the ui toggle button was forgotten. * Some other force field ui tweaks. * Crash after adding children and changing trails count. * Display types "cross" and "axis" crashed. * Particles weren't drawn with correct coloring. * Billboards didn't update properly in viewport to camera location changes. * Particle rotation wasn't recreated correctly from point cache. * Changing particles amount crashed sometimes. * Some files with child hair crashed on loading. * Compiler warning fixes. * Adding boids crashed on frame 1;
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/buttons_particle.py106
-rw-r--r--release/scripts/ui/buttons_physics_common.py5
2 files changed, 77 insertions, 34 deletions
diff --git a/release/scripts/ui/buttons_particle.py b/release/scripts/ui/buttons_particle.py
index 1a800fc4dfd..81ddab40ec9 100644
--- a/release/scripts/ui/buttons_particle.py
+++ b/release/scripts/ui/buttons_particle.py
@@ -121,17 +121,19 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
layout.enabled = particle_panel_enabled(psys) and not psys.multiple_caches
row = layout.row()
+ row.active = part.distribution != 'GRID'
row.itemR(part, "amount")
- split = layout.split()
-
- col = split.column(align=True)
- col.itemR(part, "start")
- col.itemR(part, "end")
+ if part.type != 'HAIR':
+ split = layout.split()
+
+ col = split.column(align=True)
+ col.itemR(part, "start")
+ col.itemR(part, "end")
- col = split.column(align=True)
- col.itemR(part, "lifetime")
- col.itemR(part, "random_lifetime", slider=True)
+ col = split.column(align=True)
+ col.itemR(part, "lifetime")
+ col.itemR(part, "random_lifetime", slider=True)
layout.row().itemL(text="Emit From:")
@@ -221,7 +223,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
point_cache_ui(self, psys.point_cache, particle_panel_enabled(psys), not psys.hair_dynamics, 0)
-class PARTICLE_PT_initial(ParticleButtonsPanel):
+class PARTICLE_PT_velocity(ParticleButtonsPanel):
__label__ = "Velocity"
def poll(self, context):
@@ -238,48 +240,66 @@ class PARTICLE_PT_initial(ParticleButtonsPanel):
part = psys.settings
layout.enabled = particle_panel_enabled(psys)
-
- layout.row().itemL(text="Direction:")
split = layout.split()
sub = split.column()
+ sub.itemL(text="Emitter Geometry:")
sub.itemR(part, "normal_factor")
+ subsub = sub.column(align=True)
+ subsub.itemR(part, "tangent_factor")
+ subsub.itemR(part, "tangent_phase", slider=True)
+
+ sub = split.column()
+ sub.itemL(text="Emitter Object")
+ sub.itemR(part, "object_aligned_factor", text="")
+
+ layout.row().itemL(text="Other:")
+ split = layout.split()
+ sub = split.column()
if part.emit_from=='PARTICLE':
sub.itemR(part, "particle_factor")
else:
sub.itemR(part, "object_factor", slider=True)
+ sub = split.column()
sub.itemR(part, "random_factor")
- sub.itemR(part, "tangent_factor")
- sub.itemR(part, "tangent_phase", slider=True)
- sub = split.column()
- sub.itemL(text="TODO:")
- sub.itemL(text="Object aligned")
- sub.itemL(text="direction: X, Y, Z")
+ #if part.type=='REACTOR':
+ # sub.itemR(part, "reactor_factor")
+ # sub.itemR(part, "reaction_shape", slider=True)
- if part.type=='REACTOR':
- sub.itemR(part, "reactor_factor")
- sub.itemR(part, "reaction_shape", slider=True)
+class PARTICLE_PT_rotation(ParticleButtonsPanel):
+ __label__ = "Rotation"
+
+ def poll(self, context):
+ if particle_panel_poll(context):
+ psys = context.particle_system
+ return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.external
else:
- sub.itemL(text="")
+ return False
+
+ def draw(self, context):
+ layout = self.layout
+
+ psys = context.particle_system
+ part = psys.settings
- layout.row().itemL(text="Rotation:")
- split = layout.split()
-
- sub = split.column()
+ layout.enabled = particle_panel_enabled(psys)
- sub.itemR(part, "rotation_mode", text="Axis")
+ split = layout.split()
+ split.itemL(text="Initial Rotation:")
+ split.itemR(part, "rotation_dynamic")
split = layout.split()
- sub = split.column()
- sub.itemR(part, "rotation_dynamic")
- sub.itemR(part, "random_rotation_factor", slider=True)
- sub = split.column()
+ sub = split.column(align=True)
+ sub.itemR(part, "rotation_mode", text="")
+ sub.itemR(part, "random_rotation_factor", slider=True, text="Random")
+
+ sub = split.column(align=True)
sub.itemR(part, "phase_factor", slider=True)
sub.itemR(part, "random_phase_factor", text="Random", slider=True)
- layout.row().itemL(text="Angular velocity:")
+ layout.row().itemL(text="Angular Velocity:")
layout.row().itemR(part, "angular_velocity_mode", expand=True)
split = layout.split()
@@ -607,16 +627,37 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
elif part.ren_as == 'OBJECT':
sub.itemR(part, "dupli_object")
+ sub.itemR(part, "use_global_dupli")
elif part.ren_as == 'GROUP':
sub.itemR(part, "dupli_group")
split = layout.split()
sub = split.column()
sub.itemR(part, "whole_group")
+ colsub = sub.column()
+ colsub.active = part.whole_group == False
+ colsub.itemR(part, "use_group_count")
+
sub = split.column()
colsub = sub.column()
colsub.active = part.whole_group == False
+ colsub.itemR(part, "use_global_dupli")
colsub.itemR(part, "rand_group")
+ if part.use_group_count and not part.whole_group:
+ row = layout.row()
+ row.template_list(part, "dupliweights", part, "active_dupliweight_index")
+
+ col = row.column()
+ subrow = col.row()
+ subcol = subrow.column(align=True)
+ subcol.itemO("particle.dupliob_move_up", icon='VICON_MOVE_UP', text="")
+ subcol.itemO("particle.dupliob_move_down", icon='VICON_MOVE_DOWN', text="")
+
+ weight = part.active_dupliweight
+ if weight:
+ row = layout.row()
+ row.itemR(weight, "count")
+
elif part.ren_as == 'BILLBOARD':
sub.itemL(text="Align:")
@@ -898,7 +939,8 @@ bpy.types.register(PARTICLE_PT_particles)
bpy.types.register(PARTICLE_PT_hair_dynamics)
bpy.types.register(PARTICLE_PT_cache)
bpy.types.register(PARTICLE_PT_emission)
-bpy.types.register(PARTICLE_PT_initial)
+bpy.types.register(PARTICLE_PT_velocity)
+bpy.types.register(PARTICLE_PT_rotation)
bpy.types.register(PARTICLE_PT_physics)
bpy.types.register(PARTICLE_PT_boidbrain)
bpy.types.register(PARTICLE_PT_render)
diff --git a/release/scripts/ui/buttons_physics_common.py b/release/scripts/ui/buttons_physics_common.py
index b65d092fcfa..17ac1b2bbaa 100644
--- a/release/scripts/ui/buttons_physics_common.py
+++ b/release/scripts/ui/buttons_physics_common.py
@@ -78,7 +78,7 @@ def effector_weights_ui(self, weights):
layout.itemS()
flow = layout.column_flow()
- flow.itemR(weights, "spherical", slider=True)
+ flow.itemR(weights, "force", slider=True)
flow.itemR(weights, "vortex", slider=True)
flow.itemR(weights, "magnetic", slider=True)
flow.itemR(weights, "wind", slider=True)
@@ -110,7 +110,7 @@ def basic_force_field_settings_ui(self, field):
col.itemR(field, "flow")
elif field.type == 'HARMONIC':
col.itemR(field, "harmonic_damping", text="Damping")
- elif field.type == 'VORTEX' and field.shape == 'PLANE':
+ elif field.type == 'VORTEX' and field.shape != 'POINT':
col.itemR(field, "inflow")
elif field.type == 'DRAG':
col.itemR(field, "quadratic_drag", text="Quadratic")
@@ -140,6 +140,7 @@ def basic_force_field_falloff_ui(self, field):
col.itemR(field, "z_direction", text="")
col.itemR(field, "use_min_distance", text="Use Minimum")
col.itemR(field, "use_max_distance", text="Use Maximum")
+ col.itemR(field, "do_absorption")
col = split.column()
col.itemR(field, "falloff_power", text="Power")