From c3997b8951b5128e2876d1af7280e78c02ee143b Mon Sep 17 00:00:00 2001 From: Timothy Liu <154667371+timothyliu3d@users.noreply.github.com> Date: Sun, 7 Jun 2026 22:58:12 -0700 Subject: [PATCH] Better error message if a component guide uses FCurve param defs but has not implemented its `get_divisions` method --- release/scripts/mgear/shifter/component/guide.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/release/scripts/mgear/shifter/component/guide.py b/release/scripts/mgear/shifter/component/guide.py index fca5aa05..754df6e8 100644 --- a/release/scripts/mgear/shifter/component/guide.py +++ b/release/scripts/mgear/shifter/component/guide.py @@ -274,14 +274,18 @@ def postDraw(self): return def get_divisions(self): - """Get the divisions to sample a Fcurve parameter definition. + """Get the divisions to sample a FCurve parameter definition. Note: - REIMPLEMENT. This method should only if the component is using - Fcurve paramDef. + REIMPLEMENT. This method must be implemented if the component is using an + FCurve paramDef. """ - return + errmsg = ( + f"'{self.compType}' has FCurve parameters but is missing a required " + f"`get_divisions` implementation in the `Guide` class." + ) + raise NotImplementedError(errmsg) def getMergedValues(self): """Get merged component values combining local with blueprint settings.