-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small CAC refactoring in prep for CAC 2.0 and wizardless flow (#151)
<!-- Copy the TICKETID for this task from Jira and add it to the PR name in brackets --> <!-- PR name should look like: [TICKETID] My Pull Request --> <!-- Add link for the ticket here editing the TICKETID--> ## [TICKETID](https://ready-player-me.atlassian.net/browse/TICKETID) ## Description - This PR adds some minor changes which should add some extra flexibility and help us in CAC 2.0. Please share your feedback though and point out any potential floors in the updates. I will list some main changes and the reasoning below. **1. Added an extra return property to the CreateAvatar(AvatarProperties avatarProperties) method (made it return a tuple same as CreateAvatarFromTemplate.** **Reasoning:** To create an avatar from a photo with gender prediction enabled we need to also have the avatar properties, in particular we can get the gender of the predicted avatar which is required to load/update the avatar. **2. Removed gender from AvatarManager constructor** **Reasoning**: this makes AvatarManager easier to work with as you don't need to create a new one each time you change genders. Also CreateAvatar() function is passed avartarProperties (which can optionally have gender predefined) and CreateAvatarFromTemplate gets the gender from Template data. The only thing that may be useful in future is to add a separate "SetGender" function but at the moment I don't really see a use for it. **3. Removed partner parameter from CreateAvatarFromTemplate() function.** **Reasoning:** Why would anybody ever want to pass a "partner" value that is not the same as in their CoreSettings ? Doing so would probably break API's anyways (due to non matching subdomain and API key <!-- Fill the section below with Added, Updated and Removed information. --> <!-- If there is no item under one of the lists remove it's title. --> <!-- Testability --> ## How to Test - Mainly just test that current CAC sample still works (and it should) <!-- Update your progress with the task here --> ## Checklist - [ ] Tests written or updated for the changes. - [ ] Documentation is updated. - [ ] Changelog is updated. <!--- Remember to copy the Changes Section into the commit message when you close the PR -->
- Loading branch information
1 parent
4b09422
commit f7bee7b
Showing
4 changed files
with
21 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters