Hmm, how do I put this. When there's already an image attachment under the Skin Placeholder, and you drag a new one in there, instead of swapping positions, the dragged image attachment just overrides the one under the skin placeholder. The old image is removed - I can't find it under the tree branch where I'm expecting it. Is this a bug?
Dragging Image Attachments onto Skin PH removes image
- 編集済み
I'm not sure what you mean by "swapping position". I assume you want to have several sprites in your slot to switch between them? (for example to do a frame animation)
If so you will need a skin placeholder for each sprite.
If you just want to change the list order (swapping position?) then I have to tell you that this is impossible. The order is always alphabetical or defined by the bone hirarchy.
I hope this can help you with your problem.
It's like, I have a socket called "hand", and under hand, I have the images hand1, hand2, and hand3, along with a skin placeholder called "hand". If drag those images into that placeholder, they don't get "swapped" (I'm just talking in terms of usability here). The last image in that skin placeholder just disappears.
Ok, there seem to be two ways to work with the Skin Attachments and skins.
Assume we have this Slot called Hand.
Fig. A
- [Slot] Left Hand
- [img] Left Hand Open
- [img] Left Hand Clenched
- [img] Left Hand Pointing
- [Skin PH] Left Hand
Ok, so let's say we're working only with [img] Left Hand Clenched.
Way of doing the skin assignments:
Click on Skins and the [New Skin] button.
In this way, rename the new skin, and we drag [img] Left Hand Clenched -> [Skin PH] Left Hand. It becomes like this:
Fig. B - SKIN A
[Slot] Left Hand
- [img] Left Hand Open
- [img] Left Hand Pointing
- [Skin PH] Left Hand
-
[img] Left Hand Clenched
When we repeat the process, we don't see [img] Left Hand Clenched left hand anymore in the list. We drag [Skin PH] Left Hand Open -> [Skin PH] Left Hand. It looks like this:
Fig. C - SKIN B
[Slot] Left Hand
- [img] Left Hand Pointing
- [Skin PH] Left Hand
-
[img] Left Hand Open
When we repeat the process again, [Skin PH] Left Hand Clenched and [Skin PH] Left Hand Open are both not in the list anymore. It looks like this:
Fig. C - SKIN C
- [Slot] Left Hand
- [img] Left Hand Pointing
- [Skin PH] Left Hand
- Create a skin, duplicate and rename it.
- In this way, rename the new skin, and we drag [img] Left Hand Clenched -> [Skin PH] Left Hand.
Fig. D - SKIN A, THEN DUPLICATED AS SKIN B
[Slot] Left Hand
- [img] Left Hand Open
- [img] Left Hand Pointing
- [Skin PH] Left Hand
-
[img] Left Hand Clenched
We duplicate and rename the skin. [img] Left Hand Clenched is still available to us. This can be dragged back into the tree to be reused. It looks like this:
Fig. E - SKIN B
- [Slot] Left Hand
- [img] Left Hand Open
- [img] Left Hand Pointing
- [Skin PH] Left Hand
-
[img] Left Hand Clenched <<< THIS CAN BE DRAGGED BACK INTO [Slot] Left Hand TO BE REUSED
It disappears from the Skin Placeholder and the list however, if we drag another image, like [img] Left Hand Open into [Skin PH] Left Hand Open while it's still there. Like so:
Fig. F - SKIN B (IF IMAGE IN PLACE HOLDER WAS NOT RETURNED INTO THE LEFT HAND SLOT)
- [Slot] Left Hand
- [img] Left Hand Pointing
- [Skin PH] Left Hand
-
[img] Left Hand Open
I use method 2 since reusing image parts is useful in making different face parts. I currently want to use skins to:
-Define a skin for each basic facial expression (ex: Skin 1 with lefteyebrow1, righteyebrow1, lefteye1, righteye1, nose1, mouth1, and Skin2 with lefteyebrow2, righteyebrow2, lefteye1, righteye1, nose1, mouth2) so I can readily use them in the game.
- Define a skin for each facial part variant (ex: lefteyebrow1, lefteyebrow2, lefteye1, lefteye2, nose1, nose2, mouth1, mouth2...) then make combinations of them as new skins in game itself using the runtime. This is less visual, but also faster to type up I think.
Ah well, maybe I'm trying to explore different ways of doings, but nonetheless, being able to reuse the image parts in different skins is going to be necessary for this kind of thing.
I reproduced your steps yesterday - unfortunately my internet made probles so I wasn't able do write another answer. It seems as if you added a lot more to your last post meanwhile.
Nevertheless what I wanted to comment remains the same:
You're right. The image doesn't swap. But I don't think this is a bug. It's just the way it works. Spine just thinks you want the draged image as part of the skin. How should spine know that the one attached to the skin placeholder isn't an "old" one but should be kept instead. Moreso...should spine keep in mind where each sprite was attached before it was moved? (I'll explain a case down below)
I understand that in your case swapping would be comfortable but in other cases it would be strange. So esoteric just had to make a decission for one way how spine behaves when dragging another image into the skin laceholder.
Case where swapping would be hard to realize or strange:
Imagine you have a skinplaceholder with a sprite attached. Let's call it "hand1". You realize that this is the wrong sprite.
So you drag another image "hand2" from the library into this skin placeholder. It will replace "hand1" - Great! Because that is what you wanted. With your swapping version "hand1" would be now a regular attachment to the slot instead. And it would force you to delet it. (would be anoying if you had to do several times)
Another case: "hand1" is attached to a slot called "hand_lft". You drag it into the skin placeholder "hand" wich is attached to the slot "hand_rt".
Now you drag the sprite "hand2" from the "hand_rt" slot into this skin placeholder. Where will "hand1" go in your swapping solution? Back to "hand_lft"? (this means spine needs to save the attachment history for every sprite) or will ist got to "hand_rt" because this is where "hand2" came from? (this could be very annoying too)
You see what I'm trying to say? There are always cases where one or the other version feel strange or would make more work. This doesn't mean that it's a bug ;-)
Ok, this isn't a bug.
It's just my lack of experience and understanding of a brand new tool in front of me lol. My workflow now when creating skins for face parts is to duplicate an attachment first before dragging it into its respective placeholder. Rename as needed.
Is there a way for me to automatically duplicate an attachment when dragging it into a skin placeholder? Like maybe by holding the shift key or something? Ex:
[o] Eye
- Eye 1
- Eye 2
- Eye Skin Placeholder
Can I drag Eye 1 onto Eye Skin Placeholder, copying it rather than moving it?