| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # ##### BEGIN GPL LICENSE BLOCK ##### | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | #  This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  | #  modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  | #  as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  | #  of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  | #  but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  | #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  | #  GNU General Public License for more details. | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  | #  along with this program; if not, write to the Free Software Foundation, | 
					
						
							| 
									
										
										
										
											2010-02-12 13:34:04 +00:00
										 |  |  | #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # ##### END GPL LICENSE BLOCK ##### | 
					
						
							| 
									
										
										
										
											2009-10-31 20:16:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | # <pep8 compliant> | 
					
						
							| 
									
										
										
										
											2009-06-01 11:39:11 +00:00
										 |  |  | import bpy | 
					
						
							| 
									
										
										
										
											2010-01-08 08:54:41 +00:00
										 |  |  | from rna_prop_ui import PropertyPanel | 
					
						
							| 
									
										
										
										
											2009-06-01 11:39:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:57:59 +00:00
										 |  |  | from properties_physics_common import point_cache_ui | 
					
						
							|  |  |  | from properties_physics_common import effector_weights_ui | 
					
						
							|  |  |  | from properties_physics_common import basic_force_field_settings_ui | 
					
						
							|  |  |  | from properties_physics_common import basic_force_field_falloff_ui | 
					
						
							| 
									
										
											  
											
												Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons) 
  instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group 
  setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
	- "Point" is most like the old effectors and uses the 
	  effector location as the effector point.
	- "Plane" uses the closest point on effectors local xy-plane 
	  as the effector point.
	- "Surface" uses the closest point on an effector object's 
	  surface as the effector point.
	- "Every Point" uses every point in a mesh effector object 
	  as an effector point.
	- The falloff is calculated from this point, so for example 
	  with "surface" shape and "use only negative z axis" it's 
	  possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer 
  just spherical.
* New effector parameter "flow", which makes the effector act as 
  surrounding air velocity, so the resulting force is 
  proportional to the velocity difference of the point and "air 
  velocity". For example a wind field with flow=1.0 results in 
  proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random 
  flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force 
  (note. the z-axis is the surface normal in the case of 
  effector shape "surface")
* New "force field" submenu in add menu, which adds an empty 
  with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector 
  system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for 
  particles, softbody & cloth, since their final effect depends on many external 
  factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through 
  DAG_id_flush_update(..).
  
