Fixing an essential script to work in 2.8

Hello. A project I am working on requires a script to run in order to use the full features of an armature.
This script also used to create a panel on the left hand side that gave a number of options such as hiding/unhiding certain collections of bones. This no longer works in 2.8

The console returns the error:

Warning: class POSE_OT_rigify_leg_ik2fk_judy_rig contains a properties which should be an annotation!
make annotation: POSE_OT_rigify_leg_ik2fk_judy_rig.thigh_fk
make annotation: POSE_OT_rigify_leg_ik2fk_judy_rig.shin_fk
make annotation: POSE_OT_rigify_leg_ik2fk_judy_rig.mfoot_fk
make annotation: POSE_OT_rigify_leg_ik2fk_judy_rig.thigh_ik
make annotation: POSE_OT_rigify_leg_ik2fk_judy_rig.shin_ik
make annotation: POSE_OT_rigify_leg_ik2fk_judy_rig.foot_ik
make annotation: POSE_OT_rigify_leg_ik2fk_judy_rig.footroll
make annotation: POSE_OT_rigify_leg_ik2fk_judy_rig.pole
make annotation: POSE_OT_rigify_leg_ik2fk_judy_rig.mfoot_ik
Traceback (most recent call last):
File “C:\Users\User\Desktop\folder\file.blend\”, line 744, in
File “C:\Users\User\Desktop\folder\file.blend\”, line 733, in register
RuntimeError: Error: Registering panel class: ‘judy_rig_PT_rig_layers’ has category ‘Rig’"

I am not the author of this script; I know nothing about coding in Blender with Python. I do know some C#, so if someone could point me to directions on what EXACTLY to replace in the script, I could figure it out, but searching in the script for the words that other documentation says has been changed between 2.79 and 2.8 yielded no results. (I’d post the code here, but I’m not sure if there’s a preferred way to do this on this site without making a ridiculously long post.)

I’m not sure if this is the best place to ask, but it seemed to be where others have been asking for help with python.

Thank you for the help.

The rules for what you can use in your names has changed a little bit. You can get more details in the wiki:

1 Like

Thank you! I found that part of that page addressed one of the issues, and after renaming a handful of things most of the error is resolved. There’s just the last bit of the error left, though, that does not seem to be mentioned on that page (Or I don’t understand what’s wrong with it, at least.).

RuntimeError: Error: Registering panel class: ‘judy_rig_PT_rig_layers’ has category ‘Rig’

It references this line:

And that contains the line:
bl_category = “Rig”
Which is what I can only assume is the root of the issue now.

Do you know what I need to change to fix this? There are a couple other “bpy.utils.register_class()” methods before and after that one that don’t appear to be throwing any errors…

Hey, so did you make any progress on that script? I’m currently having the same issue, but I have errors on lines 729-732 instead of one line 732 (these are similar to the one you have) and also that RuntimeError.

== UPDATE ==
I found a workaround for that. Because all what I needed was to enable facial expressions, I installed Blender 2.77 and yes, the script is working on that version (obviously). I turned on bones that I need, saved and went back to the Blender 2.8 and these bones are still visible. Maybe this will help someone :slight_smile: