iBrushC / animextras

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

Update only works with the object selected.[BUG] #25

Open lucianomunoz opened 1 year ago

lucianomunoz commented 1 year ago

OS: windows

ADDON: Latest

Describe the bug The update button doesnt work unless you select the mesh again which means getting out of pose mode selecting the mesh and then updating and then selecting again and going into pose mode, the behaviour expected is: it should update automatically when a change is done, and secondly if i need to update manually i should be able to update without going to select the object again because that breaks the flow

schroef commented 1 year ago

I can have a look at it, its been a while. I was working on an auto updater. Did work for a bit if i remember it correctly. Your using the "step frame " Method?

PS also open the console and see if you get any errors related to this addon. Copy/paste or screengrab that as well

Is it perhaps a new blender issue. I cant check the newest right now. But on my old osx at work running 2.83. I can still update while in pose mode update-in-posemode

Could you screengrab what is going on?

lucianomunoz commented 1 year ago

Hey Bud, thanks for looking into it, make sure the character is linked, at least thats how i was using it.

schroef commented 1 year ago

I had some issues with linked characters. Was jsut trying to fix that. The only thing i noticed is that when you press clear, only then do you need to select the mesh. But i believe ive fixed this in an other version i was working on.

I guess you cant share your scene or simple model?

Ps you know that it makes an override on a linked rig, right? That's the only way to make this work. I really don't quite get why your scene needs you to select the mesh, because that doesn't natter or should not matter

schroef commented 1 year ago

Do you have an update @lucianomunoz ?

lucianomunoz commented 1 year ago

hey hey sorry I can share the project, hold on:

Its a linked file and blender doesnt have a way to pack up all the resources to a zip like maya ugh so here they are: The animation scene file: https://www.dropbox.com/scl/fi/z7cao2qttqetiuq39ifn8/HeroLanding_004.blend?rlkey=767o4cifwk6wfa6cn8vk0286b&dl=0 The rig: https://www.dropbox.com/scl/fi/dxkeeiqytcdairvzl4i3f/Kid_Miles_V3.blend?rlkey=uo23eglink5q4yyt1kzeq60tw&dl=0 ** its a free rig from gumroad

schroef commented 1 year ago

So when does this happen that you need to select the mesh object again?

schroef commented 1 year ago

So i think you mean this. You have already linked the RIG and applied an override yourself. Then when you start or already have animated the rig, you can press update. Well the addon should do all the work. But i see this rig returns an error because he has names collections and rigs differently.

I think adding a check where we select a rig and it has children mesh so we can do "Set Onion to Selected", shouldnt be hard. But, im not sure it can work on the other hand. I mean its kinda hard to figure out from only the rig what child object needs to have the onion. Once you set it up, you dont need to it again. If the mesh object has the same name as the rig, than it should work i believe. issue25-no set onion from already linked

Also noticed that the "infront" option gives errors on this rig as well, it has 2 meshes. So when low is visible, it returns an error. Need to think about how i could tackle this setup

PS concerning auto update. i dont think that will ever work nice. I had made test versions, where it would update using a timer. But its super annoying, because when it needs to render the all the frames for the onion. Your system hangs a bit. So when your in the middle of setting your pose, it feels its about to crash. Thats why i added the shortcuts. When you want a update simple press ALT + SHIFT + R, or whatever you set it to or add it to Quikc Favorites

schroef commented 1 year ago

Perhaps i have an idea to make it easier. One idea i just got, is show a small popup window which shows a list with all children mesh obejct in the rig. The user can than select which mesh object to use. Therefor he/she would not need to go out of pose mode and select mesh object and go back into pose mode.

It will take quite some code to do this. Still wonder if just simply selecting the correct mesh object is that much work

EDIT I tinkered a bit with code to make a mockup. Used someone elses code adjusted it. Perhaps i can add something like this? So user will get a drop downmenu or so called enum menu. This will show all child objects inside the RIG. Then you can simple select the one you want, while stayin in pose mode. Not sure i can make it more easier than this search-popup-selector

schroef commented 1 year ago

@lucianomunoz

Could you try this branch. Ive added a enum menu so you can select all the sub items from an armature. Now the tool only works when a rig is selected. That is the downside for this approach. But that originally what the tool is for. Download the repo, delete that builds folder. Not sure why the original owner added that. Thats why there releases on github https://github.com/schroef/animextras/tree/New_Set_Onion_Object

EDIT added functionality so when we change the selected onion part. The view will automatically update, if auto-updater is ON. auto update on part switch-v117