-
Notifications
You must be signed in to change notification settings - Fork 0
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
#327: Creer un validator de blendMode sur les layers dans photoshop #43
#327: Creer un validator de blendMode sur les layers dans photoshop #43
Conversation
Change the validator description
Meilleure methode de récuperation du nom de classe
if not self.is_active(context.data): | ||
return | ||
|
||
PASSTHROUGH = "passThrough" |
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.
Selon moi ici il faut retirer PASSTHROUGH
et NORMAL
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.
En considérant qu'on garde le transfert d'info par str, on peut conserver ces var ou pas du coup ?
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.
Yes
|
||
for layer in layers: | ||
layerDict = {} | ||
if (layer.group and layer.blendMode != PASSTHROUGH) or (not layer.group and layer.blendMode != NORMAL): |
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.
Et ici faire if (layer.group and layer.blendMode != BlendMode.PassThrough) or (not layer.group and layer.blendMode != BlendMode.NormalBlend):
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.
il y a une logique typeIDToStringID(desc.getEnumerationValue(stringIDToTypeID('mode')));
pour obtenir une string, voir si il y a la même pour avoir un id (int)
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.
Comme vu dans la pr sur OpenPype, il n'y a pas de lien entre les classes et fonction dans le jsx et celles du py, les ID des blendModes ne correspondent pas entre l'api jsx et l'api python de Photoshop.
En passant par un eval('BlendMode.' + blendModeName.toUpperCase()), on va conserver la transmission d'info par str je pense
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.
Yes
layerDict = {} | ||
if (layer.group and layer.blendMode != PASSTHROUGH) or (not layer.group and layer.blendMode != NORMAL): | ||
layerDict["actualBlendMode"] = layer.blendMode | ||
layerDict["defaultBlendMode"] = PASSTHROUGH if layer.group else NORMAL |
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.
Passer ici un id une non une string
Pas hésiter à demander conseils ou avis à @Guilhemz |
typeStr = "Group" if layer.group else "Layer" | ||
msg = "{}\n\n The {} {} is set to {}.".format(msg, typeStr, layer.name, layer.blendMode) | ||
|
||
else: |
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.
le else
dans cette boucle semble inutile
…ues-en-mode-de-fusion-normal' of https://github.com/quadproduction/openpype-custom-plugins into enhancement/327-enhancement-validator-psd-tous-les-calques-en-mode-de-fusion-normal
Fix quadproduction/issues#327
Permet de valider si les layers sont bien en mode de fusion normal et les groupes en transfert sur photoshop