Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_fluid.py
| Show All 31 Lines | |||||
| class PhysicButtonsPanel: | class PhysicButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "physics" | bl_context = "physics" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | ob = context.object | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return (ob and ob.type == 'MESH') and rd.engine in cls.COMPAT_ENGINES and (context.fluid) | return (ob and ob.type == 'MESH') and view_render.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'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ▲ Show 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | |||||
| class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): | class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Fluid World" | bl_label = "Fluid World" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| md = context.fluid | md = context.fluid | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return md and md.settings and (md.settings.type == 'DOMAIN') and rd.engine in cls.COMPAT_ENGINES | return md and md.settings and (md.settings.type == 'DOMAIN') and view_render.engine in cls.COMPAT_ENGINES | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| fluid = context.fluid.settings | fluid = context.fluid.settings | ||||
| scene = context.scene | scene = context.scene | ||||
| split = layout.split() | split = layout.split() | ||||
| Show All 36 Lines | |||||
| class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel): | class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Fluid Boundary" | bl_label = "Fluid Boundary" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| md = context.fluid | md = context.fluid | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return md and md.settings and (md.settings.type == 'DOMAIN') and rd.engine in cls.COMPAT_ENGINES | return md and md.settings and (md.settings.type == 'DOMAIN') and view_render.engine in cls.COMPAT_ENGINES | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| fluid = context.fluid.settings | fluid = context.fluid.settings | ||||
| split = layout.split() | split = layout.split() | ||||
| Show All 13 Lines | |||||
| class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel): | class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Fluid Particles" | bl_label = "Fluid Particles" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| md = context.fluid | md = context.fluid | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return md and md.settings and (md.settings.type == 'DOMAIN') and rd.engine in cls.COMPAT_ENGINES | return md and md.settings and (md.settings.type == 'DOMAIN') and view_render.engine in cls.COMPAT_ENGINES | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| fluid = context.fluid.settings | fluid = context.fluid.settings | ||||
| row = layout.row() | row = layout.row() | ||||
| row.prop(fluid, "tracer_particles", text="Tracer") | row.prop(fluid, "tracer_particles", text="Tracer") | ||||
| Show All 15 Lines | |||||