Closed johnroper100 closed 8 years ago
I think this problem may be that with single bone armatures, the parent acts like a parent in that the child mesh is moved to location but then the armature is moved and offsets the child. I am testing.
No, this still does not work even with a full character rig.
@Peter-Noble can you take a look at this?
I'm not really sure what the error is? What is the point of having the base agent as a group and not just a single object? When I try adding two objects to a group and use that group I get a copy of of each object at various locations with both set to the same position (regardless of the original offset). The objects I used where armatures created using the Rigify addon. (However, if I parent an object to another then add that to the group it places the parented object in completely the wrong place.)
That is the error. I want to be able to create many agents in random locations.
This is only an error when there are parented objects in the group
I see. I'm still not entirely sure I see the point of using groups for the base agent. Is the generator meant to treat each object in the group as a different agent in order to give variety to the crowd or are all the objects in the group meant to be part of the same agent?
All part of the same agent, for meshes with an armature and multiple parts. I have been testing on the victor rig from BlenderCloud
@aditiapratama this is the big issue now
I am going to try to set the parent after the location is set
@TheDuckCow the child objects still are not showing up
@johnroper100 okay I'll take another look when I can. Do they not show up in the outliner at all?
edit: just had the thought that if anything has a parent, the only difference should be that they just don't have an assigned location/rotation as it should inherent from the root. So in the code we looked at, perhaps we sectioned off too much in the else clause.
the children do not, I will take a look at your idea
Seems to be working for now. If the problem returns I will reopen the issue.
@TheDuckCow This is an error with multiple objects on an armature as well. Take a look at test-error.zip.
ThThis needs to be fixed before anything else happens.
@TheDuckCow @Peter-Noble So, I found the problem, the meshes are duplicated, but the armature modifier still is set on Armature when it should be set on Armature.001 for agent 1 for example.
Is that something we can adjust after then duplication or should we be using a different method of duplicating them?
I just need to know how to update the armature modifier on each object with the new armature
I fixed it!
So, currently the agent generation in https://github.com/johnroper100/CrowdMaster/blob/master/cm_agent_generation/generation.py works, but it gives each object in the group a different location. I tried to fix this by putting the location outside of the objects loop:
but this still does not work.