[OoT] Fix misplaced objects bug #596
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
probably a hacky fix but
setOriginnow have the annoying side-effect of moving any child object the mesh got, I'm not sure how to fix that properly so I just made it so any object that is a child of a mesh is parented to whatever object the mesh is parented to, so basically moving it by one level in the hierarchy, shouldn't hurt anythingthe issue specifically happens in
applyRotationinootDuplicateHierarchy, basically anything that runsbpy.ops.object.transform_apply()will move the objects, idk how to fix that but I think editing the tree of the duplicated objects is good enough, it won't change anything for users anyway since it's a temporary tree 🤷Note: only tested with scenes but this change also affects DL, collision exporters, which are untested