Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added conditions when importing from a pre-DT saved pose file. #1383

Merged

Conversation

CaptainSticky
Copy link
Contributor

This pull request adds a method to determine whether a pose file was saved prior to DT, and would thus be missing the new face bones. I determine this by checking if the "tongue-A" bone is present in the file, which is a bone introduced in DT and is common to all races and genders.

The first use of this is for the general import button, which loads all bones and their rotations. We want to skip loading the face bones. This will prevent characters from having a scrunched face when loading old poses, and allow users to make use of expressions they enter gpose with.

This second use of this involves loading expressions specifically, which is defined as loading selected bones by the three main posing modes (rotation, scale, and position). There will be a dialog which warns users they are attempting to load an expression from an old, pre-DT pose file and restore the scale and position checkboxes if the user decides to cancel.

Copy link
Contributor

@StoiaCode StoiaCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Idea! I left some comments :)

Anamnesis/Languages/en.json Outdated Show resolved Hide resolved
Anamnesis/Files/PoseFile.cs Outdated Show resolved Hide resolved
@CaptainSticky
Copy link
Contributor Author

I've done the requested changes and I've added some new changes based on feedback we've been seeing on Discord regarding faces that weren't updated for DT. I didn't know that not all of them were updated.

The change I just added is to have two warnings.

  1. Warns if the user is loading an old expression on to a new face. If they continue, it will load as a pre-DT expression without loading the bone positions.
  2. Warns if the user is loading a new expression on to an old face. If they continue, it will load as a DT expression, as normal.

If the user is loading an old expression on to an old face, then there is no warning and it will load as a pre-DT expression without loading the bone positions.

Let me know your thoughts! Hopefully this will help alleviate some of the frustration. :)

@StoiaCode StoiaCode merged commit ab7dbcd into imchillin:master Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants