• Announcements
  • Spine 4.2 imports PSDs directly, no Photoshop scripts needed

Davide It would be amazing if you could include a [clip] tag in the future! I hope someday you have some time to do that. thanks for trying to help!

    Related Discussions
    ...

    habahu 我明白了,谢谢你的解答,能否改进一下psd导入功能,比如增加一个自动合并剪贴蒙版的选项。

    This has been implemented v4-2-38-beta.
    Now clipping masks are merged with the layer or group below as if they were contained into a [merge] tag.

    eli_stergiouli

    I did research on how alpha inheritance works in Krita and how it differs from Photoshop clipping masks. The main difference is that a clipping mask is bound to the layer or group below, while alpha inheritance will inherit the alpha of all layers below.

    This implies that implementing a [clip] tag to make a level work as a clipping mask would only work in a single scenario where you have a group layer with two layers, the first with alpha inheritance. If the group layer had a third layer, the clipping mask would not be applied to the third one but only to the second.

    So I'm sorry to say that it's not possible on our side to apply alpha inheritance as a clipping mask even with a [clip] tag.

    However, during the research, I found on the latest Krita website news the following:

    Various other aspects related to development
    How to handle PS style clipping mask - Deif Lou has done an awesome job in researching and investigating the clipping mask, layer effects, and blending mode technicalities. The team intends to look into this and tackle this feature together.

    There's definitely interest on Krita's side to support clipping masks. Let's hope they will implement it soon. Currently, the only thing we can do is wait.

    Hey,
    New day, new bug 🙂

    When i import my psd, some element of a skin doesnt appear.

    the "nose" doesnt appear until i mesh it then revert it to normal.

    Thanks for all <3

      valahaha
      Hello again and thanks for your precious reporting 😃

      Unfortunately, I wasn't able to reproduce the situation you reported based on your screenshots.
      Could you attach a screenshot of the layers organization in Photoshop or at least a part of it that will result in the situation described above?
      If you prefer, you can also send the PSD to contact@esotericsoftware.com.

        Davide

        Thanks for your answer



        All of above doesnt work.
        I have the same name structure in the other body part. like:

        All my psd i structured the same way, there is only 4 part of my body that doesnt work.
        The issue dont exist in 4.2.49 PRO

        When i convert to mesh then revert it to region, it seem all the skin in the skinplaceholder are debugged, but not the one in other place holder.
        With two slot in one skins, if i debug one i only have this slot debugged not the entire skin.

        Have a nice day

          valahaha

          Thanks for your screenshots! I was able to reproduce the bug.

          I confirm that in 4.4.40 we did an update to make attachments visibility more consistent with what is shown in the saved PSD.

          However, there was a bug connected to the fact that if a slot has more than one attachment, like for the nose, if the first layer in the PSD is hidden, the slot is hidden in Spine.

          Regarding the trick to show the attachment toggling the mesh checkbox, that is a side effect of making an attachment visible when the mesh checkbox is clicked and the attachment is hidden. You can achieve the same behavior just by clicking the paper clips in the tree on the left of the skin placeholder.

          You'll find the fix in the next release 🙂

          Hi,
          So I was using the script photoshop to PSD before and I wanted to try your new system !
          Unfortunatly, even if it is working fine, it doesn't name the slot based on the layer name, but rather on the folder and skin name ?

          If I have :

          Before, it created everything right, like this :


          (My bad I did it myself to show it, the picture name should still be Body/Girl Body/Girl Body/Body Arm Color 1 Right, only the skin slot should be different)

          But now, it does this :

          Is this wanted ? It is really bothersome because if you're creating skin you will have to move all picture to the same skinslot, while before it was working fine right at the start.

            Pentacles

            Pentacles it doesn't name the slot based on the layer name

            Hi, from your first screenshot, you have used the slot tag [slot:Body Arm Color 1 Right] which has rightfully used that as the slot name and not the layer name.

            As for your skin placeholder, it takes the name from your folder structure minus the skins. Please note that if you want shorter names you can simply add folders to your skin name this way: [skin: Body/GirlBody] So these parts will be omitted from the skin placeholder name.

            If instead you want to keep them for your naming logic, please also note that what is not part of a skin should have neutral naming, so for example, calling a folder that shall be used for both Girls and Boys [folder:Girl Body] would not give you a correct folder structure for Boy parts.

            Folders can be very useful to organize objects, directions, and anything that should not be used only by a single skin, but that should be common. When that is not the case, skins are preferrable for single skin usage.

              Pentacles

              Hello Pentacles 🙂

              You are right, we changed the rules to define names for skins, slots, skin placeholders, attachments, and attachment paths. The new system is quite versatile. it's just a matter of knowing how it works. We are in the process of writing the documentation, so it will be easier to understand how names are assigned to all of them.

              Here's a brief summary of the rules. Given a layer - in your example Body Arm Color 1 Right - the hierarchy is traversed from the outermost group to the layer. In this case, we have this hierarchy: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right (the layer).

              Skin name: concatenation of [folder]s and [skin]s, from the first element to the latest [skin] (/ is allowed). In your example: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right resulting in Body/Normal/Normal, where Body and the first Normal are managed as folders.

              Placeholder name: concatenation of [folder]s, from the first element to the layer name (/ is allowed). In your example: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right resulting in Body/Normal/Body Arm Color 1 Right.

              Attachment name: concatenation of [folder]s and [skin]s, from the first element to the layer name (/ is allowed). In your example: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right resulting in Body/Normal/Normal/Body Arm Color 1 Right.

              PNG path: If [path] tag is on layer name, its value is used (/ is allowed). Otherwise, the attachment name is used. Then .png is added to define the PNG path. In your example, no [path] tag is used, so the attachment name + .png is the PNG path: Body/Normal/Normal/Body Arm Color 1 Right.png.

              Slot name: The last [slot] tag in the hierarchy or the layer name (/ is allowed). In your example: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right resulting in Body Arm Color 1 Right.

              When I say "/ is allowed," it means that a forward slash can be used in the tag value or layer names. In that case, if used as:

              • "leading slash" (e.g., /Normal), then parent layers won't affect the name
              • "slash in the middle" (e.g., Body/Normal), to easily make subfolders.

              Let us know what you think about these new rules and if you can achieve a layer organization in Photoshop that allow you to import it as you desired.

                Erika
                The slot name is right, "Body Arm Color 1 Right", I was talking about the skin slot, the skin placeholder I guess ? I'm french, I use spine in French so I don't know exactly how it is named in english. The orange hanger thing.

                I'm using the [folder] on a separated folder (on Photoshop) because it's simplier and more understandable from looking than having on each picture [skin:Body/Normal/Normal], [skin:Body/Normal/Blue Shirt],[skin:Body/Normal/Red Shirt], etc.
                It's just more easy to understand by having a [folder] body with the [folder] Normal with inside the [skin] folder and inside of it picture related to.
                I try to stay tidy in the PSD file with sperated [folder] from [skin] and [slot]🙂 I found it more tidy and understandable like this, but it's personnal I guess 😅

                Davide
                So if I want to have the placeholder name (It's the orange hanger, right ?) to "Body Arm Color 1 Right" only then I have to put the folder in the [skin] ? Like if it was named : [skin:Body/Normal/Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right, it would have resulted in only "Body Arm Color 1 Right" for the placeholder ?

                To be honest, I don't understand why it have to take the folders name 🤔 No offense intended, but I don't see where it could be usefull to have the folder name in the placeholder name. I'm quite curious to hear use though, I'm doing animations from less than two years on a indie side, so maybe there's things that I don't know (Actually, no, I'm pretty sure there's a lot of things I don't know 🤣)

                I'm gonna use the old "Photoshop to Spine" script because I actually coded a full program to precreate the folder and rename picture correctly and all boring stuff so my artist can concentrate of drawing more freely. (Actually, the program create a script for photoshop based on the skin and folder asked in the program... well, anyways)
                This way we doesn't have to create and rename all the photoshop layer and all, we just drag and drop layer in the related folder and my second script does everything so that the "Photoshop to Spine" make the magic work perfectly. (By renaming layer using the slot name, mainly)
                Sadly as it doesn't result in the desired placeholder name with your new system, I'll use the old solution, even if it's less performant that your solution.
                Thanks for your hard work though 👍

                • Nate 回复了此帖

                  We had a lot of internal discussion about this. We need to define a convention to determine the placeholder name automatically. We think the most common usage is to want the [folder]s in the placeholder name. This is what the PS script does, except it ignores [folder]s above the [skin].

                  Pentacles The PSD screenshot you showed may just be an example, but it seems to be an unusual way to setup skins and seems to have [folder]s that are ignored by the PS script. I believe these folders in your example are ignored by the PS script because they are above the [skin]:

                  图像因不支持 HTTPS 被隐藏。 | 仍然显示


                  Instead of using the PS script, you can just take out those [folder] tags that the PS script ignores.

                  It can make sense to put [folder]s above the skin, so we should support that. It enables a skin to have images elsewhere, in their own folder outside the rest of the skin images, which may be needed if you want to pack those in their own atlas because sometimes you don't want to load them at runtime.

                    Nate
                    I created a mess it seems 😅

                    Originally, I was doing it like this to have a tidy PSD file, because I have a lot of skin in the same file.
                    So I wanted to have folder to have a tidy view just as in Spine, with all skin in a folder.

                    By exemple, I've got all my body skin in the folder Body because there's actually six different kind of body. If there was only those, I wouldn't need the folder Body, but I've also got others skin related to the scene, like clothes, or tattoo... So I've separated them in folder Body, Clothes and Tattoo. This way I don't have to sort visually the skin, I just have to open / close a folder. The same goes for the PSD file, I just have to open / close the group (I believe folder are called group in photoshop)

                    Also, I duplicated the skin to folder because before there was subskin that would goes with some body skin (Like a skin for the tail that was different of the original so I splitted them in subskin) so to have a tidier file, I created folder to gather the skin related to the base skin. It's the reason why it' "Body/Normal/Normal/Arm Right" and not just "Body/Normal/Arm Right"

                    But I could remove the [folder], but that would mean I would have to create manually in the spine project the folder to tidy the skin. Trough I could probably remove the [folder:Normal] and that would make it work as it would have result in "Body/Body Arm Color 1 Right" for every piece.

                    Anyways, I can still use the photoshop to spine script as it work fine, it just take longer to compute and doesn't center the picture, I just wanted to make sure this was intented as it behave differently than the script.

                    Sorry if I'm unclear, I'm not english 😅

                    6 天 后

                    re: open standard support sometime in the future, it would be nice if it also supported popular vector art tools such as inkscape and graphite.rs

                    Open standards are severely needed now that Canva have acquired Affinity.

                    Nate
                    Really excited for the ability to directly import PSDs into Spine!

                    I have a question re: it though. PSD does not show up as an option for me when I try to import data, just JSON and binary file. Is there a step I'm missing, or is there a reliable way to troubleshoot this issue? I'm on Mac OS and I'm on the latest beta version, if that helps. Additionally, the PSD file is all flattened layers (less than 30), with no hidden layers or anything fancy.

                    I'd appreciate any advice; thank you!

                      dlcolon It's a separate import option : top left > spine > import PSD

                        SnzdIV
                        Thank you so much! I actually found it after I decided to play around with the file using the tried and true PhotoshoptoSpine script. I guess the beta got jealous and decided to show itself lol

                        Yep, we decided it was more visible as its own option rather than overloading Import Data with more stuff.

                        It's worth mentioning again a drawback to Import PSD, which is that layer styles need to be rasterized by Photoshop before saving the PSD. If you aren't using Photoshop, other image editors may always do this when writing a PSD.

                        Hi, thank you so much for this. I no longer need to keep PS!
                        I have a question, does "Use layer mask bounds instead of whitespace trimmed bounds" thing work on the current version of PSD import? Because it seems to me it's ignoring layer masks when trimming, while it's said all the tags are supported. (technically not a tag? but i can't live without it!)
                        Again, thank you for this wonderful update!

                        Hi Chive!

                        The "Use layer mask bounds instead of whitespace trimmed bounds" feature has been implemented, but we've decided to activate it using the tag [trim:mask]. So essentially, for the trim tag, we have the following options:

                        • [trim], or [trim:true], or [trim:ws]: trims at whitespaces
                        • [trim:false], or [trim:canvas]: trims at canvas
                        • [trim:mask]: trims at the layer mask

                        However, I've just noticed that currently it doesn't seem to work as expected 😱

                        To ensure we're on the same page, could you show me an example of your layers structure and explain the behavior you're expecting?