Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_smoke.py
| Show All 28 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.smoke) | return (ob and ob.type == 'MESH') and (view_render.engine in cls.COMPAT_ENGINES) and (context.smoke) | ||||
| class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): | class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Smoke" | bl_label = "Smoke" | ||||
| 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 188 Lines • ▼ Show 20 Lines | |||||
| class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel): | class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Smoke High Resolution" | bl_label = "Smoke High Resolution" | ||||
| 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.smoke | md = context.smoke | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES) | return md and (md.smoke_type == 'DOMAIN') and (view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| md = context.smoke.domain_settings | md = context.smoke.domain_settings | ||||
| self.layout.prop(md, "use_high_resolution", text="") | self.layout.prop(md, "use_high_resolution", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 22 Lines | |||||
| class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel): | class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Smoke Groups" | bl_label = "Smoke Groups" | ||||
| 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.smoke | md = context.smoke | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES) | return md and (md.smoke_type == 'DOMAIN') and (view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| domain = context.smoke.domain_settings | domain = context.smoke.domain_settings | ||||
| split = layout.split() | split = layout.split() | ||||
| col = split.column() | col = split.column() | ||||
| Show All 11 Lines | |||||
| class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): | class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Smoke Cache" | bl_label = "Smoke Cache" | ||||
| 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.smoke | md = context.smoke | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES) | return md and (md.smoke_type == 'DOMAIN') and (view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| domain = context.smoke.domain_settings | domain = context.smoke.domain_settings | ||||
| cache_file_format = domain.cache_file_format | cache_file_format = domain.cache_file_format | ||||
| layout.prop(domain, "cache_file_format") | layout.prop(domain, "cache_file_format") | ||||
| Show All 19 Lines | |||||
| class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel): | class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Smoke Field Weights" | bl_label = "Smoke Field Weights" | ||||
| 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.smoke | md = context.smoke | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES) | return md and (md.smoke_type == 'DOMAIN') and (view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| domain = context.smoke.domain_settings | domain = context.smoke.domain_settings | ||||
| effector_weights_ui(self, context, domain.effector_weights, 'SMOKE') | effector_weights_ui(self, context, domain.effector_weights, 'SMOKE') | ||||
| class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel): | class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Smoke Display Settings" | bl_label = "Smoke Display Settings" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| md = context.smoke | md = context.smoke | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine) | return md and (md.smoke_type == 'DOMAIN') and (not view_render.use_game_engine) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| domain = context.smoke.domain_settings | domain = context.smoke.domain_settings | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.prop(domain, "display_thickness") | layout.prop(domain, "display_thickness") | ||||
| layout.separator() | layout.separator() | ||||
| ▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines | |||||