No longer working in Blender 4
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
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.
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
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.
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???
@amarillosebas, @smokejohn, I faced same problem, the addon was not working correctly. I take this error when trying to apply the "Mirror" modifier:
Python: Traceback (most recent call last): File "[****]\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\SKkeeper_init_.py", line 433, in execute receiver.data.shape_keys.key_blocks[i].name = sk_names[i] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'key_blocks'
I was fix this problem by cancel mesh example in box "Mirror Object" and uncheck option "Clipping" (maybe). After that everything works correctly. I use Blender 4.2.2 LTS, addon version - 1.6
UPD. My bad
I have not described to you all my ways to solve this problem, but only those that I did at the end of the solution... After a detailed discussion with AI and a comprehensive analysis of the problem, I found that this error occurs when trying to apply the modifier Mirror to an object with broken shape keys. "How is it, broken shape keys?" you ask? This is when you shape key changes number of vertexes after applying on mesh, while Mirror modifier is working (if were 100 vertexes in the Object mode, turn on this cursed shape - became 95, for example). You can also notice that that object itself deteriorates from such manipulations: the created vertexes "fly away" and you need to fix them all through "Blend from Shape" function. This is more like Blender bug itself than this addon problem.
@smokejohn Does the plugin work on blender 4.1 ?
@Jazara17 The addon works just fine if used correctly in the latest blender versions (More on that below).
@MrMage750 There is nothing i can do to fix the behaviour some of you are experiencing (except for maybe adding a nicer message that the process couldn't be completed instead of the script crashing). To explain this I have to go into a little more detail:
For shape keys to be retained while collapsing modifiers the vertex counts should if possible not change at all. If they have to change they need to change in a predictable manner so the weights can be transferred accordingly. Now if you are having trouble with the addon that means you are changing the vertex count of your meshes via modifiers unpredictably.
Most users are just sloppy with their mirror modifiers and don't have the vertices properly aligned at the mirror axis which leads to too many vertices being welded and then the vertex counts changing. So please ensure that your geometry is fine before piling on to this issue. Mentioned here by @MrDoontoo
Initially this addon was only intended to be used with Subdivision modifiers and then got extended to all modifiers because some users wished for it. Sorry but I can't and don't want to support all possible combinations of modifiers and unpredictable changes in the geometry with this addon.
As always with open source software, if you feel you can help or improve this addon, you are welcome to suggest a fix by opening a PR on this repo.
then it's over. pack it up and start a new project. this one's a lost cause
This project was created because someone in the blender forums had a specific problem and I was bored and decided to help them out and then modified the addon because some other users asked for more features. I think it does what it was originally supposed to do just fine. You are free to develop an addon that is way better in your own free time. Feel free to use this one as a basis.
you must have a pretty high bar for changing in a predictable manner. it's not our fault you couldn't keep up with blender.
This restriction is imposed by blender not by the script. The script is simply calling blender functionality via the python api and therefore saving you many manual clicks and steps. This problem existed in earlier version of blender just the same. The blender version has nothing to do with this.
that kind of sentiment is a great way to lose everything, especially your rapport with the general public.
This is just what solved most users problems in a large amount of cases so I think it is safe to assume that it would help most users that come across this problem. Also I don't care about any rapport with the general public or you. This is a free addon, I don't owe you anything.
again, we're not asking support for the kind of results you'd get from spawning a tardis inside another tardis in GMod. we want an addon that works within reason. in it's current state, it only works with geometry that's perfectly, 1:1 symmetrical. that purpose is already filled by blender's vanilla feature
Which vanilla feature? Has blender added the ability to collapse modifiers and keep the shapekeys intact in latest versions? If so that's great then this addon is not needed anymore. Again the script doesn't impose this restriction by itself, this restriction is enforced by blender. Also don't write we want if you mean I want.
pull requests can only be opened by staff and high ranking users. us rank-and-file users can't do so
Again you seem to be misinformed, you can open pull-requests just as on any other github repository by forking this repo, adding your changes and then clicking on Contribute to open a PR on this repository.
The way you formulate your messages comes across as very entitled and opinionated and is imho inappropriate because you seem to lack basic understanding in the fields touched on here.
It looks like you are arguing just for the point of arguing so I'm not gonna react to that. I've already answered your questions and the answers will not change. Please stop derailing this issue.
You seem to be lacking in reading comprehension, because if you followed my advice you would be able to create a pullrequest after FORKING the repository.
You can read the github docs on this:
Furthermore looking up the definition of an ad hominem would help, because the one you mentioned wasn't one.
How can one person possibly be this entitled and condescending while just being entirely wrong on every single thing they say. Thank you for your work and for putting up with rando harrassment like this.