Commit: a412dc97e6bcce938c2b78e50cd4bf65427f234c
Author: Campbell Barton
Date: Fri Feb 12 15:21:37 2021 +1100
Branches: pygpu_extensions
https://developer.blender.org/rBa412dc97e6bcce938c2b78e50cd4bf65427f234c
Cleanup: don't subclass 'Panel' for mix-in classes
This reports warnings with `--debug-python` since all panel
sub-classes are expected to be registered.
===================================================================
M intern/cycles/blender/addon/ui.py
M release/scripts/startup/bl_ui/properties_constraint.py
M release/scripts/startup/bl_ui/properties_view_layer.py
===================================================================
diff --git a/intern/cycles/blender/addon/ui.py
b/intern/cycles/blender/addon/ui.py
index aa009c15b10..8067dd9793c 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -886,7 +886,7 @@ class CYCLES_RENDER_PT_passes_light(CyclesButtonsPanel,
Panel):
col.prop(view_layer, "use_pass_ambient_occlusion", text="Ambient
Occlusion")
-class CYCLES_RENDER_PT_passes_crypto(CyclesButtonsPanel,
ViewLayerCryptomattePanel):
+class CYCLES_RENDER_PT_passes_crypto(CyclesButtonsPanel,
ViewLayerCryptomattePanel, Panel):
bl_label = "Cryptomatte"
bl_context = "view_layer"
bl_parent_id = "CYCLES_RENDER_PT_passes"
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py
b/release/scripts/startup/bl_ui/properties_constraint.py
index 37a2b6a38e4..e8c62368239 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -20,7 +20,7 @@
from bpy.types import Panel
-class ObjectConstraintPanel(Panel):
+class ObjectConstraintPanel:
bl_context = "constraint"
@classmethod
@@ -28,7 +28,7 @@ class ObjectConstraintPanel(Panel):
return (context.object)
-class BoneConstraintPanel(Panel):
+class BoneConstraintPanel:
bl_context = "bone_constraint"
@classmethod
@@ -36,7 +36,7 @@ class BoneConstraintPanel(Panel):
return (context.pose_bone)
-class OBJECT_PT_constraints(ObjectConstraintPanel):
+class OBJECT_PT_constraints(ObjectConstraintPanel, Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_label = "Object Constraints"
@@ -50,7 +50,7 @@ class OBJECT_PT_constraints(ObjectConstraintPanel):
layout.template_constraints(use_bone_constraints=False)
-class BONE_PT_constraints(BoneConstraintPanel):
+class BONE_PT_constraints(BoneConstraintPanel, Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_label = "Bone Constraints"
@@ -66,7 +66,7 @@ class BONE_PT_constraints(BoneConstraintPanel):
# Parent class for constraint panels, with templates and drawing methods
# shared between the bone and object constraint panels
-class ConstraintButtonsPanel(Panel):
+class ConstraintButtonsPanel:
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_label = ""
@@ -970,7 +970,7 @@ class ConstraintButtonsPanel(Panel):
# Parent class for constraint subpanels
-class ConstraintButtonsSubPanel(Panel):
+class ConstraintButtonsSubPanel:
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_label = ""
@@ -1148,149 +1148,149 @@ class ConstraintButtonsSubPanel(Panel):
# Child Of Constraint
-class OBJECT_PT_bChildOfConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bChildOfConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_childof(context)
-class BONE_PT_bChildOfConstraint(BoneConstraintPanel, ConstraintButtonsPanel):
+class BONE_PT_bChildOfConstraint(BoneConstraintPanel, ConstraintButtonsPanel,
Panel):
def draw(self, context):
self.draw_childof(context)
# Track To Constraint
-class OBJECT_PT_bTrackToConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bTrackToConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_trackto(context)
-class BONE_PT_bTrackToConstraint(BoneConstraintPanel, ConstraintButtonsPanel):
+class BONE_PT_bTrackToConstraint(BoneConstraintPanel, ConstraintButtonsPanel,
Panel):
def draw(self, context):
self.draw_trackto(context)
# Follow Path Constraint
-class OBJECT_PT_bFollowPathConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bFollowPathConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_follow_path(context)
-class BONE_PT_bFollowPathConstraint(BoneConstraintPanel,
ConstraintButtonsPanel):
+class BONE_PT_bFollowPathConstraint(BoneConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_follow_path(context)
# Rotation Limit Constraint
-class OBJECT_PT_bRotLimitConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bRotLimitConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_rot_limit(context)
-class BONE_PT_bRotLimitConstraint(BoneConstraintPanel, ConstraintButtonsPanel):
+class BONE_PT_bRotLimitConstraint(BoneConstraintPanel, ConstraintButtonsPanel,
Panel):
def draw(self, context):
self.draw_rot_limit(context)
# Location Limit Constraint
-class OBJECT_PT_bLocLimitConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bLocLimitConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_loc_limit(context)
-class BONE_PT_bLocLimitConstraint(BoneConstraintPanel, ConstraintButtonsPanel):
+class BONE_PT_bLocLimitConstraint(BoneConstraintPanel, ConstraintButtonsPanel,
Panel):
def draw(self, context):
self.draw_loc_limit(context)
# Size Limit Constraint
-class OBJECT_PT_bSizeLimitConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bSizeLimitConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_size_limit(context)
-class BONE_PT_bSizeLimitConstraint(BoneConstraintPanel,
ConstraintButtonsPanel):
+class BONE_PT_bSizeLimitConstraint(BoneConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_size_limit(context)
# Rotate Like Constraint
-class OBJECT_PT_bRotateLikeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bRotateLikeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_rotate_like(context)
-class BONE_PT_bRotateLikeConstraint(BoneConstraintPanel,
ConstraintButtonsPanel):
+class BONE_PT_bRotateLikeConstraint(BoneConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_rotate_like(context)
# Locate Like Constraint
-class OBJECT_PT_bLocateLikeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bLocateLikeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_locate_like(context)
-class BONE_PT_bLocateLikeConstraint(BoneConstraintPanel,
ConstraintButtonsPanel):
+class BONE_PT_bLocateLikeConstraint(BoneConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_locate_like(context)
# Size Like Constraint
-class OBJECT_PT_bSizeLikeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bSizeLikeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_size_like(context)
-class BONE_PT_bSizeLikeConstraint(BoneConstraintPanel, ConstraintButtonsPanel):
+class BONE_PT_bSizeLikeConstraint(BoneConstraintPanel, ConstraintButtonsPanel,
Panel):
def draw(self, context):
self.draw_size_like(context)
# Same Volume Constraint
-class OBJECT_PT_bSameVolumeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bSameVolumeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_same_volume(context)
-class BONE_PT_bSameVolumeConstraint(BoneConstraintPanel,
ConstraintButtonsPanel):
+class BONE_PT_bSameVolumeConstraint(BoneConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_same_volume(context)
# Trans Like Constraint
-class OBJECT_PT_bTransLikeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bTransLikeConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_trans_like(context)
-class BONE_PT_bTransLikeConstraint(BoneConstraintPanel,
ConstraintButtonsPanel):
+class BONE_PT_bTransLikeConstraint(BoneConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_trans_like(context)
# Action Constraint
-class OBJECT_PT_bActionConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel):
+class OBJECT_PT_bActionConstraint(ObjectConstraintPanel,
ConstraintButtonsPanel, Panel):
def draw(self, context):
self.draw_action(context)
-class BONE_PT_bActionConstraint(BoneConstraintPanel, ConstraintButtonsPanel):
+class BONE_PT_bActionConstraint(BoneConstraintPanel, ConstraintButtonsPanel,
Panel):
def draw(self, context):
self.draw_action(context)
-class OBJECT_PT_bActionConstraint_target(ObjectConstraintPanel,
ConstraintButtonsSubPanel):
+class OBJECT_PT_bActionConstraint_target(ObjectConstraintPanel,
ConstraintButtonsSubPanel, Panel):
bl_parent_id = "OBJECT_PT_bActionConstraint"
bl_label = "Target"
@@ -1298,7 +1298,7 @@ class
OBJECT_PT_bActionConstraint_target(ObjectConstraintPanel, ConstraintButton
self.draw_action_target(context)
-class BONE_PT_bActionConstraint_target(BoneConstraintPanel,
ConstraintButtonsSubPanel):
+class BONE_PT_bActionConstraint_target(BoneConstraintPanel,
ConstraintButtonsSubPanel, Panel):
bl_parent_id = "BONE_PT_bActionConstraint"
bl_label = "Target"
@@ -1306,7 +1306,7 @@ class
BONE_PT_bActionConstraint_target(BoneConstraintPanel, ConstraintButtonsSub
self.draw_action_target(context)
-class OBJECT_PT_bActionConstraint_action(ObjectConstraintPanel,
ConstraintButtonsSubPanel):
+class OBJECT_PT_bActionConstraint_action(ObjectConstraintPanel,
ConstraintButtonsSubPanel, Panel):
bl_parent_id = "OBJECT_PT_bActionConstraint"
bl_label = "Action"
@@ -1314,7 +1314,7 @@ class
OBJECT_PT_bActionConstraint_action(ObjectConstraintPanel, ConstraintButton
self.draw_action_action(context)
-class BONE_PT_bActionConstraint_action(BoneConstraintPanel,
ConstraintButtonsSubPanel):
+class BONE
@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs