animaide icon indicating copy to clipboard operation
animaide copied to clipboard

Curve Tools not working with shape key F-Curves

Open abrasic opened this issue 2 years ago • 13 comments

I work a lot with facial expressions driven by shape keys and sadly AnimAide does not seem to function on F-Curves owned by shape keys. When attempting to use the sliders, they don't function as if you haven't selected anything at all, and nothing is logged in the console as an error.

In layman's terms I would believe there would be an easy check to see if (a) the user is in object mode and (b) any data for a selected mesh exists in obj.data.shape_keys.animation_data.action.fcurves, and if so, add to the selected keys for AnimAide to move around.

I don't know if I should call this a 'bug' or a 'feature request' but regardless I would love to get such a thing working in AnimAide

abrasic avatar Feb 24 '22 06:02 abrasic

Oh, I see. I did not use the animation data inside shape_keys for the addon. That is an oversight on my part. I'll check how to best implement that. Thanks for letting me know.

aresdevo avatar Feb 24 '22 18:02 aresdevo

I'm almost there. I have a version that addresses this issue but I have not pushed it yet. I'm still testing it, but so far seems to be working with shape keys. I will let you know when it is available.

aresdevo avatar Mar 27 '22 08:03 aresdevo

Glad to hear progress is being made! Thanks so much for the update 😊

abrasic avatar Mar 27 '22 08:03 abrasic

Hi there,

Just curious if any recent progress has been made for release of this fix? Thank you! 😊

abrasic avatar Aug 13 '22 10:08 abrasic

Sorry... Life distracted me. I remember things were almost there last time I checked. I need to go back and check again to see if there is any conflict with some unrelated bugs I just fixed. Hopefully, everything is fine.

Wow... I see now how long my hiatus was. Sorry for the delay.

aresdevo avatar Nov 11 '22 07:11 aresdevo

No worries at all, we appreciate your continued upkeep on this project :)

abrasic avatar Nov 11 '22 08:11 abrasic

Hmmm.... I was going to merge the commit I had for this, but now it has conflict with some changes you made. It was too late last night to go through them.

I might ask you some questions about them. For example I see you deleted a check I had for some key selection. I couldn't see last night why I had it but I remember it was to fix a bug. Any specific reason you deleted that?

I'll be more specific if I need help when I go through the conflicts.

I really need to add more comments to the code

aresdevo avatar Nov 11 '22 15:11 aresdevo

Sorry, now that I think about it, the conflicts could be related to another bug fix I was addressing at the time.

As I said, it was late last night 😋. I'll check again with more time.

aresdevo avatar Nov 11 '22 15:11 aresdevo

I checked and your changes don't have anything to do with the conflicts. Thanks again.

The issue is that when I implemented the addition of the blend shapes I introduced some changes that affect your default curve tool (that includes what I mentioned before). I'll check tonight to crush all the inconsistencies. it shouldn't be that hard.

That is what happens when you get away from your code for so long and are not good at adding comments. :P

aresdevo avatar Nov 11 '22 16:11 aresdevo

Ok... I managed to merge the commit. Now the curve tools should work with shape keys. Please test this release (Version 1.0.38.34) and let me know if you find any bugs.

I had some issues with your "default" curve tool. I added some comments with the changes I made to make it work again. It doesn't work with shape keys and since I don't understand very well yet how your default tool works I have not tried to implement shape keys into it.

Just so you know, in case you want to try something, the main reason shape keys are included now is because of some modifications I made to the support.get_globals() function to now include shape keys actions (by the use of the new utils.get_all_actions() function).

aresdevo avatar Nov 14 '22 00:11 aresdevo

Hi @aresdevo, Albeit a bit hacky, the PR above seems to work after testing on various rigs. I should also note that currently Blend Default wont work on shape keys until you place one keyframe/f-curve on one of the loc/rot/scale properties on said mesh. When I get the time I can figure out the cause for that also.

Edit: Just found a bug where Blend Default will error if you attempt to use it on a mesh with a custom property

abrasic avatar Nov 14 '22 06:11 abrasic

Hey, thanks again. I didn't see that error, just could not affect keys on custom properties using the "default" tool.

Hacky!!! :) I think my entire addon is hacky :P

I just realized custom properties of an object are not included on any of the tools, just custom properties inside armatures. I need to check that.

aresdevo avatar Nov 14 '22 07:11 aresdevo

What's up? Curve tools also don't work with Camera Focal length f-curves. Any chance you could add this to the fix? I could also submit a pull request if you like, but I don't think I have the time to do it, and I know you've been busy as well. Looking forward to this. Thanks

jgilhutton avatar Dec 02 '22 13:12 jgilhutton