This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 318
MB-Lab: Add a simplified export expression feature #270
Open
amirpavlo
wants to merge
2
commits into
animate1978:dev
Choose a base branch
from
amirpavlo:dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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 feature makes use of Shape keys. The work flow is: 1. Create a character 2. Create a basis shape key followed by as many shape keys you desire 3. Once you're done click on the "Export Expression Shape Keys" 3a. Optionally you can select the "Apply to all Phenotype". This will apply the shape keys to all the expression files for all the same phenotype. Signed-off-by: Amir Shehata <[email protected]>
Many many thanks for the helps. Just 2 things about your commit :
|
Addressed two comment: 1. removed indent=2 for json.dump 2. renamed the tool to Import instead of Export I also added an option to override existing shapekeys. This is important since it allows the user to override their own shapekeys. It can be expanded later to expose a list of all the expression shape keys, which the user can modify. However, I still don't think it's a good idea to override the default shape keys, as they are pretty good already. Signed-off-by: Amir Shehata <[email protected]>
Unfortunately this pull request causes conflict somehow and I am unable to fix this on my end, using the 'dev' branch. |
LaikaN57
suggested changes
Nov 14, 2020
@@ -26,7 +26,7 @@ | |||
|
|||
import logging | |||
|
|||
import time | |||
import time, ntpath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use path
instead.
Comment on lines
+4392
to
+4396
kl_v = key_data.values() | ||
result = [] | ||
for l in kl_v: | ||
result.append(l.co) | ||
return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify to list comprehension.
return [l.co for l in key_data.values()]
@@ -130,7 +130,7 @@ def exists_database(lib_path): | |||
def save_json_data(json_path, char_data): | |||
try: | |||
with open(json_path, "w") as j_file: | |||
json.dump(char_data, j_file) | |||
json.dump(char_data, j_file, indent=2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove. We should let the indent come from other configuration or make this an option instead of hard-coding.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This feature makes use of Shape keys. The work flow is:
3a. Optionally you can select the "Apply to all Phenotype". This will
apply the shape keys to all the expression files for all the same
phenotype.
Signed-off-by: Amir Shehata [email protected]