Bug 400554

Summary: Layer > Import/Export > Save Group Layers: export subgroups better
Product: [Applications] krita Reporter: beuc
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: halla
Priority: NOR    
Version First Reported In: 4.1.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description beuc 2018-11-01 16:25:39 UTC
Hi,

STEPS TO REPRODUCE
1. Create top-level groups "face" and "arm"
2. Create subgroups "face > neutral", "face > smiling"
3. Create subgroups "arm > neutral", "arm > smiling"
4. Create paint layers and be creative ;)
5. Layer > Import/Export > Export Group Layers; untick "Export Only Toplevel Groups", prefix "mychar"

OBSERVED RESULT
- Files named mychar_neutral.png, mychar_smiling.png, mychar_arm.png, myarm_face.png.
- Either "face" or "arm" layers overwritten by the others for mychar_neutral.png, mychar_smiling.png
- Exports mychar_face.png and mychar_arm.png while those only contain already exported subgroups

EXPECTED RESULT
- Files names mychar_face_neutral.png, mychar_face_smiling.png, mychar_arm_neutral.png, mychar_arm_smiling.png.
- Warn the user if export will cause naming conflict (may still happen if one of the groups has '_' in its name).
- Don't export groups that only contains exported subgroups
Comment 1 beuc 2018-11-03 10:47:10 UTC
One work-around is to name the subgroups with the full (redundant) hierarchy name (e.g. "face > neutral" becomes "face > face_neutral").

My suggestions may matching a specific workflow, so take it with a grain of salt. 

Also let's note there's already a rule similar to my "Don't export groups that only contains exported subgroups": Krita only export sub-groups if their parent group only contains sub-groups; otherwise, only the parent group is merged and exported.