iBrushC / animextras

An open source Blender addon that adds extra animation functionality.
MIT License
167 stars 24 forks source link

store data #13

Open schroef opened 3 years ago

schroef commented 3 years ago

I just found the add-on through Luciano Munoz, many thanks! I was looking in the code and noticed in your operator you state that you cant store dicts in a scene. Thats is possible with PropertyGroups, if i understand your method correctly.

Here's an example how to use that, here's another example of that method. This example shows perhaps the better example

schroef commented 3 years ago

I guess you worked it out because i do see a propertygroup already in there

iBrushC commented 3 years ago

Hey, thanks for bringing this to my attention. In my case, I've found that storing dicts works better as I can assign the exact frame number to each frame of data rather than basing them relatively off of the starting frame. Using PropertyGroups might work, but a good majority of the drawing code relies on indexing the dictionary by frame number. Last time I tried that it didn't work, however I may try again soon.

schroef commented 3 years ago

Dont you have issues that the order changes, i believe that is one of the drawbacks of dicts right? Im not 100% at home with Dicts. What does it store actually? Is it all the mesh verts matrix you use for the BLG drawing.

I noticed you clear external_data in each method, yet it is only used for INB as that a extra safety?

PS what should that inbetween do, i dont see a real differnt other that it shows mostly 1 of the 2 colors all the time and seems to be working even when Past and Future are off. Here i got 2 examples with a different outcome. In one scene all are blue and the other most are red, but sometimes color blue when i move frames. inbetween-random-coloring

inbetween-random-coloring2

This last example show it draws when both past and future are actually off. But this can also be related to the handler not being stopped. Im trying to work on that to, i test with a persistent method, but still the drawing keeps active. It results in a double draw. Its kinda weird because if force it to clear everything, reset timer and clear handler when a new file is opened. inbetween-random-coloring3

iBrushC commented 3 years ago

As of now, I'm storing the data in Dicts because the frame data can be stored with the frame number. It just helps with the opacity and color blending along with which meshes are shown. For example, it would store [(66, array_data1), (67, array_data2), (68, array_data3)] In the color/opacity interpolation code, I can now look up the current frame compared to the dictionary label which is the exact frame number as opposed to using a list and having to offset the list indices by the first frame the skins were taken from.

As for the inbetweening, the first example is mostly blue because there are direct keys on almost every frame of the animation. The way it works is the Direct Key color applies to meshes when there is a keyframe on that frame. The Inbetween Color applies to frames that do not have keyframes on it. To see more frames, just increase the "Amount". Here you can see the example: help

P.S. I can see that you added an actual visibility option rather than an enabled/disabled checkbox option, I'd love to implement that.

schroef commented 3 years ago

It's actually the same Boolean, I thought this looked cleaner. I basically use no text and just the icon. Then I check if it's true or false and update the icon.

I've already forked your repo. I would like the clean the reeadme file and separate the changeling to its own file.

If @lucianomunoz is okay with, I'd like to use his beefy rig as an example so I can add a nice hero image in the reeadme

Are you okay with updating the reeadme file?

Ps I also think it's better to push those builds to actual releases. I had downloaded this repo and was doing updates in this master. Then checking builds and noticed that v1.1.0 is actually different that your code in master. I had to manually compare and update my files to get them in sync again

lucianomunoz commented 3 years ago

Do it :)

Luciano A. Muñoz Sessarego

Web: www.pintamonos.cl

Email: @.***

Vimeo: www.vimeo.com/lucianomunoz

Imdb: www.imdb.com/name/nm8355386/

Gumroad: www.gumroad.com/lucianomunoz https://gumroad.com/lucianomunoz

Instagram: www.instagram.com/lucianomunoz Linkedin: www.linkedin.com/in/lucianomunoz

Youtube: www.youtube.com/theadventuresoflollypopman

On Wed, Apr 21, 2021 at 3:00 PM schroef @.***> wrote:

It's actually the book, I thought this looked cleaner. I basically use no text and just the icon. Then I check if it's true or false and update the icon.

I've already forked your repo. I would like the clean the reeadme file and separate the changeling to its own file.

If @lucianomunoz https://github.com/lucianomunoz is okay with, idd like to use his beefy rig as an example so I can add a nice hero image in the reeadme

Are you okay with updating the reeadme file?

Ps I also think it's better to push those builds to actual releases. I had downloaded this repo and was doing updates in this master. Then checking builds and noticed that v1.1.0 is actually different that your code in master. I had to manually compare and update my files to get them in sync again

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/iBrushC/animextras/issues/13#issuecomment-824386293, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHFPER22WSLSH73DZZ4UXLTJ5DJRANCNFSM43GELIWQ .

schroef commented 3 years ago

wow big list... i only used your name, is that okay or do you want more info shown?

PS he already updated the main repo. Most stuff works, i noticed some small panel issue. That is in a new pull request.

I really hope this stuff works in your product scene. PLEASE save a backup before testing it, but i guess you know the drill