Generating cloud rig appeared error. #108

Closed
opened 2023-07-12 17:32:33 +02:00 by ZAQraven · 5 comments
ZAQraven commented 2023-07-12 17:32:33 +02:00 (Migrated from gitlab.com)

System Information
Operating system: Linux-6.3.12-200.fc38.x86_64-x86_64-with-glibc2.37 64 Bits

Blender Version
3.6.0, branch: blender-v3.6-release, commit: 2023-06-27

CloudRig Version: (0, 0, 9) (2023-07-11 03:58)


After setting up the rig and the generate the rig, these errors occurred. Regenerate again will not appear the errors

Here's the log:

Python: Traceback (most recent call last):
  File "/FileProject/Issues.blend/cloudrig.py", line 1581, in draw
  File "/FileProject/Issues.blend/cloudrig.py", line 1337, in draw_rig_settings_per_label
  File "/FileProject/Issues.blend/cloudrig.py", line 1371, in draw_rig_settings
AssertionError: Properties bone or property does not exist: {'prop_bone': 'Properties', 'prop_id': 'parents_MSTR-TGT-Eyes', 'texts': '["Eye", "Eye"]', 'operator': 'pose.cloudrig_switch_parent_bake', 'icon': 'COLLAPSEMENU', 'parent_names': '["Eye", "Eye"]', 'bones': '["MSTR-TGT-Eyes"]'}
Location: /home/zaqraven/Blender-3.6/3.6/scripts/modules/bpy/ops.py:113

To reproduce this bug, generate rig at first of open the blender the bug hasn't occurred yet. But, when re-open again (revert) and generate the rig again, the errors occur.

Issues.blend

**System Information** Operating system: Linux-6.3.12-200.fc38.x86_64-x86_64-with-glibc2.37 64 Bits **Blender Version** 3.6.0, branch: blender-v3.6-release, commit: [2023-06-27](https://developer.blender.org/rBc7fc78b81ecb) **CloudRig Version**: (0, 0, 9) (2023-07-11 03:58) *************************************** After setting up the rig and the generate the rig, these errors occurred. Regenerate again will not appear the errors Here's the log: <pre>Python: Traceback (most recent call last): File "/FileProject/Issues.blend/cloudrig.py", line 1581, in draw File "/FileProject/Issues.blend/cloudrig.py", line 1337, in draw_rig_settings_per_label File "/FileProject/Issues.blend/cloudrig.py", line 1371, in draw_rig_settings AssertionError: Properties bone or property does not exist: {'prop_bone': 'Properties', 'prop_id': 'parents_MSTR-TGT-Eyes', 'texts': '["Eye", "Eye"]', 'operator': 'pose.cloudrig_switch_parent_bake', 'icon': 'COLLAPSEMENU', 'parent_names': '["Eye", "Eye"]', 'bones': '["MSTR-TGT-Eyes"]'} Location: /home/zaqraven/Blender-3.6/3.6/scripts/modules/bpy/ops.py:113</pre> To reproduce this bug, generate rig at first of open the blender the bug hasn't occurred yet. But, when re-open again (revert) and generate the rig again, the errors occur. [Issues.blend](/uploads/c2fee1daae31c95b5b2081946cea1e07/Issues.blend)
ZAQraven commented 2023-07-12 17:35:49 +02:00 (Migrated from gitlab.com)

changed the description

changed the description
ZAQraven commented 2023-07-12 17:37:48 +02:00 (Migrated from gitlab.com)

changed the description

changed the description
ZAQraven commented 2023-07-12 22:38:23 +02:00 (Migrated from gitlab.com)

changed the description

changed the description
Mets3D commented 2023-08-02 18:25:54 +02:00 (Migrated from gitlab.com)

While I could not reproduce the bug, I agree that having asserts in UI drawing code is a bit unjustified/unwise. I replaced the asserts with a run-of-the-mill console warning.

Somebody could reach this warning by generating the rig, and then deleting the Properties bone, or any custom property used by CloudRig anywhere in its UI. And if the user can get to that state with legal Blender operations, it probably shouldn't be an assert.

Although it looks like there other cases like this in the code, but at least those are from operator calls rather than UI drawing code. At some point, those should also be changed from lazy asserts to proper raise Exception+try/except pattern.

Thanks for the report.

While I could not reproduce the bug, I agree that having asserts in UI drawing code is a bit unjustified/unwise. I replaced the asserts with a run-of-the-mill console warning. Somebody could reach this warning by generating the rig, and then deleting the Properties bone, or any custom property used by CloudRig anywhere in its UI. And if the user can get to that state with legal Blender operations, it probably shouldn't be an assert. Although it looks like there other cases like this in the code, but at least those are from operator calls rather than UI drawing code. At some point, those should also be changed from lazy asserts to proper raise Exception+try/except pattern. Thanks for the report.
Mets3D commented 2023-08-29 18:31:01 +02:00 (Migrated from gitlab.com)

mentioned in commit a47bb16472

mentioned in commit a47bb1647231c45bd4bb58a9b1f565b2d7f77bfd
Sign in to join this conversation.
No description provided.