apply as rest pose removes all rigid bones and joints on pmx #69

Closed
opened 2024-03-16 03:47:42 +00:00 by Ghost · 10 comments
Ghost commented 2024-03-16 03:47:42 +00:00 (Migrated from git.disroot.org)

As the title says, trying to use bone scaling in pose mode to edit a pmx with intact rigid bodies and joints, using cats apply as rest pose does apply the transforms but in the process deletes all rigid bodies and joints - on blender 4.0.2 and cats 4.0.4.4. I don't think i ever had that happen before blender 4.0 as i was mostly working on vrms in the meantime i can't recall when it first happened tho.
I would assume this is probably an issue with mmd_tools upstream though since morphs are also broken for material morphs with blender 4.0 not finding any mesh assigned to the morphs.

As the title says, trying to use bone scaling in pose mode to edit a pmx with intact rigid bodies and joints, using cats apply as rest pose does apply the transforms but in the process deletes all rigid bodies and joints - on blender 4.0.2 and cats 4.0.4.4. I don't think i ever had that happen before blender 4.0 as i was mostly working on vrms in the meantime i can't recall when it first happened tho. I would assume this is probably an issue with mmd_tools upstream though since morphs are also broken for material morphs with blender 4.0 not finding any mesh assigned to the morphs.
Ghost commented 2024-03-16 05:04:31 +00:00 (Migrated from git.disroot.org)

So all I done with apply rest pose is made it compatible with blender 4.0 which only needed some minor changes (as far as I remember) so unless this issue is also in the 3.6 version it is most likely something to do with mmd tools as it's not fully working with 4.0 still.

However I will take a look after I get some sleep to make sure and if it is a cats issue I will try to fix it later today.

However if it is a mmd tools issue, I would advise to use blender 3.6 and it's why I still recommend blender 3.6 rn as mmd tools has alot of issues with 4.x.

So all I done with apply rest pose is made it compatible with blender 4.0 which only needed some minor changes (as far as I remember) so unless this issue is also in the 3.6 version it is most likely something to do with mmd tools as it's not fully working with 4.0 still. However I will take a look after I get some sleep to make sure and if it is a cats issue I will try to fix it later today. However if it is a mmd tools issue, I would advise to use blender 3.6 and it's why I still recommend blender 3.6 rn as mmd tools has alot of issues with 4.x.
Ghost commented 2024-03-16 09:36:14 +00:00 (Migrated from git.disroot.org)