Known issues
* Curve guides don't yet have all ui buttons in place, but they 
  should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50 
  frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to 
  free pidlists after use :).
											
										 
											2009-09-30 22:10:14 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-15 18:27:41 +00:00
										 |  |  | def particle_panel_enabled(context, psys): | 
					
						
							| 
									
										
										
										
											2010-09-28 08:47:59 +00:00
										 |  |  |     phystype = psys.settings.physics_type | 
					
						
							| 
									
										
										
										
											2010-10-05 09:32:35 +00:00
										 |  |  |     if psys.settings.type in ('EMITTER', 'REACTOR') and phystype in ('NO', 'KEYED'): | 
					
						
							| 
									
										
										
										
											2010-09-28 08:47:59 +00:00
										 |  |  |         return True | 
					
						
							|  |  |  |     else: | 
					
						
							| 
									
										
										
										
											2010-10-05 09:32:35 +00:00
										 |  |  |         return (psys.point_cache.is_baked is False) and (not psys.is_edited) and (not context.particle_system_editable) | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-05 16:05:30 +00:00
										 |  |  | def particle_panel_poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     engine = context.scene.render.engine | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |     if psys is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         return False | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |     if psys.settings is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         return False | 
					
						
							| 
									
										
										
										
											2010-08-05 16:05:30 +00:00
										 |  |  |     return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR') and (engine in cls.COMPAT_ENGINES) | 
					
						
							| 
									
										
										
										
											2009-06-05 23:59:33 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class ParticleButtonsPanel(): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'PROPERTIES' | 
					
						
							|  |  |  |     bl_region_type = 'WINDOW' | 
					
						
							|  |  |  |     bl_context = "particle" | 
					
						
							| 
									
										
										
										
											2009-06-01 11:39:11 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							|  |  |  |         return particle_panel_poll(cls, context) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'HIDE_HEADER'} | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |         engine = context.scene.render.engine | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |         return (context.particle_system or context.object) and (engine in cls.COMPAT_ENGINES) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if ob: | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-24 04:02:50 +00:00
										 |  |  |             row.template_list(ob, "particle_systems", ob.particle_systems, "active_index", rows=2) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             col = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |             col.operator("object.particle_system_add", icon='ZOOMIN', text="") | 
					
						
							|  |  |  |             col.operator("object.particle_system_remove", icon='ZOOMOUT', text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if psys and not psys.settings: | 
					
						
							|  |  |  |             split = layout.split(percentage=0.32) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Name:") | 
					
						
							|  |  |  |             col.label(text="Settings:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(psys, "name", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             col.template_ID(psys, "settings", new="particle.new") | 
					
						
							|  |  |  |         elif psys: | 
					
						
							|  |  |  |             part = psys.settings | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             split = layout.split(percentage=0.32) | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Name:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if part.type in ('EMITTER', 'REACTOR', 'HAIR'): | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 col.label(text="Settings:") | 
					
						
							|  |  |  |                 col.label(text="Type:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(psys, "name", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if part.type in ('EMITTER', 'REACTOR', 'HAIR'): | 
					
						
							| 
									
										
										
										
											2010-11-26 15:37:08 +00:00
										 |  |  |                 row = col.row() | 
					
						
							|  |  |  |                 row.enabled = particle_panel_enabled(context, psys) | 
					
						
							|  |  |  |                 row.template_ID(psys, "settings", new="particle.new") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             #row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             #row.label(text="Viewport") | 
					
						
							|  |  |  |             #row.label(text="Render") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if part: | 
					
						
							|  |  |  |                 if part.type not in ('EMITTER', 'REACTOR', 'HAIR'): | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     layout.label(text="No settings for fluid particles") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                     return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |                 row = col.row() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 row.enabled = particle_panel_enabled(context, psys) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(part, "type", text="") | 
					
						
							|  |  |  |                 row.prop(psys, "seed") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 split = layout.split(percentage=0.65) | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |                 if part.type == 'HAIR': | 
					
						
							| 
									
										
										
										
											2010-08-18 08:26:18 +00:00
										 |  |  |                     if psys.is_edited: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                         split.operator("particle.edited_clear", text="Free Edit") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                     else: | 
					
						
							| 
									
										
										
										
											2010-12-13 10:45:24 +00:00
										 |  |  |                         row = split.row() | 
					
						
							|  |  |  |                         row.enabled = particle_panel_enabled(context, psys) | 
					
						
							|  |  |  |                         row.prop(part, "regrow_hair") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                     row = split.row() | 
					
						
							|  |  |  |                     row.enabled = particle_panel_enabled(context, psys) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     row.prop(part, "hair_step") | 
					
						
							| 
									
										
										
										
											2010-08-18 08:26:18 +00:00
										 |  |  |                     if psys.is_edited: | 
					
						
							|  |  |  |                         if psys.is_global_hair: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                             layout.operator("particle.connect_hair") | 
					
						
							|  |  |  |                             layout.label(text="Hair is disconnected.") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                             layout.operator("particle.disconnect_hair") | 
					
						
							|  |  |  |                             layout.label(text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |                 elif part.type == 'REACTOR': | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                     split.enabled = particle_panel_enabled(context, psys) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     split.prop(psys, "reactor_target_object") | 
					
						
							|  |  |  |                     split.prop(psys, "reactor_target_particle_system", text="Particle System") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Emission" | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2010-08-05 16:05:30 +00:00
										 |  |  |         if particle_panel_poll(PARTICLE_PT_emission, context): | 
					
						
							| 
									
										
										
										
											2010-08-19 12:51:31 +00:00
										 |  |  |             return not context.particle_system.point_cache.use_external | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							|  |  |  |             return False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							|  |  |  |         part = psys.settings | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-18 08:26:18 +00:00
										 |  |  |         layout.enabled = particle_panel_enabled(context, psys) and not psys.has_multiple_caches | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.active = part.distribution != 'GRID' | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         row.prop(part, "count") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if part.type != 'HAIR': | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2010-04-22 17:35:00 +00:00
										 |  |  |             col.prop(part, "frame_start") | 
					
						
							|  |  |  |             col.prop(part, "frame_end") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(part, "lifetime") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             col.prop(part, "lifetime_random", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.row().label(text="Emit From:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         row.prop(part, "emit_from", expand=True) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         row.prop(part, "use_emit_random") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         if part.distribution != 'GRID': | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             row.prop(part, "use_even_distribution") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         if part.emit_from == 'FACE' or part.emit_from == 'VOLUME': | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row.prop(part, "distribution", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             if part.distribution == 'JIT': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(part, "userjit", text="Particles/Face") | 
					
						
							|  |  |  |                 row.prop(part, "jitter_factor", text="Jittering Amount", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             elif part.distribution == 'GRID': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(part, "grid_resolution") | 
					
						
							| 
									
										
										
										
											2009-06-06 16:18:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Hair dynamics" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |         engine = context.scene.render.engine | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys.settings is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |         return psys.settings.type == 'HAIR' and (engine in cls.COMPAT_ENGINES) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw_header(self, context): | 
					
						
							|  |  |  |         #cloth = context.cloth.collision_settings | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         #self.layout.active = cloth_panel_enabled(context.cloth) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         #self.layout.prop(cloth, "use_collision", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         self.layout.prop(psys, "use_hair_dynamics", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2009-12-07 17:55:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if not psys.cloth: | 
					
						
							|  |  |  |             return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  |         #part = psys.settings | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         cloth = psys.cloth.settings | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-13 09:39:14 +00:00
										 |  |  |         layout.enabled = psys.use_hair_dynamics and psys.point_cache.is_baked == False | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Material:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(cloth, "pin_stiffness", text="Stiffness") | 
					
						
							|  |  |  |         sub.prop(cloth, "mass") | 
					
						
							|  |  |  |         sub.prop(cloth, "bending_stiffness", text="Bending") | 
					
						
							|  |  |  |         sub.prop(cloth, "internal_friction", slider=True) | 
					
						
							| 
									
										
										
										
											2010-02-26 03:24:21 +00:00
										 |  |  |         sub.prop(cloth, "collider_friction", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Damping:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(cloth, "spring_damping", text="Spring") | 
					
						
							|  |  |  |         sub.prop(cloth, "air_damping", text="Air") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Quality:") | 
					
						
							|  |  |  |         col.prop(cloth, "quality", text="Steps", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Cache" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |         engine = context.scene.render.engine | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys.settings is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         phystype = psys.settings.physics_type | 
					
						
							|  |  |  |         if phystype == 'NO' or phystype == 'KEYED': | 
					
						
							|  |  |  |             return False | 
					
						
							| 
									
										
										
										
											2010-12-13 09:39:14 +00:00
										 |  |  |         return (psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and (psys.use_hair_dynamics or psys.point_cache.is_baked))) and engine in cls.COMPAT_ENGINES | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-12-13 09:39:14 +00:00
										 |  |  |         point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if (psys.settings.type == 'HAIR') else 'PSYS') | 
					
						
							| 
									
										
										
										
											2009-06-06 16:18:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Velocity" | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2010-08-05 16:05:30 +00:00
										 |  |  |         if particle_panel_poll(PARTICLE_PT_velocity, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2010-08-19 12:51:31 +00:00
										 |  |  |             return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.use_external | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							|  |  |  |             return False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							|  |  |  |         part = psys.settings | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.enabled = particle_panel_enabled(context, psys) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sub = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.label(text="Emitter Geometry:") | 
					
						
							|  |  |  |         sub.prop(part, "normal_factor") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         subsub = sub.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         subsub.prop(part, "tangent_factor") | 
					
						
							|  |  |  |         subsub.prop(part, "tangent_phase", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         sub = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.label(text="Emitter Object") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.prop(part, "object_align_factor", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.row().label(text="Other:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  |         sub = split.column() | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         if part.emit_from == 'PARTICLE': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.prop(part, "particle_factor") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.prop(part, "object_factor", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.prop(part, "factor_random") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         #if part.type=='REACTOR': | 
					
						
							| 
									
										
										
										
											2009-12-07 17:55:58 +00:00
										 |  |  |         #    sub.prop(part, "reactor_factor") | 
					
						
							|  |  |  |         #    sub.prop(part, "reaction_shape", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Rotation" | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2010-08-05 16:05:30 +00:00
										 |  |  |         if particle_panel_poll(PARTICLE_PT_rotation, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2010-08-19 12:51:31 +00:00
										 |  |  |             return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.use_external | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							|  |  |  |             return False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							|  |  |  |         part = psys.settings | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.enabled = particle_panel_enabled(context, psys) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         split.label(text="Initial Rotation:") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         split.prop(part, "use_dynamic_rotation") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sub = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(part, "rotation_mode", text="") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.prop(part, "rotation_factor_random", slider=True, text="Random") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         sub = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(part, "phase_factor", slider=True) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.prop(part, "phase_factor_random", text="Random", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.row().label(text="Angular Velocity:") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         layout.row().prop(part, "angular_velocity_mode", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sub = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-10 19:14:49 +00:00
										 |  |  |         if part.angular_velocity_mode != 'NONE': | 
					
						
							|  |  |  |             sub.prop(part, "angular_velocity_factor", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Physics" | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2010-08-05 16:05:30 +00:00
										 |  |  |         if particle_panel_poll(PARTICLE_PT_physics, context): | 
					
						
							| 
									
										
										
										
											2010-08-19 12:51:31 +00:00
										 |  |  |             return not context.particle_system.point_cache.use_external | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							|  |  |  |             return False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							|  |  |  |         part = psys.settings | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.enabled = particle_panel_enabled(context, psys) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         row.prop(part, "physics_type", expand=True) | 
					
						
							| 
									
										
										
										
											2010-05-03 16:00:42 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-25 14:40:18 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         col = row.column(align=True) | 
					
						
							|  |  |  |         col.prop(part, "particle_size") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(part, "size_random", slider=True) | 
					
						
							| 
									
										
										
										
											2010-07-25 14:40:18 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if part.physics_type != 'NO': | 
					
						
							|  |  |  |             col = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(part, "mass") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             col.prop(part, "use_multiply_size_mass", text="Multiply mass with size") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if part.physics_type == 'NEWTON': | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             sub = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.label(text="Forces:") | 
					
						
							|  |  |  |             sub.prop(part, "brownian_factor") | 
					
						
							|  |  |  |             sub.prop(part, "drag_factor", slider=True) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             sub.prop(part, "damping", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             sub = split.column() | 
					
						
							| 
									
										
										
										
											2010-04-12 17:34:06 +00:00
										 |  |  |             sub.label(text="Integration:") | 
					
						
							|  |  |  |             sub.prop(part, "integrator", text="") | 
					
						
							|  |  |  |             sub.prop(part, "time_tweak") | 
					
						
							|  |  |  |             sub.prop(part, "subframes") | 
					
						
							|  |  |  |             sub = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             sub.prop(part, "use_size_deflect") | 
					
						
							|  |  |  |             sub.prop(part, "use_die_on_collision") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  |         elif part.physics_type == 'FLUID': | 
					
						
							|  |  |  |             fluid = part.fluid | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             sub = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             sub.label(text="Forces:") | 
					
						
							|  |  |  |             sub.prop(part, "brownian_factor") | 
					
						
							|  |  |  |             sub.prop(part, "drag_factor", slider=True) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             sub.prop(part, "damping", slider=True) | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  |             sub = split.column() | 
					
						
							| 
									
										
										
										
											2010-04-12 17:34:06 +00:00
										 |  |  |             sub.label(text="Integration:") | 
					
						
							|  |  |  |             sub.prop(part, "integrator", text="") | 
					
						
							|  |  |  |             sub.prop(part, "time_tweak") | 
					
						
							|  |  |  |             sub.prop(part, "subframes") | 
					
						
							|  |  |  |             sub = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             sub.prop(part, "use_size_deflect") | 
					
						
							|  |  |  |             sub.prop(part, "use_die_on_collision") | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             sub = split.column() | 
					
						
							|  |  |  |             sub.label(text="Fluid Interaction:") | 
					
						
							| 
									
										
										
										
											2011-01-09 19:09:41 +00:00
										 |  |  |             sub.prop(fluid, "fluid_radius") | 
					
						
							|  |  |  |             sub.prop(fluid, "repulsion_force") | 
					
						
							|  |  |  |             subsub = sub.column(align=True) | 
					
						
							|  |  |  |             subsub.prop(fluid, "rest_density") | 
					
						
							|  |  |  |             subsub.prop(fluid, "density_force", text="Force") | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             sub.label(text="Viscosity:") | 
					
						
							| 
									
										
										
										
											2011-01-09 19:09:41 +00:00
										 |  |  |             subsub = sub.column(align=True) | 
					
						
							|  |  |  |             subsub.prop(fluid, "linear_viscosity", text="Linear") | 
					
						
							|  |  |  |             subsub.prop(fluid, "square_viscosity", text="Square") | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             sub = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             sub.label(text="Springs:") | 
					
						
							| 
									
										
										
										
											2011-01-09 19:09:41 +00:00
										 |  |  |             sub.prop(fluid, "spring_force", text="Force") | 
					
						
							|  |  |  |             #Hidden to make ui a bit lighter, can be unhidden for a bit more control | 
					
						
							|  |  |  |             #sub.prop(fluid, "rest_length", slider=True) | 
					
						
							|  |  |  |             sub.prop(fluid, "use_viscoelastic_springs") | 
					
						
							|  |  |  |             subsub = sub.column(align=True) | 
					
						
							|  |  |  |             subsub.active = fluid.use_viscoelastic_springs | 
					
						
							|  |  |  |             subsub.prop(fluid, "yield_ratio", slider=True) | 
					
						
							|  |  |  |             subsub.prop(fluid, "plasticity", slider=True) | 
					
						
							|  |  |  |             subsub.prop(fluid, "use_initial_rest_length") | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             sub.label(text="Buoyancy:") | 
					
						
							| 
									
										
										
										
											2011-01-09 19:09:41 +00:00
										 |  |  |             sub.prop(fluid, "buoyancy", text="Strength", slider=True) | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         elif part.physics_type == 'KEYED': | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             sub = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  |             col = row.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             col.active = not psys.use_keyed_timing | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(part, "keyed_loops", text="Loops") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             row.prop(psys, "use_keyed_timing", text="Use Timing") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.label(text="Keys:") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         elif part.physics_type == 'BOIDS': | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             boids = part.boids | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |             row.prop(boids, "use_flight") | 
					
						
							|  |  |  |             row.prop(boids, "use_land") | 
					
						
							|  |  |  |             row.prop(boids, "use_climb") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             sub = split.column() | 
					
						
							|  |  |  |             col = sub.column(align=True) | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |             col.active = boids.use_flight | 
					
						
							|  |  |  |             col.prop(boids, "air_speed_max") | 
					
						
							|  |  |  |             col.prop(boids, "air_speed_min", slider=True) | 
					
						
							|  |  |  |             col.prop(boids, "air_acc_max", slider=True) | 
					
						
							|  |  |  |             col.prop(boids, "air_ave_max", slider=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(boids, "air_personal_space") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = col.row() | 
					
						
							| 
									
										
										
										
											2010-08-31 15:12:24 +00:00
										 |  |  |             row.active = (boids.use_land or boids.use_climb) and boids.use_flight | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |             row.prop(boids, "land_smooth") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             sub = split.column() | 
					
						
							|  |  |  |             col = sub.column(align=True) | 
					
						
							| 
									
										
										
										
											2010-08-31 15:12:24 +00:00
										 |  |  |             col.active = boids.use_land or boids.use_climb | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |             col.prop(boids, "land_speed_max") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(boids, "land_jump_speed") | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |             col.prop(boids, "land_acc_max", slider=True) | 
					
						
							|  |  |  |             col.prop(boids, "land_ave_max", slider=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(boids, "land_personal_space") | 
					
						
							|  |  |  |             col.prop(boids, "land_stick_force") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Battle:") | 
					
						
							|  |  |  |             col.prop(boids, "health") | 
					
						
							|  |  |  |             col.prop(boids, "strength") | 
					
						
							|  |  |  |             col.prop(boids, "aggression") | 
					
						
							|  |  |  |             col.prop(boids, "accuracy") | 
					
						
							|  |  |  |             col.prop(boids, "range") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             col = row.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Misc:") | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |             col.prop(boids, "bank", slider=True) | 
					
						
							| 
									
										
										
										
											2010-09-16 20:06:10 +00:00
										 |  |  |             col.prop(boids, "pitch", slider=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(boids, "height", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  |         if part.physics_type == 'KEYED' or part.physics_type == 'BOIDS' or part.physics_type == 'FLUID': | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             if part.physics_type == 'BOIDS': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 layout.label(text="Relations:") | 
					
						
							| 
									
										
										
										
											2011-01-09 19:09:41 +00:00
										 |  |  |             elif part.physics_type == 'FLUID': | 
					
						
							|  |  |  |                 layout.label(text="Fluid interaction:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  |             row.template_list(psys, "targets", psys, "active_particle_target_index") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = row.column() | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |             sub = col.row() | 
					
						
							|  |  |  |             subsub = sub.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |             subsub.operator("particle.new_target", icon='ZOOMIN', text="") | 
					
						
							|  |  |  |             subsub.operator("particle.target_remove", icon='ZOOMOUT', text="") | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |             sub = col.row() | 
					
						
							|  |  |  |             subsub = sub.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |             subsub.operator("particle.target_move_up", icon='MOVE_UP_VEC', text="") | 
					
						
							|  |  |  |             subsub.operator("particle.target_move_down", icon='MOVE_DOWN_VEC', text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             key = psys.active_particle_target | 
					
						
							|  |  |  |             if key: | 
					
						
							|  |  |  |                 row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |                 if part.physics_type == 'KEYED': | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                     col = row.column() | 
					
						
							|  |  |  |                     #doesn't work yet | 
					
						
							| 
									
										
										
										
											2011-01-03 13:33:07 +00:00
										 |  |  |                     #col.alert = key.valid | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     col.prop(key, "object", text="") | 
					
						
							|  |  |  |                     col.prop(key, "system", text="System") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |                     col = row.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |                     col.active = psys.use_keyed_timing | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     col.prop(key, "time") | 
					
						
							|  |  |  |                     col.prop(key, "duration") | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  |                 elif part.physics_type == 'BOIDS': | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |                     sub = row.row() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                     #doesn't work yet | 
					
						
							| 
									
										
										
										
											2011-01-03 13:33:07 +00:00
										 |  |  |                     #sub.alert = key.valid | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     sub.prop(key, "object", text="") | 
					
						
							|  |  |  |                     sub.prop(key, "system", text="System") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-19 12:51:31 +00:00
										 |  |  |                     layout.prop(key, "alliance", expand=True) | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  |                 elif part.physics_type == 'FLUID': | 
					
						
							|  |  |  |                     sub = row.row() | 
					
						
							|  |  |  |                     #doesn't work yet | 
					
						
							| 
									
										
										
										
											2011-01-03 13:33:07 +00:00
										 |  |  |                     #sub.alert = key.valid | 
					
						
							| 
									
										
										
										
											2010-04-04 12:29:06 +00:00
										 |  |  |                     sub.prop(key, "object", text="") | 
					
						
							|  |  |  |                     sub.prop(key, "system", text="System") | 
					
						
							| 
									
										
										
										
											2009-07-20 23:52:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Boid Brain" | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |         engine = context.scene.render.engine | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys.settings is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2010-08-19 12:51:31 +00:00
										 |  |  |         if psys.point_cache.use_external: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |         return psys.settings.physics_type == 'BOIDS' and engine in cls.COMPAT_ENGINES | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         boids = context.particle_system.settings.boids | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.enabled = particle_panel_enabled(context, context.particle_system) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # Currently boids can only use the first state so these are commented out for now. | 
					
						
							|  |  |  |         #row = layout.row() | 
					
						
							|  |  |  |         #row.template_list(boids, "states", boids, "active_boid_state_index", compact="True") | 
					
						
							|  |  |  |         #col = row.row() | 
					
						
							| 
									
										
										
										
											2009-11-12 14:37:13 +00:00
										 |  |  |         #sub = col.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |         #sub.operator("boid.state_add", icon='ZOOMIN', text="") | 
					
						
							|  |  |  |         #sub.operator("boid.state_del", icon='ZOOMOUT', text="") | 
					
						
							| 
									
										
										
										
											2009-11-12 14:37:13 +00:00
										 |  |  |         #sub = row.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |         #sub.operator("boid.state_move_up", icon='MOVE_UP_VEC', text="") | 
					
						
							|  |  |  |         #sub.operator("boid.state_move_down", icon='MOVE_DOWN_VEC', text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         state = boids.active_boid_state | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         #layout.prop(state, "name", text="State name") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(state, "ruleset_type") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         if state.ruleset_type == 'FUZZY': | 
					
						
							| 
									
										
										
										
											2010-08-19 12:51:31 +00:00
										 |  |  |             row.prop(state, "rule_fuzzy", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.template_list(state, "rules", state, "active_boid_rule_index") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = row.column() | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |         sub = col.row() | 
					
						
							|  |  |  |         subsub = sub.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |         subsub.operator_menu_enum("boid.rule_add", "type", icon='ZOOMIN', text="") | 
					
						
							|  |  |  |         subsub.operator("boid.rule_del", icon='ZOOMOUT', text="") | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |         sub = col.row() | 
					
						
							| 
									
										
										
										
											2009-11-12 14:37:13 +00:00
										 |  |  |         subsub = sub.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |         subsub.operator("boid.rule_move_up", icon='MOVE_UP_VEC', text="") | 
					
						
							|  |  |  |         subsub.operator("boid.rule_move_down", icon='MOVE_DOWN_VEC', text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         rule = state.active_boid_rule | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if rule: | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(rule, "name", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             #somebody make nice icons for boids here please! -jahka | 
					
						
							| 
									
										
										
										
											2010-08-18 07:14:10 +00:00
										 |  |  |             row.prop(rule, "use_in_air", icon='MOVE_UP_VEC', text="") | 
					
						
							|  |  |  |             row.prop(rule, "use_on_land", icon='MOVE_DOWN_VEC', text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if rule.type == 'GOAL': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(rule, "object") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |                 row.prop(rule, "use_predict") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             elif rule.type == 'AVOID': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(rule, "object") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |                 row.prop(rule, "use_predict") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(rule, "fear_factor") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             elif rule.type == 'FOLLOW_PATH': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.label(text="Not yet functional.") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             elif rule.type == 'AVOID_COLLISION': | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |                 row.prop(rule, "use_avoid") | 
					
						
							|  |  |  |                 row.prop(rule, "use_avoid_collision") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(rule, "look_ahead") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             elif rule.type == 'FOLLOW_LEADER': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(rule, "object", text="") | 
					
						
							|  |  |  |                 row.prop(rule, "distance") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |                 row.prop(rule, "use_line") | 
					
						
							| 
									
										
										
										
											2009-11-12 14:37:13 +00:00
										 |  |  |                 sub = row.row() | 
					
						
							|  |  |  |                 sub.active = rule.line | 
					
						
							| 
									
										
										
										
											2010-08-19 15:49:30 +00:00
										 |  |  |                 sub.prop(rule, "queue_count") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             elif rule.type == 'AVERAGE_SPEED': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(rule, "speed", slider=True) | 
					
						
							|  |  |  |                 row.prop(rule, "wander", slider=True) | 
					
						
							|  |  |  |                 row.prop(rule, "level", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             elif rule.type == 'FIGHT': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(rule, "distance") | 
					
						
							|  |  |  |                 row.prop(rule, "flee_distance") | 
					
						
							| 
									
										
										
										
											2009-06-05 23:59:33 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Render" | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |         engine = context.scene.render.engine | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys.settings is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |         return engine in cls.COMPAT_ENGINES | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							|  |  |  |         part = psys.settings | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(part, "material") | 
					
						
							|  |  |  |         row.prop(psys, "parent") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sub = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         sub.prop(part, "use_render_emitter") | 
					
						
							|  |  |  |         sub.prop(part, "use_parent_particles") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |         sub.prop(part, "show_unborn") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         sub.prop(part, "use_dead") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(part, "render_type", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sub = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         if part.render_type == 'LINE': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.prop(part, "line_length_tail") | 
					
						
							|  |  |  |             sub.prop(part, "line_length_head") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             sub = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             sub.prop(part, "use_velocity_length") | 
					
						
							|  |  |  |         elif part.render_type == 'PATH': | 
					
						
							|  |  |  |             sub.prop(part, "use_strand_primitive") | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |             subsub = sub.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             subsub.active = (part.use_strand_primitive is False) | 
					
						
							|  |  |  |             subsub.prop(part, "use_render_adaptive") | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |             subsub = sub.column() | 
					
						
							| 
									
										
										
										
											2010-08-22 09:18:26 +00:00
										 |  |  |             subsub.active = part.use_render_adaptive or part.use_strand_primitive == True | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             subsub.prop(part, "adaptive_angle") | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |             subsub = sub.column() | 
					
						
							| 
									
										
										
										
											2010-08-22 09:18:26 +00:00
										 |  |  |             subsub.active = (part.use_render_adaptive is True and part.use_strand_primitive is False) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             subsub.prop(part, "adaptive_pixel") | 
					
						
							|  |  |  |             sub.prop(part, "use_hair_bspline") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.prop(part, "render_step", text="Steps") | 
					
						
							| 
									
										
										
										
											2009-11-01 18:07:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             sub = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.label(text="Timing:") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             sub.prop(part, "use_absolute_path_time") | 
					
						
							|  |  |  |             sub.prop(part, "path_start", text="Start", slider=not part.use_absolute_path_time) | 
					
						
							|  |  |  |             sub.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time) | 
					
						
							|  |  |  |             sub.prop(part, "length_random", text="Random", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  |             col = row.column() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |             if part.type == 'HAIR' and part.use_strand_primitive == True and part.child_type == 'INTERPOLATED': | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |                 layout.prop(part, "use_simplify") | 
					
						
							|  |  |  |                 if part.use_simplify == True: | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                     row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     row.prop(part, "simplify_refsize") | 
					
						
							|  |  |  |                     row.prop(part, "simplify_rate") | 
					
						
							|  |  |  |                     row.prop(part, "simplify_transition") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                     row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |                     row.prop(part, "use_simplify_viewport") | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |                     sub = row.row() | 
					
						
							|  |  |  |                     sub.active = part.viewport == True | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     sub.prop(part, "simplify_viewport") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         elif part.render_type == 'OBJECT': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.prop(part, "dupli_object") | 
					
						
							|  |  |  |             sub.prop(part, "use_global_dupli") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         elif part.render_type == 'GROUP': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.prop(part, "dupli_group") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             split = layout.split() | 
					
						
							|  |  |  |             sub = split.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             sub.prop(part, "use_whole_group") | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |             subsub = sub.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             subsub.active = (part.use_whole_group is False) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             subsub.prop(part, "use_group_count") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             sub = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |             subsub = sub.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             subsub.active = (part.use_whole_group is False) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             subsub.prop(part, "use_global_dupli") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             subsub.prop(part, "use_group_pick_random") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             if part.use_group_count and not part.use_whole_group: | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-18 08:26:18 +00:00
										 |  |  |                 row.template_list(part, "dupli_weights", part, "active_dupliweight_index") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 col = row.column() | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |                 sub = col.row() | 
					
						
							|  |  |  |                 subsub = sub.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |                 subsub.operator("particle.dupliob_copy", icon='ZOOMIN', text="") | 
					
						
							|  |  |  |                 subsub.operator("particle.dupliob_remove", icon='ZOOMOUT', text="") | 
					
						
							|  |  |  |                 subsub.operator("particle.dupliob_move_up", icon='MOVE_UP_VEC', text="") | 
					
						
							|  |  |  |                 subsub.operator("particle.dupliob_move_down", icon='MOVE_DOWN_VEC', text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 weight = part.active_dupliweight | 
					
						
							|  |  |  |                 if weight: | 
					
						
							|  |  |  |                     row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     row.prop(weight, "count") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         elif part.render_type == 'BILLBOARD': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.label(text="Align:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |             row.prop(part, "billboard_align", expand=True) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             row.prop(part, "lock_billboard", text="Lock") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(part, "billboard_object") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							|  |  |  |             col = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Tilt:") | 
					
						
							|  |  |  |             col.prop(part, "billboard_tilt", text="Angle", slider=True) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             col.prop(part, "billboard_tilt_random", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             col = row.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(part, "billboard_offset") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(psys, "billboard_normal_uv") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(psys, "billboard_time_index_uv") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Split uv's:") | 
					
						
							|  |  |  |             row.prop(part, "billboard_uv_split", text="Number of splits") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(psys, "billboard_split_uv") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Animate:") | 
					
						
							| 
									
										
										
										
											2010-04-26 09:33:59 +00:00
										 |  |  |             row.prop(part, "billboard_animation", text="") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="Offset:") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             row.prop(part, "billboard_offset_split", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         if part.render_type == 'HALO' or part.render_type == 'LINE' or part.render_type == 'BILLBOARD': | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = layout.row() | 
					
						
							|  |  |  |             col = row.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(part, "trail_count") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if part.trail_count > 1: | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |                 col.prop(part, "use_absolute_path_time", text="Length in frames") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 col = row.column() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |                 col.prop(part, "path_end", text="Length", slider=not part.use_absolute_path_time) | 
					
						
							|  |  |  |                 col.prop(part, "length_random", text="Random", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             else: | 
					
						
							|  |  |  |                 col = row.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 col.label(text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Display" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |         engine = context.scene.render.engine | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2009-11-22 17:41:35 +00:00
										 |  |  |         if psys.settings is None: | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |             return False | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |         return engine in cls.COMPAT_ENGINES | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							|  |  |  |         part = psys.settings | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(part, "draw_method", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         if part.draw_method == 'NONE' or (part.render_type == 'NONE' and part.draw_method == 'RENDER'): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             return | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         path = (part.render_type == 'PATH' and part.draw_method == 'RENDER') or part.draw_method == 'PATH' | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         row.prop(part, "draw_percentage", slider=True) | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         if part.draw_method != 'RENDER' or part.render_type == 'HALO': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(part, "draw_size") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.label(text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-02 06:58:54 +00:00
										 |  |  |         if part.draw_percentage != 100: | 
					
						
							|  |  |  |             if part.type == 'HAIR': | 
					
						
							| 
									
										
										
										
											2010-09-18 00:19:53 +00:00
										 |  |  |                 if psys.use_hair_dynamics and psys.point_cache.is_baked == False: | 
					
						
							| 
									
										
										
										
											2010-09-02 06:58:54 +00:00
										 |  |  |                     layout.row().label(text="Display percentage makes dynamics inaccurate without baking!") | 
					
						
							|  |  |  |             else: | 
					
						
							|  |  |  |                 phystype = part.physics_type | 
					
						
							|  |  |  |                 if phystype != 'NO' and phystype != 'KEYED' and psys.point_cache.is_baked == False: | 
					
						
							|  |  |  |                     layout.row().label(text="Display percentage makes dynamics inaccurate without baking!") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = layout.row() | 
					
						
							|  |  |  |         col = row.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(part, "show_size") | 
					
						
							| 
									
										
										
										
											2010-08-21 04:51:00 +00:00
										 |  |  |         col.prop(part, "show_velocity") | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |         col.prop(part, "show_number") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if part.physics_type == 'BOIDS': | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |             col.prop(part, "show_health") | 
					
						
							| 
									
										
										
										
											2011-01-09 19:09:41 +00:00
										 |  |  |          | 
					
						
							|  |  |  |   | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = row.column() | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |         col.prop(part, "show_material_color", text="Use material color") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if (path): | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(part, "draw_step") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |             sub = col.column() | 
					
						
							| 
									
										
										
										
											2010-08-17 17:03:52 +00:00
										 |  |  |             sub.active = (part.show_material_color is False) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             #sub.label(text="color") | 
					
						
							|  |  |  |             #sub.label(text="Override material color") | 
					
						
							| 
									
										
										
										
											2009-06-05 23:59:33 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Children" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-09 01:37:09 +00:00
										 |  |  |     @classmethod | 
					
						
							|  |  |  |     def poll(cls, context): | 
					
						
							|  |  |  |         return particle_panel_poll(cls, context) | 
					
						
							| 
									
										
										
										
											2010-08-05 16:05:30 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         psys = context.particle_system | 
					
						
							|  |  |  |         part = psys.settings | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         layout.row().prop(part, "child_type", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         if part.child_type == 'NONE': | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             return | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(part, "child_nbr", text="Display") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         col.prop(part, "rendered_child_count", text="Render") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         if part.child_type == 'INTERPOLATED': | 
					
						
							|  |  |  |             col = row.column() | 
					
						
							|  |  |  |             col.prop(psys, "child_seed", text="Seed") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(part, "virtual_parents", slider=True) | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |             col.prop(part, "create_long_hair_children") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							|  |  |  |             col = row.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(part, "child_size", text="Size") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |             col.prop(part, "child_size_random", text="Random") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="Effects:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							|  |  |  |         sub.prop(part, "clump_factor", slider=True) | 
					
						
							|  |  |  |         sub.prop(part, "clump_shape", slider=True) | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         sub = col.column(align=True) | 
					
						
							|  |  |  |         sub.prop(part, "child_length", slider=True) | 
					
						
							|  |  |  |         sub.prop(part, "child_length_threshold", slider=True) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         if part.child_type == 'SIMPLE': | 
					
						
							|  |  |  |             sub = col.column(align=True) | 
					
						
							|  |  |  |             sub.prop(part, "child_radius", text="Radius") | 
					
						
							|  |  |  |             sub.prop(part, "child_roundness", text="Roundness", slider=True) | 
					
						
							|  |  |  |             sub.prop(psys, "child_seed", text="Seed") | 
					
						
							|  |  |  |         elif part.virtual_parents > 0.0: | 
					
						
							|  |  |  |             sub = col.column(align=True) | 
					
						
							|  |  |  |             sub.label(text="Parting not") | 
					
						
							|  |  |  |             sub.label(text="available with") | 
					
						
							|  |  |  |             sub.label(text="virtual parents.") | 
					
						
							|  |  |  |         else: | 
					
						
							|  |  |  |             sub = col.column(align=True) | 
					
						
							|  |  |  |             sub.prop(part, "child_parting_factor", text="Parting", slider=True) | 
					
						
							|  |  |  |             sub.prop(part, "child_parting_min", text="Min") | 
					
						
							|  |  |  |             sub.prop(part, "child_parting_max", text="Max") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.label(text="Roughness:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							|  |  |  |         sub.prop(part, "roughness_1", text="Uniform") | 
					
						
							|  |  |  |         sub.prop(part, "roughness_1_size", text="Size") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							|  |  |  |         sub.prop(part, "roughness_endpoint", "Endpoint") | 
					
						
							|  |  |  |         sub.prop(part, "roughness_end_shape") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							|  |  |  |         sub.prop(part, "roughness_2", text="Random") | 
					
						
							|  |  |  |         sub.prop(part, "roughness_2_size", text="Size") | 
					
						
							|  |  |  |         sub.prop(part, "roughness_2_threshold", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.row().label(text="Kink:") | 
					
						
							| 
									
										
										
										
											2010-08-06 15:17:44 +00:00
										 |  |  |         layout.row().prop(part, "kink", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         split.active = part.kink != 'NO' | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							|  |  |  |         sub.prop(part, "kink_amplitude") | 
					
						
							|  |  |  |         sub.prop(part, "kink_amplitude_clump", text="Clump", slider=True) | 
					
						
							|  |  |  |         col.prop(part, "kink_flat", slider=True) | 
					
						
							| 
									
										
										
										
											2009-11-01 10:45:42 +00:00
										 |  |  |         col = split.column() | 
					
						
							| 
									
										
										
										
											2011-01-07 11:24:34 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							|  |  |  |         sub.prop(part, "kink_frequency") | 
					
						
							|  |  |  |         sub.prop(part, "kink_shape", slider=True) | 
					
						
							| 
									
										
										
										
											2009-06-06 16:18:19 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Field Weights" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         part = context.particle_system.settings | 
					
						
							| 
									
										
										
										
											2009-11-18 21:57:13 +00:00
										 |  |  |         effector_weights_ui(self, context, part.effector_weights) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if part.type == 'HAIR': | 
					
						
							| 
									
										
										
										
											2010-08-19 12:51:31 +00:00
										 |  |  |             self.layout.prop(part.effector_weights, "apply_to_hair_growing") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Force Field Settings" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         part = context.particle_system.settings | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         layout.prop(part, "use_self_effect") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split(percentage=0.2) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         split.label(text="Type 1:") | 
					
						
							|  |  |  |         split.prop(part.force_field_1, "type", text="") | 
					
						
							| 
									
										
										
										
											2009-11-18 21:57:13 +00:00
										 |  |  |         basic_force_field_settings_ui(self, context, part.force_field_1) | 
					
						
							|  |  |  |         basic_force_field_falloff_ui(self, context, part.force_field_1) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if part.force_field_1.type != 'NONE': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.label(text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split(percentage=0.2) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         split.label(text="Type 2:") | 
					
						
							|  |  |  |         split.prop(part.force_field_2, "type", text="") | 
					
						
							| 
									
										
										
										
											2009-11-18 21:57:13 +00:00
										 |  |  |         basic_force_field_settings_ui(self, context, part.force_field_2) | 
					
						
							|  |  |  |         basic_force_field_falloff_ui(self, context, part.force_field_2) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  | class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Vertexgroups" | 
					
						
							| 
									
										
										
										
											2010-08-26 01:05:37 +00:00
										 |  |  |     bl_options = {'DEFAULT_CLOSED'} | 
					
						
							| 
									
										
										
										
											2010-07-11 08:48:21 +00:00
										 |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 12:09:02 +00:00
										 |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         psys = context.particle_system | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  |         # part = psys.settings | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         # layout.label(text="Nothing here yet.") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 12:09:02 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.label(text="Vertex Group") | 
					
						
							|  |  |  |         row.label(text="Negate") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 12:09:02 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         row.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text="Density") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(psys, "invert_vertex_group_density", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-03 05:48:19 +00:00
										 |  |  |         # Commented out vertex groups don't work and are still waiting for better implementation | 
					
						
							|  |  |  |         # row = layout.row() | 
					
						
							|  |  |  |         # row.prop_search(psys, "vertex_group_velocity", ob, "vertex_groups", text="Velocity") | 
					
						
							|  |  |  |         # row.prop(psys, "invert_vertex_group_velocity", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 12:09:02 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         row.prop_search(psys, "vertex_group_length", ob, "vertex_groups", text="Length") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(psys, "invert_vertex_group_length", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 12:09:02 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         row.prop_search(psys, "vertex_group_clump", ob, "vertex_groups", text="Clump") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(psys, "invert_vertex_group_clump", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 12:09:02 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         row.prop_search(psys, "vertex_group_kink", ob, "vertex_groups", text="Kink") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(psys, "invert_vertex_group_kink", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 12:09:02 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         row.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text="Roughness 1") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(psys, "invert_vertex_group_roughness_1", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 12:09:02 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         row.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text="Roughness 2") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(psys, "invert_vertex_group_roughness_2", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-04 12:09:02 +00:00
										 |  |  |         row = layout.row() | 
					
						
							| 
									
										
										
										
											2010-08-23 05:47:45 +00:00
										 |  |  |         row.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text="Roughness End") | 
					
						
							| 
									
										
										
										
											2010-08-20 06:09:58 +00:00
										 |  |  |         row.prop(psys, "invert_vertex_group_roughness_end", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-03 05:48:19 +00:00
										 |  |  |         # row = layout.row() | 
					
						
							|  |  |  |         # row.prop_search(psys, "vertex_group_size", ob, "vertex_groups", text="Size") | 
					
						
							|  |  |  |         # row.prop(psys, "invert_vertex_group_size", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-03 05:48:19 +00:00
										 |  |  |         # row = layout.row() | 
					
						
							|  |  |  |         # row.prop_search(psys, "vertex_group_tangent", ob, "vertex_groups", text="Tangent") | 
					
						
							|  |  |  |         # row.prop(psys, "invert_vertex_group_tangent", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-03 05:48:19 +00:00
										 |  |  |         # row = layout.row() | 
					
						
							|  |  |  |         # row.prop_search(psys, "vertex_group_rotation", ob, "vertex_groups", text="Rotation") | 
					
						
							|  |  |  |         # row.prop(psys, "invert_vertex_group_rotation", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-09-03 05:48:19 +00:00
										 |  |  |         # row = layout.row() | 
					
						
							|  |  |  |         # row.prop_search(psys, "vertex_group_field", ob, "vertex_groups", text="Field") | 
					
						
							|  |  |  |         # row.prop(psys, "invert_vertex_group_field", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-17 09:05:44 +00:00
										 |  |  | class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Panel): | 
					
						
							|  |  |  |     COMPAT_ENGINES = {'BLENDER_RENDER'} | 
					
						
							|  |  |  |     _context_path = "particle_system.settings" | 
					
						
							| 
									
										
										
										
											2010-12-17 10:33:28 +00:00
										 |  |  |     _property_type = bpy.types.ParticleSettings | 
					
						
							| 
									
										
										
										
											2010-08-17 09:05:44 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | def register(): | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |     pass | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | def unregister(): | 
					
						
							| 
									
										
										
										
											2010-08-02 02:55:12 +00:00
										 |  |  |     pass | 
					
						
							| 
									
										
										
										
											2010-02-16 09:55:07 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == "__main__": | 
					
						
							|  |  |  |     register() |