Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_fluid.py
| Show All 37 Lines | class PhysicButtonsPanel: | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | ob = context.object | ||||
| return (ob and ob.type == 'MESH') and context.engine in cls.COMPAT_ENGINES and (context.fluid) | return (ob and ob.type == 'MESH') and context.engine in cls.COMPAT_ENGINES and (context.fluid) | ||||
| class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): | class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Fluid" | bl_label = "Fluid" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_LANPR'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| md = context.fluid | md = context.fluid | ||||
| fluid = md.settings | fluid = md.settings | ||||
| col = layout.column() | col = layout.column() | ||||
| ▲ Show 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| sub.prop(fluid, "velocity_strength", text="Strength") | sub.prop(fluid, "velocity_strength", text="Strength") | ||||
| sub.prop(fluid, "velocity_radius", text="Radius") | sub.prop(fluid, "velocity_radius", text="Radius") | ||||
| class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): | class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): | ||||
| bl_label = "World" | bl_label = "World" | ||||
| bl_parent_id = 'PHYSICS_PT_fluid' | bl_parent_id = 'PHYSICS_PT_fluid' | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_LANPR'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| md = context.fluid | md = context.fluid | ||||
| return md and md.settings and (md.settings.type == 'DOMAIN') and context.engine in cls.COMPAT_ENGINES | return md and md.settings and (md.settings.type == 'DOMAIN') and context.engine in cls.COMPAT_ENGINES | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 33 Lines | def draw(self, context): | ||||
| col.prop(fluid, "grid_levels", slider=True) | col.prop(fluid, "grid_levels", slider=True) | ||||
| col.prop(fluid, "compressibility", slider=True) | col.prop(fluid, "compressibility", slider=True) | ||||
| class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel): | class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Boundary" | bl_label = "Boundary" | ||||
| bl_parent_id = 'PHYSICS_PT_fluid' | bl_parent_id = 'PHYSICS_PT_fluid' | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_LANPR'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| md = context.fluid | md = context.fluid | ||||
| return md and md.settings and (md.settings.type == 'DOMAIN') and context.engine in cls.COMPAT_ENGINES | return md and md.settings and (md.settings.type == 'DOMAIN') and context.engine in cls.COMPAT_ENGINES | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 14 Lines | def draw(self, context): | ||||
| col.prop(fluid, "surface_smooth", text="Smoothing") | col.prop(fluid, "surface_smooth", text="Smoothing") | ||||
| col.prop(fluid, "surface_subdivisions", text="Subdivisions") | col.prop(fluid, "surface_subdivisions", text="Subdivisions") | ||||
| class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel): | class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Particles" | bl_label = "Particles" | ||||
| bl_parent_id = 'PHYSICS_PT_fluid' | bl_parent_id = 'PHYSICS_PT_fluid' | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_LANPR'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| md = context.fluid | md = context.fluid | ||||
| return md and md.settings and (md.settings.type == 'DOMAIN') and context.engine in cls.COMPAT_ENGINES | return md and md.settings and (md.settings.type == 'DOMAIN') and context.engine in cls.COMPAT_ENGINES | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 20 Lines | |||||