esDotDev Posted May 12, 2015 Report Share Posted May 12, 2015 We're trying to port our animations over to Unity, and I think we're running into some bugs as a result of old version of Spriter. The problem is only present in some of our very earliest animations. Under the Z-Index column, all the pieces are named "object_00x" to "object_2xx", and each animation has unqiue names. So, our main character has over 200 of these objects defined in his SCML file. For example: etc... This breaks the Sprite2Unity importer and Sprite Swapping functionality, as it creates a new child for every single unique name in the z-index column. If I try and rename the animations, and make them look like this: Spriter won't allow me to do it. I can fix one animation, but when fixing subsequent anims, Sprite auto renames "head" to "head_000", or "torso" to "torso_000". Next animation, will force me to name it "Head_002", and etc. It simply won't allow me to fix these names within the Editor. Is there any way you can think of to fix these old SCML files? I can't hand edit it, it's close to 11,000 lines... sportrmhcnh, JohnnyType and DarrenOl 3 Quote Link to comment Share on other sites More sharing options...
lucid Posted May 13, 2015 Report Share Posted May 13, 2015 hi @esDotDev,There is a feature to help with this type of thing. It's undocumented, and thus hasn't been tested as much as the more well known features, so please make sure the first step you take is to begin with a backup scml or scon file. Make sure you're using a backup, and not the original file. If you have set any options in File|Other File Actions...|Custom Save Options aside from the 'prettify' options, unset them temporarily. Switch to the Object Pane in the Palette Window. The object pane shows a list of all objects in the entity along with every image it uses if it's a sprite. The problem now is that rather than every animation using it's own instance of a single object, each animation has it's own named object. Make sure 'Show Objects Already in Current Frame' is selected, and select every object you want to combine into one object.Then right click on the object with the name you'd like to keep, and choose 'Combine Selected Objects With'. This will leave behind empty sprites for the objects that got combined, but when you save and reload your project they will be gone. Please let me know if you have any trouble. RunnerPack 1 Quote Link to comment Share on other sites More sharing options...
esDotDev Posted May 14, 2015 Author Report Share Posted May 14, 2015 Woah, didn't expect there to really be a workaround for this, sweet! Doesn't seem to be working properly though, when I combine sprites, they dissapear from the animation. Re-opening the file doesn't seem to help. Looking at the SCML, shows the following: [uPDATE] It seems that simply renaming all the objects, in the Objects Pane works fine. If I just go through every single object_xxx and replace with the proper name, close and restart, it works like a charm. Quote Link to comment Share on other sites More sharing options...
lucid Posted May 16, 2015 Report Share Posted May 16, 2015 Sorry I missed your reply, initially. Glad you got it working, though. You probably already know this by now, but just to make sure or for anyone else who might stumble on this thread. To reuse objects on new animations, you can either: Start a new animation by cloning a previous animation Copying the object from another existing animation (or copying an entire frame with Control - Shift - C) Dragging out objects you want to reuse from the object pane (Dragging images from File Palette creates a new object) RunnerPack 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.