Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_world.py
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| engine = context.engine | return (context.world and context.engine in cls.COMPAT_ENGINES) | ||||
| if context.world and (engine in cls.COMPAT_ENGINES): | |||||
| for view_layer in context.scene.view_layers: | |||||
| if view_layer.use_pass_mist: | def draw_header(self, context): | ||||
| return True | layout = self.layout | ||||
| view_layer = context.view_layer | |||||
| layout.prop(view_layer, "use_pass_mist", text="") | |||||
| return False | |||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| view_layer = context.view_layer | |||||
| layout.active = view_layer.use_pass_mist | |||||
| world = context.world | world = context.world | ||||
| layout.prop(world.mist_settings, "start") | col = layout.column(align=True) | ||||
| layout.prop(world.mist_settings, "depth") | col.prop(world.mist_settings, "start") | ||||
| layout.prop(world.mist_settings, "falloff") | col.prop(world.mist_settings, "depth") | ||||
| col = layout.column() | |||||
| col.prop(world.mist_settings, "falloff") | |||||
| class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel): | class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel): | ||||
| Context not available. | |||||