BugMeNot2014 Posted January 14 Share Posted January 14 Can somebody help me with such script ? I need to remove all frames from particular animation, or even better, remove all frames, from all animations Quote Link to comment Share on other sites More sharing options...
0 Tokei Posted January 24 Share Posted January 24 There are many ways to achieve that: foreach (var action in act) { action.Frames = action.Frames.Take(1).ToList(); } If you need more... "control" with indexes and which animations to remove exactly, you can do it this way too: for (int aid = 0; aid < act.Actions.Count; aid++) { for (int fid = act.Actions[aid].Frames.Count - 1; fid >= 1; fid--) { act[aid].Frames.RemoveAt(fid); } } If you want to apply this to a batch of files, you can do it this way too: var path = @"C:\Sprites\"; foreach (var file in Directory.GetFiles(path, "*.act")) { var actFile = new Act(file); actFile.Actions.ForEach(p => p.Frames = p.Frames.Take(1).ToList()); actFile.Save(file); } Quote Link to comment Share on other sites More sharing options...
0 Akbare Posted January 15 Share Posted January 15 you ask for spriting item or script ? please more info not everyone can understand what you are saying Quote Link to comment Share on other sites More sharing options...
0 BugMeNot2014 Posted January 15 Author Share Posted January 15 yes, sorry. https://prnt.sc/26dzglm For example in act editor, for each animation, there are 8 directions, for each animation(idle, moving, attacking) in each direction, there are some frames(different frame count for different mobs). So I want to remove all frames from all animations from all directions. So it will be 1 frame (it actually showing 0 frames) for each direction, for each animation. Right now Im doing this manually by hands, but I think for such repititive actions should be some automatisation bump Quote Link to comment Share on other sites More sharing options...
0 Akbare Posted January 22 Share Posted January 22 On 1/15/2022 at 8:50 PM, BugMeNot2014 said: yes, sorry. https://prnt.sc/26dzglm For example in act editor, for each animation, there are 8 directions, for each animation(idle, moving, attacking) in each direction, there are some frames(different frame count for different mobs). So I want to remove all frames from all animations from all directions. So it will be 1 frame (it actually showing 0 frames) for each direction, for each animation. Right now Im doing this manually by hands, but I think for such repititive actions should be some automatisation delete manual with CTRL+DEL every frame anda save .act copy .act file and rename file to other sprite maybe can work Quote Link to comment Share on other sites More sharing options...
0 BugMeNot2014 Posted January 22 Author Share Posted January 22 its the same manual work that I do. I was asking about script Quote Link to comment Share on other sites More sharing options...
Can somebody help me with such script ? I need to remove all frames from particular animation, or even better, remove all frames, from all animations
Link to comment
Share on other sites