Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_fluid.py
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | def poll_fluid_flow_liquid(context): | ||||
| md = context.fluid | md = context.fluid | ||||
| flow = md.flow_settings | flow = md.flow_settings | ||||
| if (flow.flow_type == 'LIQUID'): | if (flow.flow_type == 'LIQUID'): | ||||
| return True | return True | ||||
| class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): | class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Fluid" | bl_label = "Fluid" | ||||
| 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): | ||||
| 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) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| if not bpy.app.build_options.fluid: | if not bpy.app.build_options.fluid: | ||||
| col = layout.column(align=True) | col = layout.column(align=True) | ||||
| col.alignment = 'RIGHT' | col.alignment = 'RIGHT' | ||||
| col.label(text="Built without Fluid modifier") | col.label(text="Built without Fluid modifier") | ||||
| return | return | ||||
| md = context.fluid | md = context.fluid | ||||
| layout.prop(md, "fluid_type") | layout.prop(md, "fluid_type") | ||||
| class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): | class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Settings" | bl_label = "Settings" | ||||
| bl_parent_id = 'PHYSICS_PT_fluid' | bl_parent_id = 'PHYSICS_PT_fluid' | ||||
| 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 not PhysicButtonsPanel.poll_fluid(context): | if not PhysicButtonsPanel.poll_fluid(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| if effector_settings.effector_type == 'GUIDE': | if effector_settings.effector_type == 'GUIDE': | ||||
| col.prop(effector_settings, "velocity_factor", text="Velocity Factor") | col.prop(effector_settings, "velocity_factor", text="Velocity Factor") | ||||
| col.prop(effector_settings, "guide_mode", text="Guide Mode") | col.prop(effector_settings, "guide_mode", text="Guide Mode") | ||||
| class PHYSICS_PT_borders(PhysicButtonsPanel, Panel): | class PHYSICS_PT_borders(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Border Collisions" | bl_label = "Border Collisions" | ||||
| bl_parent_id = 'PHYSICS_PT_settings' | bl_parent_id = 'PHYSICS_PT_settings' | ||||
| 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 not PhysicButtonsPanel.poll_fluid_domain(context): | if not PhysicButtonsPanel.poll_fluid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 16 Lines | def draw(self, context): | ||||
| col.prop(domain, "use_collision_border_left") | col.prop(domain, "use_collision_border_left") | ||||
| col.prop(domain, "use_collision_border_top") | col.prop(domain, "use_collision_border_top") | ||||
| col.prop(domain, "use_collision_border_bottom") | col.prop(domain, "use_collision_border_bottom") | ||||
| class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): | class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Gas" | bl_label = "Gas" | ||||
| bl_parent_id = 'PHYSICS_PT_fluid' | bl_parent_id = 'PHYSICS_PT_fluid' | ||||
| 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 not PhysicButtonsPanel.poll_gas_domain(context): | if not PhysicButtonsPanel.poll_gas_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 16 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(domain, "vorticity") | col.prop(domain, "vorticity") | ||||
| class PHYSICS_PT_smoke_dissolve(PhysicButtonsPanel, Panel): | class PHYSICS_PT_smoke_dissolve(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Dissolve" | bl_label = "Dissolve" | ||||
| bl_parent_id = 'PHYSICS_PT_smoke' | bl_parent_id = 'PHYSICS_PT_smoke' | ||||
| 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 not PhysicButtonsPanel.poll_gas_domain(context): | if not PhysicButtonsPanel.poll_gas_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 27 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(domain, "use_dissolve_smoke_log", text="Slow") | col.prop(domain, "use_dissolve_smoke_log", text="Slow") | ||||
| class PHYSICS_PT_fire(PhysicButtonsPanel, Panel): | class PHYSICS_PT_fire(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Fire" | bl_label = "Fire" | ||||
| bl_parent_id = 'PHYSICS_PT_smoke' | bl_parent_id = 'PHYSICS_PT_smoke' | ||||
| 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 not PhysicButtonsPanel.poll_gas_domain(context): | if not PhysicButtonsPanel.poll_gas_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 22 Lines | def draw(self, context): | ||||
| col.prop(domain, "flame_ignition", text="Minimum") | col.prop(domain, "flame_ignition", text="Minimum") | ||||
| row = col.row() | row = col.row() | ||||
| row.prop(domain, "flame_smoke_color", text="Smoke Color") | row.prop(domain, "flame_smoke_color", text="Smoke Color") | ||||
| class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): | class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Liquid" | bl_label = "Liquid" | ||||
| bl_parent_id = 'PHYSICS_PT_fluid' | bl_parent_id = 'PHYSICS_PT_fluid' | ||||
| 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 not PhysicButtonsPanel.poll_liquid_domain(context): | if not PhysicButtonsPanel.poll_liquid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| sub.prop(domain, "fractions_distance", text="Obstacle Distance") | sub.prop(domain, "fractions_distance", text="Obstacle Distance") | ||||
| sub.prop(domain, "fractions_threshold", text="Threshold") | sub.prop(domain, "fractions_threshold", text="Threshold") | ||||
| class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): | class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Flow Source" | bl_label = "Flow Source" | ||||
| bl_parent_id = 'PHYSICS_PT_settings' | bl_parent_id = 'PHYSICS_PT_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'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| if not PhysicButtonsPanel.poll_fluid_flow(context): | if not PhysicButtonsPanel.poll_fluid_flow(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 24 Lines | def draw(self, context): | ||||
| sub = col.column() | sub = col.column() | ||||
| sub.active = flow.use_particle_size | sub.active = flow.use_particle_size | ||||
| sub.prop(flow, "particle_size") | sub.prop(flow, "particle_size") | ||||
| class PHYSICS_PT_flow_initial_velocity(PhysicButtonsPanel, Panel): | class PHYSICS_PT_flow_initial_velocity(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Initial Velocity" | bl_label = "Initial Velocity" | ||||
| bl_parent_id = 'PHYSICS_PT_settings' | bl_parent_id = 'PHYSICS_PT_settings' | ||||
| 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 not PhysicButtonsPanel.poll_fluid_flow(context): | if not PhysicButtonsPanel.poll_fluid_flow(context): | ||||
| return False | return False | ||||
| if PhysicButtonsPanel.poll_fluid_flow_outflow(context): | if PhysicButtonsPanel.poll_fluid_flow_outflow(context): | ||||
| return False | return False | ||||
| Show All 25 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(flow_smoke, "velocity_coord") | col.prop(flow_smoke, "velocity_coord") | ||||
| class PHYSICS_PT_flow_texture(PhysicButtonsPanel, Panel): | class PHYSICS_PT_flow_texture(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Texture" | bl_label = "Texture" | ||||
| bl_parent_id = 'PHYSICS_PT_settings' | bl_parent_id = 'PHYSICS_PT_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'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| if not PhysicButtonsPanel.poll_fluid_flow(context): | if not PhysicButtonsPanel.poll_fluid_flow(context): | ||||
| return False | return False | ||||
| if PhysicButtonsPanel.poll_fluid_flow_outflow(context): | if PhysicButtonsPanel.poll_fluid_flow_outflow(context): | ||||
| return False | return False | ||||
| Show All 34 Lines | def draw(self, context): | ||||
| sub.prop(flow_smoke, "texture_offset") | sub.prop(flow_smoke, "texture_offset") | ||||
| class PHYSICS_PT_adaptive_domain(PhysicButtonsPanel, Panel): | class PHYSICS_PT_adaptive_domain(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Adaptive Domain" | bl_label = "Adaptive Domain" | ||||
| bl_parent_id = 'PHYSICS_PT_settings' | bl_parent_id = 'PHYSICS_PT_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'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| if not PhysicButtonsPanel.poll_gas_domain(context): | if not PhysicButtonsPanel.poll_gas_domain(context): | ||||
| return False | return False | ||||
| md = context.fluid | md = context.fluid | ||||
| domain = md.domain_settings | domain = md.domain_settings | ||||
| Show All 35 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(domain, "adapt_threshold", text="Threshold") | col.prop(domain, "adapt_threshold", text="Threshold") | ||||
| class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): | class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Noise" | bl_label = "Noise" | ||||
| bl_parent_id = 'PHYSICS_PT_smoke' | bl_parent_id = 'PHYSICS_PT_smoke' | ||||
| 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 not PhysicButtonsPanel.poll_gas_domain(context): | if not PhysicButtonsPanel.poll_gas_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| else: | else: | ||||
| split.operator("fluid.free_noise", text="Free Noise") | split.operator("fluid.free_noise", text="Free Noise") | ||||
| class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): | class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Mesh" | bl_label = "Mesh" | ||||
| bl_parent_id = 'PHYSICS_PT_liquid' | bl_parent_id = 'PHYSICS_PT_liquid' | ||||
| 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 not PhysicButtonsPanel.poll_liquid_domain(context): | if not PhysicButtonsPanel.poll_liquid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| else: | else: | ||||
| split.operator("fluid.free_mesh", text="Free Mesh") | split.operator("fluid.free_mesh", text="Free Mesh") | ||||
| class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): | class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Particles" | bl_label = "Particles" | ||||
| bl_parent_id = 'PHYSICS_PT_liquid' | bl_parent_id = 'PHYSICS_PT_liquid' | ||||
| 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 not PhysicButtonsPanel.poll_liquid_domain(context): | if not PhysicButtonsPanel.poll_liquid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| else: | else: | ||||
| split.operator("fluid.free_particles", text="Free Particles") | split.operator("fluid.free_particles", text="Free Particles") | ||||
| class PHYSICS_PT_viscosity(PhysicButtonsPanel, Panel): | class PHYSICS_PT_viscosity(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Viscosity" | bl_label = "Viscosity" | ||||
| bl_parent_id = 'PHYSICS_PT_liquid' | bl_parent_id = 'PHYSICS_PT_liquid' | ||||
| 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): | ||||
| # Fluid viscosity only enabled for liquids | # Fluid viscosity only enabled for liquids | ||||
| if not PhysicButtonsPanel.poll_liquid_domain(context): | if not PhysicButtonsPanel.poll_liquid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 23 Lines | def draw(self, context): | ||||
| col = flow.column(align=True) | col = flow.column(align=True) | ||||
| col.prop(domain, "viscosity_value", text="Strength") | col.prop(domain, "viscosity_value", text="Strength") | ||||
| class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): | class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Diffusion" | bl_label = "Diffusion" | ||||
| bl_parent_id = 'PHYSICS_PT_liquid' | bl_parent_id = 'PHYSICS_PT_liquid' | ||||
| 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): | ||||
| # Fluid diffusion only enabled for liquids (surface tension and viscosity not relevant for smoke) | # Fluid diffusion only enabled for liquids (surface tension and viscosity not relevant for smoke) | ||||
| if not PhysicButtonsPanel.poll_liquid_domain(context): | if not PhysicButtonsPanel.poll_liquid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 30 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(domain, "surface_tension", text="Surface Tension") | col.prop(domain, "surface_tension", text="Surface Tension") | ||||
| class PHYSICS_PT_guide(PhysicButtonsPanel, Panel): | class PHYSICS_PT_guide(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Guides" | bl_label = "Guides" | ||||
| 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', '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 not PhysicButtonsPanel.poll_fluid_domain(context): | if not PhysicButtonsPanel.poll_fluid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| else: | else: | ||||
| split.operator("fluid.free_guides", text="Free Guides") | split.operator("fluid.free_guides", text="Free Guides") | ||||
| class PHYSICS_PT_collections(PhysicButtonsPanel, Panel): | class PHYSICS_PT_collections(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Collections" | bl_label = "Collections" | ||||
| 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', '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 not PhysicButtonsPanel.poll_fluid_domain(context): | if not PhysicButtonsPanel.poll_fluid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 10 Lines | def draw(self, context): | ||||
| # col.prop(domain, "effector_group", text="Forces") | # col.prop(domain, "effector_group", text="Forces") | ||||
| col.prop(domain, "effector_group", text="Effector") | col.prop(domain, "effector_group", text="Effector") | ||||
| class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): | class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Cache" | bl_label = "Cache" | ||||
| bl_parent_id = 'PHYSICS_PT_fluid' | bl_parent_id = 'PHYSICS_PT_fluid' | ||||
| 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 not PhysicButtonsPanel.poll_fluid_domain(context): | if not PhysicButtonsPanel.poll_fluid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| else: | else: | ||||
| split.operator("fluid.free_all", text="Free All") | split.operator("fluid.free_all", text="Free All") | ||||
| class PHYSICS_PT_export(PhysicButtonsPanel, Panel): | class PHYSICS_PT_export(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Advanced" | bl_label = "Advanced" | ||||
| bl_parent_id = 'PHYSICS_PT_cache' | bl_parent_id = 'PHYSICS_PT_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): | ||||
| domain = context.fluid.domain_settings | domain = context.fluid.domain_settings | ||||
| if ( | if ( | ||||
| not PhysicButtonsPanel.poll_fluid_domain(context) or | not PhysicButtonsPanel.poll_fluid_domain(context) or | ||||
| (domain.cache_data_format != 'OPENVDB' and bpy.app.debug_value != 3001) | (domain.cache_data_format != 'OPENVDB' and bpy.app.debug_value != 3001) | ||||
| ): | ): | ||||
| Show All 28 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(domain, "export_manta_script", text="Export Mantaflow Script") | col.prop(domain, "export_manta_script", text="Export Mantaflow Script") | ||||
| class PHYSICS_PT_field_weights(PhysicButtonsPanel, Panel): | class PHYSICS_PT_field_weights(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Field Weights" | bl_label = "Field Weights" | ||||
| 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', '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 not PhysicButtonsPanel.poll_fluid_domain(context): | if not PhysicButtonsPanel.poll_fluid_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| else: | else: | ||||
| note.label(icon='INFO', text="Range highlighting for flags is not available!") | note.label(icon='INFO', text="Range highlighting for flags is not available!") | ||||
| class PHYSICS_PT_fluid_domain_render(PhysicButtonsPanel, Panel): | class PHYSICS_PT_fluid_domain_render(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Render" | bl_label = "Render" | ||||
| 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', '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 not PhysicButtonsPanel.poll_gas_domain(context): | if not PhysicButtonsPanel.poll_gas_domain(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||