1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 # ##### END GPL LICENSE BLOCK #####
22 from properties_physics_common import point_cache_ui
23 from properties_physics_common import effector_weights_ui
24 from properties_physics_common import basic_force_field_settings_ui
25 from properties_physics_common import basic_force_field_falloff_ui
28 def particle_panel_enabled(context, psys):
29 return psys.point_cache.baked == False and psys.edited == False and (not context.particle_system_editable)
32 def particle_panel_poll(context):
33 psys = context.particle_system
36 if psys.settings == None:
38 return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR')
41 class ParticleButtonsPanel(bpy.types.Panel):
42 bl_space_type = 'PROPERTIES'
43 bl_region_type = 'WINDOW'
44 bl_context = "particle"
46 def poll(self, context):
47 return particle_panel_poll(context)
50 class PARTICLE_PT_particles(ParticleButtonsPanel):
52 bl_show_header = False
54 def poll(self, context):
55 return (context.particle_system or context.object)
57 def draw(self, context):
61 psys = context.particle_system
66 row.template_list(ob, "particle_systems", ob, "active_particle_system_index", rows=2)
68 col = row.column(align=True)
69 col.itemO("object.particle_system_add", icon='ICON_ZOOMIN', text="")
70 col.itemO("object.particle_system_remove", icon='ICON_ZOOMOUT', text="")
72 if psys and not psys.settings:
73 split = layout.split(percentage=0.32)
76 col.itemL(text="Name:")
77 col.itemL(text="Settings:")
80 col.itemR(psys, "name", text="")
81 col.template_ID(psys, "settings", new="particle.new")
85 split = layout.split(percentage=0.32)
87 col.itemL(text="Name:")
88 if part.type in ('EMITTER', 'REACTOR', 'HAIR'):
89 col.itemL(text="Settings:")
90 col.itemL(text="Type:")
93 col.itemR(psys, "name", text="")
94 if part.type in ('EMITTER', 'REACTOR', 'HAIR'):
95 col.template_ID(psys, "settings", new="particle.new")
98 #row.itemL(text="Viewport")
99 #row.itemL(text="Render")
102 if part.type not in ('EMITTER', 'REACTOR', 'HAIR'):
103 layout.itemL(text="No settings for fluid particles")
107 row.enabled = particle_panel_enabled(context, psys)
108 row.itemR(part, "type", text="")
109 row.itemR(psys, "seed")
111 split = layout.split(percentage=0.65)
112 if part.type == 'HAIR':
113 if psys.edited == True:
114 split.itemO("particle.edited_clear", text="Free Edit")
118 row.enabled = particle_panel_enabled(context, psys)
119 row.itemR(part, "hair_step")
120 if psys.edited == True:
122 layout.itemO("particle.connect_hair")
123 layout.itemL(text="Hair is disconnected.")
125 layout.itemO("particle.disconnect_hair")
126 layout.itemL(text="")
127 elif part.type == 'REACTOR':
128 split.enabled = particle_panel_enabled(context, psys)
129 split.itemR(psys, "reactor_target_object")
130 split.itemR(psys, "reactor_target_particle_system", text="Particle System")
133 class PARTICLE_PT_emission(ParticleButtonsPanel):
134 bl_label = "Emission"
136 def poll(self, context):
137 if particle_panel_poll(context):
138 return not context.particle_system.point_cache.external
142 def draw(self, context):
145 psys = context.particle_system
148 layout.enabled = particle_panel_enabled(context, psys) and not psys.multiple_caches
151 row.active = part.distribution != 'GRID'
152 row.itemR(part, "amount")
154 if part.type != 'HAIR':
155 split = layout.split()
157 col = split.column(align=True)
158 col.itemR(part, "start")
159 col.itemR(part, "end")
161 col = split.column(align=True)
162 col.itemR(part, "lifetime")
163 col.itemR(part, "random_lifetime", slider=True)
165 layout.row().itemL(text="Emit From:")
168 row.itemR(part, "emit_from", expand=True)
170 row.itemR(part, "trand")
171 if part.distribution != 'GRID':
172 row.itemR(part, "even_distribution")
174 if part.emit_from == 'FACE' or part.emit_from == 'VOLUME':
176 row.itemR(part, "distribution", expand=True)
180 if part.distribution == 'JIT':
181 row.itemR(part, "userjit", text="Particles/Face")
182 row.itemR(part, "jitter_factor", text="Jittering Amount", slider=True)
183 elif part.distribution == 'GRID':
184 row.itemR(part, "grid_resolution")
187 class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
188 bl_label = "Hair dynamics"
189 bl_default_closed = True
191 def poll(self, context):
192 psys = context.particle_system
195 if psys.settings == None:
197 return psys.settings.type == 'HAIR'
199 def draw_header(self, context):
200 #cloth = context.cloth.collision_settings
202 #self.layout.active = cloth_panel_enabled(context.cloth)
203 #self.layout.itemR(cloth, "enable_collision", text="")
204 psys = context.particle_system
205 self.layout.itemR(psys, "hair_dynamics", text="")
207 def draw(self, context):
210 psys = context.particle_system
212 cloth = psys.cloth.settings
214 layout.enabled = psys.hair_dynamics
216 split = layout.split()
219 col.itemL(text="Material:")
220 sub = col.column(align=True)
221 sub.itemR(cloth, "pin_stiffness", text="Stiffness")
222 sub.itemR(cloth, "mass")
223 sub.itemR(cloth, "bending_stiffness", text="Bending")
224 sub.itemR(cloth, "internal_friction", slider="True")
228 col.itemL(text="Damping:")
229 sub = col.column(align=True)
230 sub.itemR(cloth, "spring_damping", text="Spring")
231 sub.itemR(cloth, "air_damping", text="Air")
233 col.itemL(text="Quality:")
234 col.itemR(cloth, "quality", text="Steps", slider=True)
237 class PARTICLE_PT_cache(ParticleButtonsPanel):
239 bl_default_closed = True
241 def poll(self, context):
242 psys = context.particle_system
245 if psys.settings == None:
247 phystype = psys.settings.physics_type
248 if phystype == 'NO' or phystype == 'KEYED':
250 return psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and psys.hair_dynamics)
252 def draw(self, context):
255 psys = context.particle_system
257 point_cache_ui(self, psys.point_cache, particle_panel_enabled(context, psys), not psys.hair_dynamics, 0)
260 class PARTICLE_PT_velocity(ParticleButtonsPanel):
261 bl_label = "Velocity"
263 def poll(self, context):
264 if particle_panel_poll(context):
265 psys = context.particle_system
266 return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.external
270 def draw(self, context):
273 psys = context.particle_system
276 layout.enabled = particle_panel_enabled(context, psys)
278 split = layout.split()
281 sub.itemL(text="Emitter Geometry:")
282 sub.itemR(part, "normal_factor")
283 subsub = sub.column(align=True)
284 subsub.itemR(part, "tangent_factor")
285 subsub.itemR(part, "tangent_phase", slider=True)
288 sub.itemL(text="Emitter Object")
289 sub.itemR(part, "object_aligned_factor", text="")
291 layout.row().itemL(text="Other:")
292 split = layout.split()
294 if part.emit_from == 'PARTICLE':
295 sub.itemR(part, "particle_factor")
297 sub.itemR(part, "object_factor", slider=True)
299 sub.itemR(part, "random_factor")
301 #if part.type=='REACTOR':
302 # sub.itemR(part, "reactor_factor")
303 # sub.itemR(part, "reaction_shape", slider=True)
306 class PARTICLE_PT_rotation(ParticleButtonsPanel):
307 bl_label = "Rotation"
309 def poll(self, context):
310 if particle_panel_poll(context):
311 psys = context.particle_system
312 return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.external
316 def draw(self, context):
319 psys = context.particle_system
322 layout.enabled = particle_panel_enabled(context, psys)
324 split = layout.split()
325 split.itemL(text="Initial Rotation:")
326 split.itemR(part, "rotation_dynamic")
327 split = layout.split()
329 sub = split.column(align=True)
330 sub.itemR(part, "rotation_mode", text="")
331 sub.itemR(part, "random_rotation_factor", slider=True, text="Random")
333 sub = split.column(align=True)
334 sub.itemR(part, "phase_factor", slider=True)
335 sub.itemR(part, "random_phase_factor", text="Random", slider=True)
337 layout.row().itemL(text="Angular Velocity:")
338 layout.row().itemR(part, "angular_velocity_mode", expand=True)
339 split = layout.split()
343 sub.itemR(part, "angular_velocity_factor", text="")
346 class PARTICLE_PT_physics(ParticleButtonsPanel):
349 def poll(self, context):
350 if particle_panel_poll(context):
351 return not context.particle_system.point_cache.external
355 def draw(self, context):
358 psys = context.particle_system
361 layout.enabled = particle_panel_enabled(context, psys)
364 row.itemR(part, "physics_type", expand=True)
365 if part.physics_type != 'NO':
367 col = row.column(align=True)
368 col.itemR(part, "particle_size")
369 col.itemR(part, "random_size", slider=True)
370 col = row.column(align=True)
371 col.itemR(part, "mass")
372 col.itemR(part, "sizemass", text="Multiply mass with size")
374 if part.physics_type == 'NEWTON':
375 split = layout.split()
378 sub.itemL(text="Forces:")
379 sub.itemR(part, "brownian_factor")
380 sub.itemR(part, "drag_factor", slider=True)
381 sub.itemR(part, "damp_factor", slider=True)
383 sub.itemR(part, "size_deflect")
384 sub.itemR(part, "die_on_collision")
385 sub.itemR(part, "integrator")
386 sub.itemR(part, "time_tweak")
388 elif part.physics_type == 'KEYED':
389 split = layout.split()
394 col.active = not psys.keyed_timing
395 col.itemR(part, "keyed_loops", text="Loops")
396 row.itemR(psys, "keyed_timing", text="Use Timing")
398 layout.itemL(text="Keys:")
399 elif part.physics_type == 'BOIDS':
404 row.itemR(boids, "allow_flight")
405 row.itemR(boids, "allow_land")
406 row.itemR(boids, "allow_climb")
408 split = layout.split()
411 col = sub.column(align=True)
412 col.active = boids.allow_flight
413 col.itemR(boids, "air_max_speed")
414 col.itemR(boids, "air_min_speed", slider="True")
415 col.itemR(boids, "air_max_acc", slider="True")
416 col.itemR(boids, "air_max_ave", slider="True")
417 col.itemR(boids, "air_personal_space")
419 row.active = (boids.allow_land or boids.allow_climb) and boids.allow_flight
420 row.itemR(boids, "landing_smoothness")
423 col = sub.column(align=True)
424 col.active = boids.allow_land or boids.allow_climb
425 col.itemR(boids, "land_max_speed")
426 col.itemR(boids, "land_jump_speed")
427 col.itemR(boids, "land_max_acc", slider="True")
428 col.itemR(boids, "land_max_ave", slider="True")
429 col.itemR(boids, "land_personal_space")
430 col.itemR(boids, "land_stick_force")
434 col = row.column(align=True)
435 col.itemL(text="Battle:")
436 col.itemR(boids, "health")
437 col.itemR(boids, "strength")
438 col.itemR(boids, "aggression")
439 col.itemR(boids, "accuracy")
440 col.itemR(boids, "range")
443 col.itemL(text="Misc:")
444 col.itemR(boids, "banking", slider=True)
445 col.itemR(boids, "height", slider=True)
447 if part.physics_type == 'KEYED' or part.physics_type == 'BOIDS':
448 if part.physics_type == 'BOIDS':
449 layout.itemL(text="Relations:")
452 row.template_list(psys, "targets", psys, "active_particle_target_index")
456 subsub = sub.column(align=True)
457 subsub.itemO("particle.new_target", icon='ICON_ZOOMIN', text="")
458 subsub.itemO("particle.remove_target", icon='ICON_ZOOMOUT', text="")
460 subsub = sub.column(align=True)
461 subsub.itemO("particle.target_move_up", icon='VICON_MOVE_UP', text="")
462 subsub.itemO("particle.target_move_down", icon='VICON_MOVE_DOWN', text="")
464 key = psys.active_particle_target
467 if part.physics_type == 'KEYED':
470 #col.red_alert = key.valid
471 col.itemR(key, "object", text="")
472 col.itemR(key, "system", text="System")
474 col.active = psys.keyed_timing
475 col.itemR(key, "time")
476 col.itemR(key, "duration")
480 #subrow.red_alert = key.valid
481 sub.itemR(key, "object", text="")
482 sub.itemR(key, "system", text="System")
484 layout.itemR(key, "mode", expand=True)
487 class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
488 bl_label = "Boid Brain"
490 def poll(self, context):
491 psys = context.particle_system
494 if psys.settings == None:
496 if psys.point_cache.external:
498 return psys.settings.physics_type == 'BOIDS'
500 def draw(self, context):
503 boids = context.particle_system.settings.boids
505 layout.enabled = particle_panel_enabled(context, context.particle_system)
507 # Currently boids can only use the first state so these are commented out for now.
509 #row.template_list(boids, "states", boids, "active_boid_state_index", compact="True")
511 #subrow = col.row(align=True)
512 #subrow.itemO("boid.state_add", icon='ICON_ZOOMIN', text="")
513 #subrow.itemO("boid.state_del", icon='ICON_ZOOMOUT', text="")
514 #subrow = row.row(align=True)
515 #subrow.itemO("boid.state_move_up", icon='VICON_MOVE_UP', text="")
516 #subrow.itemO("boid.state_move_down", icon='VICON_MOVE_DOWN', text="")
518 state = boids.active_boid_state
520 #layout.itemR(state, "name", text="State name")
523 row.itemR(state, "ruleset_type")
524 if state.ruleset_type == 'FUZZY':
525 row.itemR(state, "rule_fuzziness", slider=True)
530 row.template_list(state, "rules", state, "active_boid_rule_index")
534 subsub = sub.column(align=True)
535 subsub.item_menu_enumO("boid.rule_add", "type", icon='ICON_ZOOMIN', text="")
536 subsub.itemO("boid.rule_del", icon='ICON_ZOOMOUT', text="")
538 subcol = sub.column(align=True)
539 subsub.itemO("boid.rule_move_up", icon='VICON_MOVE_UP', text="")
540 subsub.itemO("boid.rule_move_down", icon='VICON_MOVE_DOWN', text="")
542 rule = state.active_boid_rule
546 row.itemR(rule, "name", text="")
547 #somebody make nice icons for boids here please! -jahka
548 row.itemR(rule, "in_air", icon='VICON_MOVE_UP', text="")
549 row.itemR(rule, "on_land", icon='VICON_MOVE_DOWN', text="")
553 if rule.type == 'GOAL':
554 row.itemR(rule, "object")
556 row.itemR(rule, "predict")
557 elif rule.type == 'AVOID':
558 row.itemR(rule, "object")
560 row.itemR(rule, "predict")
561 row.itemR(rule, "fear_factor")
562 elif rule.type == 'FOLLOW_PATH':
563 row.itemL(text="Not yet functional.")
564 elif rule.type == 'AVOID_COLLISION':
565 row.itemR(rule, "boids")
566 row.itemR(rule, "deflectors")
567 row.itemR(rule, "look_ahead")
568 elif rule.type == 'FOLLOW_LEADER':
569 row.itemR(rule, "object", text="")
570 row.itemR(rule, "distance")
572 row.itemR(rule, "line")
574 subrow.active = rule.line
575 subrow.itemR(rule, "queue_size")
576 elif rule.type == 'AVERAGE_SPEED':
577 row.itemR(rule, "speed", slider=True)
578 row.itemR(rule, "wander", slider=True)
579 row.itemR(rule, "level", slider=True)
580 elif rule.type == 'FIGHT':
581 row.itemR(rule, "distance")
582 row.itemR(rule, "flee_distance")
585 class PARTICLE_PT_render(ParticleButtonsPanel):
588 def poll(self, context):
589 psys = context.particle_system
592 if psys.settings == None:
596 def draw(self, context):
599 psys = context.particle_system
603 row.itemR(part, "material")
604 row.itemR(psys, "parent")
606 split = layout.split()
609 sub.itemR(part, "emitter")
610 sub.itemR(part, "parent")
612 sub.itemR(part, "unborn")
613 sub.itemR(part, "died")
616 row.itemR(part, "ren_as", expand=True)
618 split = layout.split()
622 if part.ren_as == 'LINE':
623 sub.itemR(part, "line_length_tail")
624 sub.itemR(part, "line_length_head")
626 sub.itemR(part, "velocity_length")
627 elif part.ren_as == 'PATH':
629 if part.type != 'HAIR' and part.physics_type != 'KEYED' and psys.point_cache.baked == False:
631 box.itemL(text="Baked or keyed particles needed for correct rendering.")
634 sub.itemR(part, "render_strand")
635 subsub = sub.column()
636 subsub.active = part.render_strand == False
637 subsub.itemR(part, "render_adaptive")
638 subsub = sub.column()
639 subsub.active = part.render_adaptive or part.render_strand == True
640 subsub.itemR(part, "adaptive_angle")
641 subsub = sub.column()
642 subsub.active = part.render_adaptive == True and part.render_strand == False
643 subsub.itemR(part, "adaptive_pix")
644 sub.itemR(part, "hair_bspline")
645 sub.itemR(part, "render_step", text="Steps")
648 sub.itemL(text="Timing:")
649 sub.itemR(part, "abs_path_time")
650 sub.itemR(part, "path_start", text="Start", slider=not part.abs_path_time)
651 sub.itemR(part, "path_end", text="End", slider=not part.abs_path_time)
652 sub.itemR(part, "random_length", text="Random", slider=True)
657 if part.type == 'HAIR' and part.render_strand == True and part.child_type == 'FACES':
658 layout.itemR(part, "enable_simplify")
659 if part.enable_simplify == True:
661 row.itemR(part, "simplify_refsize")
662 row.itemR(part, "simplify_rate")
663 row.itemR(part, "simplify_transition")
665 row.itemR(part, "viewport")
667 sub.active = part.viewport == True
668 sub.itemR(part, "simplify_viewport")
670 elif part.ren_as == 'OBJECT':
671 sub.itemR(part, "dupli_object")
672 sub.itemR(part, "use_global_dupli")
673 elif part.ren_as == 'GROUP':
674 sub.itemR(part, "dupli_group")
675 split = layout.split()
677 sub.itemR(part, "whole_group")
678 subsub = sub.column()
679 subsub.active = part.whole_group == False
680 subsub.itemR(part, "use_group_count")
683 subsub = sub.column()
684 subsub.active = part.whole_group == False
685 subsub.itemR(part, "use_global_dupli")
686 subsub.itemR(part, "rand_group")
688 if part.use_group_count and not part.whole_group:
690 row.template_list(part, "dupliweights", part, "active_dupliweight_index")
694 subsub = sub.column(align=True)
695 subsub.itemO("particle.dupliob_copy", icon='ICON_ZOOMIN', text="")
696 subsub.itemO("particle.dupliob_remove", icon='ICON_ZOOMOUT', text="")
697 subsub.itemO("particle.dupliob_move_up", icon='VICON_MOVE_UP', text="")
698 subsub.itemO("particle.dupliob_move_down", icon='VICON_MOVE_DOWN', text="")
700 weight = part.active_dupliweight
703 row.itemR(weight, "count")
705 elif part.ren_as == 'BILLBOARD':
706 sub.itemL(text="Align:")
709 row.itemR(part, "billboard_align", expand=True)
710 row.itemR(part, "billboard_lock", text="Lock")
712 row.itemR(part, "billboard_object")
715 col = row.column(align=True)
716 col.itemL(text="Tilt:")
717 col.itemR(part, "billboard_tilt", text="Angle", slider=True)
718 col.itemR(part, "billboard_random_tilt", slider=True)
720 col.itemR(part, "billboard_offset")
723 row.itemR(psys, "billboard_normal_uv")
725 row.itemR(psys, "billboard_time_index_uv")
728 row.itemL(text="Split uv's:")
729 row.itemR(part, "billboard_uv_split", text="Number of splits")
731 row.itemR(psys, "billboard_split_uv")
733 row.itemL(text="Animate:")
734 row.itemR(part, "billboard_animation", expand=True)
735 row.itemL(text="Offset:")
736 row.itemR(part, "billboard_split_offset", expand=True)
738 if part.ren_as == 'HALO' or part.ren_as == 'LINE' or part.ren_as == 'BILLBOARD':
741 col.itemR(part, "trail_count")
742 if part.trail_count > 1:
743 col.itemR(part, "abs_path_time", text="Length in frames")
745 col.itemR(part, "path_end", text="Length", slider=not part.abs_path_time)
746 col.itemR(part, "random_length", text="Random", slider=True)
752 class PARTICLE_PT_draw(ParticleButtonsPanel):
754 bl_default_closed = True
756 def poll(self, context):
757 psys = context.particle_system
760 if psys.settings == None:
764 def draw(self, context):
767 psys = context.particle_system
771 row.itemR(part, "draw_as", expand=True)
773 if part.draw_as == 'NONE' or (part.ren_as == 'NONE' and part.draw_as == 'RENDER'):
776 path = (part.ren_as == 'PATH' and part.draw_as == 'RENDER') or part.draw_as == 'PATH'
778 if path and part.type != 'HAIR' and part.physics_type != 'KEYED' and psys.point_cache.baked == False:
780 box.itemL(text="Baked or keyed particles needed for correct drawing.")
784 row.itemR(part, "display", slider=True)
785 if part.draw_as != 'RENDER' or part.ren_as == 'HALO':
786 row.itemR(part, "draw_size")
792 col.itemR(part, "show_size")
793 col.itemR(part, "velocity")
794 col.itemR(part, "num")
795 if part.physics_type == 'BOIDS':
796 col.itemR(part, "draw_health")
799 col.itemR(part, "material_color", text="Use material color")
802 col.itemR(part, "draw_step")
805 sub.active = part.material_color == False
806 #sub.itemL(text="color")
807 #sub.itemL(text="Override material color")
810 class PARTICLE_PT_children(ParticleButtonsPanel):
811 bl_label = "Children"
812 bl_default_closed = True
814 def draw(self, context):
817 psys = context.particle_system
820 layout.row().itemR(part, "child_type", expand=True)
822 if part.child_type == 'NONE':
827 col = row.column(align=True)
828 col.itemR(part, "child_nbr", text="Display")
829 col.itemR(part, "rendered_child_nbr", text="Render")
831 col = row.column(align=True)
833 if part.child_type == 'FACES':
834 col.itemR(part, "virtual_parents", slider=True)
836 col.itemR(part, "child_radius", text="Radius")
837 col.itemR(part, "child_roundness", text="Roundness", slider=True)
839 col = row.column(align=True)
840 col.itemR(part, "child_size", text="Size")
841 col.itemR(part, "child_random_size", text="Random")
843 layout.row().itemL(text="Effects:")
847 col = row.column(align=True)
848 col.itemR(part, "clump_factor", slider=True)
849 col.itemR(part, "clumppow", slider=True)
851 col = row.column(align=True)
852 col.itemR(part, "rough_endpoint")
853 col.itemR(part, "rough_end_shape")
857 col = row.column(align=True)
858 col.itemR(part, "rough1")
859 col.itemR(part, "rough1_size")
861 col = row.column(align=True)
862 col.itemR(part, "rough2")
863 col.itemR(part, "rough2_size")
864 col.itemR(part, "rough2_thres", slider=True)
867 col = row.column(align=True)
868 col.itemR(part, "child_length", slider=True)
869 col.itemR(part, "child_length_thres", slider=True)
871 col = row.column(align=True)
872 col.itemL(text="Space reserved for")
873 col.itemL(text="hair parting controls")
875 layout.row().itemL(text="Kink:")
876 layout.row().itemR(part, "kink", expand=True)
878 split = layout.split()
881 col.itemR(part, "kink_amplitude")
882 col.itemR(part, "kink_frequency")
884 col.itemR(part, "kink_shape", slider=True)
887 class PARTICLE_PT_field_weights(ParticleButtonsPanel):
888 bl_label = "Field Weights"
889 bl_default_closed = True
891 def draw(self, context):
892 part = context.particle_system.settings
893 effector_weights_ui(self, part.effector_weights)
895 if part.type == 'HAIR':
896 self.layout.itemR(part.effector_weights, "do_growing_hair")
899 class PARTICLE_PT_force_fields(ParticleButtonsPanel):
900 bl_label = "Force Field Settings"
901 bl_default_closed = True
903 def draw(self, context):
906 part = context.particle_system.settings
908 layout.itemR(part, "self_effect")
910 split = layout.split(percentage=0.2)
911 split.itemL(text="Type 1:")
912 split.itemR(part.force_field_1, "type", text="")
913 basic_force_field_settings_ui(self, part.force_field_1)
914 basic_force_field_falloff_ui(self, part.force_field_1)
916 if part.force_field_1.type != 'NONE':
917 layout.itemL(text="")
919 split = layout.split(percentage=0.2)
920 split.itemL(text="Type 2:")
921 split.itemR(part.force_field_2, "type", text="")
922 basic_force_field_settings_ui(self, part.force_field_2)
923 basic_force_field_falloff_ui(self, part.force_field_2)
926 class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
927 bl_label = "Vertexgroups"
928 bl_default_closed = True
930 def draw(self, context):
933 psys = context.particle_system
936 layout.itemL(text="Nothing here yet.")
939 #row.itemL(text="Vertex Group")
940 #row.itemL(text="Negate")
944 #row.itemR(psys, "vertex_group_density")
945 #row.itemR(psys, "vertex_group_density_negate", text="")
948 #row.itemR(psys, "vertex_group_velocity")
949 #row.itemR(psys, "vertex_group_velocity_negate", text="")
952 #row.itemR(psys, "vertex_group_length")
953 #row.itemR(psys, "vertex_group_length_negate", text="")
956 #row.itemR(psys, "vertex_group_clump")
957 #row.itemR(psys, "vertex_group_clump_negate", text="")
960 #row.itemR(psys, "vertex_group_kink")
961 #row.itemR(psys, "vertex_group_kink_negate", text="")
964 #row.itemR(psys, "vertex_group_roughness1")
965 #row.itemR(psys, "vertex_group_roughness1_negate", text="")
968 #row.itemR(psys, "vertex_group_roughness2")
969 #row.itemR(psys, "vertex_group_roughness2_negate", text="")
972 #row.itemR(psys, "vertex_group_roughness_end")
973 #row.itemR(psys, "vertex_group_roughness_end_negate", text="")
976 #row.itemR(psys, "vertex_group_size")
977 #row.itemR(psys, "vertex_group_size_negate", text="")
980 #row.itemR(psys, "vertex_group_tangent")
981 #row.itemR(psys, "vertex_group_tangent_negate", text="")
984 #row.itemR(psys, "vertex_group_rotation")
985 #row.itemR(psys, "vertex_group_rotation_negate", text="")
988 #row.itemR(psys, "vertex_group_field")
989 #row.itemR(psys, "vertex_group_field_negate", text="")
991 bpy.types.register(PARTICLE_PT_particles)
992 bpy.types.register(PARTICLE_PT_hair_dynamics)
993 bpy.types.register(PARTICLE_PT_cache)
994 bpy.types.register(PARTICLE_PT_emission)
995 bpy.types.register(PARTICLE_PT_velocity)
996 bpy.types.register(PARTICLE_PT_rotation)
997 bpy.types.register(PARTICLE_PT_physics)
998 bpy.types.register(PARTICLE_PT_boidbrain)
999 bpy.types.register(PARTICLE_PT_render)
1000 bpy.types.register(PARTICLE_PT_draw)
1001 bpy.types.register(PARTICLE_PT_children)
1002 bpy.types.register(PARTICLE_PT_field_weights)
1003 bpy.types.register(PARTICLE_PT_force_fields)
1004 bpy.types.register(PARTICLE_PT_vertexgroups)