Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-19 08:51:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-19 08:51:14 +0300
commit082d7e8d5f8d85449257a68418fbd672bc49b60a (patch)
tree6d1731c40ab092d5e8f30797239b776f2ebf9e7a /release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
parentba44602b2389385b4c7f719f980df2f7b9b6fff0 (diff)
Cleanup: use staticmethod where appropriate
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 83a7524fe03..fec8723ef5e 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -62,10 +62,12 @@ class PhysicButtonsPanel:
bl_region_type = 'WINDOW'
bl_context = "physics"
+ @staticmethod
def poll_dyn_paint(context):
ob = context.object
return (ob and ob.type == 'MESH') and context.dynamic_paint
+ @staticmethod
def poll_dyn_canvas(context):
if not PhysicButtonsPanel.poll_dyn_paint(context):
return False
@@ -73,6 +75,7 @@ class PhysicButtonsPanel:
md = context.dynamic_paint
return (md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active)
+ @staticmethod
def poll_dyn_canvas_paint(context):
if not PhysicButtonsPanel.poll_dyn_canvas(context):
return False
@@ -80,6 +83,7 @@ class PhysicButtonsPanel:
surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
return (surface.surface_type == 'PAINT')
+ @staticmethod
def poll_dyn_canvas_brush(context):
if not PhysicButtonsPanel.poll_dyn_paint(context):
return False
@@ -87,6 +91,7 @@ class PhysicButtonsPanel:
md = context.dynamic_paint
return (md and md.ui_type == 'BRUSH' and md.brush_settings)
+ @staticmethod
def poll_dyn_output(context):
if not PhysicButtonsPanel.poll_dyn_canvas(context):
return False
@@ -94,6 +99,7 @@ class PhysicButtonsPanel:
surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active
return (not (surface.surface_format == 'VERTEX' and (surface.surface_type in {'DISPLACE', 'WAVE'})))
+ @staticmethod
def poll_dyn_output_maps(context):
if not PhysicButtonsPanel.poll_dyn_output(context):
return False