Hi there, I just looked at the code and it seems it always been programmed into cats to remove rigid bodies when doing certain things (For atleast 3 or 4 years, in the 2.79 version it wasn't).

Basically anything with set_default_stage will remove the rigid bodies which is in about 60% of functions in cats. now the reason is apparently because there cause issues if there not in the view_layer, now I don't know if this is true in newer versions of blender as honestly never really used them myself. So what I done is created a 4.0 testing branch and removed the code responsible to see if it breaks or not. In my initial testing I don't see any issue but I think before I push this to dev, let alone stable it needs more testing as it was in alot of the core functions of Cats. Feel free to test out the 4.0 testing branch.

Hi there, I just looked at the code and it seems it always been programmed into cats to remove rigid bodies when doing certain things (For atleast 3 or 4 years, in the 2.79 version it wasn't). Basically anything with set_default_stage will remove the rigid bodies which is in about 60% of functions in cats. now the reason is apparently because there cause issues if there not in the view_layer, now I don't know if this is true in newer versions of blender as honestly never really used them myself. So what I done is created a 4.0 testing branch and removed the code responsible to see if it breaks or not. In my initial testing I don't see any issue but I think before I push this to dev, let alone stable it needs more testing as it was in alot of the core functions of Cats. Feel free to test out the 4.0 testing branch.
Ghost commented 2024-03-17 12:46:14 +00:00 (Migrated from git.disroot.org)

thank you so much for the quick reply and work! don't push yourself though please, i can work around it for the most part just converting to vrm for the most part. Will try it out and let you know, thanks again! Unfortunately don't have blender 3.x anywhere anymore and my distro isn't packaging old versions

thank you so much for the quick reply and work! don't push yourself though please, i can work around it for the most part just converting to vrm for the most part. Will try it out and let you know, thanks again! Unfortunately don't have blender 3.x anywhere anymore and my distro isn't packaging old versions
Ghost commented 2024-03-17 15:12:26 +00:00 (Migrated from git.disroot.org)

Hey there as stated it's on the 4.0 testing branch not on 3.6. thanks

Hey there as stated it's on the 4.0 testing branch not on 3.6. thanks
Ghost commented 2024-03-17 18:53:46 +00:00 (Migrated from git.disroot.org)

Hey, yeah, i'm aware, just since you mentioned 3.6 for other potential mmdtools issues. Tried it and so far it seems to be mostly fine, haven't yet tried extensive rigid body/joint behaviour after scaling tho, will let you know! material morph issue is definitely something mmd_tools upstream tho unrelated to the apply as rest pose. will wait for mmd_tools official 4.x support and then opening a bug report there for that tho

Hey, yeah, i'm aware, just since you mentioned 3.6 for other potential mmdtools issues. Tried it and so far it seems to be mostly fine, haven't yet tried extensive rigid body/joint behaviour after scaling tho, will let you know! material morph issue is definitely something mmd_tools upstream tho unrelated to the apply as rest pose. will wait for mmd_tools official 4.x support and then opening a bug report there for that tho
Ghost commented 2024-03-17 19:17:13 +00:00 (Migrated from git.disroot.org)

Ok just making sure.

Unfortunately full official mmd tools support for 4.x won't be available unto the next LTS which will be for Blender 4.2 which won't be released unto June so we won't have fullyl support for mmd tools 4.x unto then unless the author has a change of heart.

I have just released some temp fixes for the 4.1 branch of cats for mmd tools however I don't have time to fix all the issues mmd tools has (which are quite a few by the sounds of it plus some seem like more.complex issues).

Sadly unto official support from mmd tools.comes out for 4.x all I can do is patch up the most annoying issues to the best of my abilities. Hence why I still recommend 3.6 for the time being (I know you can't use that version which is fair, tho this issue is in the 3.6 version anyway).

Ok just making sure. Unfortunately full official mmd tools support for 4.x won't be available unto the next LTS which will be for Blender 4.2 which won't be released unto June so we won't have fullyl support for mmd tools 4.x unto then unless the author has a change of heart. I have just released some temp fixes for the 4.1 branch of cats for mmd tools however I don't have time to fix all the issues mmd tools has (which are quite a few by the sounds of it plus some seem like more.complex issues). Sadly unto official support from mmd tools.comes out for 4.x all I can do is patch up the most annoying issues to the best of my abilities. Hence why I still recommend 3.6 for the time being (I know you can't use that version which is fair, tho this issue is in the 3.6 version anyway).
Ghost commented 2024-03-18 06:15:09 +00:00 (Migrated from git.disroot.org)

After several tests and looking into the blender changelog and issues it seems the issue in blender regarding rigidbodies collections causing issues if there not in the view_layer still remains. In fact it annoys me as all the issues regarding this on the blender issue tracker has been closed because "you can just change a setting to fix this" (Note this setting doesn't seem to be exposed to the API so i can't just change it automatically in cats and expecting users to find this setting is stupid). The last issue I found basically said there going to re-build the rigidbody system however that was from 2 years ago and that's not been done.

So with this in mind it would be silly of me to remove the code to remove rigidbodies as it seems most users don't really care if there get removed and if there didn't there would be issues. But what I going to do instead is put in a setting where you can turn this on/off instead which seems to be the best solution (Will be on by default due to the issues it seems to cause though).

After several tests and looking into the blender changelog and issues it seems the issue in blender regarding rigidbodies collections causing issues if there not in the view_layer still remains. In fact it annoys me as all the issues regarding this on the blender issue tracker has been closed because "you can just change a setting to fix this" (Note this setting doesn't seem to be exposed to the API so i can't just change it automatically in cats and expecting users to find this setting is stupid). The last issue I found basically said there going to re-build the rigidbody system however that was from 2 years ago and that's not been done. So with this in mind it would be silly of me to remove the code to remove rigidbodies as it seems most users don't really care if there get removed and if there didn't there would be issues. But what I going to do instead is put in a setting where you can turn this on/off instead which seems to be the best solution (Will be on by default due to the issues it seems to cause though).
Ghost commented 2024-03-18 06:39:26 +00:00 (Migrated from git.disroot.org)

I also just realised something else.... this is coded in a bit of silly way.

So if you have the option remove rigid bodies and joints checked in Fix Model (OR Fix MMD Model in my version) then it will remove them but if you don't, it won't remove them... this is a global setting in a very non obvious place and not a local setting the for the Fix Model/ Fix MMD Model....

So my new plan instead is to make a global option in settings which does not effect the MMD Fix Model option, both will be separate too each other from now on. And too also make a separate manual button to remove rigid bodies and joints in MMD Options as a just in case it's needed button.

I also just realised something else.... this is coded in a bit of silly way. So if you have the option remove rigid bodies and joints checked in Fix Model (OR Fix MMD Model in my version) then it will remove them but if you don't, it won't remove them... this is a global setting in a very non obvious place and not a local setting the for the Fix Model/ Fix MMD Model.... So my new plan instead is to make a global option in settings which does not effect the MMD Fix Model option, both will be separate too each other from now on. And too also make a separate manual button to remove rigid bodies and joints in MMD Options as a just in case it's needed button.
Ghost commented 2024-03-18 07:43:06 +00:00 (Migrated from git.disroot.org)

The above changes are now live on the Dev branch for blender 4.0 and will be pushed to stable on all branches once I fully tested all functions of cats as this change could possibly be a breaking change.

  • You can now turn off the removal of rigid bodies and joints if you turn off "Remove Rigid bodies and Joints Global" setting in settings and updates tab. This will stop the removal of rigid bodies and joints when using certain functions of cats like the apply as rest pose button.
  • The Fix MMD Model setting will now not effect this global setting as it's completely separate.
  • There is now a manual button in MMD Options where you can manually remove Rigid bodies and joints if needed.

Testing branch for 4.0 has been removed as no longer needed.

Thanks!

The above changes are now live on the Dev branch for blender 4.0 and will be pushed to stable on all branches once I fully tested all functions of cats as this change could possibly be a breaking change. - You can now turn off the removal of rigid bodies and joints if you turn off "Remove Rigid bodies and Joints Global" setting in settings and updates tab. This will stop the removal of rigid bodies and joints when using certain functions of cats like the apply as rest pose button. - The Fix MMD Model setting will now not effect this global setting as it's completely separate. - There is now a manual button in MMD Options where you can manually remove Rigid bodies and joints if needed. Testing branch for 4.0 has been removed as no longer needed. Thanks!
Ghost commented 2024-03-18 11:29:26 +00:00 (Migrated from git.disroot.org)

thanks again for the quick reply and fix, i'll mark it as closed now, can always reopen if issues should pop up with it!

thanks again for the quick reply and fix, i'll mark it as closed now, can always reopen if issues should pop up with it!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Kneelawk/Cats-Blender-Plugin#69
No description provided.