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
MB-Lab: Add a simplified export expression feature #270
base: dev
Are you sure you want to change the base?
Conversation
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 <amir.pavlo@gmail.com>
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 <amir.pavlo@gmail.com>
Unfortunately this pull request causes conflict somehow and I am unable to fix this on my end, using the 'dev' branch. |
@@ -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.
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.
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 amir.pavlo@gmail.com