How to reference a global scale value of an object in Expression?

I am a rigger working for an animated series. We decided to use Tone-Shader node to shade our characters (see fig.2 for how it is set up in Node view).

The issue with Tone-Shader is that the size of bevel is native to the scene resolution rather than the scale of the object that the shader is connected to. As a result, when our characters get scaled, the weight of the tone stays the same so tone gets really thin when the character is scaled up a lot (see fig.1).

So I wrote a very simple expression:

a = column(“Square-P_Scale_x”);
b = value(a, currentFrame);

This expression takes the scale value of the character’s master peg (Square-P) at the current frame. I attached the expression to the Normal-Map node’s three Multiplier parameters (fig.3) and now the scale of the bevel get updated when the object is scaled.

But as you can imagine that this system fails easily when Square-P is scaled by Camera or its parent peg when that exists. (I cannot limit what animators can do!) Note that I cannot simply add Camera’s scale value in this script since some scenes don’t have a Camera. Now I am wondering how to reference the global scale value of Square-P in my script.

If that is not possible, is there anyway I can write a script that flexibly adds all cameras and parent nodes’ scale value into the equation when they are created in the scene? There is someone who did this in AfterEffects (https://forums.creativecow.net/thread/227/22158). Can we do the same thing in Harmony?