Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
| Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | def poll_dyn_output_maps(context): | ||||
| return False | return False | ||||
| surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active | surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active | ||||
| return (surface.surface_format == 'IMAGE' and surface.surface_type == 'PAINT') | return (surface.surface_format == 'IMAGE' and surface.surface_type == 'PAINT') | ||||
| class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Dynamic Paint" | bl_label = "Dynamic Paint" | ||||
| 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_dyn_paint(context): | if not PhysicButtonsPanel.poll_dyn_paint(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| md = context.dynamic_paint | md = context.dynamic_paint | ||||
| layout.prop(md, "ui_type") | layout.prop(md, "ui_type") | ||||
| class PHYSICS_PT_dynamic_paint_settings(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dynamic_paint_settings(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Settings" | bl_label = "Settings" | ||||
| bl_parent_id = 'PHYSICS_PT_dynamic_paint' | bl_parent_id = 'PHYSICS_PT_dynamic_paint' | ||||
| 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_dyn_paint(context): | if not PhysicButtonsPanel.poll_dyn_paint(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): | ||||
| col.prop(brush, "paint_wetness", text="Wetness", slider=True) | col.prop(brush, "paint_wetness", text="Wetness", slider=True) | ||||
| col.prop(brush, "use_absolute_alpha") | col.prop(brush, "use_absolute_alpha") | ||||
| col.prop(brush, "use_paint_erase") | col.prop(brush, "use_paint_erase") | ||||
| class PHYSICS_PT_dp_surface_canvas(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_surface_canvas(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Surface" | bl_label = "Surface" | ||||
| bl_parent_id = "PHYSICS_PT_dynamic_paint" | bl_parent_id = "PHYSICS_PT_dynamic_paint" | ||||
| 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_dyn_canvas(context): | if not PhysicButtonsPanel.poll_dyn_canvas(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): | ||||
| col.prop(surface, "brush_influence_scale", text="Scale Influence") | col.prop(surface, "brush_influence_scale", text="Scale Influence") | ||||
| col.prop(surface, "brush_radius_scale", text="Radius") | col.prop(surface, "brush_radius_scale", text="Radius") | ||||
| class PHYSICS_PT_dp_surface_canvas_paint_dry(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_surface_canvas_paint_dry(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Dry" | bl_label = "Dry" | ||||
| bl_parent_id = "PHYSICS_PT_dp_surface_canvas" | bl_parent_id = "PHYSICS_PT_dp_surface_canvas" | ||||
| 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_dyn_canvas_paint(context): | if not PhysicButtonsPanel.poll_dyn_canvas_paint(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 19 Lines | def draw(self, context): | ||||
| col.prop(surface, "color_dry_threshold", text="Color") | col.prop(surface, "color_dry_threshold", text="Color") | ||||
| col.prop(surface, "use_dry_log", text="Slow") | col.prop(surface, "use_dry_log", text="Slow") | ||||
| class PHYSICS_PT_dp_surface_canvas_paint_dissolve(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_surface_canvas_paint_dissolve(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Dissolve" | bl_label = "Dissolve" | ||||
| bl_parent_id = "PHYSICS_PT_dp_surface_canvas" | bl_parent_id = "PHYSICS_PT_dp_surface_canvas" | ||||
| 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_dyn_canvas(context): | if not PhysicButtonsPanel.poll_dyn_canvas(context): | ||||
| return False | return False | ||||
| surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active | surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active | ||||
| Show All 20 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(surface, "use_dissolve_log", text="Slow") | col.prop(surface, "use_dissolve_log", text="Slow") | ||||
| class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Output" | bl_label = "Output" | ||||
| bl_parent_id = "PHYSICS_PT_dynamic_paint" | bl_parent_id = "PHYSICS_PT_dynamic_paint" | ||||
| 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_dyn_output(context): | if not PhysicButtonsPanel.poll_dyn_output(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| elif surface_type == 'WAVE': | elif surface_type == 'WAVE': | ||||
| col.prop(surface, "depth_clamp", text="Wave Clamp") | col.prop(surface, "depth_clamp", text="Wave Clamp") | ||||
| class PHYSICS_PT_dp_canvas_output_paintmaps(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_canvas_output_paintmaps(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Paintmaps" | bl_label = "Paintmaps" | ||||
| bl_parent_id = "PHYSICS_PT_dp_canvas_output" | bl_parent_id = "PHYSICS_PT_dp_canvas_output" | ||||
| 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_dyn_output_maps(context): | if not PhysicButtonsPanel.poll_dyn_output_maps(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 13 Lines | def draw(self, context): | ||||
| sub.active = surface.use_output_a | sub.active = surface.use_output_a | ||||
| sub.prop(surface, "output_name_a", text="Name") | sub.prop(surface, "output_name_a", text="Name") | ||||
| class PHYSICS_PT_dp_canvas_output_wetmaps(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_canvas_output_wetmaps(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Wetmaps" | bl_label = "Wetmaps" | ||||
| bl_parent_id = "PHYSICS_PT_dp_canvas_output" | bl_parent_id = "PHYSICS_PT_dp_canvas_output" | ||||
| 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_dyn_output_maps(context): | if not PhysicButtonsPanel.poll_dyn_output_maps(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 13 Lines | def draw(self, context): | ||||
| sub.active = surface.use_output_b | sub.active = surface.use_output_b | ||||
| sub.prop(surface, "output_name_b", text="Name") | sub.prop(surface, "output_name_b", text="Name") | ||||
| class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Initial Color" | bl_label = "Initial Color" | ||||
| bl_parent_id = "PHYSICS_PT_dynamic_paint" | bl_parent_id = "PHYSICS_PT_dynamic_paint" | ||||
| 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_dyn_canvas_paint(context): | if not PhysicButtonsPanel.poll_dyn_canvas_paint(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): | ||||
| elif surface.init_color_type == 'VERTEX_COLOR': | elif surface.init_color_type == 'VERTEX_COLOR': | ||||
| col.prop_search(surface, "init_layername", ob.data, "vertex_colors", text="Color Layer") | col.prop_search(surface, "init_layername", ob.data, "vertex_colors", text="Color Layer") | ||||
| class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Effects" | bl_label = "Effects" | ||||
| bl_parent_id = 'PHYSICS_PT_dynamic_paint' | bl_parent_id = 'PHYSICS_PT_dynamic_paint' | ||||
| 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_dyn_canvas_paint(context): | if not PhysicButtonsPanel.poll_dyn_canvas_paint(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, _context): | def draw(self, _context): | ||||
| return # do nothing. | return # do nothing. | ||||
| class PHYSICS_PT_dp_effects_spread(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_effects_spread(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Spread" | bl_label = "Spread" | ||||
| bl_parent_id = "PHYSICS_PT_dp_effects" | bl_parent_id = "PHYSICS_PT_dp_effects" | ||||
| 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_dyn_paint(context): | if not PhysicButtonsPanel.poll_dyn_paint(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 18 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(surface, "color_spread_speed", text="Color") | col.prop(surface, "color_spread_speed", text="Color") | ||||
| class PHYSICS_PT_dp_effects_drip(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_effects_drip(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Drip" | bl_label = "Drip" | ||||
| bl_parent_id = "PHYSICS_PT_dp_effects" | bl_parent_id = "PHYSICS_PT_dp_effects" | ||||
| 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_dyn_paint(context): | if not PhysicButtonsPanel.poll_dyn_paint(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 19 Lines | def draw(self, context): | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(surface, "drip_acceleration", slider=True) | col.prop(surface, "drip_acceleration", slider=True) | ||||
| class PHYSICS_PT_dp_effects_drip_weights(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_effects_drip_weights(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Weights" | bl_label = "Weights" | ||||
| bl_parent_id = "PHYSICS_PT_dp_effects_drip" | bl_parent_id = "PHYSICS_PT_dp_effects_drip" | ||||
| 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_dyn_paint(context): | if not PhysicButtonsPanel.poll_dyn_paint(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| canvas = context.dynamic_paint.canvas_settings | canvas = context.dynamic_paint.canvas_settings | ||||
| surface = canvas.canvas_surfaces.active | surface = canvas.canvas_surfaces.active | ||||
| layout.active = surface.use_drip | layout.active = surface.use_drip | ||||
| effector_weights_ui(self, surface.effector_weights, 'DYNAMIC_PAINT') | effector_weights_ui(self, surface.effector_weights, 'DYNAMIC_PAINT') | ||||
| class PHYSICS_PT_dp_effects_shrink(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_effects_shrink(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Shrink" | bl_label = "Shrink" | ||||
| bl_parent_id = "PHYSICS_PT_dp_effects" | bl_parent_id = "PHYSICS_PT_dp_effects" | ||||
| 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_dyn_paint(context): | if not PhysicButtonsPanel.poll_dyn_paint(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 13 Lines | def draw(self, context): | ||||
| layout.prop(surface, "shrink_speed", text="Speed") | layout.prop(surface, "shrink_speed", text="Speed") | ||||
| class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Cache" | bl_label = "Cache" | ||||
| bl_parent_id = "PHYSICS_PT_dynamic_paint" | bl_parent_id = "PHYSICS_PT_dynamic_paint" | ||||
| 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_dyn_canvas(context): | if not PhysicButtonsPanel.poll_dyn_canvas(context): | ||||
| return False | return False | ||||
| surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active | surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active | ||||
| return (surface.is_cache_user and (context.engine in cls.COMPAT_ENGINES)) | return (surface.is_cache_user and (context.engine in cls.COMPAT_ENGINES)) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active | surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active | ||||
| cache = surface.point_cache | cache = surface.point_cache | ||||
| point_cache_ui(self, cache, (cache.is_baked is False), 'DYNAMIC_PAINT') | point_cache_ui(self, cache, (cache.is_baked is False), 'DYNAMIC_PAINT') | ||||
| class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Source" | bl_label = "Source" | ||||
| bl_parent_id = "PHYSICS_PT_dynamic_paint" | bl_parent_id = "PHYSICS_PT_dynamic_paint" | ||||
| 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_dyn_canvas_brush(context): | if not PhysicButtonsPanel.poll_dyn_canvas_brush(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 = col.column() | sub = col.column() | ||||
| sub.active = brush.use_proximity_project | sub.active = brush.use_proximity_project | ||||
| sub.prop(brush, "ray_direction") | sub.prop(brush, "ray_direction") | ||||
| class PHYSICS_PT_dp_brush_source_color_ramp(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_brush_source_color_ramp(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Falloff Ramp" | bl_label = "Falloff Ramp" | ||||
| bl_parent_id = "PHYSICS_PT_dp_brush_source" | bl_parent_id = "PHYSICS_PT_dp_brush_source" | ||||
| 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_dyn_canvas_brush(context): | if not PhysicButtonsPanel.poll_dyn_canvas_brush(context): | ||||
| return False | return False | ||||
| brush = context.dynamic_paint.brush_settings | brush = context.dynamic_paint.brush_settings | ||||
| return ((brush.paint_source in {'DISTANCE', 'VOLUME_DISTANCE', 'POINT'}) | return ((brush.paint_source in {'DISTANCE', 'VOLUME_DISTANCE', 'POINT'}) | ||||
| Show All 10 Lines | def draw(self, context): | ||||
| layout.use_property_split = False | layout.use_property_split = False | ||||
| layout.template_color_ramp(brush, "paint_ramp", expand=True) | layout.template_color_ramp(brush, "paint_ramp", expand=True) | ||||
| class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Velocity" | bl_label = "Velocity" | ||||
| bl_parent_id = "PHYSICS_PT_dynamic_paint" | bl_parent_id = "PHYSICS_PT_dynamic_paint" | ||||
| 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_dyn_canvas_brush(context): | if not PhysicButtonsPanel.poll_dyn_canvas_brush(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 14 Lines | def draw(self, context): | ||||
| sub.active = (brush.use_velocity_alpha or brush.use_velocity_color or brush.use_velocity_depth) | sub.active = (brush.use_velocity_alpha or brush.use_velocity_color or brush.use_velocity_depth) | ||||
| sub.prop(brush, "velocity_max") | sub.prop(brush, "velocity_max") | ||||
| class PHYSICS_PT_dp_brush_velocity_color_ramp(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_brush_velocity_color_ramp(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Ramp" | bl_label = "Ramp" | ||||
| bl_parent_id = "PHYSICS_PT_dp_brush_velocity" | bl_parent_id = "PHYSICS_PT_dp_brush_velocity" | ||||
| 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_dyn_canvas_brush(context): | if not PhysicButtonsPanel.poll_dyn_canvas_brush(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| brush = context.dynamic_paint.brush_settings | brush = context.dynamic_paint.brush_settings | ||||
| layout.template_color_ramp(brush, "velocity_ramp", expand=True) | layout.template_color_ramp(brush, "velocity_ramp", expand=True) | ||||
| class PHYSICS_PT_dp_brush_velocity_smudge(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_brush_velocity_smudge(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Smudge" | bl_label = "Smudge" | ||||
| bl_parent_id = "PHYSICS_PT_dp_brush_velocity" | bl_parent_id = "PHYSICS_PT_dp_brush_velocity" | ||||
| 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_dyn_canvas_brush(context): | if not PhysicButtonsPanel.poll_dyn_canvas_brush(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| Show All 11 Lines | def draw(self, context): | ||||
| layout.active = brush.use_smudge | layout.active = brush.use_smudge | ||||
| layout.prop(brush, "smudge_strength", text="Strength", slider=True) | layout.prop(brush, "smudge_strength", text="Strength", slider=True) | ||||
| class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel): | class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel): | ||||
| bl_label = "Waves" | bl_label = "Waves" | ||||
| bl_parent_id = "PHYSICS_PT_dynamic_paint" | bl_parent_id = "PHYSICS_PT_dynamic_paint" | ||||
| 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_dyn_canvas_brush(context): | if not PhysicButtonsPanel.poll_dyn_canvas_brush(context): | ||||
| return False | return False | ||||
| return (context.engine in cls.COMPAT_ENGINES) | return (context.engine in cls.COMPAT_ENGINES) | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||