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 is False) and (not psys.edited) and (not context.particle_system_editable)
32 def particle_panel_poll(context):
33 psys = context.particle_system
36 if psys.settings is 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.operator("object.particle_system_add", icon='ICON_ZOOMIN', text="")
70 col.operator("object.particle_system_remove", icon='ICON_ZOOMOUT', text="")
72 if psys and not psys.settings:
73 split = layout.split(percentage=0.32)
76 col.label(text="Name:")
77 col.label(text="Settings:")
80 col.prop(psys, "name", text="")
81 col.template_ID(psys, "settings", new="particle.new")
85 split = layout.split(percentage=0.32)
87 col.label(text="Name:")
88 if part.type in ('EMITTER', 'REACTOR', 'HAIR'):
89 col.label(text="Settings:")
90 col.label(text="Type:")
93 col.prop(psys, "name", text="")
94 if part.type in ('EMITTER', 'REACTOR', 'HAIR'):
95 col.template_ID(psys, "settings", new="particle.new")
98 #row.label(text="Viewport")
99 #row.label(text="Render")
102 if part.type not in ('EMITTER', 'REACTOR', 'HAIR'):
103 layout.label(text="No settings for fluid particles")
107 row.enabled = particle_panel_enabled(context, psys)
108 row.prop(part, "type", text="")
109 row.prop(psys, "seed")
111 split = layout.split(percentage=0.65)
112 if part.type == 'HAIR':
114 split.operator("particle.edited_clear", text="Free Edit")
118 row.enabled = particle_panel_enabled(context, psys)
119 row.prop(part, "hair_step")
122 layout.operator("particle.connect_hair")
123 layout.label(text="Hair is disconnected.")
125 layout.operator("particle.disconnect_hair")
126 layout.label(text="")
127 elif part.type == 'REACTOR':
128 split.enabled = particle_panel_enabled(context, psys)
129 split.prop(psys, "reactor_target_object")
130 split.prop(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.prop(part, "amount")
154 if part.type != 'HAIR':
155 split = layout.split()
157 col = split.column(align=True)
158 col.prop(part, "start")
159 col.prop(part, "end")
161 col = split.column(align=True)
162 col.prop(part, "lifetime")
163 col.prop(part, "random_lifetime", slider=True)
165 layout.row().label(text="Emit From:")
168 row.prop(part, "emit_from", expand=True)
170 row.prop(part, "trand")
171 if part.distribution != 'GRID':
172 row.prop(part, "even_distribution")
174 if part.emit_from == 'FACE' or part.emit_from == 'VOLUME':
176 row.prop(part, "distribution", expand=True)
180 if part.distribution == 'JIT':
181 row.prop(part, "userjit", text="Particles/Face")
182 row.prop(part, "jitter_factor", text="Jittering Amount", slider=True)
183 elif part.distribution == 'GRID':
184 row.prop(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 is 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.prop(cloth, "enable_collision", text="")
204 psys = context.particle_system
205 self.layout.prop(psys, "hair_dynamics", text="")
207 def draw(self, context):
210 psys = context.particle_system
211 #part = psys.settings
212 cloth = psys.cloth.settings
214 layout.enabled = psys.hair_dynamics
216 split = layout.split()
219 col.label(text="Material:")
220 sub = col.column(align=True)
221 sub.prop(cloth, "pin_stiffness", text="Stiffness")
222 sub.prop(cloth, "mass")
223 sub.prop(cloth, "bending_stiffness", text="Bending")
224 sub.prop(cloth, "internal_friction", slider=True)
228 col.label(text="Damping:")
229 sub = col.column(align=True)
230 sub.prop(cloth, "spring_damping", text="Spring")
231 sub.prop(cloth, "air_damping", text="Air")
233 col.label(text="Quality:")
234 col.prop(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 is 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):
254 psys = context.particle_system
256 point_cache_ui(self, context, psys.point_cache, particle_panel_enabled(context, psys), not psys.hair_dynamics, 0)
259 class PARTICLE_PT_velocity(ParticleButtonsPanel):
260 bl_label = "Velocity"
262 def poll(self, context):
263 if particle_panel_poll(context):
264 psys = context.particle_system
265 return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.external
269 def draw(self, context):
272 psys = context.particle_system
275 layout.enabled = particle_panel_enabled(context, psys)
277 split = layout.split()
280 sub.label(text="Emitter Geometry:")
281 sub.prop(part, "normal_factor")
282 subsub = sub.column(align=True)
283 subsub.prop(part, "tangent_factor")
284 subsub.prop(part, "tangent_phase", slider=True)
287 sub.label(text="Emitter Object")
288 sub.prop(part, "object_aligned_factor", text="")
290 layout.row().label(text="Other:")
291 split = layout.split()
293 if part.emit_from == 'PARTICLE':
294 sub.prop(part, "particle_factor")
296 sub.prop(part, "object_factor", slider=True)
298 sub.prop(part, "random_factor")
300 #if part.type=='REACTOR':
301 # sub.prop(part, "reactor_factor")
302 # sub.prop(part, "reaction_shape", slider=True)
305 class PARTICLE_PT_rotation(ParticleButtonsPanel):
306 bl_label = "Rotation"
308 def poll(self, context):
309 if particle_panel_poll(context):
310 psys = context.particle_system
311 return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.external
315 def draw(self, context):
318 psys = context.particle_system
321 layout.enabled = particle_panel_enabled(context, psys)
323 split = layout.split()
324 split.label(text="Initial Rotation:")
325 split.prop(part, "rotation_dynamic")
326 split = layout.split()
328 sub = split.column(align=True)
329 sub.prop(part, "rotation_mode", text="")
330 sub.prop(part, "random_rotation_factor", slider=True, text="Random")
332 sub = split.column(align=True)
333 sub.prop(part, "phase_factor", slider=True)
334 sub.prop(part, "random_phase_factor", text="Random", slider=True)
336 layout.row().label(text="Angular Velocity:")
337 layout.row().prop(part, "angular_velocity_mode", expand=True)
338 split = layout.split()
342 sub.prop(part, "angular_velocity_factor", text="")
345 class PARTICLE_PT_physics(ParticleButtonsPanel):
348 def poll(self, context):
349 if particle_panel_poll(context):
350 return not context.particle_system.point_cache.external
354 def draw(self, context):
357 psys = context.particle_system
360 layout.enabled = particle_panel_enabled(context, psys)
363 row.prop(part, "physics_type", expand=True)
364 if part.physics_type != 'NO':
366 col = row.column(align=True)
367 col.prop(part, "particle_size")
368 col.prop(part, "random_size", slider=True)
369 col = row.column(align=True)
370 col.prop(part, "mass")
371 col.prop(part, "sizemass", text="Multiply mass with size")
373 if part.physics_type == 'NEWTON':
374 split = layout.split()
377 sub.label(text="Forces:")
378 sub.prop(part, "brownian_factor")
379 sub.prop(part, "drag_factor", slider=True)
380 sub.prop(part, "damp_factor", slider=True)
382 sub.prop(part, "size_deflect")
383 sub.prop(part, "die_on_collision")
384 sub.prop(part, "integrator")
385 sub.prop(part, "time_tweak")
387 elif part.physics_type == 'KEYED':
388 split = layout.split()
393 col.active = not psys.keyed_timing
394 col.prop(part, "keyed_loops", text="Loops")
395 row.prop(psys, "keyed_timing", text="Use Timing")
397 layout.label(text="Keys:")
398 elif part.physics_type == 'BOIDS':
403 row.prop(boids, "allow_flight")
404 row.prop(boids, "allow_land")
405 row.prop(boids, "allow_climb")
407 split = layout.split()
410 col = sub.column(align=True)
411 col.active = boids.allow_flight
412 col.prop(boids, "air_max_speed")
413 col.prop(boids, "air_min_speed", slider=True)
414 col.prop(boids, "air_max_acc", slider=True)
415 col.prop(boids, "air_max_ave", slider=True)
416 col.prop(boids, "air_personal_space")
418 row.active = (boids.allow_land or boids.allow_climb) and boids.allow_flight
419 row.prop(boids, "landing_smoothness")
422 col = sub.column(align=True)
423 col.active = boids.allow_land or boids.allow_climb
424 col.prop(boids, "land_max_speed")
425 col.prop(boids, "land_jump_speed")
426 col.prop(boids, "land_max_acc", slider=True)
427 col.prop(boids, "land_max_ave", slider=True)
428 col.prop(boids, "land_personal_space")
429 col.prop(boids, "land_stick_force")
433 col = row.column(align=True)
434 col.label(text="Battle:")
435 col.prop(boids, "health")
436 col.prop(boids, "strength")
437 col.prop(boids, "aggression")
438 col.prop(boids, "accuracy")
439 col.prop(boids, "range")
442 col.label(text="Misc:")
443 col.prop(boids, "banking", slider=True)
444 col.prop(boids, "height", slider=True)
446 if part.physics_type == 'KEYED' or part.physics_type == 'BOIDS':
447 if part.physics_type == 'BOIDS':
448 layout.label(text="Relations:")
451 row.template_list(psys, "targets", psys, "active_particle_target_index")
455 subsub = sub.column(align=True)
456 subsub.operator("particle.new_target", icon='ICON_ZOOMIN', text="")
457 subsub.operator("particle.target_remove", icon='ICON_ZOOMOUT', text="")
459 subsub = sub.column(align=True)
460 subsub.operator("particle.target_move_up", icon='VICON_MOVE_UP', text="")
461 subsub.operator("particle.target_move_down", icon='VICON_MOVE_DOWN', text="")
463 key = psys.active_particle_target
466 if part.physics_type == 'KEYED':
469 #col.red_alert = key.valid
470 col.prop(key, "object", text="")
471 col.prop(key, "system", text="System")
473 col.active = psys.keyed_timing
474 col.prop(key, "time")
475 col.prop(key, "duration")
479 #sub.red_alert = key.valid
480 sub.prop(key, "object", text="")
481 sub.prop(key, "system", text="System")
483 layout.prop(key, "mode", expand=True)
486 class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
487 bl_label = "Boid Brain"
489 def poll(self, context):
490 psys = context.particle_system
493 if psys.settings is None:
495 if psys.point_cache.external:
497 return psys.settings.physics_type == 'BOIDS'
499 def draw(self, context):
502 boids = context.particle_system.settings.boids
504 layout.enabled = particle_panel_enabled(context, context.particle_system)
506 # Currently boids can only use the first state so these are commented out for now.
508 #row.template_list(boids, "states", boids, "active_boid_state_index", compact="True")
510 #sub = col.row(align=True)
511 #sub.operator("boid.state_add", icon='ICON_ZOOMIN', text="")
512 #sub.operator("boid.state_del", icon='ICON_ZOOMOUT', text="")
513 #sub = row.row(align=True)
514 #sub.operator("boid.state_move_up", icon='VICON_MOVE_UP', text="")
515 #sub.operator("boid.state_move_down", icon='VICON_MOVE_DOWN', text="")
517 state = boids.active_boid_state
519 #layout.prop(state, "name", text="State name")
522 row.prop(state, "ruleset_type")
523 if state.ruleset_type == 'FUZZY':
524 row.prop(state, "rule_fuzziness", slider=True)
529 row.template_list(state, "rules", state, "active_boid_rule_index")
533 subsub = sub.column(align=True)
534 subsub.operator_menu_enum("boid.rule_add", "type", icon='ICON_ZOOMIN', text="")
535 subsub.operator("boid.rule_del", icon='ICON_ZOOMOUT', text="")
537 subsub = sub.column(align=True)
538 subsub.operator("boid.rule_move_up", icon='VICON_MOVE_UP', text="")
539 subsub.operator("boid.rule_move_down", icon='VICON_MOVE_DOWN', text="")
541 rule = state.active_boid_rule
545 row.prop(rule, "name", text="")
546 #somebody make nice icons for boids here please! -jahka
547 row.prop(rule, "in_air", icon='VICON_MOVE_UP', text="")
548 row.prop(rule, "on_land", icon='VICON_MOVE_DOWN', text="")
552 if rule.type == 'GOAL':
553 row.prop(rule, "object")
555 row.prop(rule, "predict")
556 elif rule.type == 'AVOID':
557 row.prop(rule, "object")
559 row.prop(rule, "predict")
560 row.prop(rule, "fear_factor")
561 elif rule.type == 'FOLLOW_PATH':
562 row.label(text="Not yet functional.")
563 elif rule.type == 'AVOID_COLLISION':
564 row.prop(rule, "boids")
565 row.prop(rule, "deflectors")
566 row.prop(rule, "look_ahead")
567 elif rule.type == 'FOLLOW_LEADER':
568 row.prop(rule, "object", text="")
569 row.prop(rule, "distance")
571 row.prop(rule, "line")
573 sub.active = rule.line
574 sub.prop(rule, "queue_size")
575 elif rule.type == 'AVERAGE_SPEED':
576 row.prop(rule, "speed", slider=True)
577 row.prop(rule, "wander", slider=True)
578 row.prop(rule, "level", slider=True)
579 elif rule.type == 'FIGHT':
580 row.prop(rule, "distance")
581 row.prop(rule, "flee_distance")
584 class PARTICLE_PT_render(ParticleButtonsPanel):
587 def poll(self, context):
588 psys = context.particle_system
591 if psys.settings is None:
595 def draw(self, context):
598 psys = context.particle_system
602 row.prop(part, "material")
603 row.prop(psys, "parent")
605 split = layout.split()
608 sub.prop(part, "emitter")
609 sub.prop(part, "parent")
611 sub.prop(part, "unborn")
612 sub.prop(part, "died")
615 row.prop(part, "ren_as", expand=True)
617 split = layout.split()
621 if part.ren_as == 'LINE':
622 sub.prop(part, "line_length_tail")
623 sub.prop(part, "line_length_head")
625 sub.prop(part, "velocity_length")
626 elif part.ren_as == 'PATH':
628 if part.type != 'HAIR' and part.physics_type != 'KEYED' and (psys.point_cache.baked is False):
630 box.label(text="Baked or keyed particles needed for correct rendering.")
633 sub.prop(part, "render_strand")
634 subsub = sub.column()
635 subsub.active = (part.render_strand is False)
636 subsub.prop(part, "render_adaptive")
637 subsub = sub.column()
638 subsub.active = part.render_adaptive or part.render_strand == True
639 subsub.prop(part, "adaptive_angle")
640 subsub = sub.column()
641 subsub.active = (part.render_adaptive is True and part.render_strand is False)
642 subsub.prop(part, "adaptive_pix")
643 sub.prop(part, "hair_bspline")
644 sub.prop(part, "render_step", text="Steps")
647 sub.label(text="Timing:")
648 sub.prop(part, "abs_path_time")
649 sub.prop(part, "path_start", text="Start", slider=not part.abs_path_time)
650 sub.prop(part, "path_end", text="End", slider=not part.abs_path_time)
651 sub.prop(part, "random_length", text="Random", slider=True)
656 if part.type == 'HAIR' and part.render_strand == True and part.child_type == 'FACES':
657 layout.prop(part, "enable_simplify")
658 if part.enable_simplify == True:
660 row.prop(part, "simplify_refsize")
661 row.prop(part, "simplify_rate")
662 row.prop(part, "simplify_transition")
664 row.prop(part, "viewport")
666 sub.active = part.viewport == True
667 sub.prop(part, "simplify_viewport")
669 elif part.ren_as == 'OBJECT':
670 sub.prop(part, "dupli_object")
671 sub.prop(part, "use_global_dupli")
672 elif part.ren_as == 'GROUP':
673 sub.prop(part, "dupli_group")
674 split = layout.split()
676 sub.prop(part, "whole_group")
677 subsub = sub.column()
678 subsub.active = (part.whole_group is False)
679 subsub.prop(part, "use_group_count")
682 subsub = sub.column()
683 subsub.active = (part.whole_group is False)
684 subsub.prop(part, "use_global_dupli")
685 subsub.prop(part, "rand_group")
687 if part.use_group_count and not part.whole_group:
689 row.template_list(part, "dupliweights", part, "active_dupliweight_index")
693 subsub = sub.column(align=True)
694 subsub.operator("particle.dupliob_copy", icon='ICON_ZOOMIN', text="")
695 subsub.operator("particle.dupliob_remove", icon='ICON_ZOOMOUT', text="")
696 subsub.operator("particle.dupliob_move_up", icon='VICON_MOVE_UP', text="")
697 subsub.operator("particle.dupliob_move_down", icon='VICON_MOVE_DOWN', text="")
699 weight = part.active_dupliweight
702 row.prop(weight, "count")
704 elif part.ren_as == 'BILLBOARD':
705 sub.label(text="Align:")
708 row.prop(part, "billboard_align", expand=True)
709 row.prop(part, "billboard_lock", text="Lock")
711 row.prop(part, "billboard_object")
714 col = row.column(align=True)
715 col.label(text="Tilt:")
716 col.prop(part, "billboard_tilt", text="Angle", slider=True)
717 col.prop(part, "billboard_random_tilt", slider=True)
719 col.prop(part, "billboard_offset")
722 row.prop(psys, "billboard_normal_uv")
724 row.prop(psys, "billboard_time_index_uv")
727 row.label(text="Split uv's:")
728 row.prop(part, "billboard_uv_split", text="Number of splits")
730 row.prop(psys, "billboard_split_uv")
732 row.label(text="Animate:")
733 row.prop(part, "billboard_animation", expand=True)
734 row.label(text="Offset:")
735 row.prop(part, "billboard_split_offset", expand=True)
737 if part.ren_as == 'HALO' or part.ren_as == 'LINE' or part.ren_as == 'BILLBOARD':
740 col.prop(part, "trail_count")
741 if part.trail_count > 1:
742 col.prop(part, "abs_path_time", text="Length in frames")
744 col.prop(part, "path_end", text="Length", slider=not part.abs_path_time)
745 col.prop(part, "random_length", text="Random", slider=True)
751 class PARTICLE_PT_draw(ParticleButtonsPanel):
753 bl_default_closed = True
755 def poll(self, context):
756 psys = context.particle_system
759 if psys.settings is None:
763 def draw(self, context):
766 psys = context.particle_system
770 row.prop(part, "draw_as", expand=True)
772 if part.draw_as == 'NONE' or (part.ren_as == 'NONE' and part.draw_as == 'RENDER'):
775 path = (part.ren_as == 'PATH' and part.draw_as == 'RENDER') or part.draw_as == 'PATH'
777 if path and part.type != 'HAIR' and part.physics_type != 'KEYED' and psys.point_cache.baked is False:
779 box.label(text="Baked or keyed particles needed for correct drawing.")
783 row.prop(part, "display", slider=True)
784 if part.draw_as != 'RENDER' or part.ren_as == 'HALO':
785 row.prop(part, "draw_size")
791 col.prop(part, "show_size")
792 col.prop(part, "velocity")
793 col.prop(part, "num")
794 if part.physics_type == 'BOIDS':
795 col.prop(part, "draw_health")
798 col.prop(part, "material_color", text="Use material color")
801 col.prop(part, "draw_step")
804 sub.active = (part.material_color is False)
805 #sub.label(text="color")
806 #sub.label(text="Override material color")
809 class PARTICLE_PT_children(ParticleButtonsPanel):
810 bl_label = "Children"
811 bl_default_closed = True
813 def draw(self, context):
816 psys = context.particle_system
819 layout.row().prop(part, "child_type", expand=True)
821 if part.child_type == 'NONE':
826 col = row.column(align=True)
827 col.prop(part, "child_nbr", text="Display")
828 col.prop(part, "rendered_child_nbr", text="Render")
830 col = row.column(align=True)
832 if part.child_type == 'FACES':
833 col.prop(part, "virtual_parents", slider=True)
835 col.prop(part, "child_radius", text="Radius")
836 col.prop(part, "child_roundness", text="Roundness", slider=True)
838 col = row.column(align=True)
839 col.prop(part, "child_size", text="Size")
840 col.prop(part, "child_random_size", text="Random")
842 layout.row().label(text="Effects:")
846 col = row.column(align=True)
847 col.prop(part, "clump_factor", slider=True)
848 col.prop(part, "clumppow", slider=True)
850 col = row.column(align=True)
851 col.prop(part, "rough_endpoint")
852 col.prop(part, "rough_end_shape")
856 col = row.column(align=True)
857 col.prop(part, "rough1")
858 col.prop(part, "rough1_size")
860 col = row.column(align=True)
861 col.prop(part, "rough2")
862 col.prop(part, "rough2_size")
863 col.prop(part, "rough2_thres", slider=True)
866 col = row.column(align=True)
867 col.prop(part, "child_length", slider=True)
868 col.prop(part, "child_length_thres", slider=True)
870 col = row.column(align=True)
871 col.label(text="Space reserved for")
872 col.label(text="hair parting controls")
874 layout.row().label(text="Kink:")
875 layout.row().prop(part, "kink", expand=True)
877 split = layout.split()
880 col.prop(part, "kink_amplitude")
881 col.prop(part, "kink_frequency")
883 col.prop(part, "kink_shape", slider=True)
886 class PARTICLE_PT_field_weights(ParticleButtonsPanel):
887 bl_label = "Field Weights"
888 bl_default_closed = True
890 def draw(self, context):
891 part = context.particle_system.settings
892 effector_weights_ui(self, context, part.effector_weights)
894 if part.type == 'HAIR':
895 self.layout.prop(part.effector_weights, "do_growing_hair")
898 class PARTICLE_PT_force_fields(ParticleButtonsPanel):
899 bl_label = "Force Field Settings"
900 bl_default_closed = True
902 def draw(self, context):
905 part = context.particle_system.settings
907 layout.prop(part, "self_effect")
909 split = layout.split(percentage=0.2)
910 split.label(text="Type 1:")
911 split.prop(part.force_field_1, "type", text="")
912 basic_force_field_settings_ui(self, context, part.force_field_1)
913 basic_force_field_falloff_ui(self, context, part.force_field_1)
915 if part.force_field_1.type != 'NONE':
916 layout.label(text="")
918 split = layout.split(percentage=0.2)
919 split.label(text="Type 2:")
920 split.prop(part.force_field_2, "type", text="")
921 basic_force_field_settings_ui(self, context, part.force_field_2)
922 basic_force_field_falloff_ui(self, context, part.force_field_2)
925 class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
926 bl_label = "Vertexgroups"
927 bl_default_closed = True
929 def draw(self, context):
933 psys = context.particle_system
934 # part = psys.settings
936 # layout.label(text="Nothing here yet.")
939 row.label(text="Vertex Group")
940 row.label(text="Negate")
944 row.prop_object(psys, "vertex_group_density", ob, "vertex_groups", text="Density")
945 row.prop(psys, "vertex_group_density_negate", text="")
948 row.prop_object(psys, "vertex_group_velocity", ob, "vertex_groups", text="Velocity")
949 row.prop(psys, "vertex_group_velocity_negate", text="")
952 row.prop_object(psys, "vertex_group_length", ob, "vertex_groups", text="Length")
953 row.prop(psys, "vertex_group_length_negate", text="")
956 row.prop_object(psys, "vertex_group_clump", ob, "vertex_groups", text="Clump")
957 row.prop(psys, "vertex_group_clump_negate", text="")
960 row.prop_object(psys, "vertex_group_kink", ob, "vertex_groups", text="Kink")
961 row.prop(psys, "vertex_group_kink_negate", text="")
964 row.prop_object(psys, "vertex_group_roughness1", ob, "vertex_groups", text="Roughness 1")
965 row.prop(psys, "vertex_group_roughness1_negate", text="")
968 row.prop_object(psys, "vertex_group_roughness2", ob, "vertex_groups", text="Roughness 2")
969 row.prop(psys, "vertex_group_roughness2_negate", text="")
972 row.prop_object(psys, "vertex_group_roughness_end", ob, "vertex_groups", text="Roughness End")
973 row.prop(psys, "vertex_group_roughness_end_negate", text="")
976 row.prop_object(psys, "vertex_group_size", ob, "vertex_groups", text="Size")
977 row.prop(psys, "vertex_group_size_negate", text="")
980 row.prop_object(psys, "vertex_group_tangent", ob, "vertex_groups", text="Tangent")
981 row.prop(psys, "vertex_group_tangent_negate", text="")
984 row.prop_object(psys, "vertex_group_rotation", ob, "vertex_groups", text="Rotation")
985 row.prop(psys, "vertex_group_rotation_negate", text="")
988 row.prop_object(psys, "vertex_group_field", ob, "vertex_groups", text="Field")
989 row.prop(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)