Skip to content
Snippets Groups Projects
Commit 855d5183 authored by Alexander Gavrilov's avatar Alexander Gavrilov
Browse files

Rigify: don't print "No options" from BaseRig.parameters_ui.

To make it easier to call super(), instead of printing in the
dummy base method, detect and special case it in the caller code.
parent 7e441a74
Branches
Tags
No related merge requests found
......@@ -243,7 +243,7 @@ class BaseRig(GenerateCallbackHost, RaiseErrorMixin, BoneUtilityMixin, Mechanism
:param params:
:return:
"""
layout.label(text="No options")
pass
@classmethod
def on_parameter_update(cls, context, pose_bone, params, param_name):
......
......@@ -619,16 +619,24 @@ class BONE_PT_rigify_buttons(bpy.types.Panel):
else:
if hasattr(rig.Rig, 'parameters_ui'):
rig = rig.Rig
try:
rig.parameters_ui
param_cb = rig.parameters_ui
# Ignore the known empty base method
if getattr(param_cb, '__func__', None) == base_rig.BaseRig.parameters_ui.__func__:
param_cb = None
except AttributeError:
param_cb = None
if param_cb is None:
col = layout.column()
col.label(text="No options")
else:
col = layout.column()
col.label(text="Options:")
box = layout.box()
rig.parameters_ui(box, bone.rigify_parameters)
param_cb(box, bone.rigify_parameters)
class VIEW3D_PT_tools_rigify_dev(bpy.types.Panel):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment