smokejohn / SKkeeper

Blender Addon to automate the process of applying subdivision surface modifiers to models with multiple shapekeys
GNU General Public License v3.0
202 stars 9 forks source link

No longer working in Blender 4 #10

Open amarillosebas opened 10 months ago

amarillosebas commented 10 months ago

Python: Traceback (most recent call last): File "C:\Users\User\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\SKkeeper\__init__.py", line 433, in execute receiver.data.shape_keys.key_blocks[i].name = sk_names[i] IndexError: bpy_prop_collection[index]: index 3 out of range, size 3

smokejohn commented 10 months ago

In what case? I just tested in blender 4.0 with my basic testfile and i get no errors at all. Copy this template and fill it with all needed info, so i can reproduce the error you are having. If you attach the file that produces the error the chance of this problem being fixed increases tremendously. Nobody ever attaches the files in the issues so i have almost no chance of fixing the bug.

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - Blender Version: [e.g. 3.6]
 - OS: [e.g. Windows, Mac OS]

**PLEASE attach the file that you are having errors with to your issue message. If it contains sensitive data, remove it and supply a minimal version that still produces the error**

**Additional context**
Add any other context about the problem here.
RadTc commented 5 months ago

SAD,Unfortunately, at the beginning, I wanted to fix this bug myself. However, I am not familiar with Python...... And its problem is even more difficult than I think, perhaps not a simple problem like "index error"- because you have already tested it

https://github.com/smokejohn/SKkeeper/assets/109193200/82152cde-4727-4be6-b33d-fcd0f3544b48

[(BUG)template.zip] (https://github.com/smokejohn/SKkeeper/files/14731029/BUG.template.zip)

@smokejohn

MrDoontoo commented 1 month ago

Did some investigating, this seems to happen when transferring shapekeys fails during the function add_objs_shapekeys, such as when the object has a differing number of vertices. In my case, it was happening when using a mirror modifier with bisect, as vertices that moved past halfway in a shapekey were getting cut off and then failed to rejoin to the reference object.

MrHax00 commented 1 month ago

Can confirm the above comment, deleting the vertices that were getting cut away and centering the middle ones solved the problem, oddly enough having a subdivision modifier before the mirror was also able to fix the problem???