Slate Tweaks Megapost

Slate Forums Custom Clips Slate Tweaks Megapost

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2577
    brodyb
    Participant

    I probably gestured at making this thread over a year ago. I’ve now been on two projects where I’ve used Slate, mostly as a programmer helping designers and cinematics folks get the results they want. In both these projects (and a big reason we went with Slate over Timeline) I’ve made lots of tweaks and improvements to the editor and its ActionClips to suit our needs. This time, though, I documented most of the biggest tweaks I’ve made so that I can reapply them whenever we end up upgrading, but also because I anticipated wanting to share these with the wider userbase.

    NOTE 1: I want to state at the top that I know how legally/ethically precarious a post like this can be for a developer when they want to make decisions on features to add to their software. So let me say in no uncertain terms: everything here is completely free to use and steal by other users and ParadoxNotion, no credit or compensation needed. This stuff helps make Slate more useful for me and I think it can help it be more useful for others. If you agree, incorporate away!

    NOTE 2: To further lower the temperature, all the code below is written by me, noting where in the Slate codebase to apply it. No code written by ParadoxNotion has been pasted here. You obviously need to own a legit copy of Slate for any of this to matter.

    NOTE 3: These modifications were made off of Slate 1.99. The package has been upgraded since we started our project, so some noted tweaks may be out of date.

    1. Cutscene List Dropdown Size

    Made the cutscene dropdown width always match the length of the selected cutscene:

    Inside ShowToolbar()

    2. ActionClips have a virtual PreferredLength property
    I added a command (both in a dropdown and as a hotkey) that sets an ActionClip length to match a clip’s “preferred length.” ActionClip’s preferredLength is by default 1f unless overwritten by an implementation. For example: PlayAnimatorClip’s preferredLength is the length of the AnimationClip attached to it, SubCutscene’s preferredLength is the length of the cutscene it references. Handy to ensure that clips that play events of a certain length match that length, if a designer wants it to.

    Inside ActionClip

    Inside CutsceneEditor.DoClipContextMenu()

    3. Pressing F over Slate with no selection fits cutscene timeline to editor window
    Quickly set the zoom to show the whole cutscene.

    Inside DoKeyboardShortcuts()

    4. Pressing Escape kills editor playback
    A very simple addition that sped up my workflow quite a bit

    Inside DoKeyboardShotcuts()

    5. Cutscenes Dropdown List is Sorted Alphabetically
    Some of our scenes have a lot of cutscenes, and this makes the list easier to scan through.

    Inside Cutscene

    Inside CutsceneEditor.ShowToolbar() and CutsceneEditor.ShowWelcome()

    6. Added OnDelete method to ActionClip
    If your ActionClip is managing other child objects that you want to delete if the clip is removed, this comes in really handy. Override the OnDelete() method to add this to your ActionClips.

    Inside ActionClip

    Inside CutsceneTrack

    7. Added “Set Cutscene Length” Popup
    If you right-click on the end caret, you’ll get a context menu with the option to “Set To Last Clip Time” and now also a “Set Cutscene Length” option. Clicking this last option will open a pop-up window that lets you specify the length of the cutscene in Seconds or Frames.

    Inside CutsceneEditor in DoScrubControls after the “Set To Last Clip Time” menu item is created

    8. Can resize the start of a cutscene
    One of our team members requested the ability to extend the length of the cutscene and offset all the existing clips forward the same amount. The solution I came up with was adding a “cutscene resize caret” to the beginning of the cutscene, just like the one that’s on the end. When the user lets go of the Start Caret, it runs this method:

    9. Cutscene resizing carets are locked by toolbar button
    Coworkers would accidentally resize the cutscene when they meant to to scrub a surprising number of times. So to the toolbar, I added a lock button that, when enabled, will disable the cutscene resizing carets. You can’t resize the cutscene until you disengage that button.

    10. AnimatableParameter always keys if modified in inspector field
    Whether or not you have Auto-Key turned on, if the user modifies an AnamatableParameter in the inspector by changing its value, I assume they intended to key that value change. Multiple people found it confusing when they’d change one of these values and it would just snap back.
    This is only for inspector value changes, not scene gizmos. Those still adhere to Auto-Key rules.

    Inside AnimatableParameterEditor near the bottom of DoParameterField, we modify what happens when GUI changes have been made:

    11. ActionClips have hasWarning virtual property
    If I want to have a clip present itself as having an issue the designer should look into (something not set up, setting that has a weird value, etc), I have a property that will turn the clip yellow so it jumps out at them. This is usually accompanied by a warning box in the clip inspector explaining the warning, but that’s written manually.

    Inside ActionClip:

    Inside CutsceneEditor.OnClipGUI() just before action.ShowClipGUI(wholeRect):

    #2578
    brodyb
    Participant

    Ah, looks like the formatting got smoothed over. Or admin lent a quiet hand. Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.