Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_particle.py
| Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | if context.particle_system: | ||||
| return context.particle_system.settings | return context.particle_system.settings | ||||
| elif isinstance(context.space_data.pin_id, bpy.types.ParticleSettings): | elif isinstance(context.space_data.pin_id, bpy.types.ParticleSettings): | ||||
| return context.space_data.pin_id | return context.space_data.pin_id | ||||
| return None | return None | ||||
| class PARTICLE_MT_context_menu(Menu): | class PARTICLE_MT_context_menu(Menu): | ||||
| bl_label = "Particle Specials" | bl_label = "Particle Specials" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| experimental = context.preferences.experimental | experimental = context.preferences.experimental | ||||
| props = layout.operator( | props = layout.operator( | ||||
| "particle.copy_particle_systems", | "particle.copy_particle_systems", | ||||
| Show All 23 Lines | def draw(self, context): | ||||
| ) | ) | ||||
| class PARTICLE_PT_hair_dynamics_presets(PresetPanel, Panel): | class PARTICLE_PT_hair_dynamics_presets(PresetPanel, Panel): | ||||
| bl_label = "Hair Dynamics Presets" | bl_label = "Hair Dynamics Presets" | ||||
| preset_subdir = "hair_dynamics" | preset_subdir = "hair_dynamics" | ||||
| preset_operator = "script.execute_preset" | preset_operator = "script.execute_preset" | ||||
| preset_add_operator = "particle.hair_dynamics_preset_add" | preset_add_operator = "particle.hair_dynamics_preset_add" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| class ParticleButtonsPanel: | class ParticleButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "particle" | bl_context = "particle" | ||||
| @classmethod | @classmethod | ||||
| Show All 37 Lines | def draw_item(self, _context, layout, data, item, icon, _active_data, _active_propname, _index, _flt_flag): | ||||
| elif self.layout_type == 'GRID': | elif self.layout_type == 'GRID': | ||||
| layout.alignment = 'CENTER' | layout.alignment = 'CENTER' | ||||
| layout.label(text="", icon_value=icon) | layout.label(text="", icon_value=icon) | ||||
| class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): | class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel): | ||||
| bl_label = "" | bl_label = "" | ||||
| bl_options = {'HIDE_HEADER'} | bl_options = {'HIDE_HEADER'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.engine | engine = context.engine | ||||
| return ( | return ( | ||||
| (context.particle_system or context.object or context.space_data.pin_id) and | (context.particle_system or context.object or context.space_data.pin_id) and | ||||
| (engine in cls.COMPAT_ENGINES) | (engine in cls.COMPAT_ENGINES) | ||||
| ) | ) | ||||
| ▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| split.enabled = particle_panel_enabled(context, psys) | split.enabled = particle_panel_enabled(context, psys) | ||||
| split.prop(psys, "reactor_target_object") | split.prop(psys, "reactor_target_object") | ||||
| split.prop(psys, "reactor_target_particle_system", text="Particle System") | split.prop(psys, "reactor_target_particle_system", text="Particle System") | ||||
| class PARTICLE_PT_emission(ParticleButtonsPanel, Panel): | class PARTICLE_PT_emission(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Emission" | bl_label = "Emission" | ||||
| bl_translation_context = i18n_contexts.id_particlesettings | bl_translation_context = i18n_contexts.id_particlesettings | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| settings = particle_get_settings(context) | settings = particle_get_settings(context) | ||||
| if settings is None: | if settings is None: | ||||
| return False | return False | ||||
| Show All 35 Lines | def draw(self, context): | ||||
| col.prop(part, "lifetime") | col.prop(part, "lifetime") | ||||
| col.prop(part, "lifetime_random", slider=True, text="Lifetime Randomness") | col.prop(part, "lifetime_random", slider=True, text="Lifetime Randomness") | ||||
| class PARTICLE_PT_emission_source(ParticleButtonsPanel, Panel): | class PARTICLE_PT_emission_source(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Source" | bl_label = "Source" | ||||
| bl_parent_id = "PARTICLE_PT_emission" | bl_parent_id = "PARTICLE_PT_emission" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| Show All 20 Lines | def draw(self, context): | ||||
| elif part.distribution == 'GRID': | elif part.distribution == 'GRID': | ||||
| col.prop(part, "grid_resolution") | col.prop(part, "grid_resolution") | ||||
| col.prop(part, "grid_random", text="Random", slider=True) | col.prop(part, "grid_random", text="Random", slider=True) | ||||
| class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel): | class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Hair Dynamics" | bl_label = "Hair Dynamics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| engine = context.engine | engine = context.engine | ||||
| if psys is None: | if psys is None: | ||||
| return False | return False | ||||
| if psys.settings is None: | if psys.settings is None: | ||||
| ▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| % (result.min_error, result.max_error, result.avg_error), | % (result.min_error, result.max_error, result.avg_error), | ||||
| translate=False) | translate=False) | ||||
| class PARTICLE_PT_hair_dynamics_collision(ParticleButtonsPanel, Panel): | class PARTICLE_PT_hair_dynamics_collision(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Collisions" | bl_label = "Collisions" | ||||
| bl_parent_id = "PARTICLE_PT_hair_dynamics" | bl_parent_id = "PARTICLE_PT_hair_dynamics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return context.particle_system.cloth is not None | return context.particle_system.cloth is not None | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 15 Lines | def draw(self, context): | ||||
| col.prop(cloth_collision, "impulse_clamp") | col.prop(cloth_collision, "impulse_clamp") | ||||
| col.prop(cloth_collision, "collection") | col.prop(cloth_collision, "collection") | ||||
| class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel): | class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Structure" | bl_label = "Structure" | ||||
| bl_parent_id = "PARTICLE_PT_hair_dynamics" | bl_parent_id = "PARTICLE_PT_hair_dynamics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return context.particle_system.cloth is not None | return context.particle_system.cloth is not None | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 14 Lines | def draw(self, context): | ||||
| # XXX has no noticeable effect with stiff hair structure springs | # XXX has no noticeable effect with stiff hair structure springs | ||||
| #col.prop(cloth, "spring_damping", text="Damping") | #col.prop(cloth, "spring_damping", text="Damping") | ||||
| class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel): | class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Volume" | bl_label = "Volume" | ||||
| bl_parent_id = "PARTICLE_PT_hair_dynamics" | bl_parent_id = "PARTICLE_PT_hair_dynamics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return context.particle_system.cloth is not None | return context.particle_system.cloth is not None | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 14 Lines | def draw(self, context): | ||||
| col.prop(cloth, "density_target", text="Density Target") | col.prop(cloth, "density_target", text="Density Target") | ||||
| col.prop(cloth, "density_strength", slider=True, text="Density Strength") | col.prop(cloth, "density_strength", slider=True, text="Density Strength") | ||||
| class PARTICLE_PT_cache(ParticleButtonsPanel, Panel): | class PARTICLE_PT_cache(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Cache" | bl_label = "Cache" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.engine | engine = context.engine | ||||
| if engine not in cls.COMPAT_ENGINES: | if engine not in cls.COMPAT_ENGINES: | ||||
| return False | return False | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| if psys is None: | if psys is None: | ||||
| Show All 16 Lines | def draw(self, context): | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| point_cache_ui(self, psys.point_cache, True, 'HAIR' if (psys.settings.type == 'HAIR') else 'PSYS') | point_cache_ui(self, psys.point_cache, True, 'HAIR' if (psys.settings.type == 'HAIR') else 'PSYS') | ||||
| class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel): | class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Velocity" | bl_label = "Velocity" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| if particle_panel_poll(PARTICLE_PT_velocity, context): | if particle_panel_poll(PARTICLE_PT_velocity, context): | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| settings = particle_get_settings(context) | settings = particle_get_settings(context) | ||||
| if settings.type == 'HAIR' and not settings.use_advanced_hair: | if settings.type == 'HAIR' and not settings.use_advanced_hair: | ||||
| Show All 32 Lines | def draw(self, context): | ||||
| # if part.type=='REACTOR': | # if part.type=='REACTOR': | ||||
| # sub.prop(part, "reactor_factor") | # sub.prop(part, "reactor_factor") | ||||
| # sub.prop(part, "reaction_shape", slider=True) | # sub.prop(part, "reaction_shape", slider=True) | ||||
| class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel): | class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Rotation" | bl_label = "Rotation" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| if particle_panel_poll(PARTICLE_PT_rotation, context): | if particle_panel_poll(PARTICLE_PT_rotation, context): | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| settings = particle_get_settings(context) | settings = particle_get_settings(context) | ||||
| if settings.type == 'HAIR' and not settings.use_advanced_hair: | if settings.type == 'HAIR' and not settings.use_advanced_hair: | ||||
| Show All 38 Lines | def draw(self, context): | ||||
| if part.type != 'HAIR': | if part.type != 'HAIR': | ||||
| col.prop(part, "use_dynamic_rotation") | col.prop(part, "use_dynamic_rotation") | ||||
| class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel): | class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Angular Velocity" | bl_label = "Angular Velocity" | ||||
| bl_parent_id = "PARTICLE_PT_rotation" | bl_parent_id = "PARTICLE_PT_rotation" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| if psys: | if psys: | ||||
| part = psys.settings | part = psys.settings | ||||
| else: | else: | ||||
| part = context.space_data.pin_id | part = context.space_data.pin_id | ||||
| layout.enabled = particle_panel_enabled(context, psys) and part.use_rotations | layout.enabled = particle_panel_enabled(context, psys) and part.use_rotations | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(part, "angular_velocity_mode", text="Axis") | col.prop(part, "angular_velocity_mode", text="Axis") | ||||
| sub = col.column(align=True) | sub = col.column(align=True) | ||||
| sub.active = part.angular_velocity_mode != 'NONE' | sub.active = part.angular_velocity_mode != 'NONE' | ||||
| sub.prop(part, "angular_velocity_factor", text="Amount") | sub.prop(part, "angular_velocity_factor", text="Amount") | ||||
| class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Physics" | bl_label = "Physics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| if particle_panel_poll(PARTICLE_PT_physics, context): | if particle_panel_poll(PARTICLE_PT_physics, context): | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| settings = particle_get_settings(context) | settings = particle_get_settings(context) | ||||
| if settings.type == 'HAIR' and not settings.use_advanced_hair: | if settings.type == 'HAIR' and not settings.use_advanced_hair: | ||||
| Show All 36 Lines | def draw(self, context): | ||||
| if psys: | if psys: | ||||
| col.prop(psys, "use_keyed_timing", text="Use Timing") | col.prop(psys, "use_keyed_timing", text="Use Timing") | ||||
| class PARTICLE_PT_physics_fluid_advanced(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_fluid_advanced(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Advanced" | bl_label = "Advanced" | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.physics_type == 'FLUID' | return part.physics_type == 'FLUID' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 28 Lines | def draw(self, context): | ||||
| sub.label(text=iface_("Spacing: %g") % spacing, translate=False) | sub.label(text=iface_("Spacing: %g") % spacing, translate=False) | ||||
| class PARTICLE_PT_physics_fluid_springs(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_fluid_springs(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Springs" | bl_label = "Springs" | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| fluid = part.fluid | fluid = part.fluid | ||||
| return part.physics_type == 'FLUID' and fluid.solver == 'DDR' | return part.physics_type == 'FLUID' and fluid.solver == 'DDR' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| fluid = part.fluid | fluid = part.fluid | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(fluid, "spring_force", text="Force") | col.prop(fluid, "spring_force", text="Force") | ||||
| class PARTICLE_PT_physics_fluid_springs_viscoelastic(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_fluid_springs_viscoelastic(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Viscoelastic Springs" | bl_label = "Viscoelastic Springs" | ||||
| bl_parent_id = "PARTICLE_PT_physics_fluid_springs" | bl_parent_id = "PARTICLE_PT_physics_fluid_springs" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| fluid = part.fluid | fluid = part.fluid | ||||
| return part.physics_type == 'FLUID' and fluid.solver == 'DDR' | return part.physics_type == 'FLUID' and fluid.solver == 'DDR' | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| Show All 19 Lines | def draw(self, context): | ||||
| col.prop(fluid, "use_initial_rest_length") | col.prop(fluid, "use_initial_rest_length") | ||||
| col.prop(fluid, "spring_frames", text="Frames") | col.prop(fluid, "spring_frames", text="Frames") | ||||
| class PARTICLE_PT_physics_fluid_springs_advanced(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_fluid_springs_advanced(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Advanced" | bl_label = "Advanced" | ||||
| bl_parent_id = "PARTICLE_PT_physics_fluid_springs" | bl_parent_id = "PARTICLE_PT_physics_fluid_springs" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| fluid = part.fluid | fluid = part.fluid | ||||
| return part.physics_type == 'FLUID' and fluid.solver == 'DDR' | return part.physics_type == 'FLUID' and fluid.solver == 'DDR' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| fluid = part.fluid | fluid = part.fluid | ||||
| sub = layout.column() | sub = layout.column() | ||||
| sub.prop(fluid, "rest_length", slider=fluid.use_factor_rest_length) | sub.prop(fluid, "rest_length", slider=fluid.use_factor_rest_length) | ||||
| sub.prop(fluid, "use_factor_rest_length") | sub.prop(fluid, "use_factor_rest_length") | ||||
| class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Movement" | bl_label = "Movement" | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.physics_type == 'BOIDS' | return part.physics_type == 'BOIDS' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 36 Lines | def draw(self, context): | ||||
| layout.prop(part, "collision_collection") | layout.prop(part, "collision_collection") | ||||
| class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Battle" | bl_label = "Battle" | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.physics_type == 'BOIDS' | return part.physics_type == 'BOIDS' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 10 Lines | def draw(self, context): | ||||
| col.prop(boids, "accuracy") | col.prop(boids, "accuracy") | ||||
| col.prop(boids, "range") | col.prop(boids, "range") | ||||
| class PARTICLE_PT_physics_boids_misc(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_boids_misc(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Misc" | bl_label = "Misc" | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.physics_type == 'BOIDS' | return part.physics_type == 'BOIDS' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| boids = part.boids | boids = part.boids | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(boids, "bank", slider=True) | col.prop(boids, "bank", slider=True) | ||||
| col.prop(boids, "pitch", slider=True) | col.prop(boids, "pitch", slider=True) | ||||
| col.prop(boids, "height", slider=True) | col.prop(boids, "height", slider=True) | ||||
| class PARTICLE_PT_physics_relations(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_relations(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Relations" | bl_label = "Relations" | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return psys and part.physics_type in {'KEYED', 'BOIDS'} | return psys and part.physics_type in {'KEYED', 'BOIDS'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Show All 38 Lines | def draw(self, context): | ||||
| sub.prop(key, "system", text="System") | sub.prop(key, "system", text="System") | ||||
| layout.prop(key, "alliance") | layout.prop(key, "alliance") | ||||
| class PARTICLE_PT_physics_fluid_interaction(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_fluid_interaction(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Fluid Interaction" | bl_label = "Fluid Interaction" | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.physics_type == 'FLUID' | return part.physics_type == 'FLUID' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 24 Lines | def draw(self, context): | ||||
| sub.prop(key, "object") | sub.prop(key, "object") | ||||
| sub.prop(key, "system", text="System") | sub.prop(key, "system", text="System") | ||||
| class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Deflection" | bl_label = "Deflection" | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.physics_type in {'NEWTON', 'FLUID'} | return part.physics_type in {'NEWTON', 'FLUID'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 9 Lines | def draw(self, context): | ||||
| col.prop(part, "use_die_on_collision") | col.prop(part, "use_die_on_collision") | ||||
| col.prop(part, "collision_collection") | col.prop(part, "collision_collection") | ||||
| class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Forces" | bl_label = "Forces" | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.physics_type in {'NEWTON', 'FLUID'} | return part.physics_type in {'NEWTON', 'FLUID'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 10 Lines | def draw(self, context): | ||||
| col.prop(part, "drag_factor", slider=True) | col.prop(part, "drag_factor", slider=True) | ||||
| col.prop(part, "damping", slider=True) | col.prop(part, "damping", slider=True) | ||||
| class PARTICLE_PT_physics_integration(ParticleButtonsPanel, Panel): | class PARTICLE_PT_physics_integration(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Integration" | bl_label = "Integration" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.physics_type in {'NEWTON', 'FLUID'} | return part.physics_type in {'NEWTON', 'FLUID'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 17 Lines | def draw(self, context): | ||||
| sub.prop(part, "courant_target", text="Threshold") | sub.prop(part, "courant_target", text="Threshold") | ||||
| class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel): | class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Boid Brain" | bl_label = "Boid Brain" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| bl_parent_id = "PARTICLE_PT_physics" | bl_parent_id = "PARTICLE_PT_physics" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| settings = particle_get_settings(context) | settings = particle_get_settings(context) | ||||
| engine = context.engine | engine = context.engine | ||||
| if settings is None: | if settings is None: | ||||
| ▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| elif rule.type == 'FIGHT': | elif rule.type == 'FIGHT': | ||||
| col.prop(rule, "distance") | col.prop(rule, "distance") | ||||
| col.prop(rule, "flee_distance") | col.prop(rule, "flee_distance") | ||||
| class PARTICLE_PT_render(ParticleButtonsPanel, Panel): | class PARTICLE_PT_render(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Render" | bl_label = "Render" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| settings = particle_get_settings(context) | settings = particle_get_settings(context) | ||||
| engine = context.engine | engine = context.engine | ||||
| if settings is None: | if settings is None: | ||||
| return False | return False | ||||
| Show All 30 Lines | def draw(self, context): | ||||
| layout.separator() | layout.separator() | ||||
| layout.prop(context.object, "show_instancer_for_render", text="Show Emitter") | layout.prop(context.object, "show_instancer_for_render", text="Show Emitter") | ||||
| class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel): | class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Extra" | bl_label = "Extra" | ||||
| bl_parent_id = "PARTICLE_PT_render" | bl_parent_id = "PARTICLE_PT_render" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.render_type != 'NONE' | return part.render_type != 'NONE' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| col = layout.column() | col = layout.column() | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(part, "use_parent_particles", text="Parent Particles") | col.prop(part, "use_parent_particles", text="Parent Particles") | ||||
| col.prop(part, "show_unborn", text="Unborn") | col.prop(part, "show_unborn", text="Unborn") | ||||
| col.prop(part, "use_dead", text="Dead") | col.prop(part, "use_dead", text="Dead") | ||||
| class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel): | class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Path" | bl_label = "Path" | ||||
| bl_parent_id = "PARTICLE_PT_render" | bl_parent_id = "PARTICLE_PT_render" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.render_type == 'PATH' | return part.render_type == 'PATH' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(part, "use_hair_bspline") | col.prop(part, "use_hair_bspline") | ||||
| col.prop(part, "render_step", text="Steps") | col.prop(part, "render_step", text="Steps") | ||||
| class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel): | class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Timing" | bl_label = "Timing" | ||||
| bl_parent_id = "PARTICLE_PT_render" | bl_parent_id = "PARTICLE_PT_render" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.render_type == 'PATH' | return part.render_type == 'PATH' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 11 Lines | def draw(self, context): | ||||
| col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time) | col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time) | ||||
| col.prop(part, "length_random", text="Random", slider=True) | col.prop(part, "length_random", text="Random", slider=True) | ||||
| class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel): | class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Object" | bl_label = "Object" | ||||
| bl_parent_id = "PARTICLE_PT_render" | bl_parent_id = "PARTICLE_PT_render" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.render_type == 'OBJECT' | return part.render_type == 'OBJECT' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(part, "instance_object", text="Instance Object") | col.prop(part, "instance_object", text="Instance Object") | ||||
| sub = col.column() | sub = col.column() | ||||
| sub.prop(part, "use_global_instance", text="Global Coordinates") | sub.prop(part, "use_global_instance", text="Global Coordinates") | ||||
| sub.prop(part, "use_rotation_instance", text="Object Rotation") | sub.prop(part, "use_rotation_instance", text="Object Rotation") | ||||
| sub.prop(part, "use_scale_instance", text="Object Scale") | sub.prop(part, "use_scale_instance", text="Object Scale") | ||||
| class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel): | class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Collection" | bl_label = "Collection" | ||||
| bl_parent_id = "PARTICLE_PT_render" | bl_parent_id = "PARTICLE_PT_render" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.render_type == 'COLLECTION' | return part.render_type == 'COLLECTION' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 13 Lines | def draw(self, context): | ||||
| sub.prop(part, "use_rotation_instance", text="Object Rotation") | sub.prop(part, "use_rotation_instance", text="Object Rotation") | ||||
| sub.prop(part, "use_scale_instance", text="Object Scale") | sub.prop(part, "use_scale_instance", text="Object Scale") | ||||
| class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): | class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Use Count" | bl_label = "Use Count" | ||||
| bl_parent_id = "PARTICLE_PT_render_collection" | bl_parent_id = "PARTICLE_PT_render_collection" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.render_type == 'COLLECTION' | return part.render_type == 'COLLECTION' | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 31 Lines | def draw(self, context): | ||||
| if weight: | if weight: | ||||
| row = layout.row() | row = layout.row() | ||||
| row.prop(weight, "count") | row.prop(weight, "count") | ||||
| class PARTICLE_PT_draw(ParticleButtonsPanel, Panel): | class PARTICLE_PT_draw(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Viewport Display" | bl_label = "Viewport Display" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| settings = particle_get_settings(context) | settings = particle_get_settings(context) | ||||
| engine = context.engine | engine = context.engine | ||||
| if settings is None: | if settings is None: | ||||
| return False | return False | ||||
| return engine in cls.COMPAT_ENGINES | return engine in cls.COMPAT_ENGINES | ||||
| ▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| layout.separator() | layout.separator() | ||||
| layout.prop(context.object, "show_instancer_for_viewport", text="Show Emitter") | layout.prop(context.object, "show_instancer_for_viewport", text="Show Emitter") | ||||
| class PARTICLE_PT_children(ParticleButtonsPanel, Panel): | class PARTICLE_PT_children(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Children" | bl_label = "Children" | ||||
| bl_translation_context = i18n_contexts.id_particlesettings | bl_translation_context = i18n_contexts.id_particlesettings | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return particle_panel_poll(cls, context) | return particle_panel_poll(cls, context) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 36 Lines | def draw(self, context): | ||||
| col.prop(part, "child_radius", text="Radius") | col.prop(part, "child_radius", text="Radius") | ||||
| col.prop(part, "child_roundness", text="Roundness", slider=True) | col.prop(part, "child_roundness", text="Roundness", slider=True) | ||||
| class PARTICLE_PT_children_parting(ParticleButtonsPanel, Panel): | class PARTICLE_PT_children_parting(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Parting" | bl_label = "Parting" | ||||
| bl_parent_id = "PARTICLE_PT_children" | bl_parent_id = "PARTICLE_PT_children" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.child_type == 'INTERPOLATED' | return part.child_type == 'INTERPOLATED' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 14 Lines | def draw(self, context): | ||||
| sub.prop(part, "child_parting_min", text="Min") | sub.prop(part, "child_parting_min", text="Min") | ||||
| sub.prop(part, "child_parting_max", text="Max") | sub.prop(part, "child_parting_max", text="Max") | ||||
| class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel): | class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Clumping" | bl_label = "Clumping" | ||||
| bl_parent_id = "PARTICLE_PT_children" | bl_parent_id = "PARTICLE_PT_children" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.child_type != 'NONE' | return part.child_type != 'NONE' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 19 Lines | def draw(self, context): | ||||
| if part.use_twist_curve: | if part.use_twist_curve: | ||||
| col.template_curve_mapping(part, "twist_curve") | col.template_curve_mapping(part, "twist_curve") | ||||
| class PARTICLE_PT_children_clumping_noise(ParticleButtonsPanel, Panel): | class PARTICLE_PT_children_clumping_noise(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Clump Noise" | bl_label = "Clump Noise" | ||||
| bl_parent_id = "PARTICLE_PT_children_clumping" | bl_parent_id = "PARTICLE_PT_children_clumping" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| self.layout.prop(part, "use_clump_noise", text="") | self.layout.prop(part, "use_clump_noise", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| layout.enabled = part.use_clump_noise | layout.enabled = part.use_clump_noise | ||||
| layout.prop(part, "clump_noise_size") | layout.prop(part, "clump_noise_size") | ||||
| class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel): | class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Roughness" | bl_label = "Roughness" | ||||
| bl_translation_context = i18n_contexts.id_particlesettings | bl_translation_context = i18n_contexts.id_particlesettings | ||||
| bl_parent_id = "PARTICLE_PT_children" | bl_parent_id = "PARTICLE_PT_children" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.child_type != 'NONE' | return part.child_type != 'NONE' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 24 Lines | def draw(self, context): | ||||
| sub.prop(part, "roughness_2_size", text="Size") | sub.prop(part, "roughness_2_size", text="Size") | ||||
| sub.prop(part, "roughness_2_threshold", slider=True) | sub.prop(part, "roughness_2_threshold", slider=True) | ||||
| class PARTICLE_PT_children_kink(ParticleButtonsPanel, Panel): | class PARTICLE_PT_children_kink(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Kink" | bl_label = "Kink" | ||||
| bl_parent_id = "PARTICLE_PT_children" | bl_parent_id = "PARTICLE_PT_children" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| return part.child_type != 'NONE' | return part.child_type != 'NONE' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 33 Lines | def draw(self, context): | ||||
| col.prop(part, "kink_flat", slider=True) | col.prop(part, "kink_flat", slider=True) | ||||
| col.prop(part, "kink_frequency") | col.prop(part, "kink_frequency") | ||||
| col.prop(part, "kink_shape", slider=True) | col.prop(part, "kink_shape", slider=True) | ||||
| class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel): | class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Field Weights" | bl_label = "Field Weights" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return particle_panel_poll(cls, context) | return particle_panel_poll(cls, context) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| effector_weights_ui(self, part.effector_weights, 'PSYS') | effector_weights_ui(self, part.effector_weights, 'PSYS') | ||||
| if part.type == 'HAIR': | if part.type == 'HAIR': | ||||
| row = self.layout.row() | row = self.layout.row() | ||||
| row.prop(part.effector_weights, "apply_to_hair_growing") | row.prop(part.effector_weights, "apply_to_hair_growing") | ||||
| row.prop(part, "apply_effector_to_children") | row.prop(part, "apply_effector_to_children") | ||||
| row = self.layout.row() | row = self.layout.row() | ||||
| row.prop(part, "effect_hair", slider=True) | row.prop(part, "effect_hair", slider=True) | ||||
| class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel): | class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Force Field Settings" | bl_label = "Force Field Settings" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(part, "use_self_effect") | col.prop(part, "use_self_effect") | ||||
| col.prop(part, "effector_amount", text="Effector Amount") | col.prop(part, "effector_amount", text="Effector Amount") | ||||
| class PARTICLE_PT_force_fields_type1(ParticleButtonsPanel, Panel): | class PARTICLE_PT_force_fields_type1(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Type 1" | bl_label = "Type 1" | ||||
| bl_parent_id = "PARTICLE_PT_force_fields" | bl_parent_id = "PARTICLE_PT_force_fields" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| if part.force_field_1: | if part.force_field_1: | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(part.force_field_1, "type", text="Type 1") | col.prop(part.force_field_1, "type", text="Type 1") | ||||
| basic_force_field_settings_ui(self, part.force_field_1) | basic_force_field_settings_ui(self, part.force_field_1) | ||||
| class PARTICLE_PT_force_fields_type2(ParticleButtonsPanel, Panel): | class PARTICLE_PT_force_fields_type2(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Type 2" | bl_label = "Type 2" | ||||
| bl_parent_id = "PARTICLE_PT_force_fields" | bl_parent_id = "PARTICLE_PT_force_fields" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| if part.force_field_2: | if part.force_field_2: | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(part.force_field_2, "type", text="Type 2") | col.prop(part.force_field_2, "type", text="Type 2") | ||||
| basic_force_field_settings_ui(self, part.force_field_2) | basic_force_field_settings_ui(self, part.force_field_2) | ||||
| class PARTICLE_PT_force_fields_type1_falloff(ParticleButtonsPanel, Panel): | class PARTICLE_PT_force_fields_type1_falloff(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Falloff" | bl_label = "Falloff" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| bl_parent_id = "PARTICLE_PT_force_fields_type1" | bl_parent_id = "PARTICLE_PT_force_fields_type1" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| if part.force_field_1: | if part.force_field_1: | ||||
| basic_force_field_falloff_ui(self, part.force_field_1) | basic_force_field_falloff_ui(self, part.force_field_1) | ||||
| class PARTICLE_PT_force_fields_type2_falloff(ParticleButtonsPanel, Panel): | class PARTICLE_PT_force_fields_type2_falloff(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Falloff" | bl_label = "Falloff" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| bl_parent_id = "PARTICLE_PT_force_fields_type2" | bl_parent_id = "PARTICLE_PT_force_fields_type2" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| part = particle_get_settings(context) | part = particle_get_settings(context) | ||||
| if part.force_field_2: | if part.force_field_2: | ||||
| basic_force_field_falloff_ui(self, part.force_field_2) | basic_force_field_falloff_ui(self, part.force_field_2) | ||||
| class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel): | class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Vertex Groups" | bl_label = "Vertex Groups" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| if context.particle_system is None: | if context.particle_system is None: | ||||
| return False | return False | ||||
| return particle_panel_poll(cls, context) | return particle_panel_poll(cls, context) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| ▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| # row = layout.row() | # row = layout.row() | ||||
| # row.prop_search(psys, "vertex_group_field", ob, "vertex_groups", text="Field") | # row.prop_search(psys, "vertex_group_field", ob, "vertex_groups", text="Field") | ||||
| # row.prop(psys, "invert_vertex_group_field", text="") | # row.prop(psys, "invert_vertex_group_field", text="") | ||||
| class PARTICLE_PT_textures(ParticleButtonsPanel, Panel): | class PARTICLE_PT_textures(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Textures" | bl_label = "Textures" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| if context.particle_system is None: | if context.particle_system is None: | ||||
| return False | return False | ||||
| return particle_panel_poll(cls, context) | return particle_panel_poll(cls, context) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Show All 15 Lines | def draw(self, context): | ||||
| else: | else: | ||||
| slot = part.texture_slots[part.active_texture_index] | slot = part.texture_slots[part.active_texture_index] | ||||
| layout.template_ID(slot, "texture", new="texture.new") | layout.template_ID(slot, "texture", new="texture.new") | ||||
| class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel): | class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel): | ||||
| bl_label = "Hair Shape" | bl_label = "Hair Shape" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| psys = context.particle_system | psys = context.particle_system | ||||
| if psys is None: | if psys is None: | ||||
| return False | return False | ||||
| return particle_panel_poll(cls, context) and psys.settings.type == 'HAIR' | return particle_panel_poll(cls, context) and psys.settings.type == 'HAIR' | ||||
| Show All 11 Lines | def draw(self, context): | ||||
| col.prop(part, "tip_radius", text="Tip") | col.prop(part, "tip_radius", text="Tip") | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(part, "radius_scale") | col.prop(part, "radius_scale") | ||||
| col.prop(part, "use_close_tip") | col.prop(part, "use_close_tip") | ||||
| class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel): | class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel): | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH','BLENDER_WORKBENCH_NEXT'} | ||||
| _context_path = "particle_system.settings" | _context_path = "particle_system.settings" | ||||
| _property_type = bpy.types.ParticleSettings | _property_type = bpy.types.ParticleSettings | ||||
| classes = ( | classes = ( | ||||
| PARTICLE_MT_context_menu, | PARTICLE_MT_context_menu, | ||||
| PARTICLE_PT_hair_dynamics_presets, | PARTICLE_PT_hair_dynamics_presets, | ||||
| PARTICLE_UL_particle_systems, | PARTICLE_UL_particle_systems, | ||||
| ▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines | |||||