h4lfheart / FortnitePorting

Automation of the Fortnite Porting Process
GNU General Public License v3.0
250 stars 45 forks source link

Fixing lobby pose prop and character accessory importing #62

Closed Bmarquez1997 closed 5 months ago

Bmarquez1997 commented 5 months ago

Two issues fixed:

1) When importing a skin that has a lobby pose with props, the plugin would throw an error when trying to get the shape keys for the master_skeleton/Fortnite_M_Avg_Player_Skeleton's mesh (because it doesn't exist). Fixed by adding a null check before trying to get the shape keys/process the pose data

2) When importing a skin that has an accessory (hat/custom head/tail/etc) that is connected to the main armature with a Child-Of constraint instead of by merging skeletons, if "Spawn at 3d Cursor" is enabled the accessory will end up offset from the main armature (both when spawned in and when moving the main armature in object mode). Fixed by setting accessory armature object location to (0, 0, 0) when adding the Child-Of constraint, so the armature's position is determined by the constraint instead of by the constraint + the 3d cursor offset