157 Commits over 153 Days - 0.04cph!
Fix gizmo bounds on SpriteComponent when origin was in lower-left quadrant
Optimize single non-spritesheet Sprites
Another TextureAtlas NRE fix when uninitialized
Fixed CellOffset visual display in Spritesheet Importer
Fixed Cell Offset in Import process
Fix TextureAtlas NRE when uninitialized
Fix more sprite component errors when no Sprite is set
Added popup to Create Sprites menu option allowing you to specify import settings for each sprite
https://files.facepunch.com/CarsonKompon/2024/July/18_19-26-TinyWrenchbird.mp4
Whoops creating sprite from menu didnt actually save the file
Fix error serializing SpriteComponent without a Sprite
Added Right Click Menu for creating 2D Sprite(s) from image files
https://files.facepunch.com/CarsonKompon/2024/July/18_18-16-TurbulentBongo.mp4
Fix Sprite Component gizmos erroring when no Sprite is set
Only run OnAnimationComplete if Game.IsPlaying
Changed SpriteComponent title to "2D Sprite Component" to prevent confusion with existing sprite components
Fix Sprite Objects being dragged in with an incorrect rotation
Added SpriteComponent.GetAttachmentTransform to get Transform of an attachment without having to create Attachment Objects
Added documentation to PlayAnimation function
Made Attach Points much more visible in the Sprite Editor
Hopefully prevent spontaneous crash when crating new Attach Points
Delete the test sprite
Fix sprites not initializing since SceneObject didn't exist before setter was set
Minor SpriteComponent Optimizations. SpriteComponent also updates properly when Sprite is changed after being initially set.
Cache textures for TextureAtlas.GetTextureFromFrame
Make CurrentTexture public on SpriteComponent.
Queue Broadcast Events so they can be run on the main thread to prevent code being unknowingly run on another thread
Give attach points proper rotations when flipped, respecting origin
Flip attach points when sprite is flipped
Don't update attachments in SpriteAnimationSystem, only do it when necessary
Update Attachments properly for non-square aspect ratios
Don't stretch asset preview/thumbnail for sprites with non-square aspect ratio
Timeline FrameButtons no longer stretch Sprites with non-square aspect ratio
Add TextureAtlas.AspectRatio
SpriteComponent now supports Sprites of non-square aspect ratios
Fixed not being able to click on Sprite Components to select them in the Scene
TextureAtlas now supports packing textures of non-square aspect ratio
Added Sprite Tools -> Flush Texture Cache to Menu
Fix origin/attach point pixel snapping on images that weren't square aspect ratios
Fix origin/attach point bounds and dragging on images that aren't square aspect ratio
"Point Controls" shortcut buttons now set origin directly instead of setting via the draggable
Add CTRL+Wheel to quickly zoom in/out of Sprite Editor Timeline
https://files.facepunch.com/CarsonKompon/2024/July/16_08-21-ThoroughVerdin.mp4
Fix default rotationOffset when placing a new sprite
Make sure attach points respect the UpDirection
Added UpDirection to SpriteComponent. Added JsonUpgrader to prevent previous components from becoming the new default.
Fix Frame -> Duplicate creating a duplicate reference of the current frame instead of a duplicate copy
Basic 2d player movement for example scene
https://files.facepunch.com/CarsonKompon/2024/July/14_21-17-MemorableSteed.mp4
SpriteDropObject now respects camera rotation
Remove shit we don't need in the example project anymore
Right Click -> Delete in the Sprite Editor Timeline will delete all selected frames if multiple are selected
Update Ninja Frog sprite to include all necessary animations
Add `HasBroadcastEvents` to SpriteComponent. Hide Broadcast Events in Inspector if `!HasBroadcastEvents`. Add `Bounds` to SpriteComponent
Add "footstep" events to Ninja Frog sprite
Remove all the old code files from the example project
Update the example scene
Fix broadcast events not firing on the first frame on the first loop. Fixed BroadcastEvents not firing when PlaybackSpeed is negative (reverse).
Fix StartingAnimationName returning "" when it couldnt find anim
Fallback when no obtainable origin for SpriteComponent gizmo
Remove the animator stuff for now. If I end up doing this it'll be on another branch
Micro-optimization
Add warning when calling PlayAnimation for an animation that doesnt exist
Prevent multiple toolbars in Sprite Editor
Can open multiple Sprite Editors to edit multiple sprites at once now
Remove UpdateWindowTitle from SpriteEditor Preview
Added Animator Dock/Tab to Sprite Editor
Update .sbproj files
Update example files
Serialize Tint and apply to SceneObject when created.
White outline when selected (similar to renderer components)
Fixed SpriteComponent Gizmo hitbox (Facepunch/sbox-spritetools#2)
https://files.facepunch.com/CarsonKompon/2024/July/10_10-17-BasicChipmunk.mp4
Animation List is has hover highlight and StatusTip
FrameButton now has hover highlight and StatusTip displaying frame number, file name, and sheet rect (if applicable)
Fix BroadcastEvents widget not updating on file change
Remove un-needed Spritesheet Preview Overlay stuff
Properly serialize BroadcastEvents Actiongraph so it saves/loads.
Clear appropriate texture caches on file changes when in editor. Also tell respective components to get the new texture from the cache.
https://files.facepunch.com/CarsonKompon/2024/July/09_21-25-ForestgreenInganue.mp4
Only apply SpriteFlags when necessary & Apply Material Offset after playing new animation
Fix some TextureAtlas issues and added Documentation Comments
SpriteResource.Load shorthand
TextureAtlas.GetTextureFromFrame
Sprite AssetPreview with Thumbnails
Animated SpritePreview if there is an animation
Added SpriteInspector. Allows you to view animations similarly to ModelInspector. https://files.facepunch.com/CarsonKompon/2024/July/09_14-38-SerpentineGrassspider.mp4
SpriteResource.GetPreivewTexture and more TextureAtlas fixes
Make SpriteComponent.Sprite public. Not sure why this wasn't before....
Added SpriteDropObject so you can drag-and-drop sprites into the Scene. https://files.facepunch.com/CarsonKompon/2024/July/09_16-17-YellowCorydorascatfish.mp4
UV offset gets reset appropriately when changing animation
Update .sbproj
Fixed Looping variable not working properly
Added "Import Spritesheet" button which opens a blank import dialog
Merge branch 'main' into spritesheet-importer
Merge branch 'main' into spritesheet-importer
Merge branch 'main' into spritesheet-importer
TextureAtlas.FromSprites orders list by name so order doesnt matter
TextureAtlas.FromSpritesheet re-orders list so order doesn't matter
Merge branch 'main' into spritesheet-importer
Create SceneWorld thru EditorUtility
Created SpritesheetPreview widget
Created SpriteRenderingWidget as a generic for SpriteEditor and SpritesheetImporter to both extend
Import settings control widgets
Import Settings Groups
Importer window shows importing image
Remove unused shaders and renamed main shader & material to "sprite_2d"
Spritesheet Importer Overlay Buttons
Fixed transparency issues with spritesheet importer
Fixed origin/attachment materials
Created sprite_sheet_grid which draws over the spritesheet import preview
Update sprite_2d vmat initial variables
Attempt at grid shader
Spritesheet Importer Window UI
https://files.facepunch.com/CarsonKompon/2024/July/04_18-39-ImperturbableCorydorascatfish.mp4
Remove debug logs
Remove some other un-needed stuff
Add SpriteSheetRecf to SpriteAnimationFrame
TextureAtlas class now caches the atlas itself instead of just the texture
Created TextureAtlas.FromAnimation which respects sprites *and* spritesheets
Spritesheet Import Button which saves image+rect data to the selected animation
Timeline optimizations with respects to spritesheets
FrameButton supports spritesheet frames
Preview now supports a supplied rect
SpriteComponent now supports sprites with spritesheets
Improve TextureAtlas caching
Support sprites that aren't square aspect ratio in the Sprite Editor UI
Imported some more spritesheet test assets
Fix spritesheet size being used instead of rect size for spritesheet frames
Update Frame List automatically after importing spritesheet
Remove Spritesheet Overlay
Update player and example scene
Fix SpriteFlags not applying OnStart
Timeline optimizations with respects to spritesheets
FrameButton supports spritesheet frames
Preview now supports a supplied rect
SpriteComponent now supports sprites with spritesheets
Improve TextureAtlas caching
Support sprites that aren't square aspect ratio in the Sprite Editor UI
Imported some more spritesheet test assets
Fix spritesheet size being used instead of rect size for spritesheet frames
Update Frame List automatically after importing spritesheet
Remove Spritesheet Overlay
Update player and example scene
Fix SpriteFlags not applying OnStart
Remove debug logs
Remove some other un-needed stuff
Add SpriteSheetRecf to SpriteAnimationFrame
TextureAtlas class now caches the atlas itself instead of just the texture
Created TextureAtlas.FromAnimation which respects sprites *and* spritesheets
Spritesheet Import Button which saves image+rect data to the selected animation
Update sprite_2d vmat initial variables
Attempt at grid shader
Spritesheet Importer Window UI
https://files.facepunch.com/CarsonKompon/2024/July/04_18-39-ImperturbableCorydorascatfish.mp4
Fixed origin/attachment materials
Created sprite_sheet_grid which draws over the spritesheet import preview
Import Settings Groups
Importer window shows importing image
Remove unused shaders and renamed main shader & material to "sprite_2d"
Spritesheet Importer Overlay Buttons
Fixed transparency issues with spritesheet importer
Gave a few SpriteComponent properties "Visuals" Category. Removed FlashAmount in favour of FlashTint.
Fixed Opacity not working on Tint Property
Added SpriteFlags, starting with Horizontal Flip and Vertical Flip.
https://files.facepunch.com/CarsonKompon/2024/June/28_21-54-ShockingYearling.mp4
SpriteComponent doesn't draw backface by default. Added Draw Backface SpriteFlag.
https://files.facepunch.com/CarsonKompon/2024/June/28_22-54-InconsequentialBantamrooster.mp4
Fix NRE in UpdateMaterialOffset
Merge branch 'main' into spritesheet-importer
Create SceneWorld thru EditorUtility
Created SpritesheetPreview widget
Created SpriteRenderingWidget as a generic for SpriteEditor and SpritesheetImporter to both extend
Import settings control widgets