From c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 19 Apr 2020 17:19:32 -0400 Subject: Inital commit --- .../com.unity.timeline@1.2.13/CHANGELOG.md | 256 + .../com.unity.timeline@1.2.13/CHANGELOG.md.meta | 7 + .../Documentation~/TableOfContents.md | 68 + .../Documentation~/clp_about.md | 101 + .../Documentation~/clp_add.md | 21 + .../Documentation~/clp_blend.md | 37 + .../Documentation~/clp_dup.md | 24 + .../Documentation~/clp_ease.md | 74 + .../Documentation~/clp_gap_extrap.md | 47 + .../Documentation~/clp_insert.md | 25 + .../Documentation~/clp_match.md | 42 + .../Documentation~/clp_pan_zoom.md | 24 + .../Documentation~/clp_position.md | 58 + .../Documentation~/clp_reset.md | 18 + .../Documentation~/clp_select.md | 42 + .../Documentation~/clp_speed.md | 29 + .../Documentation~/clp_split.md | 15 + .../Documentation~/clp_tile.md | 16 + .../Documentation~/clp_trim.md | 75 + .../Documentation~/crv_about.md | 18 + .../Documentation~/crv_hide.md | 15 + .../Documentation~/crv_keys_add.md | 6 + .../Documentation~/crv_keys_del.md | 6 + .../Documentation~/crv_keys_edit.md | 9 + .../Documentation~/crv_keys_interp.md | 27 + .../Documentation~/crv_keys_sel.md | 20 + .../Documentation~/crv_nav.md | 12 + .../Documentation~/grp_hide.md | 9 + .../Documentation~/grp_lock.md | 15 + .../Documentation~/grp_use.md | 28 + .../images/timeline_add_track_menu.png | Bin 0 -> 32518 bytes .../images/timeline_animation_window_locked.png | Bin 0 -> 59523 bytes .../images/timeline_cinematic_example.png | Bin 0 -> 28719 bytes .../images/timeline_clip_blend_area.png | Bin 0 -> 14526 bytes .../images/timeline_clip_double_speed.png | Bin 0 -> 7266 bytes .../images/timeline_clip_duplicate_before.png | Bin 0 -> 13277 bytes .../images/timeline_clip_duplicate_clip_after.png | Bin 0 -> 24530 bytes .../images/timeline_clip_duplicate_clip_before.png | Bin 0 -> 23780 bytes .../images/timeline_clip_duplicate_project.png | Bin 0 -> 8847 bytes .../images/timeline_clip_ease_in_bad_gap.png | Bin 0 -> 13263 bytes .../images/timeline_clip_ease_in_good_gap.png | Bin 0 -> 13278 bytes .../images/timeline_clip_ease_in_out.png | Bin 0 -> 10448 bytes .../timeline_clip_ease_in_override_scene.png | Bin 0 -> 7264 bytes .../timeline_clip_ease_in_override_track.png | Bin 0 -> 8511 bytes .../images/timeline_clip_split_after.png | Bin 0 -> 51225 bytes .../images/timeline_clip_split_before.png | Bin 0 -> 49172 bytes .../images/timeline_clip_trim_end_keys.png | Bin 0 -> 10713 bytes .../images/timeline_clip_trim_loop.png | Bin 0 -> 9744 bytes .../images/timeline_clip_trim_start_keys.png | Bin 0 -> 9959 bytes .../images/timeline_clips_anim_clip_timing.png | Bin 0 -> 15540 bytes .../images/timeline_clips_arrows.png | Bin 0 -> 29964 bytes .../images/timeline_clips_position_invalid.png | Bin 0 -> 51718 bytes .../images/timeline_clips_positioning.png | Bin 0 -> 52838 bytes .../images/timeline_clips_select_first.png | Bin 0 -> 24581 bytes .../images/timeline_clips_select_last.png | Bin 0 -> 23965 bytes .../images/timeline_clips_split_after.png | Bin 0 -> 53226 bytes .../images/timeline_clips_split_before.png | Bin 0 -> 51168 bytes .../images/timeline_clips_tile_result.png | Bin 0 -> 23403 bytes .../images/timeline_clips_tile_selection.png | Bin 0 -> 23806 bytes .../Documentation~/images/timeline_clips_view.png | Bin 0 -> 32623 bytes .../images/timeline_clips_view_adding.png | Bin 0 -> 55441 bytes .../images/timeline_clips_view_inserting_after.png | Bin 0 -> 54074 bytes .../timeline_clips_view_inserting_before.png | Bin 0 -> 83136 bytes .../Documentation~/images/timeline_cog_menu.png | Bin 0 -> 64070 bytes .../images/timeline_curves_first_last_tangent.png | Bin 0 -> 12438 bytes .../images/timeline_curves_interp_menu.png | Bin 0 -> 24231 bytes .../images/timeline_curves_tangent_joined.png | Bin 0 -> 10955 bytes .../images/timeline_curves_view_icon.png | Bin 0 -> 23957 bytes .../images/timeline_curves_view_position_x.png | Bin 0 -> 24957 bytes .../timeline_curves_view_select_contiguous.png | Bin 0 -> 25576 bytes .../images/timeline_curves_view_select_key.png | Bin 0 -> 25433 bytes .../images/timeline_duration_mode.png | Bin 0 -> 32285 bytes .../images/timeline_editor_bindings.png | Bin 0 -> 25155 bytes .../images/timeline_editor_create.png | Bin 0 -> 9320 bytes .../images/timeline_editor_project.png | Bin 0 -> 23571 bytes .../images/timeline_editor_to_start.png | Bin 0 -> 3635 bytes .../Documentation~/images/timeline_end_button.png | Bin 0 -> 406 bytes .../images/timeline_frames_subframes.png | Bin 0 -> 4375 bytes .../images/timeline_gap_extrap_icons.png | Bin 0 -> 12020 bytes .../images/timeline_gap_extrap_two_tracks.png | Bin 0 -> 15365 bytes .../images/timeline_humanoid_after_match.png | Bin 0 -> 126539 bytes .../images/timeline_humanoid_before_match.png | Bin 0 -> 128899 bytes .../images/timeline_humanoid_blend.png | Bin 0 -> 17714 bytes .../images/timeline_humanoid_idle.png | Bin 0 -> 14868 bytes .../images/timeline_humanoid_manual.png | Bin 0 -> 138408 bytes .../images/timeline_humanoid_match_menu.png | Bin 0 -> 63735 bytes .../images/timeline_humanoid_runleft.png | Bin 0 -> 14753 bytes .../images/timeline_humanoid_start.png | Bin 0 -> 12225 bytes .../images/timeline_inspector_activation_clip.png | Bin 0 -> 7861 bytes .../images/timeline_inspector_activation_track.png | Bin 0 -> 6026 bytes .../images/timeline_inspector_anim_extrap.png | Bin 0 -> 15520 bytes .../images/timeline_inspector_animation_clip.png | Bin 0 -> 16299 bytes .../timeline_inspector_animation_clip_common.png | Bin 0 -> 15481 bytes .../timeline_inspector_animation_clip_playable.png | Bin 0 -> 19074 bytes .../images/timeline_inspector_animation_track.png | Bin 0 -> 15169 bytes .../images/timeline_inspector_audio_clip.png | Bin 0 -> 13803 bytes .../images/timeline_inspector_blend_curves.png | Bin 0 -> 16350 bytes .../images/timeline_inspector_clip_speed.png | Bin 0 -> 16331 bytes .../images/timeline_inspector_clip_timing.png | Bin 0 -> 16399 bytes .../timeline_inspector_control_clip_common.png | Bin 0 -> 23444 bytes .../timeline_inspector_control_clip_playable.png | Bin 0 -> 23382 bytes .../images/timeline_inspector_curve_editor.png | Bin 0 -> 13476 bytes .../timeline_inspector_ease_in_blend_out.png | Bin 0 -> 16943 bytes .../images/timeline_inspector_ease_in_out.png | Bin 0 -> 15471 bytes .../timeline_inspector_multiple_selection.png | Bin 0 -> 13550 bytes .../images/timeline_inspector_narrow_selection.png | Bin 0 -> 5679 bytes .../timeline_inspector_playable_director.png | Bin 0 -> 28149 bytes .../images/timeline_inspector_timeline.png | Bin 0 -> 8192 bytes .../images/timeline_last_loop_before.png | Bin 0 -> 12014 bytes .../images/timeline_last_loop_complete.png | Bin 0 -> 11230 bytes .../images/timeline_last_loop_trim.png | Bin 0 -> 11094 bytes .../images/timeline_masking_avatar_inspector.png | Bin 0 -> 14939 bytes .../images/timeline_masking_avatar_off.png | Bin 0 -> 19307 bytes .../images/timeline_masking_avatar_on.png | Bin 0 -> 19368 bytes .../images/timeline_masking_override.png | Bin 0 -> 66387 bytes .../images/timeline_masking_override_selected.png | Bin 0 -> 18016 bytes .../images/timeline_masking_start.png | Bin 0 -> 15262 bytes .../images/timeline_masking_waving.png | Bin 0 -> 17988 bytes .../images/timeline_match_clip_many.png | Bin 0 -> 77249 bytes .../images/timeline_match_clip_two.png | Bin 0 -> 79126 bytes .../images/timeline_match_prematch_clips.png | Bin 0 -> 40196 bytes .../images/timeline_match_prematch_scene.png | Bin 0 -> 62941 bytes .../images/timeline_mix_mode_blend_arrow.png | Bin 0 -> 54693 bytes .../images/timeline_mix_mode_position_cursor.png | Bin 0 -> 53829 bytes .../images/timeline_move_track_after copy.png | Bin 0 -> 54312 bytes .../images/timeline_move_track_after.png | Bin 0 -> 29958 bytes .../images/timeline_move_track_before.png | Bin 0 -> 32807 bytes .../images/timeline_nesting_editing.png | Bin 0 -> 67320 bytes .../images/timeline_nesting_example.png | Bin 0 -> 48098 bytes .../images/timeline_nesting_global.png | Bin 0 -> 67541 bytes .../images/timeline_nesting_local.png | Bin 0 -> 67369 bytes .../images/timeline_next_frame_button.png | Bin 0 -> 339 bytes .../images/timeline_overview_asset.png | Bin 0 -> 45627 bytes .../images/timeline_overview_enemy.png | Bin 0 -> 24561 bytes .../images/timeline_overview_instance.png | Bin 0 -> 62046 bytes .../images/timeline_overview_player.png | Bin 0 -> 24628 bytes .../Documentation~/images/timeline_play_button.png | Bin 0 -> 354 bytes .../Documentation~/images/timeline_play_range.png | Bin 0 -> 27794 bytes .../images/timeline_play_range_button.png | Bin 0 -> 383 bytes .../images/timeline_playback_controls.png | Bin 0 -> 2485 bytes .../images/timeline_playhead_insert_100_after.png | Bin 0 -> 9698 bytes .../images/timeline_playhead_insert_before.png | Bin 0 -> 55797 bytes .../images/timeline_playhead_insert_menu.png | Bin 0 -> 65723 bytes .../images/timeline_playhead_location.png | Bin 0 -> 21955 bytes .../images/timeline_playhead_select_menu.png | Bin 0 -> 44026 bytes .../images/timeline_playhead_trim_after.png | Bin 0 -> 7501 bytes .../images/timeline_playhead_trim_before.png | Bin 0 -> 7186 bytes .../images/timeline_preview_selector.png | Bin 0 -> 38627 bytes .../images/timeline_previous_frame_button.png | Bin 0 -> 344 bytes .../images/timeline_property_red.png | Bin 0 -> 23891 bytes .../images/timeline_replace_mode.png | Bin 0 -> 53572 bytes .../images/timeline_replace_mode_red_cut.png | Bin 0 -> 53909 bytes .../Documentation~/images/timeline_ripple_mode.png | Bin 0 -> 53955 bytes .../images/timeline_ripple_mode_yellow_arrow.png | Bin 0 -> 55475 bytes .../Documentation~/images/timeline_splash.png | Bin 0 -> 303699 bytes .../images/timeline_start_button.png | Bin 0 -> 406 bytes .../images/timeline_track_alert_icon.png | Bin 0 -> 21787 bytes .../images/timeline_track_duplicate.png | Bin 0 -> 31780 bytes .../images/timeline_track_group_add.png | Bin 0 -> 26295 bytes .../images/timeline_track_group_hidden.png | Bin 0 -> 17305 bytes .../images/timeline_track_group_locked.png | Bin 0 -> 41260 bytes .../images/timeline_track_group_plus.png | Bin 0 -> 39248 bytes .../Documentation~/images/timeline_track_list.png | Bin 0 -> 32359 bytes .../images/timeline_track_locked.png | Bin 0 -> 31180 bytes .../Documentation~/images/timeline_track_muted.png | Bin 0 -> 27116 bytes .../images/timeline_track_priority.png | Bin 0 -> 26971 bytes .../images/timeline_track_reorder.png | Bin 0 -> 28181 bytes .../images/timeline_track_select_first.png | Bin 0 -> 26509 bytes .../images/timeline_track_select_last.png | Bin 0 -> 26922 bytes .../images/timeline_workflow_clip_in_project.png | Bin 0 -> 7516 bytes .../images/timeline_workflow_converted_clip.png | Bin 0 -> 14778 bytes .../images/timeline_workflow_dopesheet.png | Bin 0 -> 13690 bytes .../images/timeline_workflow_keyframing_menu.png | Bin 0 -> 32363 bytes .../images/timeline_workflow_record_button.png | Bin 0 -> 13956 bytes .../timeline_workflow_recorded_clip_track_menu.png | Bin 0 -> 15038 bytes .../images/timeline_workflow_recording.png | Bin 0 -> 14041 bytes .../timeline_workflow_recording_diamonds.png | Bin 0 -> 15926 bytes .../Documentation~/images/timeline_zoombar.png | Bin 0 -> 23166 bytes .../images/timeline_zoomed_clip_edit_modes.png | Bin 0 -> 36955 bytes .../workflow_inspector_animation_clip_playable.png | Bin 0 -> 18808 bytes .../images/workflow_nesting_control_disabled.png | Bin 0 -> 23366 bytes .../images/workflow_nesting_done.png | Bin 0 -> 47973 bytes .../images/workflow_nesting_double_click.png | Bin 0 -> 48899 bytes .../images/workflow_nesting_drag_board.png | Bin 0 -> 46454 bytes .../images/workflow_nesting_edit_warning.png | Bin 0 -> 69329 bytes .../images/workflow_nesting_master.png | Bin 0 -> 50036 bytes .../Documentation~/index.md | 39 + .../Documentation~/insp_about.md | 27 + .../Documentation~/insp_clp.md | 16 + .../Documentation~/insp_clp_act.md | 25 + .../Documentation~/insp_clp_anim_com.md | 47 + .../Documentation~/insp_clp_anim_plyb.md | 44 + .../Documentation~/insp_clp_aud.md | 35 + .../Documentation~/insp_clp_ctrl_com.md | 34 + .../Documentation~/insp_clp_ctrl_plyb.md | 45 + .../Documentation~/insp_tl.md | 15 + .../Documentation~/insp_trk.md | 13 + .../Documentation~/insp_trk_act.md | 16 + .../Documentation~/insp_trk_anim.md | 22 + .../Documentation~/play_director.md | 27 + .../Documentation~/tl_about.md | 50 + .../Documentation~/tl_gloss.md | 71 + .../Documentation~/tl_play_cntrls.md | 104 + .../Documentation~/tl_selector.md | 11 + .../Documentation~/tl_settings.md | 70 + .../Documentation~/tl_window.md | 29 + .../Documentation~/trk_add.md | 15 + .../Documentation~/trk_delete.md | 13 + .../Documentation~/trk_dup.md | 14 + .../Documentation~/trk_list_about.md | 29 + .../Documentation~/trk_lock.md | 13 + .../Documentation~/trk_mute.md | 15 + .../Documentation~/trk_reorder.md | 17 + .../Documentation~/trk_select.md | 25 + .../Documentation~/wf_about.md | 10 + .../Documentation~/wf_char_anim.md | 75 + .../Documentation~/wf_conv_infinite.md | 16 + .../Documentation~/wf_instance.md | 23 + .../Documentation~/wf_mask.md | 44 + .../Documentation~/wf_nested.md | 50 + .../Documentation~/wf_rec_anim.md | 60 + .../com.unity.timeline@1.2.13/Editor.meta | 8 + .../com.unity.timeline@1.2.13/Editor/Actions.meta | 8 + .../Editor/Actions/ClipsActions.cs | 376 ++ .../Editor/Actions/ClipsActions.cs.meta | 11 + .../Editor/Actions/ItemAction.cs | 124 + .../Editor/Actions/ItemAction.cs.meta | 11 + .../Editor/Actions/MarkerActions.cs | 17 + .../Editor/Actions/MarkerActions.cs.meta | 11 + .../Editor/Actions/Menus.meta | 8 + .../Editor/Actions/Menus/MenuItemActionBase.cs | 177 + .../Actions/Menus/MenuItemActionBase.cs.meta | 11 + .../Editor/Actions/Menus/TimelineContextMenu.cs | 448 ++ .../Actions/Menus/TimelineContextMenu.cs.meta | 11 + .../Editor/Actions/TimelineActions.cs | 946 +++ .../Editor/Actions/TimelineActions.cs.meta | 11 + .../Editor/Actions/TrackActions.cs | 521 ++ .../Editor/Actions/TrackActions.cs.meta | 11 + .../Editor/Activation.meta | 8 + .../Editor/Activation/ActivationTrackEditor.cs | 56 + .../Activation/ActivationTrackEditor.cs.meta | 11 + .../Editor/Activation/ActivationTrackInspector.cs | 43 + .../Activation/ActivationTrackInspector.cs.meta | 11 + .../Editor/Analytics.meta | 8 + .../Editor/Analytics/TimelineAnalytics.cs | 170 + .../Editor/Analytics/TimelineAnalytics.cs.meta | 11 + .../Editor/Animation.meta | 8 + .../Editor/Animation/AnimationClipActions.cs | 96 + .../Editor/Animation/AnimationClipActions.cs.meta | 11 + .../Editor/Animation/AnimationClipCurveCache.cs | 436 ++ .../Animation/AnimationClipCurveCache.cs.meta | 11 + .../Editor/Animation/AnimationOffsetMenu.cs | 82 + .../Editor/Animation/AnimationOffsetMenu.cs.meta | 11 + .../Animation/AnimationPlayableAssetEditor.cs | 65 + .../Animation/AnimationPlayableAssetEditor.cs.meta | 11 + .../Editor/Animation/AnimationTrackActions.cs | 151 + .../Editor/Animation/AnimationTrackActions.cs.meta | 11 + .../Editor/Animation/BindingSelector.cs | 224 + .../Editor/Animation/BindingSelector.cs.meta | 11 + .../Editor/Animation/BindingTreeViewDataSource.cs | 139 + .../Animation/BindingTreeViewDataSource.cs.meta | 11 + .../Animation/BindingTreeViewDataSourceGUI.cs | 80 + .../Animation/BindingTreeViewDataSourceGUI.cs.meta | 11 + .../Editor/Animation/ClipCurveEditor.cs | 332 + .../Editor/Animation/ClipCurveEditor.cs.meta | 11 + .../Editor/Animation/CurveDataSource.cs | 272 + .../Editor/Animation/CurveDataSource.cs.meta | 11 + .../Editor/Animation/CurvesProxy.cs | 302 + .../Editor/Animation/CurvesProxy.cs.meta | 11 + .../Editor/Animation/TimelineAnimationUtilities.cs | 435 ++ .../Animation/TimelineAnimationUtilities.cs.meta | 11 + .../Editor/Attributes.meta | 8 + .../Editor/Attributes/ActiveInModeAttribute.cs | 14 + .../Attributes/ActiveInModeAttribute.cs.meta | 11 + .../Editor/Attributes/MenuEntryAttribute.cs | 37 + .../Editor/Attributes/MenuEntryAttribute.cs.meta | 11 + .../Editor/Attributes/ShortcutAttribute.cs | 71 + .../Editor/Attributes/ShortcutAttribute.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/Audio.meta | 8 + .../Editor/Audio/AudioClipPropertiesDrawer.cs | 81 + .../Editor/Audio/AudioClipPropertiesDrawer.cs.meta | 11 + .../Editor/Audio/AudioPlayableAssetEditor.cs | 84 + .../Editor/Audio/AudioPlayableAssetEditor.cs.meta | 11 + .../Editor/Audio/AudioPlayableAssetInspector.cs | 27 + .../Audio/AudioPlayableAssetInspector.cs.meta | 11 + .../Editor/Audio/AudioTrackInspector.cs | 164 + .../Editor/Audio/AudioTrackInspector.cs.meta | 11 + .../Editor/ControlTrack.meta | 8 + .../ControlTrack/ControlPlayableAssetEditor.cs | 69 + .../ControlPlayableAssetEditor.cs.meta | 11 + .../Editor/CurveEditUtility.cs | 657 ++ .../Editor/CurveEditUtility.cs.meta | 11 + .../Editor/CustomEditors.meta | 8 + .../Editor/CustomEditors/ClipEditor.cs | 256 + .../Editor/CustomEditors/ClipEditor.cs.meta | 11 + .../CustomEditors/CustomTimelineEditorCache.cs | 155 + .../CustomTimelineEditorCache.cs.meta | 11 + .../Editor/CustomEditors/MarkerEditor.cs | 209 + .../Editor/CustomEditors/MarkerEditor.cs.meta | 11 + .../Editor/CustomEditors/MarkerTrackEditor.cs | 18 + .../Editor/CustomEditors/MarkerTrackEditor.cs.meta | 11 + .../Editor/CustomEditors/TrackEditor.cs | 284 + .../Editor/CustomEditors/TrackEditor.cs.meta | 11 + .../Editor/DirectorNamedColor.cs | 288 + .../Editor/DirectorNamedColor.cs.meta | 11 + .../Editor/DirectorStyles.cs | 362 ++ .../Editor/DirectorStyles.cs.meta | 11 + .../Editor/Extensions.meta | 8 + .../Extensions/AnimatedParameterExtensions.cs | 150 + .../Extensions/AnimatedParameterExtensions.cs.meta | 11 + .../Editor/Extensions/AnimationTrackExtensions.cs | 134 + .../Extensions/AnimationTrackExtensions.cs.meta | 11 + .../Editor/Extensions/TrackExtensions.cs | 495 ++ .../Editor/Extensions/TrackExtensions.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/Items.meta | 8 + .../Editor/Items/ClipItem.cs | 143 + .../Editor/Items/ClipItem.cs.meta | 11 + .../Editor/Items/ITimelineItem.cs | 39 + .../Editor/Items/ITimelineItem.cs.meta | 11 + .../Editor/Items/ItemsGroup.cs | 63 + .../Editor/Items/ItemsGroup.cs.meta | 11 + .../Editor/Items/ItemsPerTrack.cs | 45 + .../Editor/Items/ItemsPerTrack.cs.meta | 11 + .../Editor/Items/ItemsUtils.cs | 116 + .../Editor/Items/ItemsUtils.cs.meta | 11 + .../Editor/Items/MarkerItem.cs | 106 + .../Editor/Items/MarkerItem.cs.meta | 11 + .../Editor/Manipulators.meta | 8 + .../Editor/Manipulators/AddDelete.meta | 8 + .../Manipulators/AddDelete/AddDeleteItemModeMix.cs | 26 + .../AddDelete/AddDeleteItemModeMix.cs.meta | 11 + .../AddDelete/AddDeleteItemModeReplace.cs | 18 + .../AddDelete/AddDeleteItemModeReplace.cs.meta | 11 + .../AddDelete/AddDeleteItemModeRipple.cs | 18 + .../AddDelete/AddDeleteItemModeRipple.cs.meta | 11 + .../Manipulators/AddDelete/IAddDeleteItemMode.cs | 10 + .../AddDelete/IAddDeleteItemMode.cs.meta | 11 + .../Editor/Manipulators/Cursors.meta | 8 + .../Editor/Manipulators/Cursors/TimelineCursors.cs | 95 + .../Manipulators/Cursors/TimelineCursors.cs.meta | 11 + .../Editor/Manipulators/EditMode.cs | 344 + .../Editor/Manipulators/EditMode.cs.meta | 11 + .../Editor/Manipulators/EditModeInputHandler.cs | 199 + .../Manipulators/EditModeInputHandler.cs.meta | 11 + .../Editor/Manipulators/Move.meta | 8 + .../Editor/Manipulators/Move/IMoveItemMode.cs | 28 + .../Editor/Manipulators/Move/IMoveItemMode.cs.meta | 11 + .../Editor/Manipulators/Move/MoveItemHandler.cs | 312 + .../Manipulators/Move/MoveItemHandler.cs.meta | 11 + .../Editor/Manipulators/Move/MoveItemModeMix.cs | 138 + .../Manipulators/Move/MoveItemModeMix.cs.meta | 11 + .../Manipulators/Move/MoveItemModeReplace.cs | 99 + .../Manipulators/Move/MoveItemModeReplace.cs.meta | 11 + .../Editor/Manipulators/Move/MoveItemModeRipple.cs | 271 + .../Manipulators/Move/MoveItemModeRipple.cs.meta | 11 + .../Editor/Manipulators/Move/MovingItems.cs | 137 + .../Editor/Manipulators/Move/MovingItems.cs.meta | 11 + .../Editor/Manipulators/Sequence.meta | 8 + .../Editor/Manipulators/Sequence/EaseClip.cs | 146 + .../Editor/Manipulators/Sequence/EaseClip.cs.meta | 11 + .../Editor/Manipulators/Sequence/Jog.cs | 61 + .../Editor/Manipulators/Sequence/Jog.cs.meta | 11 + .../Sequence/MarkerHeaderContextMenu.cs | 24 + .../Sequence/MarkerHeaderContextMenu.cs.meta | 11 + .../Manipulators/Sequence/RectangleSelect.cs | 36 + .../Manipulators/Sequence/RectangleSelect.cs.meta | 11 + .../Editor/Manipulators/Sequence/RectangleTool.cs | 169 + .../Manipulators/Sequence/RectangleTool.cs.meta | 11 + .../Editor/Manipulators/Sequence/RectangleZoom.cs | 23 + .../Manipulators/Sequence/RectangleZoom.cs.meta | 11 + .../Manipulators/Sequence/SelectAndMoveItem.cs | 297 + .../Sequence/SelectAndMoveItem.cs.meta | 11 + .../Editor/Manipulators/Sequence/TrackZoom.cs | 20 + .../Editor/Manipulators/Sequence/TrackZoom.cs.meta | 11 + .../Editor/Manipulators/Sequence/TrimClip.cs | 232 + .../Editor/Manipulators/Sequence/TrimClip.cs.meta | 11 + .../Editor/Manipulators/TimeAreaAutoPanner.cs | 72 + .../Editor/Manipulators/TimeAreaAutoPanner.cs.meta | 11 + .../Editor/Manipulators/TimeIndicator.cs | 47 + .../Editor/Manipulators/TimeIndicator.cs.meta | 11 + .../Editor/Manipulators/TimelineClipGroup.cs | 54 + .../Editor/Manipulators/TimelineClipGroup.cs.meta | 11 + .../Editor/Manipulators/Trim.meta | 8 + .../Editor/Manipulators/Trim/ITrimItemMode.cs | 23 + .../Editor/Manipulators/Trim/ITrimItemMode.cs.meta | 11 + .../Editor/Manipulators/Trim/TrimItemModeMix.cs | 102 + .../Manipulators/Trim/TrimItemModeMix.cs.meta | 11 + .../Manipulators/Trim/TrimItemModeReplace.cs | 139 + .../Manipulators/Trim/TrimItemModeReplace.cs.meta | 11 + .../Editor/Manipulators/Trim/TrimItemModeRipple.cs | 97 + .../Manipulators/Trim/TrimItemModeRipple.cs.meta | 11 + .../Editor/Manipulators/Utils.meta | 8 + .../Editor/Manipulators/Utils/EditModeGUIUtils.cs | 27 + .../Manipulators/Utils/EditModeGUIUtils.cs.meta | 11 + .../Editor/Manipulators/Utils/EditModeMixUtils.cs | 137 + .../Manipulators/Utils/EditModeMixUtils.cs.meta | 11 + .../Manipulators/Utils/EditModeReplaceUtils.cs | 57 + .../Utils/EditModeReplaceUtils.cs.meta | 11 + .../Manipulators/Utils/EditModeRippleUtils.cs | 108 + .../Manipulators/Utils/EditModeRippleUtils.cs.meta | 11 + .../Editor/Manipulators/Utils/EditModeUtils.cs | 123 + .../Manipulators/Utils/EditModeUtils.cs.meta | 11 + .../Editor/Manipulators/Utils/ManipulatorsUtils.cs | 19 + .../Manipulators/Utils/ManipulatorsUtils.cs.meta | 11 + .../Editor/Manipulators/Utils/PlacementValidity.cs | 13 + .../Manipulators/Utils/PlacementValidity.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/MenuOrder.cs | 103 + .../Editor/MenuOrder.cs.meta | 11 + .../Editor/Playables.meta | 8 + .../Editor/Playables/ControlPlayableInspector.cs | 212 + .../Playables/ControlPlayableInspector.cs.meta | 11 + .../Editor/Properties.meta | 8 + .../Editor/Properties/AssemblyInfo.cs | 24 + .../Editor/Properties/AssemblyInfo.cs.meta | 11 + .../Editor/Recording.meta | 8 + .../Editor/Recording/AnimationTrackRecorder.cs | 306 + .../Recording/AnimationTrackRecorder.cs.meta | 11 + .../Editor/Recording/TimelineRecording.cs | 497 ++ .../Editor/Recording/TimelineRecording.cs.meta | 11 + .../TimelineRecordingContextualResponder.cs | 134 + .../TimelineRecordingContextualResponder.cs.meta | 11 + .../Recording/TimelineRecording_Monobehaviour.cs | 709 +++ .../TimelineRecording_Monobehaviour.cs.meta | 11 + .../Recording/TimelineRecording_PlayableAsset.cs | 115 + .../TimelineRecording_PlayableAsset.cs.meta | 11 + .../Recording/TrackAssetRecordingExtensions.cs | 191 + .../TrackAssetRecordingExtensions.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/Shortcuts.cs | 266 + .../Editor/Shortcuts.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/Signals.meta | 8 + .../Editor/Signals/SignalAssetInspector.cs | 28 + .../Editor/Signals/SignalAssetInspector.cs.meta | 11 + .../Editor/Signals/SignalEmitterEditor.cs | 23 + .../Editor/Signals/SignalEmitterEditor.cs.meta | 11 + .../Editor/Signals/SignalEmitterInspector.cs | 377 ++ .../Editor/Signals/SignalEmitterInspector.cs.meta | 11 + .../Editor/Signals/SignalEventDrawer.cs | 39 + .../Editor/Signals/SignalEventDrawer.cs.meta | 11 + .../Editor/Signals/SignalManager.cs | 87 + .../Editor/Signals/SignalManager.cs.meta | 11 + .../Editor/Signals/SignalReceiverHeader.cs | 15 + .../Editor/Signals/SignalReceiverHeader.cs.meta | 11 + .../Editor/Signals/SignalReceiverInspector.cs | 116 + .../Editor/Signals/SignalReceiverInspector.cs.meta | 11 + .../Editor/Signals/SignalUtility.cs | 125 + .../Editor/Signals/SignalUtility.cs.meta | 11 + .../Editor/Signals/Styles.cs | 39 + .../Editor/Signals/Styles.cs.meta | 11 + .../Editor/Signals/TreeView.meta | 8 + .../Editor/Signals/TreeView/SignalListFactory.cs | 31 + .../Signals/TreeView/SignalListFactory.cs.meta | 11 + .../Editor/Signals/TreeView/SignalReceiverItem.cs | 180 + .../Signals/TreeView/SignalReceiverItem.cs.meta | 11 + .../Signals/TreeView/SignalReceiverTreeView.cs | 155 + .../TreeView/SignalReceiverTreeView.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/State.meta | 8 + .../Editor/State/ISequenceState.cs | 106 + .../Editor/State/ISequenceState.cs.meta | 11 + .../Editor/State/SequenceHierarchy.cs | 298 + .../Editor/State/SequenceHierarchy.cs.meta | 11 + .../Editor/State/SequencePath.cs | 131 + .../Editor/State/SequencePath.cs.meta | 11 + .../Editor/State/SequenceState.cs | 212 + .../Editor/State/SequenceState.cs.meta | 11 + .../Editor/State/WindowState.cs | 1131 ++++ .../Editor/State/WindowState.cs.meta | 11 + .../Editor/StyleSheets.meta | 8 + .../Editor/StyleSheets/Extensions.meta | 8 + .../Editor/StyleSheets/Extensions/common.uss | 1153 ++++ .../Editor/StyleSheets/Extensions/common.uss.meta | 11 + .../Editor/StyleSheets/Extensions/dark.uss | 286 + .../Editor/StyleSheets/Extensions/dark.uss.meta | 11 + .../Editor/StyleSheets/Extensions/light.uss | 282 + .../Editor/StyleSheets/Extensions/light.uss.meta | 11 + .../Editor/StyleSheets/Images.meta | 8 + .../Editor/StyleSheets/Images/DarkSkin.meta | 8 + .../Images/DarkSkin/TimelineActivation.png | Bin 0 -> 15414 bytes .../Images/DarkSkin/TimelineActivation.png.meta | 107 + .../Images/DarkSkin/TimelineAutokey.png | Bin 0 -> 1300 bytes .../Images/DarkSkin/TimelineAutokey.png.meta | 77 + .../Images/DarkSkin/TimelineAutokey@2x.png | Bin 0 -> 1822 bytes .../Images/DarkSkin/TimelineAutokey@2x.png.meta | 91 + .../Images/DarkSkin/TimelineAutokey_active.png | Bin 0 -> 350 bytes .../DarkSkin/TimelineAutokey_active.png.meta | 77 + .../Images/DarkSkin/TimelineAutokey_active@2x.png | Bin 0 -> 617 bytes .../DarkSkin/TimelineAutokey_active@2x.png.meta | 91 + .../TimelineCollapseMarkerButtonDisabled.png | Bin 0 -> 363 bytes .../TimelineCollapseMarkerButtonDisabled.png.meta | 88 + .../TimelineCollapseMarkerButtonEnabled.png | Bin 0 -> 360 bytes .../TimelineCollapseMarkerButtonEnabled.png.meta | 88 + .../Images/DarkSkin/TimelineContinue.png | Bin 0 -> 14651 bytes .../Images/DarkSkin/TimelineContinue.png.meta | 107 + .../Images/DarkSkin/TimelineCurvesOff.png | Bin 0 -> 14766 bytes .../Images/DarkSkin/TimelineCurvesOff.png.meta | 77 + .../Images/DarkSkin/TimelineCurvesOn.png | Bin 0 -> 14806 bytes .../Images/DarkSkin/TimelineCurvesOn.png.meta | 77 + .../Images/DarkSkin/TimelineDisabledBackground.png | Bin 0 -> 2323 bytes .../DarkSkin/TimelineDisabledBackground.png.meta | 119 + .../Images/DarkSkin/TimelineEndPlayback.png | Bin 0 -> 2816 bytes .../Images/DarkSkin/TimelineEndPlayback.png.meta | 77 + .../StyleSheets/Images/DarkSkin/TimelineEye.png | Bin 0 -> 470 bytes .../Images/DarkSkin/TimelineEye.png.meta | 77 + .../StyleSheets/Images/DarkSkin/TimelineEye@2x.png | Bin 0 -> 928 bytes .../Images/DarkSkin/TimelineEye@2x.png.meta | 91 + .../StyleSheets/Images/DarkSkin/TimelineHold.png | Bin 0 -> 14711 bytes .../Images/DarkSkin/TimelineHold.png.meta | 107 + .../Images/DarkSkin/TimelineIconClipIn.png | Bin 0 -> 227 bytes .../Images/DarkSkin/TimelineIconClipIn.png.meta | 77 + .../Images/DarkSkin/TimelineIconClipOut.png | Bin 0 -> 143 bytes .../Images/DarkSkin/TimelineIconClipOut.png.meta | 77 + .../DarkSkin/TimelineInfiniteTrackNoShadow.png | Bin 0 -> 15479 bytes .../TimelineInfiniteTrackNoShadow.png.meta | 107 + .../Images/DarkSkin/TimelineKeyframe.png | Bin 0 -> 15713 bytes .../Images/DarkSkin/TimelineKeyframe.png.meta | 107 + .../Images/DarkSkin/TimelineLockButton.png | Bin 0 -> 218 bytes .../Images/DarkSkin/TimelineLockButton.png.meta | 77 + .../Images/DarkSkin/TimelineLockButton@2x.png | Bin 0 -> 340 bytes .../Images/DarkSkin/TimelineLockButton@2x.png.meta | 91 + .../StyleSheets/Images/DarkSkin/TimelineLoop.png | Bin 0 -> 14738 bytes .../Images/DarkSkin/TimelineLoop.png.meta | 107 + .../Images/DarkSkin/TimelineMarkerItem.png | Bin 0 -> 357 bytes .../Images/DarkSkin/TimelineMarkerItem.png.meta | 90 + .../DarkSkin/TimelineMarkerItemCollapsed.png | Bin 0 -> 200 bytes .../DarkSkin/TimelineMarkerItemCollapsed.png.meta | 90 + .../Images/DarkSkin/TimelineMarkerItemSelected.png | Bin 0 -> 325 bytes .../DarkSkin/TimelineMarkerItemSelected.png.meta | 90 + .../Images/DarkSkin/TimelinePingPong.png | Bin 0 -> 14757 bytes .../Images/DarkSkin/TimelinePingPong.png.meta | 77 + .../Images/DarkSkin/TimelinePlayRange.png | Bin 0 -> 216 bytes .../Images/DarkSkin/TimelinePlayRange.png.meta | 77 + .../Images/DarkSkin/TimelineSignalCollapsed.png | Bin 0 -> 206 bytes .../DarkSkin/TimelineSignalCollapsed.png.meta | 83 + .../Images/DarkSkin/TimelineSignalSelected.png | Bin 0 -> 202 bytes .../DarkSkin/TimelineSignalSelected.png.meta | 88 + .../Images/DarkSkin/TimelineStartPlayback.png | Bin 0 -> 2822 bytes .../Images/DarkSkin/TimelineStartPlayback.png.meta | 77 + .../Images/DarkSkin/TimelineTimeCursor.png | Bin 0 -> 15465 bytes .../Images/DarkSkin/TimelineTimeCursor.png.meta | 77 + .../Editor/StyleSheets/Images/Icons.meta | 8 + .../Icons/Timeline-Marker-Warning-Overlay.png | Bin 0 -> 334 bytes .../Icons/Timeline-Marker-Warning-Overlay.png.meta | 115 + .../StyleSheets/Images/Icons/TimelineClipBG.png | Bin 0 -> 784 bytes .../Images/Icons/TimelineClipBG.png.meta | 115 + .../StyleSheets/Images/Icons/TimelineClipFG.png | Bin 0 -> 156 bytes .../Images/Icons/TimelineClipFG.png.meta | 115 + .../StyleSheets/Images/Icons/TimelineDigIn.png | Bin 0 -> 218 bytes .../Images/Icons/TimelineDigIn.png.meta | 115 + .../Images/Icons/TimelineEditModeMixOFF.png | Bin 0 -> 2776 bytes .../Images/Icons/TimelineEditModeMixOFF.png.meta | 115 + .../Images/Icons/TimelineEditModeMixON.png | Bin 0 -> 3244 bytes .../Images/Icons/TimelineEditModeMixON.png.meta | 115 + .../Images/Icons/TimelineEditModeReplaceOFF.png | Bin 0 -> 2747 bytes .../Icons/TimelineEditModeReplaceOFF.png.meta | 115 + .../Images/Icons/TimelineEditModeReplaceON.png | Bin 0 -> 3131 bytes .../Icons/TimelineEditModeReplaceON.png.meta | 115 + .../Images/Icons/TimelineEditModeRippleOFF.png | Bin 0 -> 3724 bytes .../Icons/TimelineEditModeRippleOFF.png.meta | 115 + .../Images/Icons/TimelineEditModeRippleON.png | Bin 0 -> 3376 bytes .../Images/Icons/TimelineEditModeRippleON.png.meta | 115 + .../Images/Icons/TimelineHeaderMarkerIcon.png | Bin 0 -> 410 bytes .../Images/Icons/TimelineHeaderMarkerIcon.png.meta | 115 + .../Icons/TimelineMarkerAreaButtonDisabled.png | Bin 0 -> 1533 bytes .../TimelineMarkerAreaButtonDisabled.png.meta | 115 + .../Icons/TimelineMarkerAreaButtonEnabled.png | Bin 0 -> 1533 bytes .../Icons/TimelineMarkerAreaButtonEnabled.png.meta | 115 + .../StyleSheets/Images/Icons/TimelineSelector.png | Bin 0 -> 15489 bytes .../Images/Icons/TimelineSelector.png.meta | 139 + .../StyleSheets/Images/Icons/TimelineSignal.png | Bin 0 -> 1724 bytes .../Images/Icons/TimelineSignal.png.meta | 88 + .../StyleSheets/Images/Icons/d_TimelineDigIn.png | Bin 0 -> 218 bytes .../Images/Icons/d_TimelineDigIn.png.meta | 115 + .../Images/Icons/d_TimelineEditModeMixOFF.png | Bin 0 -> 1755 bytes .../Images/Icons/d_TimelineEditModeMixOFF.png.meta | 115 + .../Images/Icons/d_TimelineEditModeMixON.png | Bin 0 -> 1745 bytes .../Images/Icons/d_TimelineEditModeMixON.png.meta | 115 + .../Images/Icons/d_TimelineEditModeReplaceOFF.png | Bin 0 -> 1518 bytes .../Icons/d_TimelineEditModeReplaceOFF.png.meta | 115 + .../Images/Icons/d_TimelineEditModeReplaceON.png | Bin 0 -> 1733 bytes .../Icons/d_TimelineEditModeReplaceON.png.meta | 115 + .../Images/Icons/d_TimelineEditModeRippleOFF.png | Bin 0 -> 2362 bytes .../Icons/d_TimelineEditModeRippleOFF.png.meta | 115 + .../Images/Icons/d_TimelineEditModeRippleON.png | Bin 0 -> 1997 bytes .../Icons/d_TimelineEditModeRippleON.png.meta | 115 + .../Images/Icons/d_TimelineHeaderMarkerIcon.png | Bin 0 -> 417 bytes .../Icons/d_TimelineHeaderMarkerIcon.png.meta | 115 + .../Icons/d_TimelineMarkerAreaButtonDisabled.png | Bin 0 -> 241 bytes .../d_TimelineMarkerAreaButtonDisabled.png.meta | 115 + .../Icons/d_TimelineMarkerAreaButtonEnabled.png | Bin 0 -> 242 bytes .../d_TimelineMarkerAreaButtonEnabled.png.meta | 115 + .../Images/Icons/d_TimelineSelector.png | Bin 0 -> 15489 bytes .../Images/Icons/d_TimelineSelector.png.meta | 139 + .../StyleSheets/Images/Icons/d_TimelineSignal.png | Bin 0 -> 207 bytes .../Images/Icons/d_TimelineSignal.png.meta | 88 + .../Editor/StyleSheets/Images/LightSkin.meta | 8 + .../Images/LightSkin/TimelineActivation.png | Bin 0 -> 14964 bytes .../Images/LightSkin/TimelineActivation.png.meta | 107 + .../Images/LightSkin/TimelineAutokey.png | Bin 0 -> 1323 bytes .../Images/LightSkin/TimelineAutokey.png.meta | 77 + .../Images/LightSkin/TimelineAutokey@2x.png | Bin 0 -> 2131 bytes .../Images/LightSkin/TimelineAutokey@2x.png.meta | 91 + .../Images/LightSkin/TimelineAutokey_active.png | Bin 0 -> 344 bytes .../LightSkin/TimelineAutokey_active.png.meta | 77 + .../Images/LightSkin/TimelineAutokey_active@2x.png | Bin 0 -> 647 bytes .../LightSkin/TimelineAutokey_active@2x.png.meta | 91 + .../TimelineCollapseMarkerButtonDisabled.png | Bin 0 -> 348 bytes .../TimelineCollapseMarkerButtonDisabled.png.meta | 88 + .../TimelineCollapseMarkerButtonEnabled.png | Bin 0 -> 356 bytes .../TimelineCollapseMarkerButtonEnabled.png.meta | 88 + .../Images/LightSkin/TimelineContinue.png | Bin 0 -> 15525 bytes .../Images/LightSkin/TimelineContinue.png.meta | 107 + .../Images/LightSkin/TimelineCurvesOff.png | Bin 0 -> 15681 bytes .../Images/LightSkin/TimelineCurvesOff.png.meta | 107 + .../Images/LightSkin/TimelineCurvesOn.png | Bin 0 -> 15653 bytes .../Images/LightSkin/TimelineCurvesOn.png.meta | 77 + .../LightSkin/TimelineDisabledBackground.png | Bin 0 -> 2139 bytes .../LightSkin/TimelineDisabledBackground.png.meta | 119 + .../Images/LightSkin/TimelineEndPlayback.png | Bin 0 -> 2816 bytes .../Images/LightSkin/TimelineEndPlayback.png.meta | 77 + .../StyleSheets/Images/LightSkin/TimelineEye.png | Bin 0 -> 457 bytes .../Images/LightSkin/TimelineEye.png.meta | 77 + .../Images/LightSkin/TimelineEye@2x.png | Bin 0 -> 889 bytes .../Images/LightSkin/TimelineEye@2x.png.meta | 91 + .../StyleSheets/Images/LightSkin/TimelineHold.png | Bin 0 -> 15597 bytes .../Images/LightSkin/TimelineHold.png.meta | 107 + .../Images/LightSkin/TimelineIconClipIn.png | Bin 0 -> 15065 bytes .../Images/LightSkin/TimelineIconClipIn.png.meta | 107 + .../Images/LightSkin/TimelineIconClipOut.png | Bin 0 -> 15695 bytes .../Images/LightSkin/TimelineIconClipOut.png.meta | 107 + .../LightSkin/TimelineInfiniteTrackNoShadow.png | Bin 0 -> 15486 bytes .../TimelineInfiniteTrackNoShadow.png.meta | 107 + .../Images/LightSkin/TimelineKeyframe.png | Bin 0 -> 15714 bytes .../Images/LightSkin/TimelineKeyframe.png.meta | 107 + .../Images/LightSkin/TimelineLockButton.png | Bin 0 -> 203 bytes .../Images/LightSkin/TimelineLockButton.png.meta | 77 + .../Images/LightSkin/TimelineLockButton@2x.png | Bin 0 -> 346 bytes .../LightSkin/TimelineLockButton@2x.png.meta | 91 + .../StyleSheets/Images/LightSkin/TimelineLoop.png | Bin 0 -> 15174 bytes .../Images/LightSkin/TimelineLoop.png.meta | 77 + .../Images/LightSkin/TimelineMarkerItem.png | Bin 0 -> 339 bytes .../Images/LightSkin/TimelineMarkerItem.png.meta | 90 + .../LightSkin/TimelineMarkerItemCollapsed.png | Bin 0 -> 191 bytes .../LightSkin/TimelineMarkerItemCollapsed.png.meta | 90 + .../LightSkin/TimelineMarkerItemSelected.png | Bin 0 -> 263 bytes .../LightSkin/TimelineMarkerItemSelected.png.meta | 90 + .../Images/LightSkin/TimelinePingPong.png | Bin 0 -> 15179 bytes .../Images/LightSkin/TimelinePingPong.png.meta | 77 + .../Images/LightSkin/TimelinePlayRange.png | Bin 0 -> 14680 bytes .../Images/LightSkin/TimelinePlayRange.png.meta | 77 + .../Images/LightSkin/TimelineSignalCollapsed.png | Bin 0 -> 203 bytes .../LightSkin/TimelineSignalCollapsed.png.meta | 86 + .../Images/LightSkin/TimelineSignalSelected.png | Bin 0 -> 184 bytes .../LightSkin/TimelineSignalSelected.png.meta | 88 + .../Images/LightSkin/TimelineStartPlayback.png | Bin 0 -> 2814 bytes .../LightSkin/TimelineStartPlayback.png.meta | 77 + .../Images/LightSkin/TimelineTimeCursor.png | Bin 0 -> 15479 bytes .../Images/LightSkin/TimelineTimeCursor.png.meta | 77 + .../Editor/StyleSheets/Images/Shared.meta | 8 + .../Shared/Timeline-Marker-Multi-Overlay.png | Bin 0 -> 126 bytes .../Shared/Timeline-Marker-Multi-Overlay.png.meta | 108 + .../Images/Shared/TimelineBottomShadow.png | Bin 0 -> 96 bytes .../Images/Shared/TimelineBottomShadow.png.meta | 117 + .../Images/Shared/TimelineConnector.png | Bin 0 -> 14566 bytes .../Images/Shared/TimelineConnector.png.meta | 107 + .../StyleSheets/Images/Shared/TimelineDisplay.png | Bin 0 -> 214 bytes .../Images/Shared/TimelineDisplay.png.meta | 104 + .../Images/Shared/TimelineGroupBackground.png | Bin 0 -> 149 bytes .../Images/Shared/TimelineGroupBackground.png.meta | 77 + .../StyleSheets/Images/Shared/TimelineOutline.png | Bin 0 -> 14678 bytes .../Images/Shared/TimelineOutline.png.meta | 77 + .../StyleSheets/Images/Shared/TimelineSeqEnd.png | Bin 0 -> 14981 bytes .../Images/Shared/TimelineSeqEnd.png.meta | 77 + .../StyleSheets/Images/Shared/TimelineSwatch.png | Bin 0 -> 14552 bytes .../Images/Shared/TimelineSwatch.png.meta | 117 + .../StyleSheets/Images/Shared/TimelineWarning.png | Bin 0 -> 361 bytes .../Images/Shared/TimelineWarning.png.meta | 77 + .../Editor/StyleSheets/res.meta | 8 + .../Editor/StyleSheets/res/HumanoidDefault.anim | 6683 ++++++++++++++++++++ .../StyleSheets/res/HumanoidDefault.anim.meta | 10 + .../Editor/StyleSheets/res/Timeline_DarkSkin.txt | 52 + .../StyleSheets/res/Timeline_DarkSkin.txt.meta | 8 + .../Editor/StyleSheets/res/Timeline_LightSkin.txt | 52 + .../StyleSheets/res/Timeline_LightSkin.txt.meta | 8 + .../Editor/TimelineEditor.cs | 173 + .../Editor/TimelineEditor.cs.meta | 11 + .../Editor/TimelineHelpers.cs | 929 +++ .../Editor/TimelineHelpers.cs.meta | 11 + .../Editor/TimelineSelection.cs | 331 + .../Editor/TimelineSelection.cs.meta | 11 + .../Editor/TimelineUtility.cs | 315 + .../Editor/TimelineUtility.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/Tooltip.cs | 110 + .../Editor/Tooltip.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/Trackhead.cs | 363 ++ .../Editor/Trackhead.cs.meta | 11 + .../Editor/Unity.Timeline.Editor.asmdef | 10 + .../Editor/Unity.Timeline.Editor.asmdef.meta | 7 + .../Editor/UnityEditorInternals.cs | 19 + .../Editor/UnityEditorInternals.cs.meta | 3 + .../Editor/Utilities.meta | 8 + .../Editor/Utilities/AnimatedParameterCache.cs | 91 + .../Utilities/AnimatedParameterCache.cs.meta | 11 + .../Editor/Utilities/AnimatedParameterUtility.cs | 358 ++ .../Utilities/AnimatedParameterUtility.cs.meta | 11 + .../Editor/Utilities/BindingUtility.cs | 58 + .../Editor/Utilities/BindingUtility.cs.meta | 11 + .../Editor/Utilities/BreadcrumbDrawer.cs | 235 + .../Editor/Utilities/BreadcrumbDrawer.cs.meta | 11 + .../Editor/Utilities/ClipModifier.cs | 386 ++ .../Editor/Utilities/ClipModifier.cs.meta | 11 + .../Editor/Utilities/Clipboard.cs | 142 + .../Editor/Utilities/Clipboard.cs.meta | 11 + .../Editor/Utilities/ControlPlayableUtility.cs | 62 + .../Utilities/ControlPlayableUtility.cs.meta | 11 + .../Editor/Utilities/CustomTrackDrawerAttribute.cs | 47 + .../Utilities/CustomTrackDrawerAttribute.cs.meta | 11 + .../Editor/Utilities/DisplayNameHelper.cs | 33 + .../Editor/Utilities/DisplayNameHelper.cs.meta | 11 + .../Editor/Utilities/GUIColorOverride.cs | 21 + .../Editor/Utilities/GUIColorOverride.cs.meta | 11 + .../Editor/Utilities/GUIGroupScope.cs | 18 + .../Editor/Utilities/GUIGroupScope.cs.meta | 11 + .../Editor/Utilities/GUIMixedValueScope.cs | 20 + .../Editor/Utilities/GUIMixedValueScope.cs.meta | 11 + .../Editor/Utilities/GUIViewportScope.cs | 34 + .../Editor/Utilities/GUIViewportScope.cs.meta | 11 + .../Editor/Utilities/Graphics.cs | 109 + .../Editor/Utilities/Graphics.cs.meta | 11 + .../Editor/Utilities/KeyTraverser.cs | 203 + .../Editor/Utilities/KeyTraverser.cs.meta | 11 + .../Editor/Utilities/MarkerModifier.cs | 66 + .../Editor/Utilities/MarkerModifier.cs.meta | 11 + .../Editor/Utilities/ObjectExtension.cs | 28 + .../Editor/Utilities/ObjectExtension.cs.meta | 11 + .../Editor/Utilities/ObjectReferenceField.cs | 195 + .../Editor/Utilities/ObjectReferenceField.cs.meta | 11 + .../Editor/Utilities/PropertyCollector.cs | 226 + .../Editor/Utilities/PropertyCollector.cs.meta | 11 + .../Editor/Utilities/Range.cs | 49 + .../Editor/Utilities/Range.cs.meta | 11 + .../Utilities/SequenceSelectorNameFormater.cs | 32 + .../Utilities/SequenceSelectorNameFormater.cs.meta | 11 + .../Editor/Utilities/SpacePartitioner.cs | 127 + .../Editor/Utilities/SpacePartitioner.cs.meta | 11 + .../Editor/Utilities/StyleManager.cs | 60 + .../Editor/Utilities/StyleManager.cs.meta | 11 + .../Editor/Utilities/StyleNormalColorOverride.cs | 23 + .../Utilities/StyleNormalColorOverride.cs.meta | 11 + .../Editor/Utilities/TimeReferenceUtility.cs | 57 + .../Editor/Utilities/TimeReferenceUtility.cs.meta | 11 + .../Editor/Utilities/TimelineKeyboardNavigation.cs | 387 ++ .../Utilities/TimelineKeyboardNavigation.cs.meta | 11 + .../Editor/Utilities/TrackModifier.cs | 21 + .../Editor/Utilities/TrackModifier.cs.meta | 11 + .../Editor/Utilities/TrackResourceCache.cs | 121 + .../Editor/Utilities/TrackResourceCache.cs.meta | 11 + .../Editor/Utilities/TypeUtility.cs | 342 + .../Editor/Utilities/TypeUtility.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/Window.meta | 8 + .../Editor/Window/Modes.meta | 8 + .../Editor/Window/Modes/TimeReferenceMode.cs | 8 + .../Editor/Window/Modes/TimeReferenceMode.cs.meta | 11 + .../Editor/Window/Modes/TimelineActiveMode.cs | 42 + .../Editor/Window/Modes/TimelineActiveMode.cs.meta | 11 + .../Window/Modes/TimelineAssetEditionMode.cs | 27 + .../Window/Modes/TimelineAssetEditionMode.cs.meta | 11 + .../Editor/Window/Modes/TimelineDisabledMode.cs | 44 + .../Window/Modes/TimelineDisabledMode.cs.meta | 11 + .../Editor/Window/Modes/TimelineInactiveMode.cs | 47 + .../Window/Modes/TimelineInactiveMode.cs.meta | 11 + .../Editor/Window/Modes/TimelineMode.cs | 71 + .../Editor/Window/Modes/TimelineMode.cs.meta | 11 + .../Editor/Window/Modes/TimelineReadOnlyMode.cs | 52 + .../Window/Modes/TimelineReadOnlyMode.cs.meta | 11 + .../Editor/Window/PlaybackScroller.cs | 54 + .../Editor/Window/PlaybackScroller.cs.meta | 11 + .../Editor/Window/TimelineMarkerHeaderGUI.cs | 201 + .../Editor/Window/TimelineMarkerHeaderGUI.cs.meta | 11 + .../Editor/Window/TimelineWindow.cs | 541 ++ .../Editor/Window/TimelineWindow.cs.meta | 11 + .../Editor/Window/TimelineWindowTimeControl.cs | 331 + .../Window/TimelineWindowTimeControl.cs.meta | 11 + .../Editor/Window/TimelineWindow_ActiveTimeline.cs | 80 + .../Window/TimelineWindow_ActiveTimeline.cs.meta | 11 + .../Editor/Window/TimelineWindow_Breadcrumbs.cs | 118 + .../Window/TimelineWindow_Breadcrumbs.cs.meta | 11 + .../Editor/Window/TimelineWindow_Duration.cs | 128 + .../Editor/Window/TimelineWindow_Duration.cs.meta | 11 + .../Window/TimelineWindow_EditorCallbacks.cs | 272 + .../Window/TimelineWindow_EditorCallbacks.cs.meta | 11 + .../Editor/Window/TimelineWindow_Gui.cs | 511 ++ .../Editor/Window/TimelineWindow_Gui.cs.meta | 11 + .../Editor/Window/TimelineWindow_HeaderGui.cs | 314 + .../Editor/Window/TimelineWindow_HeaderGui.cs.meta | 11 + .../Editor/Window/TimelineWindow_Manipulators.cs | 41 + .../Window/TimelineWindow_Manipulators.cs.meta | 11 + .../Editor/Window/TimelineWindow_PlayRange.cs | 131 + .../Editor/Window/TimelineWindow_PlayRange.cs.meta | 11 + .../Editor/Window/TimelineWindow_PlayableLookup.cs | 79 + .../Window/TimelineWindow_PlayableLookup.cs.meta | 11 + .../Window/TimelineWindow_PreviewPlayMode.cs | 80 + .../Window/TimelineWindow_PreviewPlayMode.cs.meta | 11 + .../Editor/Window/TimelineWindow_Selection.cs | 80 + .../Editor/Window/TimelineWindow_Selection.cs.meta | 11 + .../Editor/Window/TimelineWindow_StateChange.cs | 53 + .../Window/TimelineWindow_StateChange.cs.meta | 11 + .../Editor/Window/TimelineWindow_TimeArea.cs | 107 + .../Editor/Window/TimelineWindow_TimeArea.cs.meta | 11 + .../Editor/Window/TimelineWindow_TimeCursor.cs | 83 + .../Window/TimelineWindow_TimeCursor.cs.meta | 11 + .../Editor/Window/TimelineWindow_TrackGui.cs | 219 + .../Editor/Window/TimelineWindow_TrackGui.cs.meta | 11 + .../Editor/Window/ViewModel.meta | 8 + .../Window/ViewModel/ScriptableObjectViewPrefs.cs | 119 + .../ViewModel/ScriptableObjectViewPrefs.cs.meta | 11 + .../Window/ViewModel/TimelineAssetViewModel.cs | 116 + .../ViewModel/TimelineAssetViewModel.cs.meta | 11 + .../Window/ViewModel/TimelineWindowViewPrefs.cs | 170 + .../ViewModel/TimelineWindowViewPrefs.cs.meta | 11 + .../Editor/Window/WindowConstants.cs | 45 + .../Editor/Window/WindowConstants.cs.meta | 11 + .../Editor/inspectors.meta | 8 + .../inspectors/AnimationPlayableAssetInspector.cs | 341 + .../AnimationPlayableAssetInspector.cs.meta | 11 + .../Editor/inspectors/AnimationTrackInspector.cs | 504 ++ .../inspectors/AnimationTrackInspector.cs.meta | 11 + .../Editor/inspectors/BasicAssetInspector.cs | 41 + .../Editor/inspectors/BasicAssetInspector.cs.meta | 11 + .../Editor/inspectors/BuiltInCurvePresets.cs | 58 + .../Editor/inspectors/BuiltInCurvePresets.cs.meta | 11 + .../Editor/inspectors/ClipInspector.meta | 8 + .../inspectors/ClipInspector/ClipInspector.cs | 786 +++ .../inspectors/ClipInspector/ClipInspector.cs.meta | 11 + .../ClipInspector/ClipInspectorCurveEditor.cs | 348 + .../ClipInspector/ClipInspectorCurveEditor.cs.meta | 11 + .../ClipInspector/ClipInspectorSelectionInfo.cs | 132 + .../ClipInspectorSelectionInfo.cs.meta | 11 + .../Editor/inspectors/CurvesOwner.meta | 8 + .../CurvesOwner/CurvesOwnerInspectorHelper.cs | 109 + .../CurvesOwner/CurvesOwnerInspectorHelper.cs.meta | 11 + .../CurvesOwner/ICurvesOwnerInspectorWrapper.cs | 14 + .../ICurvesOwnerInspectorWrapper.cs.meta | 11 + .../inspectors/DirectorNamedColorInspector.cs | 27 + .../inspectors/DirectorNamedColorInspector.cs.meta | 11 + .../Editor/inspectors/EditorClip.cs | 24 + .../Editor/inspectors/EditorClip.cs.meta | 11 + .../Editor/inspectors/EditorClipFactory.cs | 53 + .../Editor/inspectors/EditorClipFactory.cs.meta | 11 + .../Editor/inspectors/GroupTrackInspector.cs | 107 + .../Editor/inspectors/GroupTrackInspector.cs.meta | 11 + .../Editor/inspectors/MarkerInspector.cs | 69 + .../Editor/inspectors/MarkerInspector.cs.meta | 11 + .../Editor/inspectors/TimeFieldDrawer.cs | 69 + .../Editor/inspectors/TimeFieldDrawer.cs.meta | 11 + .../Editor/inspectors/TimelineAssetInspector.cs | 78 + .../inspectors/TimelineAssetInspector.cs.meta | 11 + .../Editor/inspectors/TimelineInspectorUtility.cs | 353 ++ .../inspectors/TimelineInspectorUtility.cs.meta | 11 + .../Editor/inspectors/TrackAssetInspector.cs | 203 + .../Editor/inspectors/TrackAssetInspector.cs.meta | 11 + .../com.unity.timeline@1.2.13/Editor/treeview.meta | 8 + .../Editor/treeview/AnimationTrackKeyDataSource.cs | 25 + .../treeview/AnimationTrackKeyDataSource.cs.meta | 11 + .../Editor/treeview/Control.cs | 28 + .../Editor/treeview/Control.cs.meta | 11 + .../Editor/treeview/Drawers.meta | 8 + .../treeview/Drawers/AnimationTrackDrawer.cs | 86 + .../treeview/Drawers/AnimationTrackDrawer.cs.meta | 11 + .../Editor/treeview/Drawers/ClipDrawer.cs | 678 ++ .../Editor/treeview/Drawers/ClipDrawer.cs.meta | 11 + .../Editor/treeview/Drawers/InfiniteTrackDrawer.cs | 86 + .../treeview/Drawers/InfiniteTrackDrawer.cs.meta | 11 + .../Editor/treeview/Drawers/Layers.meta | 8 + .../Editor/treeview/Drawers/Layers/ClipsLayer.cs | 57 + .../treeview/Drawers/Layers/ClipsLayer.cs.meta | 11 + .../Editor/treeview/Drawers/Layers/ItemsLayer.cs | 134 + .../treeview/Drawers/Layers/ItemsLayer.cs.meta | 11 + .../Editor/treeview/Drawers/Layers/MarkersLayer.cs | 80 + .../treeview/Drawers/Layers/MarkersLayer.cs.meta | 11 + .../Editor/treeview/Drawers/TrackDrawer.cs | 51 + .../Editor/treeview/Drawers/TrackDrawer.cs.meta | 11 + .../Editor/treeview/Drawers/TrackItemsDrawer.cs | 42 + .../treeview/Drawers/TrackItemsDrawer.cs.meta | 11 + .../Editor/treeview/IPropertyKeyDataSource.cs | 71 + .../Editor/treeview/IPropertyKeyDataSource.cs.meta | 11 + .../Editor/treeview/IRowGUI.cs | 16 + .../Editor/treeview/IRowGUI.cs.meta | 11 + .../Editor/treeview/InlineCurveEditor.cs | 299 + .../Editor/treeview/InlineCurveEditor.cs.meta | 11 + .../Editor/treeview/ItemGui.meta | 8 + .../Editor/treeview/ItemGui/ISelectable.cs | 11 + .../Editor/treeview/ItemGui/ISelectable.cs.meta | 11 + .../Editor/treeview/ItemGui/TimelineClipGUI.cs | 760 +++ .../treeview/ItemGui/TimelineClipGUI.cs.meta | 11 + .../Editor/treeview/ItemGui/TimelineItemGUI.cs | 92 + .../treeview/ItemGui/TimelineItemGUI.cs.meta | 11 + .../treeview/ItemGui/TimelineMarkerClusterGUI.cs | 150 + .../ItemGui/TimelineMarkerClusterGUI.cs.meta | 11 + .../Editor/treeview/ItemGui/TimelineMarkerGUI.cs | 193 + .../treeview/ItemGui/TimelineMarkerGUI.cs.meta | 11 + .../Editor/treeview/ManipulationsClips.cs | 77 + .../Editor/treeview/ManipulationsClips.cs.meta | 11 + .../Editor/treeview/ManipulationsTimeline.cs | 287 + .../Editor/treeview/ManipulationsTimeline.cs.meta | 11 + .../Editor/treeview/ManipulationsTracks.cs | 103 + .../Editor/treeview/ManipulationsTracks.cs.meta | 11 + .../Editor/treeview/Manipulator.cs | 91 + .../Editor/treeview/Manipulator.cs.meta | 11 + .../Editor/treeview/PickerUtils.cs | 41 + .../Editor/treeview/PickerUtils.cs.meta | 11 + .../Editor/treeview/Snapping.meta | 8 + .../Editor/treeview/Snapping/IAttractable.cs | 21 + .../Editor/treeview/Snapping/IAttractable.cs.meta | 11 + .../Editor/treeview/Snapping/ISnappable.cs | 22 + .../Editor/treeview/Snapping/ISnappable.cs.meta | 11 + .../Editor/treeview/Snapping/SnapEngine.cs | 288 + .../Editor/treeview/Snapping/SnapEngine.cs.meta | 11 + .../Editor/treeview/TimelineClipHandle.cs | 53 + .../Editor/treeview/TimelineClipHandle.cs.meta | 11 + .../Editor/treeview/TimelineClipUnion.cs | 126 + .../Editor/treeview/TimelineClipUnion.cs.meta | 11 + .../Editor/treeview/TimelineDataSource.cs | 222 + .../Editor/treeview/TimelineDataSource.cs.meta | 11 + .../Editor/treeview/TimelineDragging.cs | 683 ++ .../Editor/treeview/TimelineDragging.cs.meta | 11 + .../Editor/treeview/TimelineGroupGUI.cs | 310 + .../Editor/treeview/TimelineGroupGUI.cs.meta | 11 + .../Editor/treeview/TimelineTrackBaseGUI.cs | 218 + .../Editor/treeview/TimelineTrackBaseGUI.cs.meta | 11 + .../Editor/treeview/TimelineTrackErrorGUI.cs | 185 + .../Editor/treeview/TimelineTrackErrorGUI.cs.meta | 11 + .../Editor/treeview/TimelineTrackGUI.cs | 812 +++ .../Editor/treeview/TimelineTrackGUI.cs.meta | 11 + .../Editor/treeview/TimelineTreeView.cs | 439 ++ .../Editor/treeview/TimelineTreeView.cs.meta | 11 + .../Editor/treeview/TimelineTreeViewGUI.cs | 182 + .../Editor/treeview/TimelineTreeViewGUI.cs.meta | 11 + .../treeview/TrackPropertyCurvesDataSource.cs | 15 + .../treeview/TrackPropertyCurvesDataSource.cs.meta | 11 + .../com.unity.timeline@1.2.13/LICENSE.md | 5 + .../com.unity.timeline@1.2.13/LICENSE.md.meta | 7 + .../com.unity.timeline@1.2.13/README.md | 37 + .../com.unity.timeline@1.2.13/README.md.meta | 7 + .../com.unity.timeline@1.2.13/Runtime.meta | 8 + .../Runtime/Activation.meta | 8 + .../Runtime/Activation/ActivationMixerPlayable.cs | 71 + .../Activation/ActivationMixerPlayable.cs.meta | 11 + .../Runtime/Activation/ActivationPlayableAsset.cs | 29 + .../Activation/ActivationPlayableAsset.cs.meta | 11 + .../Runtime/Activation/ActivationTrack.cs | 93 + .../Runtime/Activation/ActivationTrack.cs.meta | 11 + .../Runtime/Animation.meta | 8 + .../Animation/AnimationOutputWeightProcessor.cs | 93 + .../AnimationOutputWeightProcessor.cs.meta | 11 + .../Runtime/Animation/AnimationPlayableAsset.cs | 326 + .../Animation/AnimationPlayableAsset.cs.meta | 11 + .../Animation/AnimationPreviewUpdateCallback.cs | 54 + .../AnimationPreviewUpdateCallback.cs.meta | 11 + .../Runtime/Animation/AnimationTrack.cs | 971 +++ .../Runtime/Animation/AnimationTrack.cs.meta | 11 + .../Runtime/Animation/ICurvesOwner.cs | 15 + .../Runtime/Animation/ICurvesOwner.cs.meta | 11 + .../Runtime/AssetUpgrade.meta | 8 + .../AssetUpgrade/AnimationPlayableAssetUpgrade.cs | 47 + .../AnimationPlayableAssetUpgrade.cs.meta | 11 + .../Runtime/AssetUpgrade/AnimationTrackUpgrade.cs | 102 + .../AssetUpgrade/AnimationTrackUpgrade.cs.meta | 11 + .../Runtime/AssetUpgrade/ClipUpgrade.cs | 34 + .../Runtime/AssetUpgrade/ClipUpgrade.cs.meta | 11 + .../Runtime/AssetUpgrade/TimelineUpgrade.cs | 21 + .../Runtime/AssetUpgrade/TimelineUpgrade.cs.meta | 11 + .../Runtime/AssetUpgrade/TrackUpgrade.cs | 76 + .../Runtime/AssetUpgrade/TrackUpgrade.cs.meta | 11 + .../Runtime/Attributes.meta | 8 + .../Runtime/Attributes/TrackColorAttribute.cs | 33 + .../Runtime/Attributes/TrackColorAttribute.cs.meta | 11 + .../com.unity.timeline@1.2.13/Runtime/Audio.meta | 8 + .../Runtime/Audio/AudioClipProperties.cs | 13 + .../Runtime/Audio/AudioClipProperties.cs.meta | 11 + .../Runtime/Audio/AudioMixerProperties.cs | 45 + .../Runtime/Audio/AudioMixerProperties.cs.meta | 11 + .../Runtime/Audio/AudioPlayableAsset.cs | 133 + .../Runtime/Audio/AudioPlayableAsset.cs.meta | 11 + .../Runtime/Audio/AudioTrack.cs | 129 + .../Runtime/Audio/AudioTrack.cs.meta | 11 + .../com.unity.timeline@1.2.13/Runtime/ClipCaps.cs | 85 + .../Runtime/ClipCaps.cs.meta | 11 + .../com.unity.timeline@1.2.13/Runtime/Control.meta | 8 + .../Runtime/Control/ControlPlayableAsset.cs | 406 ++ .../Runtime/Control/ControlPlayableAsset.cs.meta | 11 + .../Runtime/Control/ControlTrack.cs | 14 + .../Runtime/Control/ControlTrack.cs.meta | 11 + .../Runtime/DiscreteTime.cs | 226 + .../Runtime/DiscreteTime.cs.meta | 11 + .../Runtime/Evaluation.meta | 8 + .../Runtime/Evaluation/InfiniteRuntimeClip.cs | 46 + .../Runtime/Evaluation/InfiniteRuntimeClip.cs.meta | 11 + .../Runtime/Evaluation/IntervalTree.cs | 271 + .../Runtime/Evaluation/IntervalTree.cs.meta | 11 + .../Runtime/Evaluation/RuntimeClip.cs | 110 + .../Runtime/Evaluation/RuntimeClip.cs.meta | 11 + .../Runtime/Evaluation/RuntimeClipBase.cs | 21 + .../Runtime/Evaluation/RuntimeClipBase.cs.meta | 11 + .../Runtime/Evaluation/RuntimeElement.cs | 17 + .../Runtime/Evaluation/RuntimeElement.cs.meta | 11 + .../Runtime/Evaluation/ScheduleRuntimeClip.cs | 111 + .../Runtime/Evaluation/ScheduleRuntimeClip.cs.meta | 11 + .../com.unity.timeline@1.2.13/Runtime/Events.meta | 8 + .../Runtime/Events/IMarker.cs | 31 + .../Runtime/Events/IMarker.cs.meta | 11 + .../Runtime/Events/INotificationOptionProvider.cs | 15 + .../Events/INotificationOptionProvider.cs.meta | 11 + .../Runtime/Events/Marker.cs | 53 + .../Runtime/Events/Marker.cs.meta | 11 + .../Runtime/Events/MarkerList.cs | 168 + .../Runtime/Events/MarkerList.cs.meta | 11 + .../Runtime/Events/MarkerTrack.cs | 28 + .../Runtime/Events/MarkerTrack.cs.meta | 11 + .../Runtime/Events/SignalTrack.cs | 19 + .../Runtime/Events/SignalTrack.cs.meta | 11 + .../Runtime/Events/Signals.meta | 8 + .../Events/Signals/CustomSignalEventDrawer.cs | 5 + .../Events/Signals/CustomSignalEventDrawer.cs.meta | 11 + .../Runtime/Events/Signals/SignalAsset.cs | 22 + .../Runtime/Events/Signals/SignalAsset.cs.meta | 11 + .../Runtime/Events/Signals/SignalEmitter.cs | 72 + .../Runtime/Events/Signals/SignalEmitter.cs.meta | 11 + .../Runtime/Events/Signals/SignalReceiver.cs | 248 + .../Runtime/Events/Signals/SignalReceiver.cs.meta | 11 + .../Runtime/Extensions.meta | 8 + .../Runtime/Extensions/TrackExtensions.cs | 76 + .../Runtime/Extensions/TrackExtensions.cs.meta | 11 + .../Runtime/GroupTrack.cs | 26 + .../Runtime/GroupTrack.cs.meta | 11 + .../Runtime/ILayerable.cs | 20 + .../Runtime/ILayerable.cs.meta | 11 + .../Runtime/Playables.meta | 8 + .../Runtime/Playables/ActivationControlPlayable.cs | 140 + .../Playables/ActivationControlPlayable.cs.meta | 11 + .../Runtime/Playables/BasicScriptPlayable.cs | 91 + .../Runtime/Playables/BasicScriptPlayable.cs.meta | 11 + .../Runtime/Playables/DirectorControlPlayable.cs | 206 + .../Playables/DirectorControlPlayable.cs.meta | 11 + .../Runtime/Playables/ITimeControl.cs | 27 + .../Runtime/Playables/ITimeControl.cs.meta | 11 + .../Runtime/Playables/NotificationFlags.cs | 31 + .../Runtime/Playables/NotificationFlags.cs.meta | 11 + .../Runtime/Playables/ParticleControlPlayable.cs | 177 + .../Playables/ParticleControlPlayable.cs.meta | 11 + .../Runtime/Playables/PrefabControlPlayable.cs | 158 + .../Playables/PrefabControlPlayable.cs.meta | 11 + .../Runtime/Playables/TimeControlPlayable.cs | 85 + .../Runtime/Playables/TimeControlPlayable.cs.meta | 11 + .../Runtime/Playables/TimeNotificationBehaviour.cs | 254 + .../Playables/TimeNotificationBehaviour.cs.meta | 11 + .../Runtime/Properties.meta | 8 + .../Runtime/Properties/AssemblyInfo.cs | 28 + .../Runtime/Properties/AssemblyInfo.cs.meta | 11 + .../Runtime/Scripting.meta | 8 + .../Runtime/Scripting/PlayableTrack.cs | 23 + .../Runtime/Scripting/PlayableTrack.cs.meta | 11 + .../Runtime/Timeline.deprecated.cs | 34 + .../Runtime/Timeline.deprecated.cs.meta | 11 + .../Runtime/TimelineAsset.cs | 455 ++ .../Runtime/TimelineAsset.cs.meta | 11 + .../Runtime/TimelineAsset_CreateRemove.cs | 255 + .../Runtime/TimelineAsset_CreateRemove.cs.meta | 11 + .../Runtime/TimelineAttributes.cs | 222 + .../Runtime/TimelineAttributes.cs.meta | 11 + .../Runtime/TimelineClip.cs | 821 +++ .../Runtime/TimelineClip.cs.meta | 11 + .../Runtime/TimelinePlayable.cs | 310 + .../Runtime/TimelinePlayable.cs.meta | 11 + .../Runtime/TrackAsset.cs | 1264 ++++ .../Runtime/TrackAsset.cs.meta | 11 + .../Runtime/Unity.Timeline.asmdef | 6 + .../Runtime/Unity.Timeline.asmdef.meta | 7 + .../Runtime/Utilities.meta | 8 + .../Runtime/Utilities/AnimationPreviewUtilities.cs | 266 + .../Utilities/AnimationPreviewUtilities.cs.meta | 11 + .../Runtime/Utilities/AnimatorBindingCache.cs | 133 + .../Runtime/Utilities/AnimatorBindingCache.cs.meta | 11 + .../Runtime/Utilities/Extrapolation.cs | 92 + .../Runtime/Utilities/Extrapolation.cs.meta | 11 + .../Runtime/Utilities/HashUtility.cs | 51 + .../Runtime/Utilities/HashUtility.cs.meta | 11 + .../Runtime/Utilities/IPropertyCollector.cs | 102 + .../Runtime/Utilities/IPropertyCollector.cs.meta | 11 + .../Runtime/Utilities/IPropertyPreview.cs | 17 + .../Runtime/Utilities/IPropertyPreview.cs.meta | 11 + .../Runtime/Utilities/NotificationUtilities.cs | 54 + .../Utilities/NotificationUtilities.cs.meta | 11 + .../Runtime/Utilities/TimeUtility.cs | 212 + .../Runtime/Utilities/TimeUtility.cs.meta | 11 + .../Runtime/Utilities/TimelineCreateUtilities.cs | 131 + .../Utilities/TimelineCreateUtilities.cs.meta | 11 + .../Runtime/Utilities/TimelineUndo.cs | 90 + .../Runtime/Utilities/TimelineUndo.cs.meta | 11 + .../Runtime/Utilities/WeightUtility.cs | 30 + .../Runtime/Utilities/WeightUtility.cs.meta | 11 + .../com.unity.timeline@1.2.13/package.json | 24 + .../com.unity.timeline@1.2.13/package.json.meta | 8 + 1101 files changed, 73649 insertions(+) create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/CHANGELOG.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/CHANGELOG.md.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/TableOfContents.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_about.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_add.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_blend.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_dup.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_ease.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_gap_extrap.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_insert.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_match.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_pan_zoom.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_position.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_reset.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_select.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_speed.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_split.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_tile.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_trim.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_about.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_hide.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_add.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_del.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_edit.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_interp.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_sel.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_nav.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_hide.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_lock.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_use.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_add_track_menu.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_animation_window_locked.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_cinematic_example.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_blend_area.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_double_speed.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_before.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_clip_after.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_clip_before.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_project.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_bad_gap.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_good_gap.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_out.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_override_scene.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_override_track.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_split_after.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_split_before.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_end_keys.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_loop.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_start_keys.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_anim_clip_timing.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_arrows.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_position_invalid.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_positioning.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_select_first.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_select_last.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_split_after.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_split_before.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_tile_result.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_tile_selection.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_adding.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_inserting_after.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_inserting_before.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_cog_menu.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_first_last_tangent.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_interp_menu.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_tangent_joined.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_icon.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_position_x.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_select_contiguous.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_select_key.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_duration_mode.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_bindings.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_create.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_project.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_to_start.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_end_button.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_frames_subframes.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_gap_extrap_icons.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_gap_extrap_two_tracks.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_after_match.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_before_match.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_blend.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_idle.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_manual.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_match_menu.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_runleft.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_start.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_activation_clip.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_activation_track.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_anim_extrap.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip_common.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip_playable.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_track.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_audio_clip.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_blend_curves.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_clip_speed.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_clip_timing.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_control_clip_common.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_control_clip_playable.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_curve_editor.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_ease_in_blend_out.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_ease_in_out.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_multiple_selection.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_narrow_selection.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_playable_director.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_timeline.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_before.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_complete.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_trim.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_inspector.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_off.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_on.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_override.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_override_selected.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_start.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_waving.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_clip_many.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_clip_two.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_prematch_clips.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_prematch_scene.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_mix_mode_blend_arrow.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_mix_mode_position_cursor.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_after copy.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_after.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_before.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_editing.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_example.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_global.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_local.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_next_frame_button.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_asset.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_enemy.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_instance.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_player.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_button.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_range.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_range_button.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playback_controls.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_100_after.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_before.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_menu.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_location.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_select_menu.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_trim_after.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_trim_before.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_preview_selector.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_previous_frame_button.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_property_red.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_replace_mode.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_replace_mode_red_cut.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_ripple_mode.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_ripple_mode_yellow_arrow.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_splash.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_start_button.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_alert_icon.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_duplicate.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_add.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_hidden.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_locked.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_plus.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_list.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_locked.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_muted.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_priority.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_reorder.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_select_first.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_select_last.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_clip_in_project.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_converted_clip.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_dopesheet.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_keyframing_menu.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_record_button.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recorded_clip_track_menu.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recording.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recording_diamonds.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_zoombar.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_zoomed_clip_edit_modes.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_inspector_animation_clip_playable.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_control_disabled.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_done.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_double_click.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_drag_board.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_edit_warning.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_master.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/index.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_about.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_act.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_anim_com.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_anim_plyb.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_aud.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_ctrl_com.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_ctrl_plyb.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_tl.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk_act.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk_anim.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/play_director.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_about.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_gloss.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_play_cntrls.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_selector.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_settings.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_window.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_add.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_delete.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_dup.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_list_about.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_lock.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_mute.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_reorder.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_select.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_about.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_char_anim.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_conv_infinite.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_instance.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_mask.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_nested.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_rec_anim.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ClipsActions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ClipsActions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ItemAction.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ItemAction.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/MarkerActions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/MarkerActions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/MenuItemActionBase.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/MenuItemActionBase.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/TimelineContextMenu.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/TimelineContextMenu.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TimelineActions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TimelineActions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TrackActions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TrackActions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics/TimelineAnalytics.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics/TimelineAnalytics.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipActions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipActions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipCurveCache.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipCurveCache.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationOffsetMenu.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationOffsetMenu.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationPlayableAssetEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationPlayableAssetEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationTrackActions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationTrackActions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingSelector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingSelector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSource.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSource.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSourceGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSourceGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/ClipCurveEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/ClipCurveEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurveDataSource.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurveDataSource.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurvesProxy.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurvesProxy.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/TimelineAnimationUtilities.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/TimelineAnimationUtilities.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioClipPropertiesDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioClipPropertiesDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioTrackInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioTrackInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack/ControlPlayableAssetEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack/ControlPlayableAssetEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CurveEditUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CurveEditUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/ClipEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/ClipEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/CustomTimelineEditorCache.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/CustomTimelineEditorCache.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerTrackEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerTrackEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/TrackEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/TrackEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorNamedColor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorNamedColor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorStyles.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorStyles.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimatedParameterExtensions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimatedParameterExtensions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimationTrackExtensions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimationTrackExtensions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/TrackExtensions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/TrackExtensions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ClipItem.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ClipItem.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ITimelineItem.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ITimelineItem.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsGroup.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsGroup.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsPerTrack.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsPerTrack.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsUtils.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsUtils.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/MarkerItem.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/MarkerItem.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeMix.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeMix.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeReplace.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeReplace.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeRipple.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeRipple.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/IAddDeleteItemMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/IAddDeleteItemMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors/TimelineCursors.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors/TimelineCursors.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditModeInputHandler.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditModeInputHandler.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/IMoveItemMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/IMoveItemMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemHandler.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemHandler.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeMix.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeMix.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeReplace.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeReplace.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeRipple.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeRipple.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MovingItems.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MovingItems.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/EaseClip.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/EaseClip.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/Jog.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/Jog.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/MarkerHeaderContextMenu.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/MarkerHeaderContextMenu.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleSelect.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleSelect.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleTool.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleTool.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleZoom.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleZoom.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/SelectAndMoveItem.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/SelectAndMoveItem.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrackZoom.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrackZoom.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrimClip.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrimClip.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeAreaAutoPanner.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeAreaAutoPanner.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeIndicator.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeIndicator.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimelineClipGroup.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimelineClipGroup.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/ITrimItemMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/ITrimItemMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeMix.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeMix.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeReplace.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeReplace.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeRipple.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeRipple.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeGUIUtils.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeGUIUtils.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeMixUtils.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeMixUtils.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeReplaceUtils.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeReplaceUtils.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeRippleUtils.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeRippleUtils.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeUtils.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeUtils.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/ManipulatorsUtils.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/ManipulatorsUtils.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/PlacementValidity.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/PlacementValidity.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/MenuOrder.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/MenuOrder.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables/ControlPlayableInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables/ControlPlayableInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties/AssemblyInfo.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties/AssemblyInfo.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/AnimationTrackRecorder.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/AnimationTrackRecorder.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecordingContextualResponder.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecordingContextualResponder.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_Monobehaviour.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_Monobehaviour.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_PlayableAsset.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_PlayableAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TrackAssetRecordingExtensions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TrackAssetRecordingExtensions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Shortcuts.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Shortcuts.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalAssetInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalAssetInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEventDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEventDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalManager.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalManager.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverHeader.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverHeader.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/Styles.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/Styles.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalListFactory.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalListFactory.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverItem.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverItem.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverTreeView.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverTreeView.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/ISequenceState.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/ISequenceState.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceHierarchy.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceHierarchy.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequencePath.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequencePath.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceState.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceState.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/WindowState.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/WindowState.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/common.uss create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/common.uss.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/dark.uss create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/dark.uss.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/light.uss create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/light.uss.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineActivation.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineActivation.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey@2x.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey@2x.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active@2x.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active@2x.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonDisabled.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonDisabled.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonEnabled.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonEnabled.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineContinue.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineContinue.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOff.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOff.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineDisabledBackground.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineDisabledBackground.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEndPlayback.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEndPlayback.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye@2x.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye@2x.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineHold.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineHold.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipIn.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipIn.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipOut.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipOut.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineInfiniteTrackNoShadow.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineInfiniteTrackNoShadow.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineKeyframe.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineKeyframe.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLoop.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLoop.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItem.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItem.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemCollapsed.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemCollapsed.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemSelected.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemSelected.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePingPong.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePingPong.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePlayRange.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePlayRange.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalCollapsed.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalCollapsed.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalSelected.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalSelected.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineStartPlayback.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineStartPlayback.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineTimeCursor.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineTimeCursor.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/Timeline-Marker-Warning-Overlay.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/Timeline-Marker-Warning-Overlay.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipBG.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipBG.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipFG.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipFG.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineDigIn.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineDigIn.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixOFF.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixOFF.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixON.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixON.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceOFF.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceOFF.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceON.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceON.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleOFF.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleOFF.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleON.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleON.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineHeaderMarkerIcon.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineHeaderMarkerIcon.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonDisabled.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonDisabled.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonEnabled.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonEnabled.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSelector.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSelector.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSignal.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSignal.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineDigIn.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineDigIn.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixOFF.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixOFF.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixON.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixON.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceOFF.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceOFF.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceON.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceON.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleOFF.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleOFF.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleON.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleON.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineHeaderMarkerIcon.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineHeaderMarkerIcon.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonDisabled.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonDisabled.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonEnabled.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonEnabled.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSelector.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSelector.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSignal.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSignal.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineActivation.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineActivation.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey@2x.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey@2x.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active@2x.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active@2x.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonDisabled.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonDisabled.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonEnabled.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonEnabled.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineContinue.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineContinue.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOff.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOff.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineDisabledBackground.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineDisabledBackground.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEndPlayback.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEndPlayback.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye@2x.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye@2x.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineHold.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineHold.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipIn.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipIn.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipOut.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipOut.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineInfiniteTrackNoShadow.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineInfiniteTrackNoShadow.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineKeyframe.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineKeyframe.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLoop.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLoop.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItem.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItem.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemCollapsed.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemCollapsed.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemSelected.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemSelected.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePingPong.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePingPong.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePlayRange.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePlayRange.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalCollapsed.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalCollapsed.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalSelected.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalSelected.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineStartPlayback.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineStartPlayback.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineTimeCursor.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineTimeCursor.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/Timeline-Marker-Multi-Overlay.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/Timeline-Marker-Multi-Overlay.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineBottomShadow.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineBottomShadow.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineConnector.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineConnector.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineDisplay.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineDisplay.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineGroupBackground.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineGroupBackground.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineOutline.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineOutline.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSeqEnd.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSeqEnd.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSwatch.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSwatch.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineWarning.png create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineWarning.png.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/HumanoidDefault.anim create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/HumanoidDefault.anim.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_DarkSkin.txt create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_DarkSkin.txt.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_LightSkin.txt create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_LightSkin.txt.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineHelpers.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineHelpers.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineSelection.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineSelection.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Trackhead.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Trackhead.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Unity.Timeline.Editor.asmdef create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Unity.Timeline.Editor.asmdef.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/UnityEditorInternals.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/UnityEditorInternals.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterCache.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterCache.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BindingUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BindingUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BreadcrumbDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BreadcrumbDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ClipModifier.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ClipModifier.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Clipboard.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Clipboard.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ControlPlayableUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ControlPlayableUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/DisplayNameHelper.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/DisplayNameHelper.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIColorOverride.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIColorOverride.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIGroupScope.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIGroupScope.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIMixedValueScope.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIMixedValueScope.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIViewportScope.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIViewportScope.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Graphics.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Graphics.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/KeyTraverser.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/KeyTraverser.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/MarkerModifier.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/MarkerModifier.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectExtension.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectExtension.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectReferenceField.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectReferenceField.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/PropertyCollector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/PropertyCollector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Range.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Range.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SequenceSelectorNameFormater.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SequenceSelectorNameFormater.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SpacePartitioner.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SpacePartitioner.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleManager.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleManager.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleNormalColorOverride.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleNormalColorOverride.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimeReferenceUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimeReferenceUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimelineKeyboardNavigation.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimelineKeyboardNavigation.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackModifier.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackModifier.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackResourceCache.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackResourceCache.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TypeUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TypeUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimeReferenceMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimeReferenceMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineActiveMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineActiveMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineAssetEditionMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineAssetEditionMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineDisabledMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineDisabledMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineInactiveMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineInactiveMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineReadOnlyMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineReadOnlyMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/PlaybackScroller.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/PlaybackScroller.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineMarkerHeaderGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineMarkerHeaderGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindowTimeControl.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindowTimeControl.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_ActiveTimeline.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_ActiveTimeline.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Breadcrumbs.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Breadcrumbs.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Duration.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Duration.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_EditorCallbacks.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_EditorCallbacks.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Gui.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Gui.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_HeaderGui.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_HeaderGui.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Manipulators.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Manipulators.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayRange.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayRange.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PreviewPlayMode.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PreviewPlayMode.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Selection.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Selection.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_StateChange.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_StateChange.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeArea.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeArea.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeCursor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeCursor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TrackGui.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TrackGui.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/ScriptableObjectViewPrefs.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/ScriptableObjectViewPrefs.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineAssetViewModel.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineAssetViewModel.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineWindowViewPrefs.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineWindowViewPrefs.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/WindowConstants.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/WindowConstants.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationPlayableAssetInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationPlayableAssetInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationTrackInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationTrackInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BasicAssetInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BasicAssetInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BuiltInCurvePresets.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BuiltInCurvePresets.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorCurveEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorCurveEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorSelectionInfo.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorSelectionInfo.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/CurvesOwnerInspectorHelper.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/CurvesOwnerInspectorHelper.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/ICurvesOwnerInspectorWrapper.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/ICurvesOwnerInspectorWrapper.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/DirectorNamedColorInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/DirectorNamedColorInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClip.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClip.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClipFactory.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClipFactory.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/GroupTrackInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/GroupTrackInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/MarkerInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/MarkerInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimeFieldDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimeFieldDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineInspectorUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineInspectorUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TrackAssetInspector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TrackAssetInspector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/AnimationTrackKeyDataSource.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/AnimationTrackKeyDataSource.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Control.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Control.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/AnimationTrackDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/AnimationTrackDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/ClipDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/ClipDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/InfiniteTrackDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/InfiniteTrackDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ItemsLayer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ItemsLayer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/MarkersLayer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/MarkersLayer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackItemsDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackItemsDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IPropertyKeyDataSource.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IPropertyKeyDataSource.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IRowGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IRowGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/InlineCurveEditor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/InlineCurveEditor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/ISelectable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/ISelectable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineClipGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineClipGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineItemGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineItemGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerClusterGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerClusterGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsClips.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsClips.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTimeline.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTimeline.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTracks.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTracks.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/PickerUtils.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/PickerUtils.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/IAttractable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/IAttractable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/ISnappable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/ISnappable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/SnapEngine.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/SnapEngine.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipHandle.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipHandle.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipUnion.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipUnion.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDataSource.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDataSource.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDragging.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDragging.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineGroupGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineGroupGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackBaseGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackBaseGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackErrorGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackErrorGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeView.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeView.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeViewGUI.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeViewGUI.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TrackPropertyCurvesDataSource.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TrackPropertyCurvesDataSource.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/LICENSE.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/LICENSE.md.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/README.md create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/README.md.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationMixerPlayable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationMixerPlayable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationPlayableAsset.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationPlayableAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationTrack.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationTrack.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationOutputWeightProcessor.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationOutputWeightProcessor.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPlayableAsset.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPlayableAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPreviewUpdateCallback.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPreviewUpdateCallback.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationTrack.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationTrack.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/ICurvesOwner.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/ICurvesOwner.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationPlayableAssetUpgrade.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationPlayableAssetUpgrade.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationTrackUpgrade.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationTrackUpgrade.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/ClipUpgrade.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/ClipUpgrade.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TimelineUpgrade.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TimelineUpgrade.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TrackUpgrade.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TrackUpgrade.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes/TrackColorAttribute.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes/TrackColorAttribute.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioClipProperties.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioClipProperties.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioMixerProperties.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioMixerProperties.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioPlayableAsset.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioPlayableAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioTrack.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioTrack.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ClipCaps.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ClipCaps.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlPlayableAsset.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlPlayableAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlTrack.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlTrack.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/DiscreteTime.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/DiscreteTime.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/InfiniteRuntimeClip.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/InfiniteRuntimeClip.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/IntervalTree.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/IntervalTree.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClip.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClip.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClipBase.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClipBase.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeElement.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeElement.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/ScheduleRuntimeClip.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/ScheduleRuntimeClip.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/IMarker.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/IMarker.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/INotificationOptionProvider.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/INotificationOptionProvider.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Marker.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Marker.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerList.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerList.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerTrack.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerTrack.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/SignalTrack.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/SignalTrack.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/CustomSignalEventDrawer.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/CustomSignalEventDrawer.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalAsset.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalEmitter.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalEmitter.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalReceiver.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalReceiver.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/GroupTrack.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/GroupTrack.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ILayerable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ILayerable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ActivationControlPlayable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ActivationControlPlayable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/DirectorControlPlayable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/DirectorControlPlayable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ITimeControl.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ITimeControl.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/NotificationFlags.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/NotificationFlags.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ParticleControlPlayable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ParticleControlPlayable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/PrefabControlPlayable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/PrefabControlPlayable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeControlPlayable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeControlPlayable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeNotificationBehaviour.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeNotificationBehaviour.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties/AssemblyInfo.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties/AssemblyInfo.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting/PlayableTrack.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting/PlayableTrack.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Timeline.deprecated.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Timeline.deprecated.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset_CreateRemove.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset_CreateRemove.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAttributes.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAttributes.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineClip.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineClip.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelinePlayable.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelinePlayable.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TrackAsset.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TrackAsset.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Unity.Timeline.asmdef create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Unity.Timeline.asmdef.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimationPreviewUtilities.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimationPreviewUtilities.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimatorBindingCache.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimatorBindingCache.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/Extrapolation.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/Extrapolation.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/HashUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/HashUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyCollector.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyCollector.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyPreview.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyPreview.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/NotificationUtilities.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/NotificationUtilities.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimeUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimeUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineCreateUtilities.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineCreateUtilities.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineUndo.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineUndo.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/WeightUtility.cs create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/WeightUtility.cs.meta create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/package.json create mode 100644 Library/PackageCache/com.unity.timeline@1.2.13/package.json.meta (limited to 'Library/PackageCache/com.unity.timeline@1.2.13') diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/CHANGELOG.md b/Library/PackageCache/com.unity.timeline@1.2.13/CHANGELOG.md new file mode 100644 index 0000000..7659f54 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/CHANGELOG.md @@ -0,0 +1,256 @@ +# Changelog +All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) + +## [1.2.13] - 2020-02-24 + +### Fixed +- Fixed Performance issue where Control Tracks would resimulate during the tail of a non-looping particle clip. ([1216702](https://issuetracker.unity3d.com/product/unity/issues/guid/1216702/)) +- Fixed adjacent recording clips highlighting the wrong clip. ([1210312](https://issuetracker.unity3d.com/product/unity/issues/guid/1210312/)) +- Fixed timescale drawing to only draw visible lines which avoids a hang with very large clips. ([1213189](https://issuetracker.unity3d.com/product/unity/issues/guid/1213189/)) +- Fixed `SignalReceiver.ChangeSignalAtIndex` incorrectly throwing exception when multiple entries are set to null. ([1210877](https://issuetracker.unity3d.com/product/unity/issues/guid/1210877/)) +- Fixed a memory leak with Animation Clips in Edit mode. +- Fixed issue where changes to a Signal Receiver component in a prefab were reverted. ([1210883](https://issuetracker.unity3d.com/product/unity/issues/guid/1210883/)) +- Fixed avatar mask reassignment not causing immediate re-evaluation. ([1219326](https://issuetracker.unity3d.com/product/unity/issues/guid/1219326/)) +- Fixed issues related to recursive control tracks. (1178423) +- Fixed issue where using the `HideInMenu` attribute in combination with a class inheriting from `Marker` would not hide the marker from the Timeline context menus. ([1221054](https://issuetracker.unity3d.com/product/unity/issues/guid/1221054/)) + +## [1.2.12] - 2020-02-21 + +### Fixed +- Fixed issue where the curves view would change its framing when moving a clip. ([1217353](https://issuetracker.unity3d.com/product/unity/issues/guid/1217353/)) + +## [1.2.11] - 2020-01-22 + +### Fixed +- Fixed Control Track inspector dropdown not opening. ([1208943](https://issuetracker.unity3d.com/product/unity/issues/guid/1208943/)) +- Fixed issue where applying the Match content command on subtimeline clip with a newly created subtimeline with no duration makes the clip disappear. ([1203662](https://issuetracker.unity3d.com/product/unity/issues/guid/1203662/)) +- Fixed issue where the opened timeline is changed to another timeline when switching focus from Unity to a different application. ([1087348](https://issuetracker.unity3d.com/product/unity/issues/guid/1087348/)) +- Fixed issue where the keys in the inline curves view were incorrectly positioned ([1205835](https://issuetracker.unity3d.com/product/unity/issues/guid/1205835/)) + +### Changed +- ControlPlayableAsset.searchHierarchy (a.k.a. Control Children) now defaults to false. + +## [1.2.10] - 2019-12-08 + +### Fixed +- Fixed issue where object selectors on tracks did not show bound objects. (1202853) +- Fixing inspector blend graph display for animation clips. (1201474) +- Fixed Timeline Window lock state when restarting Unity and no timeline are selected. ([1201405](https://issuetracker.unity3d.com/product/unity/issues/guid/1201405/)) + +## [1.2.9] - 2019-12-06 + +### Fixed +- Added missing high-resolution icons for Personal Skin. + +## [1.2.8] - 2019-11-21 + +### Fixed +- Fixed issue where recording couldn't be turned on for override tracks. (1199389) +- Fixed overlay bug when panning. (1198348) +- Fixed Foot IK being applied in Editor when option is disabled. ([1197426](https://issuetracker.unity3d.com/product/unity/issues/guid/1197426/)) +- Fixed issue where the Animation Track's inline curves were not properly aligned when panning the timeline. (1198364) + +## [1.2.7] - 2019-11-15 + +### Fixed +- Fixed inline curves to display PlayableBehaviour array properties. (1178251) +- Fixed clip selection from playhead. (1187495) +- Fixed recorded clips dirtying the scene on copy/paste. (1181492) + +## [1.2.6] - 2019-10-25 + +### Added +- Added Timeline manual. + +## [1.2.5] - 2019-10-16 + +### Changed +- Added tooltips that were missing for Timeline selector and settings buttons. ([1152790](https://issuetracker.unity3d.com/product/unity/issues/guid/1152790/)) +- Removed Undo menu entry that was added when clicking on the Inline curves button. ([1187402](https://issuetracker.unity3d.com/product/unity/issues/guid/1187402/)) + +### Fixed +- Fixed issue where recording couldn't be turned off when an object is deactivated. (1187174) +- Timelines listed in the Timeline selector will now be sorted alphabetically. (1190514) +- Fixed Insert Frames options from Trackhead context menu not applying to markers. (1187895) +- Fixed incorrect display when a large number of nested group tracks was added to a Timeline. (1157367) + +## [1.2.4] - 2019-10-03 + +### Changed +- Properties in the Inline Curve editor will now be listed in the same order as the Animation window. (1184058) +- Updated the appearance of the Timeline window to conform to the [editor's UX redesign](https://blogs.unity3d.com/2019/08/29/evolving-the-unity-editor-ux/) +- Improved the appearance of clip blends. + +### Fixed +- Adding a PlayableDirector with no Playable Asset will no longer trigger a repaint of the Timeline Window on each frame. ([1172707](https://issuetracker.unity3d.com/product/unity/issues/guid/1172707/)) +- Fixed issue where a clip's blend selection border was not drawn correctly when there was a previous clip. (1178173) +- Fixed issue where Animation Events were fired twice when the Playable Director Wrap mode is set to Loop. ([1173281](https://issuetracker.unity3d.com/product/unity/issues/guid/1173281/)) +- Fixed issue where double-clicking on a Timeline Asset would not open it in the Timeline window. ([1182159](https://issuetracker.unity3d.com/product/unity/issues/guid/1182159)) +- Fixed issue where the paste shortcut would not work when copying and pasting between two different timelines. (1184967) +- Fixed audio stutter when going into playmode. ([1167289](https://issuetracker.unity3d.com/product/unity/issues/guid/1167289/)) +- Fixed PreviousFrame and NextFrame controls in subtimelines with large offsets. (1175320) +- Fixed issue where exceptions were thrown when resetting a Signal Receiver component. ([1158227](https://issuetracker.unity3d.com/product/unity/issues/guid/1158227/)) +- Increased font size of clip labels (1179642) + +## [1.2.3] - 2019-10-03 + +### Fixed +- Removed unnecessary directories from the package. + +## [1.2.2] - 2019-08-20 + +### Fixed +- Fixed issue where fields for custom clips were not responding to Add Key commands. (1174416) +- Fixed issue where a different track's bound GameObject is highlighted when clicking a track's bound GameObject box. (1141836) +- Fixed issue where a clip locks to the playhead's position when moving it. (1157280) + +## [1.2.1] - 2019-08-01 + +### Fixed +- Fixed appearance of a selected clip's border. +- Fixed non-transform properties from AnimationClips not being correctly put into preview mode when the avatar root does not contain the animator component. ([1162334](https://issuetracker.unity3d.com/product/unity/issues/guid/1162334/)) +- Fixed an issue where the context menu for inline curves keys would not open on MacOS. ([1158584](https://issuetracker.unity3d.com/product/unity/issues/guid/1158584/)) +- Fixed recording state being incorrect after toggling preview mode (1146551) +- Fixed copying clips without ExposedReferences causing the scene to dirty (1144469) + +## [1.2.0] - 2019-07-16 +*Compatible with Unity 2019.3* + +### Added +- Added ILayerable interface. Implementing this interface on a custom track will enable support for multiple layers, similar to the AnimationTracks override tracks. +- Added "Pan" autoscrolling option in the Timeline window. +- Enabled rectangle tool for inline curves. + +### Changed +- Scrolling horizontally with the mouse wheel or trackpad now pans the timeline view horizontally, instead of zooming. +- Scrolling vertically with the mouse wheel or trackpad on the track headers or on the vertical scroll bar now pans the timeline view vertically, instead of zooming. + +### Fixed +- Fixed an issue causing info text to overlap when displaying multiple lines (1150863). +- Fixed duration mode not reverting from "Fixed Length" to "Based On Clips" properly. (1154034) +- Fixed playrange markers being drawn over horizontal scrollbar (1156023) +- Fixed an issue where a hotkey does not autofit all when Marker is present (1158704) +- Fixed an issue where an exception was thrown when overwriting a Signal Asset through the Signal Emitter inspector. (1152202) +- Fixed Control Tracks not updating instances when source prefab change. (case 1158592) +- An exception will be thrown when calling TrackAsset.CreateMarker() with a marker that implements INotification if the track does not support notifications. (1150248) +- Fixed preview mode being reenabled when warnings change on tracks. (case 1151381) +- Fixed minimum clip duration to be frame aligned. (case 1156602) +- Fixed playhead being moved when applying undo while recording.(case 1154802) +- Fixed warnings about localEulerAnglesRaw when using RectTransform. (case 1151100) +- Fixed precision error on the duration of infinite tracks. (case 1156723) +- Fixed issue where two GatherProperties call were made when switching between two PlayableDirectors. (1159036) +- Fixed issue where inspectors for clips, tracks and markers would get incorrectly displayed when no Timeline Window is opened. (1158242, 1158283) +- Fixed issue with clip connectors that were incorrectly drawn when the timeline was panned or zoomed. (1141960) +- Fixed issue where evaluating a Playable Graph inside a Notification Receiver would cause an infinite recursion. ([1149930](https://issuetracker.unity3d.com/product/unity/issues/guid/1149930/)) +- Fixed Trim and Move operations to ensure playable duration is updated upon completion. ([1151894](https://issuetracker.unity3d.com/product/unity/issues/guid/1151894/)) +- Fixed options menu icon that was blurry on high-dpi screens. (1154623) +- Track binding field is now larger. (1153446) +- Fixed issue where an empty Timeline window would create new objects on each repaint. (1142894) +- Fixed an issue causing info text to overlap when displaying multiple lines (when trimming + time scaling, for example). (1150863) +- Fixed duration mode not reverting from "Fixed Length" to "Based On Clips" properly. ([1154034](https://issuetracker.unity3d.com/product/unity/issues/guid/1154034/)) +- Prevented the PlayableGraph from being created twice when playing a timeline in play mode with the Timeline window opened. (1147247) +- Fixed issue where an exception was thrown when clicking on a SignalEmitter with the Timeline window in asset mode. (1146261) +- A timeline will now be played correctly when building a player with Mono and Managed Stripping Level set higher than Low. ([1133182](https://issuetracker.unity3d.com/product/unity/issues/guid/1133182/)) +- The Signal Asset creation dialog will no longer throw exceptions when canceled on macOS. ([1141959](https://issuetracker.unity3d.com/product/unity/issues/guid/1141959/)) +- Fixed issue where the Emit Signal property on a Signal Emitter would not get saved correctly. ([1148709](https://issuetracker.unity3d.com/product/unity/issues/guid/1148709/)) +- Fixed issue where a Signal Emitter placed at the start of a timeline would be fired twice. ([1149653](https://issuetracker.unity3d.com/product/unity/issues/guid/1149653/)) +- Fixed record button state not updating when offset modes are changed. ([1142747](https://issuetracker.unity3d.com/product/unity/issues/guid/1142747/)) +- Cleared invalid assets from the Timeline Clipboard when going into or out of PlayMode. (1144473) +- Copying a Control Clip during play mode no longer throws exceptions. (1141581) +- Going to Play Mode while inspecting a Track Asset will no longer throw exceptions. (1141958) +- Resizing Timeline's window no longer affects the zoom value. ([1147150](https://issuetracker.unity3d.com/product/unity/issues/guid/1147150/)) +- Snap relaxing now responds to Command on Mac, instead of Control. (1149144) +- Clips will no longer randomly disappear when showing or hiding inline curves. (1141661) +- The global/local time referential button will no longer be shown for a top-level timeline. (1080872) +- Playhead will not be drawn above the bottom scrollbar anymore. (1134016) +- Fixed moving a marker on an Infinite Track will keep the track in infinite mode (1141190) +- Fixed zooming in/out will keep the padding at the beginning of the timeline (1030689) +- Fixed marker UI is the same color and size on infinite track (1139370) +- Fixed Disable the possibility to add Markers to tracks of a Timeline that is ReadOnly (1134463) +- Fixed wrong context menu being shown when right-clicking a marker (1133592) +- Fixed creation of override track to work with multiselection (1133592) + +## [1.1.0] - 2019-02-14 +*Compatible with Unity 2019.2* +### Added +- ClipEditor, TrackEditor and MarkerEditor classes users can derive from to control visual appearance of custom timeline clips, tracks and markers using the CustomTimelineEditor attribute. +- ClipEditor.GetSubTimelines to allow user created clips that support sub-timelines in editor +- TimelineEditor.selectedClip and TimelineEditor.selectedClips to set and retrieve the currently selected timeline clips +- IPropertyCollector.AddFromName override that takes a component. +- Warning icons to SignalEmitters when they do not reference an asset +- Ability to mute/unmute a Group Track. +- Mute/Unmute only selected track command added for tracks with multiple layers. +- Animate-able Properties on Tracks and Clips can now be edited through inline curves. +- Added loop override on AnimationTrack clips (1140766) +- ReadOnly/Source Control Lock support for Timeline Scene + +### Changed +- Control Track display to show a particle system icon when particle systems are being controlled +- Animate-able Properties for clips are no longer edited using by "recording"; they are edited through the inline curves just like tracks. +- AudioTrack properties can now be animated through inline curves. +- Changed Marker show/hide to be undoable. Hide will also unselect markers. (1124661) +- Changed SignalReceivers show their enabled state in the inspector. (1131163) +- Changed Track Context Menu to show "Add Signal Emitter" at the top of the list of Marker commands. (1131166) +- Moved "Add Signal Emitter" and "Add Signal Emitter From Asset" commands out of their sub-menu. (1131166) + +### Fixed +- Fixed markers being drawn outside their pane. (1124381) +- Fixed non-public tracks not being recognized by the Timeline Editor. (1122803) +- Fixed keyboard shortcuts for _Frame All_ (default: A) and _Frame Selected_ (default: F) to also apply horizontally ([1126623](https://issuetracker.unity3d.com/product/unity/issues/guid/1126623/)) +- Fixed recording getting disabled when selecting a different GameObject while the Timeline Window is not locked. (1123119) +- Fixed time sync between Animation and Timeline windows when clips have non-default timescale or clip-in values. ([930909](https://issuetracker.unity3d.com/product/unity/issues/guid/930909/)) +- Fixed animation window link not releasing when deleting the timeline asset. (1127425) +- Fixed an exception being raised when selecting both a Track marker and a Timeline marker at the same time. ([1113006](https://issuetracker.unity3d.com/product/unity/issues/guid/1113006/)) +- Fixed the header marker area will so it no longer opens its context menu if it's hidden. (1124351) +- Fixed Signal emitters to show the Signals list when created on override tracks. (1102913) +- Fixed a crash on IL2CPP platforms when the VideoPlayer component is not used. (1129572) +- Fixed Timeline Duration changes in editor not being undoable. (1109279) +- Fixed _Match Offsets_ commands causing improper animation defaults to be applied. (911678) +- Fixed Timeline Inspectors leaving _EditorGUI.showMixedValue_ in the wrong state. ([1123895](https://issuetracker.unity3d.com/product/unity/issues/guid/1123895/)) +- Fixed issue where performing undo after moving items on multiple tracks would not undo some items. (1131071) +- Fixed cog icon in the Signal Receiver inspector being blurry. (1130320) +- Fixed Timeline marker track hamburger icon not being centered vertically. (1131112) +- Fixed detection of signal receivers when track is in a group. (1131811) +- Fixed exception being thrown when deleting Signal entries. (1131065) +- Fixed Markers blocking against Clips when moving both Clips and Markers in Ripple mode. (1102594) +- Fixed NullReferenceException being thrown when muting an empty marker track. (1131106) +- Fixed SignalEmitter Inspector losing the Receiver UI when it is locked and another object is selected. (1116041) +- Fixed Marker and Clip appearing to be allowed to move to another track in Ripple mode. (1131123) +- Fixed issue where the Signal Emitter inspector did not show the Signal Receiver UI when placed on the timeline marker track. (1131811) +- Fixed Replace mode not drawing clips when moved together with a Marker. (1132605) +- Fixed inline curves to retain their state when performing undo/redo or keying from the inspector. ([1125443](https://issuetracker.unity3d.com/product/unity/issues/guid/1125443)) +- Fixed an issue preventing Timeline from entering preview mode when an Audio Track is present an a full assembly reload is performed. (1132243) +- Fixed an issue where the Marker context menu would show a superfluous line at the bottom. (1132662) +- Fixed an issue preventing Timeline asset to be removed from a locked Timeline Window when a new scene is loaded. (1135073) +- Fixed EaseIn/Out shortcut for clips + +## [1.0.0] - 2019-01-28 +*Compatible with Unity 2019.1* +### Added +- This is the first release of Timeline, as a Package +- Added API calls to access all AnimationClips used by Timeline. +- Added support in the runtime API to Animate Properties used by template-style PlayableBehaviours used as Mixers. +- Added Markers. Markers are abstract types that represent a single point in time. +- Added Signal Emitters and Signal Assets. Signal Emitters are markers that send a notification, indicated by a SignalAsset, to a GameObject indicating an event has occurred during playback of the Timeline. +- Added Signal Receiver Components. Signal Receivers are MonoBehaviour that listen for Signals from Timeline and respond by invoking UnityEvents. +- Added Signal Tracks. Signal Tracks are Timeline Tracks that are used only for Signal Emitters. + +### Fixed +- Signal Receiver will no longer throw exceptions when its inspector is locked ([1114526](https://issuetracker.unity3d.com/product/unity/issues/guid/1114526/)) +- Context menu operations will now be applied on all selected tracks (1089820) +- Clip edit mode clutch keys will not get stuck when holding multiple keys at the same time (1097216) +- Marker inspector will be disabled when the marker is collapsed (1102860) +- Clip inspector will no longer throw exceptions when changing values when the inspector is locked (1115984) +- Fixed appearance of muted tracks (1018643) +- Fixed multiple issues where clips and markers were selectable when located under the time ruler and the marker header track ([1117925](https://issuetracker.unity3d.com/product/unity/issues/guid/1117925/), 1102598) +- A marker aligned with the edge of a clip is now easier to select (1102591) +- Changed behaviour of the Timeline Window to apply modifications immediately during Playmode ([922846](https://issuetracker.unity3d.com/product/unity/issues/guid/922846/), 1111908) +- PlayableDirector.played event is now called after entering or exiting Playmode ([1088918](https://issuetracker.unity3d.com/product/unity/issues/guid/1088918/)) +- Undoing a paste track operation in a group will no longer corrupt the timeline (1116052) +- The correct context menu will now be displayed on the marker header track (1120857) +- Fixed an issue where a circular reference warning appeared in the Control Clip inspector even if there was no circular reference (1116520) +- Fixed preview mode when animation clips with root curves are used (case 1116297, case 1116007) +- Added option to disable foot IK on animation playable assets (case 1115652) +- Fixed unevaluated animation tracks causing default pose (case 1109118) +- Fixed drawing of Group Tracks when header is off-screen (case 876340) +- Fixed drag and drop of objects inside a group being inserted outside (case 1011381, case 1014774) diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/CHANGELOG.md.meta b/Library/PackageCache/com.unity.timeline@1.2.13/CHANGELOG.md.meta new file mode 100644 index 0000000..6ecb3ea --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4a0757ee0236f39489520769ae710288 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/TableOfContents.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/TableOfContents.md new file mode 100644 index 0000000..ef03bf2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/TableOfContents.md @@ -0,0 +1,68 @@ +* [About Timeline](index.md) + * [Timeline overview](tl_about.md) + * [Using the Timeline window](wf_about.md) + * [Creating a Timeline Asset and Timeline instance](wf_instance.md) + * [Recording basic animation with an Infinite clip](wf_rec_anim.md) + * [Converting an Infinite clip to an Animation clip](wf_conv_infinite.md) + * [Animating a humanoid](wf_char_anim.md) + * [Using an Animation Override track and Avatar masking](wf_mask.md) + * [Nesting Timeline instances](wf_nested.md) + * [Timeline window](tl_window.md) + * [Timeline Preview and Timeline Selector](tl_selector.md) + * [Timeline Playback Controls](tl_play_cntrls.md) + * [Track List and Track Headers](trk_list_about.md) + * [Adding Tracks](trk_add.md) + * [Selecting Tracks](trk_select.md) + * [Duplicating Tracks](trk_dup.md) + * [Deleting Tracks](trk_delete.md) + * [Locking Tracks](trk_lock.md) + * [Muting Tracks](trk_mute.md) + * [Reordering Tracks and Rendering Priority](trk_reorder.md) + * [Using Track Groups](grp_use.md) + * [Collapsing and Expanding Track Groups](grp_hide.md) + * [Locking Track groups](grp_lock.md) + * [Clip Edit modes and the Clips view](clp_about.md) + * [Panning and Zooming the Clips View](clp_pan_zoom.md) + * [Adding Clips](clp_add.md) + * [Inserting Clips](clp_insert.md) + * [Selecting Clips](clp_select.md) + * [Positioning Clips](clp_position.md) + * [Tiling Clips](clp_tile.md) + * [Duplicating Clips](clp_dup.md) + * [Trimming Clips](clp_trim.md) + * [Splitting Clips](clp_split.md) + * [Resetting Clips](clp_reset.md) + * [Changing Clip Play Speed](clp_speed.md) + * [Setting Gap Extrapolation](clp_gap_extrap.md) + * [Easing-in and Easing-out Clips](clp_ease.md) + * [Blending Clips](clp_blend.md) + * [Matching clip offsets](clp_match.md) + * [Curves View](crv_about.md) + * [Hiding and Showing Curves](crv_hide.md) + * [Navigating the Curves View](crv_nav.md) + * [Selecting Keys](crv_keys_sel.md) + * [Adding Keys](crv_keys_add.md) + * [Editing Keys](crv_keys_edit.md) + * [Changing Interpolation and Shape](crv_keys_interp.md) + * [Deleting Keys](crv_keys_del.md) + * [Timeline Settings](tl_settings.md) + * [Timeline Inspector](insp_about.md) + * [Setting Timeline Properties](insp_tl.md) + * [Setting Track Properties](insp_trk.md) + * [Activation Track Properties](insp_trk_act.md) + * [Animation Track Properties](insp_trk_anim.md) + * [Setting Clip Properties](insp_clp.md) + * [Activation Clip Properties](insp_clp_act.md) + * [Animation Clip Common Properties](insp_clp_anim_com.md) + * [Animation Clip Playable Asset Properties](insp_clp_anim_plyb.md) + * [Audio Clip Properties](insp_clp_aud.md) + * [Control Clip Common Properties](insp_clp_ctrl_com.md) + * [Control Clip Playable Asset Properties](insp_clp_ctrl_plyb.md) + * [Playable Director Component](play_director.md) + * [Timeline Glossary](tl_gloss.md) + + + + + + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_about.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_about.md new file mode 100644 index 0000000..5149c34 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_about.md @@ -0,0 +1,101 @@ +# Clip Edit modes and the Clips view + +Use the Clips view to add, position, and manipulate clips on each track in the Track list. The selected Clip Edit mode determines how clips interact when you add, move, or delete them. + +![The Clip Edit modes (green) and the Clips view (red)](images/timeline_clips_view.png) + +_The Clip Edit modes (green) and the Clips view (red)_ + +## Clips and the Clips view + +In the Clips view, each clip has a colored accent line that identifies the type of clip: + +* Activation clips are green. +* Animation clips are blue. +* Audio clips are orange. +* Control clips are turquoise. +* Playable clips are white. + +A clip based on data, such as an Animation clip or an Audio clip, displays arrows that indicate when the clip has been trimmed to exclude part of its source animation, waveform, or other data. For example, if an Animation clip uses only part of its full key animation, white arrows indicate that key animation exists before the start or after the end of the clip. + +![Small arrows (circled) indicate that data exists before the start or after the end of the area defined by the clip](images/timeline_clips_arrows.png) + +_Small arrows (circled) indicate that data exists before the start or after the end of the area defined by the clip_ + +To resize a clip and view its hidden data, either right-click the clip and select **Match Content** from the context menu, or select the clip and modify its clip timing properties in the Inspector window. When you resize a clip, the selected Clip Edit mode determines how the surrounding clips are affected. + +## Clip Edit modes + +Select a Clip Edit mode to choose how clips are added, positioned, and trimmed within the Clips view, or when modifying clip timing properties in the Inspector window. There are three Clip Edit modes that affect most clip editing features: Mix mode (default), Ripple mode, and Replace mode. + +![Clip Edit modes are Mix (default and selected), Ripple, and Replace mode](images/timeline_zoomed_clip_edit_modes.png) + +_Clip Edit modes are Mix (default and selected), Ripple, and Replace mode_ + +You can also temporarily switch between Clip Edit modes. This is useful if, for example, you want to temporarily use Ripple mode to offset the content of a track while you position clips. To temporarily switch between Clip Edit modes, hold down the following keyboard keys: + +* Hold 1 to temporarily switch to Mix mode. +* Hold 2 to temporarily switch to Ripple mode. +* Hold 3 to temporarily switch to Replace mode. + +### Mix mode + +Use Mix mode to add, position, and trim clips without moving or replacing adjacent clips. Mix mode creates blends between intersecting clips. Mix mode is the default Clip Edit mode. + +![Timeline window with Mix mode as the selected Clip Edit mode. The position cursor (circled) indicates where you drag to position the clip.](images/timeline_mix_mode_position_cursor.png) + +_Timeline window with Mix mode as the selected Clip Edit mode. The position cursor (circled) indicates where you drag to position the clip._ + +In Mix mode, when you hover over a selected clip in the Clips view, the cursor changes to indicate the action that you can perform. The action depends on the part of the clip that you hover over: + +* When you hover over the start of a selected clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the start of the clip. +* When you hover over the middle of a selected clip, the cursor changes to a position cursor and indicates the area to drag to position the clip. +* When you hover over the end of a selected clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the end of the clip. + +In Mix mode, if you drag to trim or position a clip and it intersects another clip, the cursor changes to a white arrow that points towards the blend being created. There are three possible cursors depending on whether the blend is created at the beginning of the clip, at the end of the clip, or at both the beginning and end of the clip. + +![The white arrow cursor indicates that dragging Clip 2A to the right creates a blend, at the end of the clip, between Clip 2A and Clip 2B.](images/timeline_mix_mode_blend_arrow.png) + +_The white arrow cursor indicates that dragging Clip 2A to the right creates a blend, at the end of the clip, between Clip 2A and Clip 2B._ + +### Ripple mode + +Use Ripple mode to add, position, and trim a clip while affecting the subsequent clips on the same track. Positioning or trimming clips in Ripple mode preserves the gaps between subsequent clips. + +![Timeline window with Ripple mode as the selected Clip Edit mode. The position cursor (circled) indicates where you drag to position the clip.](images/timeline_ripple_mode.png) + +_Timeline window with Ripple mode as the selected Clip Edit mode. The position cursor (circled) indicates where you drag to position the clip._ + +In Ripple mode, when you hover over a selected clip in the Clips view, the cursor changes to indicate the action that you can perform. The actions and areas are similar to Mix mode: + +* When you hover over the start of a selected clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the clip relative to its start. +* When you hover over the middle of a clip, the cursor changes to a position cursor and indicates the area to drag to position the clip. +* When you hover over the end of a clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the clip relative to its end. + +In Ripple mode, when you click and drag to trim or position a clip, the cursor switches to a yellow arrow that points towards the affected clips and gaps. A yellow line indicates the ripple point. When you drag to trim a clip, dragging left and right changes the duration of the selected clip and repositions subsequent clips and gaps after the ripple point. + +![For example, the yellow arrow cursor indicates that trimming the start of Clip 2A in Ripple mode changes the clip duration and affects the clips and gaps after the ripple point: Clip 2B and Clip 2C.](images/timeline_ripple_mode_yellow_arrow.png) + +_For example, the yellow arrow cursor indicates that trimming the start of Clip 2A in Ripple mode changes the clip duration and affects the clips and gaps after the ripple point: Clip 2B and Clip 2C.]_ + +### Replace mode + +Use Replace mode to add, position, and trim a clip while cutting or replacing intersecting clips. + +![Timeline window with Replace mode as the selected Clip Edit mode. The position cursor (circled) indicates where you drag to position the clip.](images/timeline_replace_mode.png) + +_Timeline window with Replace mode as the selected Clip Edit mode. The position cursor (circled) indicates where you drag to position the clip._ + +In Replace mode, when you hover over a selected clip in the Clips view, the cursor changes to indicate the action that you can perform. The actions and areas are similar to Mix mode: + +* When you hover over the start of a selected clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the clip relative to its start. +* When you hover over the middle of a clip, the cursor changes to a position cursor and indicates the area to drag to position the clip. +* When you hover over the end of a clip, the cursor changes to a trim cursor. The trim cursor indicates the area to drag to trim the clip relative to its end. + +In Replace mode, when you drag to position a clip, the clip becomes translucent so that you can view overlapping clips. If the clip being positioned overlaps other clips, the cursor changes to a red arrow and red replacement lines indicate where each overlap occurs. Releasing the clip cuts the underlying clip at each red overlap. + +![For example, the red arrow cursor indicates that dragging Clip 2A to the right overlaps Clip 2B. Releasing the clip cuts Clip 2B at the point where the overlap occurs.](images/timeline_replace_mode_red_cut.png) + +_For example, the red arrow cursor indicates that dragging Clip 2A to the right overlaps Clip 2B. Releasing the clip cuts Clip 2B at the point where the overlap occurs._ + +In Replace mode, trimming a clip is similar to positioning a clip. When you drag to trim a clip and it intersects another clip, the cursor changes to a red arrow and a red replacement line indicates where the overlap occurs. Releasing the trim cuts the intersecting clip at the red replacement line. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_add.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_add.md new file mode 100644 index 0000000..c4b15ca --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_add.md @@ -0,0 +1,21 @@ +# Adding clips + +The Timeline window supports different methods of adding clips to tracks, depending on the type of track, where you click, and whether a clip or track is already selected. + +The quickest method to add a clip is to right-click on an empty area within a track and select the appropriate Add option from the context menu. Depending on the track, the options for adding a clip change. + +![Context menu for adding an Activation clip](images/timeline_clips_view_adding.png) + +_Context menu for adding an Activation clip._ + +There are other ways to add clips: + +* Select a clip option from the Track menu in the Track Header to add a clip at the location of the Timeline Playhead. +* Drag an animation Source Asset from the Project window to an empty area in the Timeline window to automatically create an Animation track and add an Animation clip. +* Drag an animation Source Asset from the Project window to an existing track in the Timeline window to add an Animation clip to the same track. +* Drag an audio Source Asset from the Project window to an empty area in the Timeline window to automatically create an Audio track and add an Audio clip. +* Drag a GameObject with a PlayableDirector component to create a nested Timeline instance. This automatically creates a Control track and adds a Control clip for the nested Timeline instance. +* Drag a Prefab from the Project window to an empty area in the Timeline window to add a Prefab instance to your Timeline instance. This automatically creates a Control track and adds a Control clip for the Prefab instance. +* Drag a GameObject with a Particle component to add a particle effect to your Timeline instance. This automatically creates a Control track and adds a Control clip for the duration of the Particle effect. + +When you add a clip, the [selected Clip Edit mode](clp_about.md) determines how the added clip interacts with surrounding clips. For example, if you add an Animation clip or an Audio clip in Mix mode and the added clip intersects a clip on the same track, Timeline [creates a blend](clp_blend.md). diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_blend.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_blend.md new file mode 100644 index 0000000..916341d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_blend.md @@ -0,0 +1,37 @@ +# Blending clips + +Blend two clips on the same track to create a smooth transition between two Animation clips, two Audio clips, or two Playable clips. To blend two clips, select the Mix Clip Edit mode and position or trim one clip until it overlaps an adjacent clip. + +In a blend, the first clip is referred to as the **outgoing clip** and the second clip is referred to as the **incoming clip**. The area where the outgoing clip transitions to the incoming clip is referred to as the **blend area**. The blend area sets the duration of the transition. + +![The blend area shows the transition between the outgoing clip and incoming clip](images/timeline_clip_blend_area.png) + +_The blend area shows the transition between the outgoing clip and incoming clip_ + +Although the Clips view represents a blend area as a single linear curve, the transition between clips is actually comprised of two blend curves. The blend curve for the outgoing clip is referred to as the **Blend Out** curve. The blend curve for the incoming clip is referred to as the **Blend In** curve. By default, each blend curve is automatically set to an ease-in and ease-out curve. + +![Use Blend Curves to customize the blend area](images/timeline_inspector_blend_curves.png) + +_Use Blend Curves to customize the blend area_ + +Use the **Blend Curves** in the Inspector window to change the shape for either the Blend In or Blend Out curve of the selected clip. However, the Inspector window only allows you to edit the properties of one clip at a time. You cannot simultaneously customize both blend curves from the same blend area. + +To customize the **Blend Curves** for the transition between two clips: + +1. Select the outgoing clip to customize its Blend Out curve (labelled **Out**). +2. Select the incoming clip to customize its Blend In curve (labelled **In**). + +To customize either the Blend Out curve or Blend In curve, use the drop-down menu to switch from **Auto** to **Manual**. With **Manual** selected, the Inspector window shows a preview of the blend curve. Click the curve preview to open the Curve Editor below the Inspector window. + +![Select Manual and click the curve preview to open the Curve Editor](images/timeline_inspector_curve_editor.png) + +_Select Manual and click the curve preview to open the Curve Editor_ + +Use the Curve Editor to customize the shape of the blend curve. By default, the blend curve includes a key at the beginning of the curve and a key at the end of the curve. The Curve Editor provides the following different methods of modifying the blend curve: + +* Select the key at the start or end of the blend curve and use the tangent handles to adjust the interpolation between keys. +* Add additional keys to change the shape of the blend curve by adding more interpolation points. Adding keys in the Curve Editor is the same as [adding keys in the Curves view](crv_keys_add.md). +* Right-click a key to delete or edit the key. Editing keys in the Curve Editor is the same as [editing keys in the Curves view](crv_keys_edit.md). Note that you cannot delete the first and last keys. +* Select a shape template from the bottom of the Curve Editor. + +The Curve Editor also includes shape templates based on whether you are modifying the Blend In curve or the Blend Out curve. Select a shape template to change the blend curve to the selected shape template. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_dup.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_dup.md new file mode 100644 index 0000000..bf21ed0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_dup.md @@ -0,0 +1,24 @@ +# Duplicating clips + +There are many ways to duplicate clips in the Clips view: + +* Select a clip or multiple clips. Right-click in the Clips view and select **Duplicate** from the context menu. +* Select a clip or multiple clips. Hold Command/Control and press D. +* Right-click an unselected clip and choose **Duplicate** from the context menu. + +Duplicating clips copies each selected clip and places the duplicates after the last clip on the same track. If you duplicate clips used in a blend or clips separated by a gap, the blend or gap is also duplicated. + +If you duplicate an Animation clip that uses a recorded clip as its Source Asset, the recorded clip is also duplicated. The duplicate of the recorded clip only appears in your Project after you save the Scene or Project. For example, the following images demonstrates what happens if you duplicate an Animation clip named "Clip 2B" that uses the recorded clip named "Recorded (3)". + +![Select the"Clip 2B", hold Command/Control and press D to duplicate](images/timeline_clip_duplicate_clip_before.png) + +_Select the"Clip 2B", hold Command/Control and press D to duplicate_ + +![A duplicate Animation clip is placed at the end of the same track. The recorded clip associated with "Clip 2B" is also duplicated.](images/timeline_clip_duplicate_clip_after.png) + +_A duplicate Animation clip is placed at the end of the same track. The recorded clip associated with "Clip 2B" is also duplicated._ + +![The new "Recorded (6)" recorded clip appears in the Project window after you save the Scene or Project](images/timeline_clip_duplicate_project.png) + +_The new "Recorded (6)" recorded clip appears in the Project window after you save the Scene or Project_ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_ease.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_ease.md new file mode 100644 index 0000000..a643d66 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_ease.md @@ -0,0 +1,74 @@ +# Easing-in and easing-out clips + +Ease-in and ease-out a clip to create a smooth transition between a clip and its surrounding gaps. To create an ease-in or ease-out transition, select a clip and, in the Inspector window, set either the **Ease In Duration** or the **Ease Out Duration**. + +![Use Ease In Duration and Ease Out Duration to smoothly transition into and out of the selected clip.](images/timeline_inspector_ease_in_out.png) + +_Use Ease In Duration and Ease Out Duration to smoothly transition into and out of the selected clip._ + +Ease-in and ease-out transitions create different effects, depending on the track: + +* On an Animation track or an Animation Override track, ease-in to an Animation clip to create a smooth transition between the animation in the gap before the clip and the Animation clip. Ease-out of an Animation clip to create a smooth transition between the Animation clip and the animation in the gap after the clip. For information on the factors that determine what animation occurs in the gap before and after an Animation clip, see [Setting gap extrapolation](clp_gap_extrap.md). + +* On an Audio track, ease-in to an Audio clip to fade in the volume of the audio waveform. Ease-out of an Audio clip to fade out the volume of the audio waveform specified by the Audio clip. + +* On a Playable track, ease-In to a Playable clip to fade in the effect or script in the Playable clip. Ease-out of a Playable clip to fade out the effect or script in the Playable clip. + +![Ease-in and ease-out an Animation clip to transition between its animation and its gaps. Timeline represents ease-in and ease-out transitions as a linear curve.](images/timeline_clip_ease_in_out.png) + +_Ease-in and ease-out an Animation clip to transition between its animation and its gaps. Timeline represents ease-in and ease-out transitions as a linear curve._ + +Although the Clips view represents an ease-in or ease-out transition as a single linear curve, every ease-in or ease-out transition is actually set to a gradually easing-in or easing-out curve by default. To change the shape of either the ease-in curve (labelled **In**) or the ease-out (labelled **Out**) curve, use the **Blend Curves** in the Inspector window. + +![Use the Blend Curves to customize ease-in or ease-out transitions](images/timeline_inspector_blend_curves.png) + +_Use the Blend Curves to customize ease-in or ease-out transitions_ + +Note that the **Blend Curves** might affect the blend area used for blending between two clips. The **Ease In Duration** and **Ease Out Duration** properties indicate whether the **Blend Curves** affect an ease-in or ease-out transition, or a blend. For example, If the **Ease Out Duration** is editable, then the Blend Out curve (labelled **Out**) affects the curve used by an ease-out transition. If the **Ease Out Duration** is not editable, then the Blend Out curve (labelled **Out**) affects the outgoing clip in a blend between two clips. + +![Ease Out Duration is not editable, therefore the **Out** curve affects the blend area between two clips](images/timeline_inspector_ease_in_blend_out.png) + +_Ease Out Duration is not editable, therefore the **Out** curve affects the blend area between two clips_ + +To customize either the ease-in or ease-out transition, use the drop-down menu to switch from **Auto** to **Manual**. With **Manual** selected, the Inspector window shows a preview of the blend curve. Click the curve preview to open the Curve Editor below the Inspector window. + +![Select Manual and click the preview to open the Curve Editor](images/timeline_inspector_curve_editor.png) + +_Select Manual and click the preview to open the Curve Editor_ + +The Curve Editor is the same editor that is used to customize the shape of the blend curves when [blending between clips](clp_blend.md). + +When creating an ease-in or an ease-out transition with Animation clips, the Animation clip blends between its gaps and the Animation clip. The following factors affect the values of animated properties in the gaps surrounding an Animation clip: + +* The [pre-extrapolate and post-extrapolate settings](clp_gap_extrap.md) for the Animation clip and for other Animation clips on the same track. +* Animation clips on other Animation tracks that are bound to the same GameObject. +* The position or animation of the GameObject in the Scene, outside the Timeline Asset. + +## Gap extrapolation and easing clips + +To successfully ease-in or ease-out an Animation clip, gap extrapolation must not be set based on the Animation clip being eased-in or eased-out. Gap extrapolation must either be set to **None** or set by another Animation clip. + +For example, the following ease-in transition has no effect because the Pre-Extrapolate for the Victory_Dance clip is set to **Hold**. This means that the ease-in creates a transition between the first frame of the Animation clip and the rest of the Animation clip. + +![The gap is set to **Hold** from the Animation clip (circled). The ease-in transition has no effect.](images/timeline_clip_ease_in_bad_gap.png) + +_The gap is set to **Hold** from the Animation clip (circled). The ease-in transition has no effect._ + +![To ease-in from the Idle clip, set pre-extrapolate for the Victory_Dance clip to **None**. The ease-in gap uses the post-extrapolate mode from the Idle clip (circled).](images/timeline_clip_ease_in_good_gap.png) + +_To ease-in from the Idle clip, set pre-extrapolate for the Victory_Dance clip to **None**. The ease-in gap uses the post-extrapolate mode from the Idle clip (circled)._ + +## Overriding Animation tracks with ease-in and ease-out transitions + +Use two Animation tracks bound to the same GameObject to create a smooth transition between two Animation clips. + +For example, if two Animation tracks are bound to the same GameObject and a clip on the second track contains an ease-in transition, the ease-in transition creates a smooth transition between the animation on the previous track and the animation on the second track. + +![Example of using two Animation tracks, bound to the same GameObject, to create smooth transitions between Animation clips.](images/timeline_clip_ease_in_override_track.png) + +_Example of using two Animation tracks, bound to the same GameObject, to create smooth transitions between Animation clips._ + +In this example, the Animation clip on the first track is a repeated idle cycle where the humanoid GameObject stands still. The Animation clip in the second track eases-in the Victory_Dance motion and eases-out to return back to the idle cycle + +To successfully override animation on a previous track, the gap extrapolation for the second track must be set to **None** so that the animation data in the gap is taken from the previous track bound to the same GameObject. The ease-in and ease-out transitions use this animation data. + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_gap_extrap.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_gap_extrap.md new file mode 100644 index 0000000..767a868 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_gap_extrap.md @@ -0,0 +1,47 @@ +# Setting gap extrapolation + +Gap extrapolation refers to how an Animation track approximates animation data in the gaps before and after an Animation clip. + +The main purpose for extrapolating animation data in the gaps between Animation clips is to avoid animation anomalies. Depending on the GameObject bound to the Animation track, these anomalies could be a GameObject jumping between two transformations, or a humanoid jumping between different poses. + +Each Animation clip has two gap extrapolation properties: **Pre-Extrapolate**, which controls how animation data is approximated in the gap before an Animation clip, and **Post-Extrapolate**, which controls how animation data extends in the gap after an Animation clip. + +By default, Timeline sets both extrapolation properties to **Hold**. This sets the gap before the Animation clip to the animation on the first frame, and the gap after the Animation clip to the animation on the last frame. Each gap "holds" the animation at a certain frame. Icons before and after an Animation clip indicate the selected extrapolation modes. + +![Icons indicate the pre-extrapolate and post-extrapolate modes](images/timeline_gap_extrap_icons.png) + +_Icons indicate the pre-extrapolate and post-extrapolate modes_ + +When an Animation track contains a gap between two Animation clips, the **Post-Extrapolate** property of the left clip sets the gap extrapolation. If the **Post-Extrapolate** property of the clip to the left of a gap is set to **None**, the **Pre-Extrapolate** property of the right clip sets the gap extrapolation. Icons before and after Animation clips indicate whether the extrapolation for a gap is taken from the **Post-Extrapolate** property of the clip to the left or from the **Pre-Extrapolate** property of the clip to the right. + +![First track (red box): gap extrapolation from Post-Extrapolate of the left clip. Third track (blue box): gap extrapolation from Pre-Extrapolate of the right clip.](images/timeline_gap_extrap_two_tracks.png) + +_First track (red box): gap extrapolation from Post-Extrapolate of the left clip. Third track (blue box): gap extrapolation from Pre-Extrapolate of the right clip._ + +To change the Pre-Extrapolate and Post-Extrapolate properties, select the Animation clip and use the Animation Extrapolation properties in the Inspector window. + +![Use Pre-Extrapolate and Post-Extrapolate to set the extrapolation modes for the selected Animation clip](images/timeline_inspector_anim_extrap.png) + +_Use Pre-Extrapolate and Post-Extrapolate to set the extrapolation modes for the selected Animation clip_ + +The Pre-Extrapolate property is hidden when one of the following is true: + +* The gap before the Animation clip is set by the Post-Extrapolation mode of the previous clip. +* There is no gap before the Animation clip. + +Use the Pre-Extrapolation property to set the gap extrapolation of the gap before the selected Animation clip to one of the following options: + +* **None**: Turns off pre-extrapolation. In the gap before the selected Animation clip, the GameObject uses its transform, pose, or state from the Scene. Select **None** if, for example, you want to create an ease-in between the motion of a GameObject in the Scene and an Animation clip. See [Easing-in and Easing-out Clips](clp_ease.md) for details. +* **Hold** (default): In the gap before the selected Animation clip, the GameObject bound to the Animation track uses the values assigned at the start of the Animation clip. +* **Loop**: In the gap before the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation as a forward loop: from start to end. To offset the start of the loop, use the **Clip In** property. +* **Ping Pong**: In the gap before the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation forwards, then backwards. Use the **Clip In** property to offset the start of the loop. Changing the **Clip In** property affects the start of the loop when looping forward, and the end of the loop when looping backwards. +* **Continue**: In the gap before the selected Animation clip, the GameObject bound to the Animation track either holds or loops the animation based on the settings of the Source Asset. For example, if the selected Animation clip uses the motion file "Recorded(2)" as its Source Asset and "Recorded(2)" is set to **Loop**, then selecting **Continue** loops the animation according to the "Recorded(2)" Loop Time settings. + +Use the Post-Extrapolate property to set the gap extrapolation of the gap after the selected Animation clip to one of the following options: + +* **None**: Turns off post-extrapolation. In the gap after the selected Animation clip, the GameObject uses its transform, pose, or state from the Scene. Selecting **None** is useful if, for example, you want to create an ease-out between an Animation clip and the motion of a GameObject in the Scene. See [Easing-in and Easing-out Clips](clp_ease.md) for details. +* **Hold** (default): In the gap after the selected Animation clip, the GameObject bound to the Animation track uses the values assigned at the end of the Animation clip. +* **Loop**: In the gap after the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation as a forward loop: from start to end. To offset the start of the loop, use the **Clip In** property. +* **Ping Pong**: In the gap after the selected Animation clip, the GameObject bound to the Animation track repeats the entire animation forwards, then backwards. Use the **Clip In** property to offset the start of the loop. Changing the **Clip In** property affects the start of the loop when looping forward, and the end of the loop when looping backwards. +* **Continue**: In the gap after the selected Animation clip, the GameObject bound to the Animation track either holds or loops the animation based on the settings of the Source Asset. For example, if the selected Animation clip uses the motion file "Recorded(2)" as its Source Asset and "Recorded(2)" is set to **Loop**, then selecting **Continue** loops the animation according to the "Recorded(2)" Loop Time settings. + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_insert.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_insert.md new file mode 100644 index 0000000..0be890a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_insert.md @@ -0,0 +1,25 @@ +# Inserting clips + +The Timeline window supports different methods of inserting clips depending on the type of track, where you click, and whether a clip or track is already selected. In the Timeline window, inserting clips refers to adding and making space for a clip without blending or replacing intersecting clips. + +To accurately insert a clip, select Ripple mode as the Clip Edit mode, and position the Timeline Playhead to set the insertion point. Select **Add From Animation Clip** from the Track menu for the track where you want to insert the clip. + +![Accurately insert a clip with the Ripple mode (red circle), the Timeline Playhead (green box), and the Add From Animation Clip in the Track menu](images/timeline_clips_view_inserting_before.png) + +_Accurately insert a clip with the Ripple mode (red circle), the Timeline Playhead (green box), and the Add From Animation Clip in the Track menu_ + +In the above example, the Timeline Playhead is the insertion point. You can specify the insertion point using these other methods: + +* Right-click within a gap and add a clip with the context menu. The insertion point is where you right-click. +* Drag a Source Asset (animation or audio) to a track in the Clips view. The insertion point is where you stop dragging. + +The location of the insertion point determines where the clip is inserted and how it affects the other clips and gaps on the same track: + +* If the insertion point intersects a clip, the inserted clip is added at the insertion point. The intersected clip, and all subsequent clips and gaps, are rippled after the inserted clip. +* If the insertion point is within a gap and there is enough space between the insertion point and the next clip, then the inserted clip is added to the gap. The other clips on the track are not affected. +* If the insertion point is within a gap and the inserted clip overlaps the next clip, the inserted clips is added at the insertion point. The next clip, and all subsequent clips and gaps, are rippled to accommodate the inserted clip. + +![For example, inserting a clip at the Timeline Playhead ripples Clip 1B to accommodate the 36 frame Run clip.](images/timeline_clips_view_inserting_after.png) + +_For example, inserting a clip at the Timeline Playhead ripples Clip 1B to accommodate the 36 frame Run clip._ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_match.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_match.md new file mode 100644 index 0000000..1b05567 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_match.md @@ -0,0 +1,42 @@ +# Matching clip offsets + +Every Animation clip contains key animation, or motion, that animates the GameObject, or humanoid, bound to the Animation track. + +When you add an Animation clip to an Animation track, its key animation or motion does not automatically begin where the previous clip ends. The key animation or motion also does not end where the next clip begins. By default, each Animation clip begins at the position and rotation of the GameObject, or humanoid, at the beginning of the Timeline instance. + +![An animation sequence of three Animation clips.](images/timeline_match_prematch_clips.png) + +_An animation sequence of three Animation clips._ + +For example, three Animation clips create an animation sequence that starts with a clip of a standing humanoid that starts to run, then turns left, and finally comes to a stand still. + +Each Animation clip begins at the position and rotation of the humanoid at the start of the Timeline instance, indicated by a red arrow in the Scene view below. The three Animation clips, Stand2Run, RunLeft, and Run2Stand, end at the green, blue, and yellow arrows, respectively. + +![](images/timeline_match_prematch_scene.png) + +For an animation sequence to flow seamlessly between adjacent Animation clips, you must match each Animation clip with its previous clip or next clip. Matching clips adds a position and rotation offset for each Animation clip. The position and rotation offsets are named **Clip Transform Offsets** and they [can be set manually](insp_clp_anim_plyb.md) or automatically. The following sections describe how to automatically match two or many Animation clips. + +## Matching two clips + +To match the clip offsets between two clips, right-click the Animation clip that you want to match. From the context menu, select either **Match Offsets to Previous Clip** or **Match Offsets to Next Clip**. + +![Matching an Animation clip with the next clip](images/timeline_match_clip_two.png) + +_Matching an Animation clip with the next clip_ + +For example, right-click the middle Animation clip, named "RunLeft", and select **Match Offsets To Next Clip** to match its offsets to the next clip + +When you are matching offsets for a single Animation clip, you don’t need to select the Animation clip first, but you must right-click the Animation clip that you want to match. For example, if you right-click an Animation clip that is not selected, Timeline matches the clicked clip and ignores the selected Animation clips. + +The context menu only displays the match options available for the clicked Animation clip. For example, if there is a gap **before** the clicked Animation clip, only the **Match Offsets to Next Clip** menu item is available. + +## Matching many clips + +To match the clip offsets of many clips, select the adjacent Animation clips that you want to match and right-click one of the selected clips. From the context menu, select either **Match Offsets to Previous Clip** or **Match Offsets to Next Clip**. + +![Matching many clips with previous clips](images/timeline_match_clip_many.png) + +_Matching many clips with previous clips_ + +For example, select the "RunLeft" and "Run2Stand" clips. Right-click one of the selected clips, and select **Match Offsets to Previous Clips**, to match the "RunLeft" clip with the previous "Stand2Run" clip, and to match "Run2Stand" with the previous "RunLeft" clip. + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_pan_zoom.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_pan_zoom.md new file mode 100644 index 0000000..226347c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_pan_zoom.md @@ -0,0 +1,24 @@ +# Panning and zooming the Clips view + +Use either the keyboard or the zoombar to pan and zoom the contents of the Clips view. There are many ways to pan, zoom, or frame clips in the Clips view with the keyboard: + +* To pan, either middle-drag, or hold Alt and drag. +* To frame all selected clips, [select clips](clp_select.md) then press F. +* To frame all clips, press A. +* To zoom horizontally, move the scroll-wheel. +* To zoom vertically, hold Command/Control and move the scroll-wheel. + +When you horizontally zoom the Clips view, the zoombar indicates the level of zoom. The zoombar is the horizontal bar at the bottom of the Clips view that zooms and pans the section of the Timeline instance or Timeline Asset that is shown in the Clips view. + +![The zoombar (inside the red box) and the zoombar handles (shown by the green arrows). The zoombar thumb is the area between the two zoombar handles.](images/timeline_zoombar.png) + +_The zoombar (inside the red box) and the zoombar handles (shown by the green arrows). The zoombar thumb is the area between the two zoombar handles._ + +There are many ways to pan and zoom with the zoombar: + +* To pan, drag the zoombar thumb left or right. +* To jump to a section of the Timeline instance or Timeline Asset, click on an empty area of the scrollbar, on either side of the zoombar. +* To zoom in or zoom out, drag either zoombar handle. Dragging a zoombar handle also resizes the zoombar thumb. + +On the zoombar thumb, a white line indicates the location of the Timeline Playhead. Use this line to see where the Timeline Playhead is in relation to the zoom level and the part of the Timeline instance shown in the Clips view. + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_position.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_position.md new file mode 100644 index 0000000..62c3974 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_position.md @@ -0,0 +1,58 @@ +# Positioning clips + +To position a clip, select Mix mode as the Clip Edit mode. Select a clip and hover over the middle of the clip. When the cursor changes to a position cursor, click and drag the clip to its new position. + +While dragging, black lines indicate the selection of clips being positioned. The Timeline ruler shows the start time and end time of the selected clips being positioned. + +![Select Mix mode (circled). Select and drag to position a clip.](images/timeline_clips_positioning.png) + +_Select Mix mode (circled). Select and drag to position a clip._ + +By default, when you drag to position clips, both Snap to Frame and Edge Snap are enabled in the Clips view. You can change these snap settings in the [Timeline Settings](tl_settings.md) menu. + +You can also move a clip to another track of the same type. Drag the clip off of its current track and a white ghost indicates where the clip will be moved. If you drag a clip to an area where the clip cannot be placed, the ghost changes to red indicating that you cannot release the clip in that area. For example, you cannot drag a clip where there is no track. + +![The ghost of the selection being moved is drawn in red if you attempt to move a clip to an invalid area](images/timeline_clips_position_invalid.png) + +_The ghost of the selection being moved is drawn in red if you attempt to move a clip to an invalid area_ + +You can position a selection of clips on the same track, or on different tracks. You are not limited to positioning one clip at a time. The same edge snapping rules and invalid area restrictions apply when positioning a selection of clips on many tracks. + +## Positioning clips with the Inspector window + +You can use the [Inspector window to position clips](insp_clp.md). To position a clip with the Inspector window, select a clip and use the Clip Timing properties in the Inspector window to change its **Start** property. + +![Clip Timing properties for an Animation clip](images/timeline_clips_anim_clip_timing.png) + +_Clip Timing properties for an Animation clip_ + +The effect that changing the Start value has on adjacent clips depends on the selected Clip Edit mode. + +## Positioning clips in different Clip Edit modes + +You are not restricted to positioning clips with Mix mode as the selected Clip Edit mode. You can also position clips in Ripple mode and in Replace mode. The difference is the effect each Clip Edit mode has on adjacent clips on the tracks where clips are being moved: + +* Positioning clips in Mix mode creates blends between intersecting clips. +* Positioning clips in Ripple mode ripples subsequent clips, respecting the gaps between clips. +* Positioning clips in Replace mode cuts or replaces intersecting clips. + +## Positioning clips with the Timeline Playhead + +You can position clips by inserting frames at the position of the Timeline Playhead. To do this, move the Timeline Playhead to where you want to insert frames. + +![To insert frames starting at frame 40, move the Timeline Playhead to frame 40](images/timeline_playhead_insert_before.png) + +_To insert frames starting at frame 40, move the Timeline Playhead to frame 40_ + +Right-click the Timeline Playhead on the Timeline ruler above the Clips view, choose **Insert** > **Frame**, and a number of frames. + +![To insert 25 frames, right-click the Timeline Playhead and select **Insert** > **Frame**, then 25 Frames](images/timeline_playhead_insert_menu.png) + +_To insert 25 frames, right-click the Timeline Playhead and select **Insert** > **Frame**, then 25 Frames_ + +This inserts frames in the Timeline Asset at the position of the Timeline Playhead. Inserting frames only repositions the clips that start **after** the position of the Timeline Playhead. + +![Only the clips that start after the Timeline Playhead are moved. In this example, inserting 25 frames at frame 40 affects Clip 1B, Clip 2B, and Clip 2C.](images/timeline_playhead_insert_25_after.png) + +_Only the clips that start after the Timeline Playhead are moved. In this example, inserting 25 frames at frame 40 affects Clip 1B, Clip 2B, and Clip 2C._ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_reset.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_reset.md new file mode 100644 index 0000000..3393699 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_reset.md @@ -0,0 +1,18 @@ +# Resetting clips + +You can reset the duration and speed of a clip. Resetting a clip **does not reset** the following properties: + +* Start +* Ease In Duration and Ease Out Duration +* Animation Extrapolation settings +* Blend Curves + +To reset a clip, right-click the clip and select **Editing** from the context menu. Then, select **Reset Duration**, **Reset Speed**, or **Reset All**. Depending on the reset option you select, resetting a clip does the following: + +|**Option:** |**Description:** | +|:---|:---| +|**Reset Duration**|Resets the Duration and the Clip In.| +|**Reset Speed**|Resets the Speed Multiplier.| +|**Reset All**|Resets the Duration, Clip In, and Speed Multiplier.| + +If resetting a clip results in two clips overlapping each other, Timeline creates a blend for the overlap, regardless of the selected Clip Edit mode. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_select.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_select.md new file mode 100644 index 0000000..a0f75b3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_select.md @@ -0,0 +1,42 @@ +# Selecting clips + +Click to select a single clip. The Clips view displays the selected clip with a white border, including its blends. Selecting a clip deselects all other tracks or clips. + +Selecting a clip also shows its properties in the Inspector window. The clip properties change depending on the type of clip and whether multiple clips are selected. See [Setting Clip properties](insp_clp.md) for details. + +Hold Shift and click to select contiguous clips vertically on different tracks or horizontally on the same track. For example, to select three contiguous clips on the same track, select the first clip, then hold Shift and click the third clip. All three clips are selected. + +![Click to select the first clip](images/timeline_clips_select_first.png) + +_Click to select the first clip_ + +![Shift-click the third clip to select contiguous clips on the same track](images/timeline_clips_select_last.png) + +_Shift-click the third clip to select contiguous clips on the same track_ + +Hold Command/Control and click to select discontiguous clips. Hold Command/Control and click a selected clip to deselect it. + +Click and drag on an empty area in the Clips view to draw a selection rectangle. This selects all clips inside the rectangle, including the clips that intersect the rectangle. Hold down Shift and draw a selection rectangle to add clips to the current selection. + +You can also press the Tab key to select clips. The behaviour of the Tab key changes depending on the current selection: + +* If a track is selected, press Tab to select the first clip on the selected track. +* If many tracks are selected, press Tab to select the first clip on the first selected track. +* If a clip is selected, press Tab to [select its track](trk_select.md). +* If there are no clips or tracks selected, press Tab to select the first clip on the first track. + +Use the arrow keys to change the selected clips. The behaviour and results depend on the current selection and which modifier keys you press: + +* If nothing is selected in the Timeline window, press the Tab, Up arrow, or Down arrow key to select the first clip on the first track. +* If a clip is selected, press the Left arrow key to select the previous clip. If the selected clip is the first clip on a track, the Left arrow key selects the track. +* If a clip is selected, press the Right arrow key to select the next clip. Press the Up arrow key to select the closest clip on a previous track. Press the Down arrow key to select the closest clip on a next track. +* Hold Shift and press either the Left arrow key or Right arrow key to add or remove clips from the selection of clips. Whether a clip is added to or removed from the selection of clips is relative to the first selected clip. + +If you zoom into the Clips view, it pans to show either the start or end of the most recently selected clip. For example, if a selected clip is framed in the Clips view and you press the Right arrow key to select the next clip which is outside the Clips view, the Clips view pans to show the start of the selected clip. + +You can also select clips with the Timeline Playhead. Right-click the Timeline Playhead and choose a selection option. This selects clips that either start after, start before, end after, end before, or intersect the Timeline Playhead. Clips are selected on all tracks. + +![Right-click the Timeline Playhead and choose **Select** for more clip selection options](images/timeline_playhead_select_menu.png) + +_Right-click the Timeline Playhead and choose **Select** for more clip selection options_ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_speed.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_speed.md new file mode 100644 index 0000000..00fdb42 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_speed.md @@ -0,0 +1,29 @@ +# Changing clip play speed + +Change the clip play speed to accelerate or decelerate its audio, motion, animation, or particle effect. Changing the clip play speed affects the duration of the clip. You can only change the play speed for Animation clips, Audio clips, and Control clips. + +To change the clip play speed, first, select the Clip Edit mode to determine how other clips on the same track are affected: + +* If the change in duration results in two clips that overlap each other: + * Select Mix mode to create a blend. + * Select Replace mode to cut or remove intersecting clips. +* Select Ripple mode to reposition the clips that come after the clip being sped up or slowed down. Ripple mode preserves the gaps between clips. + +Select the clip and set the **Speed Multiplier** property in the Inspector window. The **Speed Multiplier** property shows the play speed as a multiplier of the original clip speed, so 1 plays the clip at the same speed as the original clip. + +![Speed Multiplier in the Inspector window](images/timeline_inspector_clip_speed.png) + +_Speed Multiplier in the Inspector window_ + +For example, to double the play speed of an Animation clip, change the **Speed Multiplier** to 2. This changes the duration of an 80 frame Animation clip to 40 frames by doubling its play speed. + +There are other ways to change the play speed of a clip: + +* Right-click the clip and select **Editing > Double Speed** to halve the clip duration. The clip plays at twice its current speed. A short-dashed line and a multiplication factor indicates an accelerated clip. Doubling the clip speed sets the **Speed Multiplier** property to double its current value. +* Right-click the clip and select **Editing > Half Speed** to double the clip duration. The clip plays at half its current speed. A long-dashed line and multiplication factor indicates a decelerated clip. Halving the clip speed sets the **Speed Multiplier** property to half its current value. +* Right-click the clip and select **Editing > Reset Speed** to reset the clip to its original speed. This is the original duration of the clip. Resetting the clip speed sets the **Speed Multiplier** property to 1. + +![A short-dashed line and multiplication factor of 2.00x indicates a clip playing at double its original speed](images/timeline_clip_double_speed.png) + +_A short-dashed line and multiplication factor of 2.00x indicates a clip playing at double its original speed_ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_split.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_split.md new file mode 100644 index 0000000..991296d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_split.md @@ -0,0 +1,15 @@ +# Splitting clips + +You can split a clip into two identical clips that have different start points, end points, and durations. You can extend the start or end of the clip to include split animation or audio. You can also [reset a clip](clp_reset.md) to undo a split and other edits. + +To split a clip, select the clip, position the playhead where you want to split the clip, and either right-click the clip and select **Editing** > **Split**, or press S. Any selected clips that intersect the playhead are split into separate clips. You can position, trim, and edit split clips independently. + +![Select the clips to be split, position the playhead where you want the split to occur, and press S](images/timeline_clip_split_before.png) + +_Select the clips to be split, position the playhead where you want the split to occur, and press S_ + +![Selected clips are split where each clip intersects the playhead](images/timeline_clip_split_after.png) + +_Selected clips are split where each clip intersects the playhead_ + +If a split clip is part of a blend, or if the split is performed within a blend, Timeline copies the blend settings to the split clips. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_tile.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_tile.md new file mode 100644 index 0000000..44dc5a5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_tile.md @@ -0,0 +1,16 @@ +# Tiling clips + +Tile clips to remove gaps and blends between clips on the same track. Tiling clips is useful if you want each clip to begin exactly where the previous clip ends. If you select multiple clips on multiple tracks, you must select at least two clips on the same track for tiling to have an affect. + +To tile clips, select at least two clips on the same track. + +![Three clips with gaps and blends are selected](images/timeline_clips_tile_selection.png) + +_Three clips with gaps and blends are selected_ + +Right-click on one of the selected clips and select Tile from the context menu. Timeline positions the selected clips based on the position of the first selected clip. The first selected clip does not move, and the duration of each clip remains the same. + +![Tiling removes gaps and blends between the selected clips](images/timeline_clips_tile_result.png) + +_Tiling removes gaps and blends between the selected clips_ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_trim.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_trim.md new file mode 100644 index 0000000..4270811 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/clp_trim.md @@ -0,0 +1,75 @@ +# Trimming clips + +Trimming a clip cuts off a portion of the clip at its start or end. To trim a clip, select the Mix mode as the Clip Edit mode, then drag the start or end of the clip. Dragging the start or end of a clip automatically selects the clip, showing its properties in the Inspector window. Use the [Clip Timing properties](insp_clp.md) in the Inspector window to set the start, end, duration, and offset (Clip In) of a clip to exact values. + +![Position and trim a clip by adjusting its Start, End, Duration, and Clip In properties in the Inspector window](images/timeline_inspector_clip_timing.png) + +_Position and trim a clip by adjusting its Start, End, Duration, and Clip In properties in the Inspector window_ + +## Trimming the start of a clip + +Trimming an Animation clip or Audio clip after the start of the Source Asset, selects the part of the Source Asset the clip uses. + +![Trimming the start of an Animation clip trims its key animation, relative to the start of the Source Asset](images/timeline_clip_trim_start_keys.png) + +_Trimming the start of an Animation clip trims its key animation, relative to the start of the Source Asset_ + +Trimming a clip is non-destructive. Trim the clip again to modify its start to include the animation, or the audio waveform, cut off during a previous trim. You can also [reset a clip](clp_reset.md) to undo trims or other edits. + +To trim the start of a clip to a precise time or frame, use the **Clip In** property in the Inspector window. + +Changing the **Clip In** property is similar to the same effect as trimming the start of a clip after the start of its Source Asset. + +## Trimming the end of a clip + +As with the start of the clip, trimming an Animation clip or Audio clip before the end of the Source Asset, selects the part of the Source Asset the clip uses. + +![Trimming the end of an Animation clip trims its key animation, relative to the end of the Source Asset](images/timeline_clip_trim_end_keys.png) + +_Trimming the end of an Animation clip trims its key animation, relative to the end of the Source Asset_ + +If you trim the end of an Animation clip or Audio clip past the end of the Source Asset the clip is based on, the extra clip area either holds or loops, depending on the settings of the Source Asset. + +For example, an Animation clip named "End Move" uses the motion file "Recorded(2)" as its Source Asset. The motion file "Recorded(2)" is set to loop. Trimming the end of the Animation clip past the end of the "Recorded(2)" Source Asset fills the extra clip area by looping "Recorded(2)". A white animation curve shows the hold or loop. + +![A white animation curve indicates whether the extra clip area holds or loops data, depending on the Source Asset](images/timeline_clip_trim_loop.png) + +_A white animation curve indicates whether the extra clip area holds or loops data, depending on the Source Asset_ + +To choose whether the extra clip area holds or loops, select the Source Asset to change its settings in the Inspector window. Depending on the type of Source Asset, different properties control whether the Source Asset holds or loops. + +If you are unsure which Source Asset is used by a clip, select the clip in the Clips view, right-click and select **Find Source Asset** from the context menu. This highlights the Source Asset in the Project window. + +## Trimming the end of looping clips + +The Timeline window provides special trimming options for Animation clips or Audio clips with loops. These special trim options either remove the last partial loop or complete the last partial loop. + +For example, the Animation clip named run_away is over three times longer than the Source Asset on which it is based. Since the Source Asset is set to loop, the Animation clip loops the Source Asset until the Animation clip ends which results in a partial loop. + +![L1, L2, and L3 signify complete loops. The clip ends partially through the fourth loop, L4.](images/timeline_last_loop_before.png) + +_L1, L2, and L3 signify complete loops. The clip ends partially through the fourth loop, L4._ + +To extend the end of the clip and complete a partial loop, select the clip, right-click and select **Editing** > **Complete Last Loop**. To trim the clip at the last complete loop, select the clip, Right-clip and select **Editing** > **Trim Last Loop**. + +![The result of select Editing > Complete Last Loop](images/timeline_last_loop_complete.png) + +_The result of select **Editing** > **Complete Last Loop**_ + +![The result of select Editing > Trim Last Loop](images/timeline_last_loop_trim.png) + +_The result of select **Editing** > **Trim Last Loop**_ + +## Trimming with the Timeline Playhead + +You can also trim a clip based on the location of the playhead. To trim using the playhead, position the playhead within the clip to be trimmed. Right-click the clip and select either **Editing** > **Trim Start** or **Editing** > **Trim End**. **Trim Start** trims the start of the clip to the playhead. **Trim End** trims the end of the clip to the playhead. + +![Move the Timeline Playhead within the clip](images/timeline_playhead_trim_before.png) + +_Move the Timeline Playhead within the _ + +![Right-click and select Editing > Trim Start to trim the start of the clip to the playhead](images/timeline_playhead_trim_after.png) + +_Right-click and select **Editing** > **Trim Start** to trim the start of the clip to the playhead_ + +If you select clips on multiple tracks, Timeline only trims the selected clips that intersect the playhead. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_about.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_about.md new file mode 100644 index 0000000..0cc33a9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_about.md @@ -0,0 +1,18 @@ +# Curves view + +The Curves view shows the animation curves for Infinite clips, or for Animation clips that were converted from Infinite clips. Use the Curves view for basic animation editing such as adding keys, modifying keys, adjusting tangents, and changing the interpolation between keys. + +To view animation curves for an Infinite clip, click the Curves icon next to the Track name. To view animation curves for an Animation clip, select the Animation clip and click the Curves icon. The Curves view is similar to [Curves mode](https://docs.unity3d.com/Manual/animeditor-AnimationCurves.html) in the Animation window. + +![The Curves icon (circled) shows and hides the Curves view for the selected clip](images/timeline_curves_view_icon.png) + +_The Curves icon (circled) shows and hides the Curves view for the selected clip_ + +The Curves icon does not appear for Animation tracks with humanoid animation or imported animation. To view and edit key animation for humanoid or imported Animation clips, right-click an Animation clip and select **Edit in Animation Window** from the context menu. You can also double-click the Animation clip. The Animation window appears, linked to the Timeline window. + +When in linked mode, the Animation window shows a Linked icon and the name of the Animation clip being edited. Click the Linked icon to stop editing the Animation clip and to release the Animation window from linked mode. + +![Animation window linked to the Timeline window, indicated by the Linked icon and Animation clip name](images/timeline_animation_window_locked.png) + +_Animation window linked to the Timeline window, indicated by the Linked icon and Animation clip name_ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_hide.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_hide.md new file mode 100644 index 0000000..8d6a9c6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_hide.md @@ -0,0 +1,15 @@ +# Hiding and showing curves + +For the selected Animation clip, the Curves view includes a hierarchical list of the properties with animation curves. Expand, collapse, select, and deselect the properties in this list to filter which animation curves show in the Curves view. + +For example, to show only the X-axis animation curves for the position of a GameObject, expand **Position**, select the **Position.x** property, and then press F to frame the animation curve for the **Position.x** property. + +![Curves view showing the animation curve for the Position.x property](images/timeline_curves_view_position_x.png) + +_Curves view showing the animation curve for the Position.x property_ + +There are many ways to expand, collapse, select, and deselect animation curves: + +* Click the Triangle icon of a parent property to expand and collapse its list of child properties. +* Hold Shift and click to select contiguous properties. +* Hold Command/Control and click to select discontiguous properties. Hold Command/Control and click a selected property to deselect it. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_add.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_add.md new file mode 100644 index 0000000..0f77326 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_add.md @@ -0,0 +1,6 @@ +# Adding keys + +The Curves view provides the following methods for adding keys: + +* Right-click on an animation curve and select **Add Key**. This method adds a key at the location of the right-click. +* Double-click on an animation curve. This method adds a key at the location of the Double-click. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_del.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_del.md new file mode 100644 index 0000000..c532262 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_del.md @@ -0,0 +1,6 @@ +# Deleting keys + +The Curves view provides the following methods for deleting keys: + +* Right-click a key and select **Delete Key** from the context menu. This method does not affect selected keys. +* Select a key and either press Delete or right-click and select **Delete Key** from the context menu. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_edit.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_edit.md new file mode 100644 index 0000000..2bacf7e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_edit.md @@ -0,0 +1,9 @@ +# Editing keys + +Edit a key to change its time, value, or both. The Curves view provides the following different methods for editing a key: + +* Right-click a key and select **Edit** from the context menu to enter specific values for time and value. +* Select a key and press Enter to enter specific values. +* Select and drag a key to change its time and value. +* Drag a key vertically, then press Shift to snap the key on the vertical axis. This changes the value of the key, but not its time. +* Drag a key horizontally, then press Shift to snap the key on the horizontal axis. This changes the time of the key, but not its value. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_interp.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_interp.md new file mode 100644 index 0000000..ec158f4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_interp.md @@ -0,0 +1,27 @@ +# Changing interpolation and shape + +Every key has one or two tangents that control the interpolation of the animation curve. The term **interpolation** refers to the estimation of values that determine the shape of the animation curve between two keys. + +Whether a key has one of two tangents depends on the location of the key on the animation curve. The first key only has a right tangent that controls the interpolation of the animation curve after the key. The last key only has a left tangent that controls the interpolation of the animation curve before the last key. + +![The first key (red) only has a right tangent, and the last key (blue) only has a left tangent](images/timeline_curves_first_last_tangent.png) + +_The first key (red) only has a right tangent, and the last key (blue) only has a left tangent_ + +All other keys have two tangents where the left tangent controls the interpolation before the key, and the right tangent controls the interpolation after the key. By default, tangents are joined. Dragging one tangent affects the position of both tangents, and the interpolation of the animation curve both before and after the key. + +![Keys that are neither the first key nor last key have joined tangents by default. Dragging either tangent changes the interpolation of the animation curve both before and after the key.](images/timeline_curves_tangent_joined.png) + +_Keys that are neither the first key nor last key have joined tangents by default. Dragging either tangent changes the interpolation of the animation curve both before and after the key._ + +Dragging a tangent may also change the interpolation mode of the animation curve. For example, most keys are set to the **Clamped Auto** interpolation mode which automatically smooths animation curve as it passes through the key. If you drag a tangent of a key set to **Clamped Auto**, the interpolation mode changes to **Free Smooth**. + +The term **interpolation mode** refers to the interpolation algorithm that determines which shape to use when drawing the animation curve. + +To view the interpolation mode for a key, select the key and right-click. The context menu shows the interpolation mode. To change the interpolation mode for a key, select the key, right-click and select another interpolation mode. + +![The context menu shows the interpolation mode for the selected key. Use the context menu to change the interpolation mode.](images/timeline_curves_interp_menu.png) + +_The context menu shows the interpolation mode for the selected key. Use the context menu to change the interpolation mode._ + +Some interpolation modes break the left and right tangents so that you can position them separately. When tangents are broken, you can set a separate interpolation mode for the animation curve before the key and the animation curve after the key. For more details on the different interpolation modes, see [Editing Curves](EditingCurves). In the [Animation window documentation](AnimationEditorGuide), the interpolation mode is referred to as **tangent type**. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_sel.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_sel.md new file mode 100644 index 0000000..67c4459 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_keys_sel.md @@ -0,0 +1,20 @@ +# Selecting keys + +Click to select a single key. Selecting a key deselects all other selected keys. The Curves view displays the selected key with its tangents. + +![Click to select a single key. A selected key shows its tangents.](images/timeline_curves_view_select_key.png) + +_Click to select a single key. A selected key shows its tangents._ + +To select contiguous keys along the same animation curve, click the first key, then hold Shift and click the last key. + +![Hold Shift and click a key to select contiguous keys](images/timeline_curves_view_select_contiguous.png) + +_Hold Shift and click a key to select contiguous keys_ + +There are many ways to select and deselect keys in the Curves view: + +* Hold Command/Control and click to select discontiguous keys. Hold Command/Control and click a selected key to deselect it. +* Click and drag on an empty spot in the Curves view to draw a selection rectangle. This selects all keys within the rectangle. Hold down Shift while drawing the selection rectangle to add keys to the current selection. +* Double-click a selected key to select all keys on the same animation curve. + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_nav.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_nav.md new file mode 100644 index 0000000..5a69aeb --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/crv_nav.md @@ -0,0 +1,12 @@ +# Navigating the Curves view + +Use one of the following methods to pan, zoom, resize, or frame the animation curves and keys in the Curves view: + +* To pan, middle-drag, or hold Alt and drag. +* To zoom vertically, move the scroll-wheel, or hold Alt and right-drag. +* To zoom horizontally, hold Command/Control and zoom vertically. +* To resize the Curves view, drag the double line separating the Curves view from the next track in the Track list. +* To frame only selected animation curves or selected keys, press F. +* To frame all animation curves or keys, press A. + +You can also [use the Zoombar](clp_pan_zoom.md) to pan, zoom, and resize the Clips view. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_hide.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_hide.md new file mode 100644 index 0000000..a37c9d9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_hide.md @@ -0,0 +1,9 @@ +# Collapsing and expanding Track groups + +To collapse the tracks in a Track group, click the Triangle icon beside the name of the Track group. The tracks are collapsed from view in the Timeline window, not muted. To expand the tracks in a Track group, click the Triangle icon again. + +![Triangle icon (circled) collapses the tracks in the Game Board Track group. A ghost track visually represents the tracks in the collapsed group.](images/timeline_track_group_hidden.png) + +_Triangle icon (circled) collapses the tracks in the Game Board Track group. A ghost track visually represents the tracks in the collapsed group._ + +You can also press the Left Arrow key to collapse the tracks in a Track group while the Track group is selected. Press the Right Arrow key to expand the tracks in a Track group. If you press the Right Arrow key with a Track group already selected, the selection switches to the first selectable clip on the first track in the Track group. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_lock.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_lock.md new file mode 100644 index 0000000..770f3ee --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_lock.md @@ -0,0 +1,15 @@ +# Locking Track groups + +You can also lock a Track group to prevent editing its Track sub-groups, tracks, and clips. This is useful when you have finished animating the content within a Track group and you want to avoid inadvertently modifying its tracks or clips. + +You cannot edit the tracks or select the clips in a locked Track group. The Lock icon identifies a locked Track group. + +![Selected and locked Track group with Lock icon (red circle)](images/timeline_track_group_locked.png) + +_Selected and locked Track group with Lock icon (red circle)_ + +To lock a Track group, right-click on the Track group header and select **Lock** from the context menu. You can also select a Track group and press L. You can select and lock multiple Track groups. + +To unlock a Track group, click the Lock icon. You can also select a locked Track group and press L, or right-click and select **Unlock** from the context menu. Tracks in a Track group maintain their individual locked state when you lock a Track group. This means that if you lock a track and then lock its Track group, when you unlock the Track group, the track remains locked. + +For example, the MovingPieces Track group has its first track locked and its second track unlocked. If you lock the Track group, both the first and second track are locked. If you unlock the Track group, the first track remains locked and the second track is unlocked because the first track was already locked before the Track group was locked. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_use.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_use.md new file mode 100644 index 0000000..d1c7309 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/grp_use.md @@ -0,0 +1,28 @@ +# Using Track groups + +Use Track groups to organize tracks when you are working with many tracks. For example, a Timeline Asset contains an Animation track and an Audio track that interacts with the same GameObject. To organize these tracks, move them into their own Track group. + +To add a Track group, click the **Add** button and select **Track Group** from the **Add** menu. You can also right-click an empty area of the Track list and select **Track Group** from the context menu. A new Track group appears at the bottom of the Track list. + +![Timeline window with Track group added](images/timeline_track_group_add.png) + +_Timeline window with Track group added_ + +To rename a Track group, click its name and an I-beam cursor appears. Type the new name for the Track group and press Return. + +To move tracks into a Track group, select one or more tracks and drag over the Track group. The Track group is highlighted. When dragging a selection of tracks, the last selected track type displays beside the cursor. To drop the tracks before a specific track in the Track group, drag until a white insert line indicates the destination. + +![Release the mouse button when the white insert line appears within the Track group](images/timeline_move_track_before.png) + +_Release the mouse button when the white insert line appears within the Track group_ + +![Selected tracks are moved to the location of the insert line](images/timeline_move_track_after.png) + +_Selected tracks are moved to the location of the insert line_ + +A Track group can also have any number of Track sub-groups. To add a Track sub-group, either select a Track group and click the **Add** button in the Track list, or click the Plus icon beside the Track group name, and select **Track Sub-Group**. You can also use this menu to add tracks directly to a Track group or a Track sub-group. + +![Click the Plus icon to add Track Sub-Groups and tracks to Track groups](images/timeline_track_group_plus.png) + +_Click the Plus icon to add Track Sub-Groups and tracks to Track groups_ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_add_track_menu.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_add_track_menu.png new file mode 100644 index 0000000..595ea6c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_add_track_menu.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_animation_window_locked.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_animation_window_locked.png new file mode 100644 index 0000000..3ebf150 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_animation_window_locked.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_cinematic_example.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_cinematic_example.png new file mode 100644 index 0000000..6f8be34 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_cinematic_example.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_blend_area.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_blend_area.png new file mode 100644 index 0000000..8884e32 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_blend_area.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_double_speed.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_double_speed.png new file mode 100644 index 0000000..2c68435 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_double_speed.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_before.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_before.png new file mode 100644 index 0000000..11eaf0f Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_before.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_clip_after.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_clip_after.png new file mode 100644 index 0000000..9bbe8b3 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_clip_after.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_clip_before.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_clip_before.png new file mode 100644 index 0000000..01fef50 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_clip_before.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_project.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_project.png new file mode 100644 index 0000000..82bd28d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_duplicate_project.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_bad_gap.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_bad_gap.png new file mode 100644 index 0000000..267f752 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_bad_gap.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_good_gap.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_good_gap.png new file mode 100644 index 0000000..61a2681 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_good_gap.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_out.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_out.png new file mode 100644 index 0000000..bf552ca Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_out.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_override_scene.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_override_scene.png new file mode 100644 index 0000000..c53d8c6 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_override_scene.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_override_track.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_override_track.png new file mode 100644 index 0000000..38d6c3a Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_ease_in_override_track.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_split_after.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_split_after.png new file mode 100644 index 0000000..e27c256 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_split_after.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_split_before.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_split_before.png new file mode 100644 index 0000000..b433800 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_split_before.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_end_keys.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_end_keys.png new file mode 100644 index 0000000..e5342fb Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_end_keys.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_loop.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_loop.png new file mode 100644 index 0000000..c84d339 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_loop.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_start_keys.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_start_keys.png new file mode 100644 index 0000000..735a1f2 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clip_trim_start_keys.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_anim_clip_timing.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_anim_clip_timing.png new file mode 100644 index 0000000..e260003 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_anim_clip_timing.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_arrows.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_arrows.png new file mode 100644 index 0000000..bf9bf92 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_arrows.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_position_invalid.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_position_invalid.png new file mode 100644 index 0000000..db34d8b Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_position_invalid.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_positioning.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_positioning.png new file mode 100644 index 0000000..4ce3cd3 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_positioning.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_select_first.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_select_first.png new file mode 100644 index 0000000..89f5aec Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_select_first.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_select_last.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_select_last.png new file mode 100644 index 0000000..4916818 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_select_last.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_split_after.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_split_after.png new file mode 100644 index 0000000..924f66e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_split_after.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_split_before.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_split_before.png new file mode 100644 index 0000000..d9cf8a0 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_split_before.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_tile_result.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_tile_result.png new file mode 100644 index 0000000..9a5d30e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_tile_result.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_tile_selection.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_tile_selection.png new file mode 100644 index 0000000..89548e7 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_tile_selection.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view.png new file mode 100644 index 0000000..3eceb66 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_adding.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_adding.png new file mode 100644 index 0000000..9a4fc24 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_adding.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_inserting_after.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_inserting_after.png new file mode 100644 index 0000000..0e01be1 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_inserting_after.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_inserting_before.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_inserting_before.png new file mode 100644 index 0000000..035d37e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_clips_view_inserting_before.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_cog_menu.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_cog_menu.png new file mode 100644 index 0000000..98c7a6f Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_cog_menu.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_first_last_tangent.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_first_last_tangent.png new file mode 100644 index 0000000..e12be3e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_first_last_tangent.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_interp_menu.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_interp_menu.png new file mode 100644 index 0000000..be16895 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_interp_menu.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_tangent_joined.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_tangent_joined.png new file mode 100644 index 0000000..e1ea954 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_tangent_joined.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_icon.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_icon.png new file mode 100644 index 0000000..46195e4 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_icon.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_position_x.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_position_x.png new file mode 100644 index 0000000..fff9870 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_position_x.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_select_contiguous.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_select_contiguous.png new file mode 100644 index 0000000..784757c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_select_contiguous.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_select_key.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_select_key.png new file mode 100644 index 0000000..97e53ec Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_curves_view_select_key.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_duration_mode.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_duration_mode.png new file mode 100644 index 0000000..a9e7c7c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_duration_mode.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_bindings.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_bindings.png new file mode 100644 index 0000000..ef1fc21 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_bindings.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_create.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_create.png new file mode 100644 index 0000000..2f576e4 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_create.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_project.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_project.png new file mode 100644 index 0000000..1da523c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_project.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_to_start.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_to_start.png new file mode 100644 index 0000000..e197beb Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_editor_to_start.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_end_button.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_end_button.png new file mode 100644 index 0000000..c86c03c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_end_button.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_frames_subframes.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_frames_subframes.png new file mode 100644 index 0000000..d054692 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_frames_subframes.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_gap_extrap_icons.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_gap_extrap_icons.png new file mode 100644 index 0000000..ced4349 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_gap_extrap_icons.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_gap_extrap_two_tracks.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_gap_extrap_two_tracks.png new file mode 100644 index 0000000..6b6d70c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_gap_extrap_two_tracks.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_after_match.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_after_match.png new file mode 100644 index 0000000..01e9cea Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_after_match.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_before_match.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_before_match.png new file mode 100644 index 0000000..db90355 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_before_match.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_blend.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_blend.png new file mode 100644 index 0000000..1d9ff27 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_blend.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_idle.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_idle.png new file mode 100644 index 0000000..fe9889f Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_idle.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_manual.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_manual.png new file mode 100644 index 0000000..746c7d9 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_manual.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_match_menu.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_match_menu.png new file mode 100644 index 0000000..8e6c6ba Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_match_menu.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_runleft.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_runleft.png new file mode 100644 index 0000000..c99e27e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_runleft.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_start.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_start.png new file mode 100644 index 0000000..230e152 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_humanoid_start.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_activation_clip.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_activation_clip.png new file mode 100644 index 0000000..bb3e849 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_activation_clip.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_activation_track.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_activation_track.png new file mode 100644 index 0000000..291fd64 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_activation_track.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_anim_extrap.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_anim_extrap.png new file mode 100644 index 0000000..ad7d03b Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_anim_extrap.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip.png new file mode 100644 index 0000000..7f5a7fb Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip_common.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip_common.png new file mode 100644 index 0000000..03587a8 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip_common.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip_playable.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip_playable.png new file mode 100644 index 0000000..2a0c77b Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_clip_playable.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_track.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_track.png new file mode 100644 index 0000000..4750b84 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_animation_track.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_audio_clip.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_audio_clip.png new file mode 100644 index 0000000..9d28cdb Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_audio_clip.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_blend_curves.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_blend_curves.png new file mode 100644 index 0000000..cf5a600 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_blend_curves.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_clip_speed.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_clip_speed.png new file mode 100644 index 0000000..1f5cd76 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_clip_speed.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_clip_timing.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_clip_timing.png new file mode 100644 index 0000000..0b07b61 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_clip_timing.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_control_clip_common.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_control_clip_common.png new file mode 100644 index 0000000..a293085 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_control_clip_common.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_control_clip_playable.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_control_clip_playable.png new file mode 100644 index 0000000..1a3fb41 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_control_clip_playable.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_curve_editor.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_curve_editor.png new file mode 100644 index 0000000..bc24cdb Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_curve_editor.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_ease_in_blend_out.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_ease_in_blend_out.png new file mode 100644 index 0000000..5287880 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_ease_in_blend_out.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_ease_in_out.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_ease_in_out.png new file mode 100644 index 0000000..e352511 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_ease_in_out.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_multiple_selection.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_multiple_selection.png new file mode 100644 index 0000000..bda9d1c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_multiple_selection.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_narrow_selection.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_narrow_selection.png new file mode 100644 index 0000000..b3aa886 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_narrow_selection.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_playable_director.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_playable_director.png new file mode 100644 index 0000000..9ba9d11 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_playable_director.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_timeline.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_timeline.png new file mode 100644 index 0000000..6e7094d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_inspector_timeline.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_before.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_before.png new file mode 100644 index 0000000..9e77f97 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_before.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_complete.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_complete.png new file mode 100644 index 0000000..181c729 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_complete.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_trim.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_trim.png new file mode 100644 index 0000000..b80360b Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_last_loop_trim.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_inspector.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_inspector.png new file mode 100644 index 0000000..5e0a851 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_inspector.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_off.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_off.png new file mode 100644 index 0000000..44c6380 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_off.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_on.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_on.png new file mode 100644 index 0000000..b947f91 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_avatar_on.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_override.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_override.png new file mode 100644 index 0000000..6b97ea1 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_override.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_override_selected.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_override_selected.png new file mode 100644 index 0000000..10a86d1 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_override_selected.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_start.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_start.png new file mode 100644 index 0000000..ccddc93 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_start.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_waving.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_waving.png new file mode 100644 index 0000000..6de3bb1 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_masking_waving.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_clip_many.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_clip_many.png new file mode 100644 index 0000000..fb50368 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_clip_many.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_clip_two.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_clip_two.png new file mode 100644 index 0000000..f6262dd Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_clip_two.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_prematch_clips.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_prematch_clips.png new file mode 100644 index 0000000..e9006e8 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_prematch_clips.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_prematch_scene.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_prematch_scene.png new file mode 100644 index 0000000..e383c2b Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_match_prematch_scene.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_mix_mode_blend_arrow.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_mix_mode_blend_arrow.png new file mode 100644 index 0000000..591b987 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_mix_mode_blend_arrow.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_mix_mode_position_cursor.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_mix_mode_position_cursor.png new file mode 100644 index 0000000..7336c30 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_mix_mode_position_cursor.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_after copy.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_after copy.png new file mode 100644 index 0000000..23ebe51 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_after copy.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_after.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_after.png new file mode 100644 index 0000000..0ee4f79 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_after.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_before.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_before.png new file mode 100644 index 0000000..53bbfd0 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_move_track_before.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_editing.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_editing.png new file mode 100644 index 0000000..c66a2c7 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_editing.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_example.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_example.png new file mode 100644 index 0000000..7c1cec5 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_example.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_global.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_global.png new file mode 100644 index 0000000..f241c98 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_global.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_local.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_local.png new file mode 100644 index 0000000..58cb84e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_nesting_local.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_next_frame_button.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_next_frame_button.png new file mode 100644 index 0000000..284ce31 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_next_frame_button.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_asset.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_asset.png new file mode 100644 index 0000000..9595b66 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_asset.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_enemy.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_enemy.png new file mode 100644 index 0000000..adf7cc5 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_enemy.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_instance.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_instance.png new file mode 100644 index 0000000..731c366 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_instance.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_player.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_player.png new file mode 100644 index 0000000..1a63416 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_overview_player.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_button.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_button.png new file mode 100644 index 0000000..67d641e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_button.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_range.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_range.png new file mode 100644 index 0000000..cf54bf4 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_range.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_range_button.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_range_button.png new file mode 100644 index 0000000..297ee7f Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_play_range_button.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playback_controls.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playback_controls.png new file mode 100644 index 0000000..99dc140 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playback_controls.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_100_after.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_100_after.png new file mode 100644 index 0000000..ce622ef Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_100_after.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_before.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_before.png new file mode 100644 index 0000000..f3a584b Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_before.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_menu.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_menu.png new file mode 100644 index 0000000..cef9abb Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_insert_menu.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_location.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_location.png new file mode 100644 index 0000000..29f2065 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_location.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_select_menu.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_select_menu.png new file mode 100644 index 0000000..a715311 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_select_menu.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_trim_after.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_trim_after.png new file mode 100644 index 0000000..8d54b08 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_trim_after.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_trim_before.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_trim_before.png new file mode 100644 index 0000000..b0e6936 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_playhead_trim_before.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_preview_selector.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_preview_selector.png new file mode 100644 index 0000000..568f2c3 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_preview_selector.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_previous_frame_button.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_previous_frame_button.png new file mode 100644 index 0000000..dc22907 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_previous_frame_button.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_property_red.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_property_red.png new file mode 100644 index 0000000..79f0365 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_property_red.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_replace_mode.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_replace_mode.png new file mode 100644 index 0000000..3541f02 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_replace_mode.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_replace_mode_red_cut.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_replace_mode_red_cut.png new file mode 100644 index 0000000..aeaa519 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_replace_mode_red_cut.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_ripple_mode.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_ripple_mode.png new file mode 100644 index 0000000..1735bae Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_ripple_mode.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_ripple_mode_yellow_arrow.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_ripple_mode_yellow_arrow.png new file mode 100644 index 0000000..f774627 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_ripple_mode_yellow_arrow.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_splash.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_splash.png new file mode 100644 index 0000000..9ae9c24 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_splash.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_start_button.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_start_button.png new file mode 100644 index 0000000..74d6373 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_start_button.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_alert_icon.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_alert_icon.png new file mode 100644 index 0000000..c3f84c6 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_alert_icon.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_duplicate.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_duplicate.png new file mode 100644 index 0000000..440a9ba Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_duplicate.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_add.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_add.png new file mode 100644 index 0000000..185db78 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_add.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_hidden.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_hidden.png new file mode 100644 index 0000000..c8ccd8b Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_hidden.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_locked.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_locked.png new file mode 100644 index 0000000..3dfad7a Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_locked.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_plus.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_plus.png new file mode 100644 index 0000000..73a9f56 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_group_plus.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_list.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_list.png new file mode 100644 index 0000000..1487d5c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_list.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_locked.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_locked.png new file mode 100644 index 0000000..aae278b Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_locked.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_muted.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_muted.png new file mode 100644 index 0000000..8395bb2 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_muted.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_priority.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_priority.png new file mode 100644 index 0000000..3b52ad5 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_priority.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_reorder.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_reorder.png new file mode 100644 index 0000000..1b4f415 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_reorder.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_select_first.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_select_first.png new file mode 100644 index 0000000..c35edc6 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_select_first.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_select_last.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_select_last.png new file mode 100644 index 0000000..df3b093 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_track_select_last.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_clip_in_project.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_clip_in_project.png new file mode 100644 index 0000000..2935a60 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_clip_in_project.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_converted_clip.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_converted_clip.png new file mode 100644 index 0000000..c6b2914 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_converted_clip.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_dopesheet.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_dopesheet.png new file mode 100644 index 0000000..c5ba572 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_dopesheet.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_keyframing_menu.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_keyframing_menu.png new file mode 100644 index 0000000..64907f3 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_keyframing_menu.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_record_button.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_record_button.png new file mode 100644 index 0000000..75b7fce Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_record_button.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recorded_clip_track_menu.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recorded_clip_track_menu.png new file mode 100644 index 0000000..a9b30e8 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recorded_clip_track_menu.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recording.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recording.png new file mode 100644 index 0000000..5f7a3d8 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recording.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recording_diamonds.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recording_diamonds.png new file mode 100644 index 0000000..9c13cd0 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_workflow_recording_diamonds.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_zoombar.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_zoombar.png new file mode 100644 index 0000000..26a07da Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_zoombar.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_zoomed_clip_edit_modes.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_zoomed_clip_edit_modes.png new file mode 100644 index 0000000..fbd2b02 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/timeline_zoomed_clip_edit_modes.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_inspector_animation_clip_playable.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_inspector_animation_clip_playable.png new file mode 100644 index 0000000..685209d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_inspector_animation_clip_playable.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_control_disabled.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_control_disabled.png new file mode 100644 index 0000000..1266fb5 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_control_disabled.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_done.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_done.png new file mode 100644 index 0000000..084a1b6 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_done.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_double_click.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_double_click.png new file mode 100644 index 0000000..c7998fb Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_double_click.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_drag_board.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_drag_board.png new file mode 100644 index 0000000..0c6c514 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_drag_board.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_edit_warning.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_edit_warning.png new file mode 100644 index 0000000..b23b659 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_edit_warning.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_master.png b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_master.png new file mode 100644 index 0000000..c35d09f Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/images/workflow_nesting_master.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/index.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/index.md new file mode 100644 index 0000000..1d91564 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/index.md @@ -0,0 +1,39 @@ +# About Timeline + +![Unity's Timeline](images/timeline_splash.png) + +_Unity's Timeline_ + +Use Unity's Timeline to create cinematic content, game-play sequences, audio sequences, and complex particle effects. + +Each cut-scene, cinematic, or game-play sequence that you create with Unity's Timeline consists of a Timeline Asset and a Timeline instance. The [Timeline window](tl_window.md) creates and modifies Timeline Assets and Timeline instances simultaneously. + +The [Timeline Overview section](tl_about.md) includes details on the relationship between the Timeline window, Timeline Assets, and Timeline instances. + +The [Using Timeline section](wf_about.md) shows how to create Timeline Assets and Timeline instances, record basic animation, animate humanoids, and use other Timeline features. + +# Installing Timeline + +Timeline is a Package and is installed through the Packages window in Unity. Consult the [Packages window documentation](https://docs.unity3d.com/Manual/upm-ui.html) for more information. + +# Technical details +## Requirements + +This version of Timeline is compatible with the following versions of the Unity Editor: + +* 2019.1 and later (recommended) + +## Package contents + +The following table indicates the folder structure of the Timeline package: + +|Location|Description| +|---|---| +|``|Root folder containing the source for the Timeline Runtime. This is the source for what is available in the Player. | +|``|Root folder containing the source for the Timeline Editor used to edit Timeline files inside the Unity Editor.| + +## Document revision history + +|Date|Reason| +|---|---| +|October 10, 2018|Document created. Matches package version 0.0.0| diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_about.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_about.md new file mode 100644 index 0000000..636215d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_about.md @@ -0,0 +1,27 @@ +# Timeline properties in the Inspector window + +The Inspector window displays information about the selected GameObject including all attached components and their properties. This section documents the properties in the Inspector window that appear when you select one or many Timeline Assets, tracks, clips, or a combination. + +If you select a single Timeline Asset, track, or clip, the Inspector window displays the properties for the selected Asset, track, or clip. For example, if you select an Animation clip, the Inspector window shows the [common properties](insp_clp_anim_com.md) and [Playable Asset properties](insp_clp_anim_plyb.md) for the selected Animation clip. + +![Inspector window when selecting an Animation clip in the Timeline window](images/timeline_inspector_animation_clip_common.png) + +_Inspector window when selecting an Animation clip in the Timeline window_ + +If you select multiple Timeline Assets, tracks, or clips, the Inspector window shows two sections: a section with properties that apply to the entire selection, and a section of common properties that apply to each selected object individually. + +For example, if you select an Audio clip on one track and two Animation clips on another track, the Inspector window includes **Multiple Clip Timing** properties and **Clip Timing** properties: + +* Use the **Multiple Clip Timing** properties to change the **Start** or **End** of the selection as a group. For example, if you change the **Start** to frame 30, the selection of clips start at frame 30. This moves the start of the first clip to frame 30 and the remaining selected clips are placed relative to the first clip, respecting gaps between selected clips. +* Use the **Clip Timing** properties to change the common properties for each selected clip. If the selected clips have different values for the same property, the value is represented with a dash ("-"). If you change the dash to a value, it sets the value for all selected clips. For example, if you change the **Ease In Duration** from a dash to 10 frames, the ease in of each selected clip changes to 10 frames. + +![Inspector window when selecting multiple clips, on multiple tracks, in the Timeline window](images/timeline_inspector_multiple_selection.png) + +_Inspector window when selecting multiple clips, on multiple tracks, in the Timeline window_ + +If your selection does not have common properties, the Inspector window prompts you to narrow the selection. For example, if you select an Animation track and an Audio clip in the Timeline window, you are prompted to narrow the selection: + +![The message in the Inspector window when the selection does not have common properties](images/timeline_inspector_narrow_selection.png) + +_The message in the Inspector window when the selection does not have common properties_ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp.md new file mode 100644 index 0000000..6140a01 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp.md @@ -0,0 +1,16 @@ +# Setting clip properties + +Use the Inspector window to change the name of a clip and other properties, such as its timing and blend properties. The available properties depend on the type of clip selected. For example, select an Activation clip to change its name and set its **Clip Timing**. + +![Inspector window when selecting an Activation clip in the Timeline window](images/timeline_inspector_activation_clip.png) + +_Inspector window when selecting an Activation clip in the Timeline window_ + +Not all clips have properties. See the following sections for clips with properties: + +* [Activation clip properties](insp_clp_act.md) +* [Animation clip common properties](insp_clp_anim_com.md) +* [Animation clip Playable Asset properties](insp_clp_anim_plyb.md) +* [Audio clip properties](insp_clp_aud.md) +* [Control clip common properties](insp_clp_ctrl_com.md) +* [Control clip Playable Asset properties](insp_clp_ctrl_plyb.md) diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_act.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_act.md new file mode 100644 index 0000000..257ab48 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_act.md @@ -0,0 +1,25 @@ +# Activation clip properties + +Use the Inspector window to change the name of an Activation clip and its **Clip Timing**. + +![Inspector window when selecting an Activation clip in the Timeline window](images/timeline_inspector_activation_clip.png) + +_Inspector window when selecting an Activation clip in the Timeline window_ + +## Display Name + +The name of the Activation clip shown in the Timeline window. By default, each Activation clip is named "Active". + +## Clip Timing properties + +Use the **Clip Timing** properties to change the position and duration of the Activation clip. + +Most timing properties are expressed in both seconds (s) and frames (f). When specifying seconds to modify a **Clip Timing** property, all decimal values are accepted. When specifying frames, only integer values are accepted. For example, if you attempt to enter 12.5 in a frames (f) field, it is set to 12 frames. + +Depending on [the selected Clip Edit mode](clp_about.md), changing the **Start**, **End**, or **Duration** may ripple or replace Activation clips on the same track. + +|**Property** |**Description** | +|:---|:---| +|**Start**|The frame or time (in seconds) when the clip starts.
Changing the Start also affects the End. Changing the Start sets the End to the new Start value plus the Duration.| +|**End**|The frame or time (in seconds) when the clip ends.
Changing the End also affects the Start. Changing the End sets the Start to the new End value minus the Duration.| +|**Duration**|The duration of the clip in frames or seconds.
Changing the Duration also affects the End. Changing the Duration sets the End to the Start value plus the new Duration.| diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_anim_com.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_anim_com.md new file mode 100644 index 0000000..0120fc5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_anim_com.md @@ -0,0 +1,47 @@ +# Animation clip common properties + +Use the Inspector window to change the common properties of an Animation clip. The common properties of an Animation clip include its name, timing, play speed, blend properties, and extrapolation settings. + +![Inspector window when selecting an Animation clip in the Timeline window](images/timeline_inspector_animation_clip_common.png) + +_Inspector window when selecting an Animation clip in the Timeline window_ + +## Display Name + +The name of the Animation clip shown in the Timeline window. + +## Clip Timing properties + +Use the **Clip Timing** properties to position, change the duration, change the ease-in and ease-out duration, choose the extrapolation mode, and adjust the play speed of the Animation clip. + +Most timing properties are expressed in both seconds (s) and frames (f). When specifying seconds, a **Clip Timing** property accepts decimal values. When specifying frames, a property only accepts integer values. For example, if you attempt to enter 12.5 in a frames (f) field, the Inspector window sets the value to 12 frames. + +Depending on the [selected Clip Edit mode](clp_about.md), changing the **Start**, **End**, or **Duration** may blend, ripple, or replace Animation clips on the same track. + +|**Property** |**Description** | +|:---|:---| +|**Start**|The frame or time (in seconds) when the clip starts. Changing the Start changes the position of the clip on its track in the Timeline Asset.
Changing the Start also affects the End. Changing the Start sets the End to the new Start value plus the Duration.| +|**End**|The frame or time (in seconds) when the clip ends.
Changing the End also affects the Start. Changing the End sets the Start to the new End value minus the Duration.| +|**Duration**|The duration of the clip in frames or seconds.
Changing the Duration also affects the End. Changing the Duration sets the End to the Start value plus the new Duration.| +|**Ease In Duration**|Sets the number of seconds or frames that it takes for the clip to ease in. If the beginning of the clip overlaps and blends with another clip, the Ease In Duration cannot be edited and instead shows the duration of the blend between clips. See [Blending clips](clp_blend.md).| +|**Ease Out Duration**|Sets the number of seconds or frames that it takes for the clip to ease out. If the end of the clip overlaps and blends with another clip, the Ease Out Duration cannot be edited and instead shows the duration of the blend between clips. In this case, trim or position the clip to change the duration of the blend between clips. See [Blending clips](clp_blend.md).| +|**Clip In**|Sets the offset of when the source clip should start playing. For example, to play the last 10 seconds of a 30 second Animation clip, set Clip In to 20 seconds.| +|**Speed Multiplier**|A multiplier on the playback speed of the clip. This value must be greater than 0. Changing this value changes the duration of the clip.| + +## Animation Extrapolation + +Use the **Animation Extrapolation** properties to set the gap extrapolation before and after an Animation clip. The term **gap extrapolation** refers to how an Animation track approximates or extends animation data in the gaps before, between, and after the Animation clips on a track. + +There are two properties for [setting the gap extrapolation](clp_gap_extrap.md) between Animation clips. The **Pre-Extrapolate** property only appears for Animation clips. + +|**Property** |**Description** | +|:---|:---| +|**Pre-Extrapolate**|Controls how animation data is approximated in the gap before an Animation clip. The Pre-Extrapolate property affects the easing-in of an Animation clip.| +|**Post-Extrapolate**|Controls how animation data extends in the gap after an Animation clip. The Post-Extrapolate property affects the easing-out of an Animation clip.| + + +## Blend Curves + +Use the **Blend Curves** to customize the transition between the outgoing and incoming Animation clips. See [Blending clips](clp_blend.md) for details on how to blend clips and customize blend curves. + +When easing-in or easing-out clips, use the **Blend Curves** to customize the curve that eases-in or eases-out an Animation clip. See [Easing-in and Easing-out clips](clp_ease.md) for details. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_anim_plyb.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_anim_plyb.md new file mode 100644 index 0000000..b3f5456 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_anim_plyb.md @@ -0,0 +1,44 @@ +# Animation clip Playable Asset properties + +Use the Inspector window to change the Playable Asset properties of an Animation clip. These properties include controls for manually applying position and rotation clip offsets, and options for overriding default clip matching. + +To view the Playable Asset properties for an Animation clip, select an Animation clip in the Timeline window and expand **Animation Playable Asset** in the Inspector window. + +![Inspector window showing the **Animation Playable Asset** properties for the selected Animation clip](images/timeline_inspector_animation_clip_playable.png) + +_Inspector window showing the **Animation Playable Asset** properties for the selected Animation clip_ + +## Animation Clip + +Use the **Animation Clip** to change the source asset used by the clip on the Animation track. The source asset is either a [recorded Infinite clip](wf_rec_anim.md) or an [external motion clip](wf_char_anim.md). + +## Clip Transform Offsets + +Use the **Clip Transform Offsets** area to manually apply position and rotation offsets to the selected Animation clip. The tools and properties underneath the Clip Transform Offsets provide two methods of manually applying offsets based on the selected source: + +|**Property:** |**Description:** | +|:---|:---| +|**Move tool**|Shows a Move Gizmo in the Scene view. Use the Move Gizmo to manually position the clip offset for the selected Animation clip. Using the Move Gizmo changes the Position coordinates.| +|**Rotate tool**|Shows a Rotate Gizmo in the Scene view. Use the Rotate Gizmo to manually rotate the clip offset for the selected Animation clip. Using the Rotate Gizmo changes the Rotation coordinates.| +|**Position**|Manually sets the clip offset in X, Y, and Z coordinates. By default, the Position coordinates are set to zero and are relative to the [track offsets](insp_trk_anim.md).| +|**Rotation**|Manually sets the clip rotation offset around the X, Y, and Z axes. By default, the Rotation axes are set to zero and are relative to the [track offsets](insp_trk_anim.md).| + +You can also [automatically match the clip offsets](clp_match.md) based on the end of the previous Animation clip, or the start of the next Animation clip. The transforms that are matched depends on the **Offset Match Fields**. + +## Offsets Match Fields + +Use **Offsets Match Fields** to choose which transforms to match when [matching clip offsets](clp_match.md). By default, **Use Defaults** is enabled and uses the default matching options set for the [Animation track](insp_trk_anim.md). + +Disable **Use Defaults** to override the track matching options and choose which transformations to match when performing a Match Offsets to Previous Clip or Match Offsets to Next Clip for the selected Animation clip. When you disable **Offsets Match Fields**, a series of additional checkboxes appear. Use these additional checkboxes to enable or disable matching per coordinate, for both position and rotation. + +## Remove Start Offset + +Enable **Remove Start Offset** to make the Animation clip begin at position zero and rotation zero. The rest of the position and rotation keys in the Animation clip follow from zero. Enabling **Remove Start Offset** makes it easier to match the Animation clip with the previous Animation clip. + +Disable **Remove Start Offset** to keep the starting position and rotation. The Animation clip starts from its original position and rotation. + +## Foot IK + +Enable **Foot IK** if the Animation clip is animating a humanoid and you want to use inverse kinematics for foot solving. Inverse kinematics attempts to remedy foot sliding by solving and influencing foot placement from the foot to the hip of the humanoid. + +Disable Foot IK if the Animation clip is animating a non-humanoid object such as a moving platform or a quadruped character with a non-human bone structure. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_aud.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_aud.md new file mode 100644 index 0000000..a0ceb27 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_aud.md @@ -0,0 +1,35 @@ +# Audio clip properties + +Use the Inspector window to change the properties of an Audio clip. These properties include the name, timing, play speed, blend properties, audio media, and loop option. + +![Inspector window when selecting an Audio clip in the Timeline window](images/timeline_inspector_audio_clip.png) + +_Inspector window when selecting an Audio clip in the Timeline window_ + +## Display Name + +The name of the Audio clip shown in the Timeline window. This is not the name of the audio file that Unity uses for the waveform. For information on audio file properties, see **Audio Playable Asset** below. + +## Clip Timing properties + +Use the **Clip Timing** properties to position, change the duration, change the ease-in and ease-out duration, and adjust the play speed of the Audio clip. + +Most timing properties are expressed in both seconds (s) and frames (f). When specifying seconds, a **Clip Timing** property accepts decimal values. When specifying frames, a property only accepts integer values. For example, if you attempt to enter 12.5 in a frames (f) field, the Inspector window sets the value to 12 frames. + +Depending on [the selected Clip Edit mode](clp_about.md), changing the **Start**, **End**, or **Duration** may blend, ripple, or replace Audio clips on the same track. + +|**Property** |**Description** | +|:---|:---| +|**Start**|The frame or time (in seconds) when the clip starts. Changing the Start property changes the position of the clip on its track in the Timeline Asset.
Changing the Start also affects the End. Changing the Start sets the End to the new Start value plus the Duration.| +|**End**|The frame or time (in seconds) when the clip ends.
Changing the End also affects the Start. Changing the End sets the Start to the new End value minus the Duration.| +|**Duration**|The duration of the clip in frames or seconds.
Changing the Duration also affects the End. Changing the Duration sets the End to the Start value plus the new Duration.| + +## Blend Curves + +Use the **Blend Curves** to customize the fade-in and fade-out between the outgoing and incoming Audio clips. See [Blending clips](clp_blend.md) for details on how to blend clips and customize blend curves. + +When easing-in or easing-out Audio clips, use the **Blend Curves** to customize the curve that fades-in or fades-out an Audio clip. See [Easing-in and Easing-out clips](clp_ease.md) for details. + +## Audio Playable Asset + +Use the **Audio Playable Asset** properties to select the Audio file used by the Audio clip and to set whether the selected Audio clip loops (**Loop** enabled) or plays once (**Loop** disabled). diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_ctrl_com.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_ctrl_com.md new file mode 100644 index 0000000..57760ee --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_ctrl_com.md @@ -0,0 +1,34 @@ +# Control clip common properties + +Use the Inspector window to change the common properties of a Control clip. You can only create a Control clip in a Control track. A Control clip is a special clip that controls a nested Timeline instance, Particle System, Prefab instance, or ITimeControl Script, depending on how you create the Control clip: + +* If you create the Control clip from a GameObject with a Playable Director component associated with a Timeline Asset, then the Control clip controls a nested Timeline instance. If the GameObject parents other GameObjects associated with many Timeline Assets, then the Control clip controls multiple Timeline instances. +* If you create the Control clip from a GameObject with a Particle System component, then the Control clip controls a Particle System. +* If you create the Control clip from a GameObject linked to a Prefab, then the Control clip controls a Prefab instance. +* If you create the Control clip from a GameObject with a script that implements the ITimeControl interface, then the Control clip controls an ITimeControl Script. + +The common properties of a Control clip include its name and Clip Timing properties. Not all common properties apply to all types of Control clips. + +![Inspector window when selecting a Control clip in the Timeline window](images/timeline_inspector_control_clip_common.png) + +_Inspector window when selecting a Control clip in the Timeline window_ + +## Display Name + +The name of the Control clip shown in the Timeline window. + +## Clip Timing properties + +Use the **Clip Timing** properties to position and change the duration of the Control clip. + +Most timing properties are expressed in both seconds (s) and frames (f). When specifying seconds, a **Clip Timing** property accepts decimal values. When specifying frames, a property only accepts integer values. For example, if you attempt to enter 12.5 in a frames (f) field, the Inspector window sets the value to 12 frames. + +Depending on the [selected Clip Edit mode](clp_about.md), changing the **Start**, **End** or **Duration** of a Control clip may create an insert or replace clips on the same track. You cannot create a blend between Control clips. + +|**Property:** |**Description:** | +|:---|:---| +|**Start**|The frame or time (in seconds) when the Control clip starts. Changing the Start changes the position of the Control clip on its track in the Timeline Asset.
Changing the Start also affects the End. Changing the Start sets the End to the new Start value plus the Duration.| +|**End**|The frame or time (in seconds) when the Control clip ends.
Changing the End also affects the Start. Changing the End sets the Start to the new End value minus the Duration.| +|**Duration**|The duration of the clip in frames or seconds.
Changing the Duration also affects the End. Changing the Duration sets the End to the Start value plus the new Duration.| +|**Clip In**|Sets the offset of when the Control clip starts playing. The Clip In property only affects Particle Systems and nested Timeline instances.| +|**Speed Multiplier**|A speed multiplier that affects the playback speed of the Control clip. This value must be greater than 0. The Speed Multiplier property only affects Particle Systems and nested Timeline instances.| diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_ctrl_plyb.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_ctrl_plyb.md new file mode 100644 index 0000000..43e4a48 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_clp_ctrl_plyb.md @@ -0,0 +1,45 @@ +# Control clip Playable Asset properties + +Use the Inspector window to change the playable asset properties of a Control clip. To view the playable asset properties for a Control clip, select a Control clip in the Timeline window and expand **Control Playable Asset** in the Inspector window. + +![Inspector window showing the **Control Playable Asset** properties for the selected Control clip](images/timeline_inspector_control_clip_playable.png) + +_Inspector window showing the **Control Playable Asset** properties for the selected Control clip_ + +## Source Game Object + +Use **Source Game Object** to select the GameObject with the Particle System, nested Timeline instance, or ITimeControl Script for the selected Control clip. Changing the **Source Game Object** changes what the Control clip controls. + +## Prefab + +Use **Prefab** to select a Prefab to instantiate when the Timeline instance plays in Play Mode. When a Prefab is selected, the label of the **Source Game Object** property changes to **Parent Object**. + +When in Play Mode, the Prefab is instantiated as a child of the **Parent Object**. Although the Prefab is instantiated at the start of the Timeline instance, the Prefab is only activated during the Control clip. When the Control clip ends, the Prefab instance is deactivated. + +## Control Activation + +Enable **Control Activation** to activate the **Source Game Object** while the Control clip plays. Disable this property to activate the **Source Game Object** during the entire Timeline instance. + +The **Control Activation** property only affects Control clips that control a nested Timeline instance or a Particle System. + +## Post Playback + +When **Control Activation** is enabled, use the **Post Playback** property to set the activation state for the nested Timeline instance when the main Timeline stops playing. The **Post Playback** property only affects nested Timeline instances. + +|**Post-Playback State** |**Description** | +|:---|:---| +|**Active**|Activates the Source Game Object after the nested Timeline instance finishes playing.| +|**Inactive**|Deactivates the Source Game Object after the nested Timeline instance finishes playing.| +|**Revert**|Reverts the Source Game Object to its activation state before the nested Timeline instance began playing.| + + +## Advanced properties + +Use the Advanced properties to select additional functionality based on whether the Control clip controls a Playable Director, Particle System, or ITimeControl Script. The Advanced properties do not apply to all Control clips. + +|**Property** |**Description** | +|:---|:---| +|**Control Playable Directors**|Enable this property if the Source Game Object is attached to a Playable Director and you want the Control clip to control the nested Timeline instance associated with this Playable Director.| +|**Control Particle Systems**|Enable this property when the Control clip includes a Particle System. Set the value of the Random Seed property to create a unique, repeatable effect.| +|**Control ITimeControl**|Enable this property to control ITimeControl scripts on the Source GameObject. To use this feature, the Source Game Object must have a script that implements the ITimeControl interface.| +|**Control Children**|Enable this property if the Source Game Object has a child GameObject with either a Playable Director, Particle System, or ITimeControl Script, and you want the Control clip to control this child component.

For example, if the Source Game Object is a GameObject that parents another GameObject with a Particle System, enable this property to make the Control clip control the Particle system on the child GameObject.| diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_tl.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_tl.md new file mode 100644 index 0000000..1f39849 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_tl.md @@ -0,0 +1,15 @@ +# Setting Timeline Asset properties + +Use the Inspector window to set the frame rate, the duration mode, and a fixed length for the selected Timeline Asset. From the Project window, select a Timeline Asset to view its properties. + +![Inspector window when selecting a Timeline Asset in the Project window ](images/timeline_inspector_timeline.png) + +_Inspector window when selecting a Timeline Asset in the Project window_ + +|**Property**||**Description**| +|:---|:---|:---| +|**Frame Rate**||Sets the reference frame rate for the Timeline Asset and its Timeline instances. Change the Frame Rate to align clips at precise frames but changing the Frame Rate is only visual and has no effect on play speed, keys, tracks, or clips.

Timeline supports the following standard frame rates: 24 (PAL), 25 (NTSC), 30, 50, and 60. Timeline also supports custom frame rates from 1e-6 to 1000.

To set a custom frame rate, enter a non-standard frame rate for the Frame Rate property. In the [Timeline Settings](tl_settings.md) menu, the Custom menu item is enabled and automatically selected for the Timeline instance. The Custom menu item shows the custom frame rate in parentheses.| +| **Duration Mode**||Choose whether the duration of the Timeline Asset extends to the end of the last clip or ends at a specific time or frame.| +||Based On Clips|Sets the length of the Timeline Asset based on the end of the last clip.| +||Fixed Length|Sets the length of the Timeline Asset to a specific number of seconds or frames.| +| **Duration**||Shows the length of the Timeline Asset in seconds and frames when the Duration Mode is set to Based on Clips.

Sets the length of the Timeline Asset to a specific number of seconds or frames when the Duration Mode is set to Fixed Length.| diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk.md new file mode 100644 index 0000000..b18f764 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk.md @@ -0,0 +1,13 @@ +# Setting track properties + +Use the Inspector window to change the name of a track and its properties. The available properties depend on the type of track selected. For example, select an Animation Track to set how track offsets are applied, to apply an avatar mask, and to select which transforms are modified when matching offsets between Animation clips. + +![Inspector window when selecting an Animation track in the Timeline window](images/timeline_inspector_animation_track.png) + +_Inspector window when selecting an Animation track in the Timeline window_ + +Not all tracks have properties. See the following sections for tracks with properties: + +* [Activation Track properties](insp_trk_act.md) +* [Animation Track properties](insp_trk_anim.md) + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk_act.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk_act.md new file mode 100644 index 0000000..1cadffd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk_act.md @@ -0,0 +1,16 @@ +# Activation track properties + +Use the Inspector window to change the name of an Activation track and set the state of its bound GameObject when the Timeline Asset finishes playing. + +![Inspector window when selecting an Activation track in the Timeline window](images/timeline_inspector_activation_track.png) + +_Inspector window when selecting an Activation track in the Timeline window_ + +|**Property**||**Description**| +|:---|:---|:---| +|**Display Name**||The name of the Activation track shown in the Timeline window and Playable Director component. The Display Name applies to the Timeline Asset and all of its Timeline instances.| +|**Post-playback state**||Sets the activation state for the bound GameObject when the Timeline Asset stops playing. The Post-playback state applies to the Timeline Asset and all of its Timeline instances.| +||Active|Activates the bound GameObject when the Timeline Asset finishes playing.| +||Inactive|Deactivates the bound GameObject when the Timeline Asset finishes playing.| +||Revert|Reverts the bound GameObject to its activation state before the Timeline Asset began playing.

For example, if the Timeline Asset finishes playing with the GameObject set to inactive, and the GameObject was active before the Timeline Asset began playing, then the GameObject reverts to active.| +||Leave As Is|Sets the activation state of the bound GameObject to the state the Timeline Asset is at when it finishes playing.

For example, if the Timeline Asset finishes playing with the GameObject set to inactive, the GameObject remains inactive.| diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk_anim.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk_anim.md new file mode 100644 index 0000000..9e3be77 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/insp_trk_anim.md @@ -0,0 +1,22 @@ +# Animation track properties + +Use the Inspector window to change the name of an Animation track, set how track offsets are applied, apply an avatar mask, and set which transforms are modified by default when you [match clip offsets](clp_match.md). + +![Inspector window when selecting an Animation track in the Timeline window](images/timeline_inspector_animation_track.png) + +_Inspector window when selecting an Animation track in the Timeline window_ + +|**Property** ||**Description** | +|:---|:---|:---| +|**Display Name**||The name of the Animation track shown in the Timeline window and in the Playable Director component. The Display Name applies to the Timeline Asset and all of its Timeline instances.| +|**Track Offsets**||Applies a position and rotation offset to the start of each Animation clip on the selected Animation track. The position and rotation offset starts from a specific position and rotation or from the position and rotation relative to a state machine or another Timeline instance.| +||Apply Transform Offsets|Starts the animation in each Animation clip from a specific position and rotation offset. Use the Move and Rotate tools, and the Position and Rotation fields, to set the starting position and rotation.| +||Apply Scene Offsets|Starts the animated GameObject from its current position and rotation in the Scene. Use this mode to build a Timeline instance that transitions to and from a state machine or to and from another Timeline instance.| +||Auto (deprecated)|If you load a Scene or Project that was built before 2018.3, Track Offsets is automatically set to Auto (deprecated). This is a special mode for backwards compatibility.

After opening an old Project, choose another Track Offsets mode because the Auto (deprecated) offset disables key animation recording.| +||Move tool|Enable the Move tool to show the Move Gizmo in the Scene view. Use the Move Gizmo to visually position the transform offset. Positioning the Move Gizmo changes the Position properties.

The Move tool only appears when Track Offsets is set to Apply Transform Offsets.| +||Rotate tool|Enable the Rotate tool to show the Rotate Gizmo in the Scene view. Use the Rotate Gizmo to visually rotate the track offset. Rotating the Rotate Gizmo changes the Rotation properties.

The Rotate tool only appears when Track Offsets is set to Apply Transform Offsets.| +||Position|Sets the track position offset in X, Y, and Z coordinates. The Position fields only appears when Track Offsets is set to Apply Transform Offsets.| +||Rotation|Sets the track rotation offset in X, Y, and Z coordinates. The Rotation fields appear when Track Offsets is set to Apply Transform Offsets.| +|**Apply Avatar Mask**||Enables Avatar masking. When enabled, Timeline applies the animation of all Animation clips on the track based on the selected Avatar Mask.| +||Avatar Mask|Selects the Avatar Mask applied to all Animation clips on the Animation track.
An Avatar Mask defines which humanoid body parts are animated by Animation clips on the selected Animation track. The body parts that are masked are animated by other Animation tracks in the Timeline Asset.

For example, you can use an Avatar Mask to combine the lower-body animation on an Animation track with the upper body animation on an [Override Animation track](wf_mask.md).| +|**Default Offset Match Fields**||Expand to display a series of checkboxes that choose which transforms are matched when [matching clip offsets](clp_match.md) between Animation clips.

The Default Offset Match Fields set the default matching options for all Animation clips on the same track. Use the [Animation Playable Asset properties](insp_clp_anim_plyb.md) to override these defaults for each Animation clip.| diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/play_director.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/play_director.md new file mode 100644 index 0000000..776477c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/play_director.md @@ -0,0 +1,27 @@ +# Playable Director component + +The Playable Director component stores the link between a Timeline instance and a Timeline Asset. The Playable Director component controls when the Timeline instance plays, how the Timeline instance updates its clock, and what happens when the Timeline instance finishes playing. + +![Playable Director component added to the GameObject named Ground. The GameObject is associated with the GroundCTL Timeline Asset.](images/timeline_inspector_playable_director.png) + +_Playable Director component added to the GameObject named Ground. The GameObject is associated with the GroundCTL Timeline Asset._ + +The Playable Director component also shows the list of tracks from the associated Timeline Asset (**Playable** property) that animate GameObjects in the Scene. The link between Timeline Asset tracks and GameObjects in the Scene is referred to as **binding** or **Track binding**. For more on binding and the relationship between Timeline Assets and Timeline instances, see [Timeline overview](tl_about.md). + +|**Property** ||**Description** | +|:---|:---|:---| +|**Playable**||Associates a Timeline Asset with a GameObject in the Scene.
When you make this association, you create a Timeline instance for the selected Timeline Asset. After you create a Timeline instance, you can use the other properties in the Playable Director component to control the instance and choose which GameObjects in the Scene are animated by the Timeline Asset.| +|**Update Method**||Sets the clock source that the Timeline instance uses to update its timing.| +||DSP|Select for sample accurate audio scheduling. When selected, the Timeline instance uses the same clock source that processes audio. DSP stands for digital signal processing.| +||Game Time|Select to use the same clock source as the game clock. This clock source is affected by [time scaling](https://docs.unity3d.com/Manual/TimeFrameManagement.html).| +||Unscaled Game Time|Select to use the same clock source as the game clock, but without being affected by time scaling.| +||Manual|Select to not use a clock source and to manually set the clock time through scripting.| +|**Play on Awake**||Whether the Timeline instance is played when game play is initiated. By default, a Timeline instance is set to begin as soon as the Scene begins playback. To disable the default behaviour, disable the Play on Awake option in the Playable Director component.| +|**Wrap Mode**||The behaviour when the Timeline instance ends playback.| +||Hold|Plays the Timeline instance once and holds on the last frame until playback is interrupted.| +||Loop|Plays the Timeline instance repeatedly until playback is interrupted.| +||None|Plays the Timeline instance once.| +|Initial Time||The time (in seconds) at which the Timeline instance begins playing. The Initial Time adds a delay in seconds before the Timeline instance actually begins. For example, when Play On Awake is enabled and Initial Time is set to five seconds, if you click the Play button in the Unity Toolbar, [Play Mode](https://docs.unity3d.com/Manual/GameView.html) starts and the Timeline instance begins five seconds later.| +|**Current Time**||Views the progression of time according to the Timeline instance in the Timeline window. The Current Time field matches the Playhead Location field.
Use the Current Time field when the Timeline window is hidden. The Current Time field appears in the Playable Director Component when in Timeline Playback mode or when Unity is in Game Mode.| +|**Bindings**||Shows the link between GameObjects in the Scene with tracks from the associated Timeline Asset (Playable property). The Bindings area is split into two columns:
The first column lists the tracks from the Timeline Asset. Each track is identified by an icon and its track type.
The second column lists the GameObject linked (or bound) to each track.
The Bindings area does not list Track groups, Track sub-groups, or tracks that do not animate GameObjects. The Timeline window shows the same bindings in the [Track list](trk_list_about.md).| + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_about.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_about.md new file mode 100644 index 0000000..98d043c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_about.md @@ -0,0 +1,50 @@ +# Timeline overview + +Use the **Timeline window** to create cut-scenes, cinematics, and game-play sequences by visually arranging tracks and clips linked to GameObjects in your Scene. + +![A cinematic sequence in the Timeline window.](images/timeline_cinematic_example.png) + +_A cinematic sequence in the Timeline window._ + +For each cut-scene, cinematic, or game-play sequence, the Timeline window saves the following: + +* **Timeline Asset**: Stores the tracks, clips, and recorded animations without links to the specific GameObjects being animated. The Timeline Asset is saved to the Project. +* **Timeline instance**: Stores links to the specific GameObjects being animated or affected by the Timeline Asset. These links, referred to as **bindings**, are saved to the Scene. + +## Timeline Asset + +The Timeline window saves track and clip definitions as a **Timeline Asset**. If you record key animations while creating your cinematic, cut-scene, or game-play sequence, the Timeline window saves the recorded clips as children of the Timeline Asset. + +![The Timeline Asset saves tracks and clips (red). Timeline saves recorded clips (blue) as children of the Timeline Asset.](images/timeline_overview_asset.png) + +_The Timeline Asset saves tracks and clips (red). Timeline saves recorded clips (blue) as children of the Timeline Asset._ + +## Timeline instance + +To animate a GameObject in your Scene with a Timeline Asset, you must create a **Timeline instance**. A **Timeline instance** associates a Timeline Asset with the GameObject in the Scene, through a [Playable Director](play_director.md) component. + +When you select a GameObject in a Scene that has a Playable Director component, the Timeline instance appears in the Timeline window. The bindings appear in the Timeline window and in the Playable Director component (Inspector window). + +![The Playable Director component shows the Timeline Asset (blue) with its bound GameObjects (red). The Timeline window shows the same bindings (red) in the Track list.](images/timeline_overview_instance.png) + +_The Playable Director component shows the Timeline Asset (blue) with its bound GameObjects (red). The Timeline window shows the same bindings (red) in the Track list._ + +The Timeline window provides an automated method of creating a Timeline instance while [creating a Timeline Asset](wf_instance.md). + +## Reusing Timeline Assets + +Because Timeline Assets and Timeline instances are separate, you can reuse the same Timeline Asset with many Timeline instances. + +For example, you could create a Timeline Asset named VictoryTL with the animation, music, and particle effects that play when the main game character (Player) wins. To reuse the VictoryTL Timeline Asset to animate another game character (Enemy) in the same Scene, you can create another Timeline instance for the secondary game character. + +![The Player GameObject (red) is attached to the VictoryTL Timeline Asset](images/timeline_overview_player.png) + +_The Player GameObject (red) is attached to the VictoryTL Timeline Asset]_ + +![The Enemy GameObject (blue) is also attached to the VictoryTL Timeline Asset](images/timeline_overview_enemy.png) + +_The Enemy GameObject (blue) is also attached to the VictoryTL Timeline Asset]_ + +Because you are reusing the Timeline Asset, any modification to the Timeline Asset in the Timeline window results in changes to all Timeline instances. + +For example, in the previous example, if you delete the Audio track while modifying the Player Timeline instance, the Timeline window removes the track from the VictoryTL Timeline Asset. The Timeline window also removes the Audio track from all instances of the VictoryTL Timeline Asset, including the Enemy Timeline instance. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_gloss.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_gloss.md new file mode 100644 index 0000000..4ec438e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_gloss.md @@ -0,0 +1,71 @@ +# Timeline glossary + +This topic provides an alphabetical list of the terminology used throughout the Timeline documentation. + +**animatable property**: A property belonging to a GameObject, or belonging to a component added to a GameObject, that can have different values over time. + +**animation**: The result of adding two different keys, at two different times, for the same animatable property. + +**animation curve**: The curve drawn between keys set for the same animatable property, at different frames or seconds. The position of the tangents and the selected interpolation mode for each key determines the shape of the animation curve. + +**binding** or **Track binding**: Refers to the link between Timeline Asset tracks and the GameObjects in the scene. When you link a GameObject to a track, the track animates the GameObject. Bindings are stored as part of the Timeline instance. + +**blend** and **blend area**: The area where two Animation clips, Audio clips, or Control clips overlap. The overlap creates a transition that is referred to as a **blend**. The duration of the overlap is referred to as the **blend area**. The blend area sets the duration of the transition. + +**Blend In curve**: In a blend between two Animation clips, Audio clips, or Control clips, there are two blend curves. The blend curve for the incoming clip is referred to as the **Blend In** curve. + +**Blend Out curve**: In a blend between two Animation clips, Audio clips, or Control clips, there are two blend curves. The blend curve for the out-going clip is referred to as the **Blend Out** curve. + +**clip**: A generic term that refers to any clip within the Clips view of the Timeline window. + +**Clips view**: The area in the Timeline window where you add, position, and manipulate clips. + +**Control/Command**: This term is used when instructing the user to press or hold down the Control key on Windows, or the Command key on Mac. + +**Curves view**: The area in the Timeline window that shows the animation curves for Infinite clips or for Animation clips that have been converted from Infinite clips. The Curves view is similar to [Curves mode](animeditor-AnimationCurves) in the Animation window. + +**Gap extrapolation**: How an Animation track approximates animation data in the gaps before and after an Animation clip. + +**field**: A generic term that describes an editable box that the user clicks and types-in a value. A field is also referred to as a **property**. + +**incoming clip:** The second clip in a blend between two clips. The first clip, the out-going clip, transitions to the second clip, the **incoming clip**. + +**Infinite clip**: A special animation clip that contains basic key animation recorded directly to an Animation track within the Timeline window. An Infinite clip cannot be positioned, trimmed, or split because it does not have a defined duration: it spans the entirety of an Animation track. + +**interpolation**: The estimation of values that determine the shape of an animation curve between two keys. + +**interpolation mode**: The interpolation algorithm that draws the animation curve between two keys. The interpolation mode also joins or breaks left and right tangents. + +**key**: The value of an animatable property, set at a specific point in time. Setting at least two keys for the same property creates an animation. + +**out-going clip**: The first clip in a blend between two clips. The first clip, the **out-going clip**, transitions to the second clip, the incoming clip. + +**Playhead Location field**: The field that expresses the location of the Timeline Playhead in either frames or seconds, depending on the Timeline Settings. + +**property**: A generic term for the editable fields, buttons, checkboxes, or menus that comprise a component. An editable field is also referred to as a **field**. + +**tangent**: One of two handles that controls the shape of the animation curve before and after a key. Tangents appear when a key is selected in the Curves view, or when a key is selected in the Curve Editor. + +**tangent mode**: The selected interpolation mode used by the left tangent, right tangent, or both tangents. + +**Timeline** or **Unity's Timeline**: Generic terms that refer to all features, windows, editors, and components related to creating, modifying, or reusing cut-scenes, cinematics, and game-play sequences. + +**Timeline Asset**: Refers to the tracks, clips, and recorded animation that comprise a cinematic, cut-scene, game-play sequence, or other effect created with the Timeline window. A Timeline Asset does not include bindings to the GameObjects animated by the Timeline Asset. The bindings to scene GameObjects are stored in the Timeline instance. The Timeline Asset is project-based. + +**Timeline window**: The official name of the window where you create, modify, and preview a Timeline instance. Modifications to a Timeline instance also affects the Timeline Asset. + +**Timeline instance**: Refers to the link between a Timeline Asset and the GameObjects that the Timeline Asset animates in the scene. You create a Timeline instance by associating a Timeline Asset to a GameObject through a Playable Director component. The Timeline instance is scene-based. + +**Timeline Playback Controls**: The row of buttons and fields in the Timeline window that controls playback of the Timeline instance. The Timeline Playback Controls affect the location of the Timeline Playhead. + +**Timeline Playback mode**: The mode that previews the Timeline instance in the Timeline window. Timeline Playback mode is a simulation of Play mode. Timeline Playback mode does not support audio playback. + +**Timeline Playhead**: The white marker and line that indicates the exact point in time being previewed in the Timeline window. + +**Timeline Selector**: The name of the menu in the Timeline window that selects the Timeline instance to be previewed or modified. + +**track**: A generic term that refers to any track within the Track list of the Timeline window. + +**Track groups**: The term for a series of tracks organized in an expandable and collapse collection of tracks. + +**Track list**: The area in the Timeline window where you add, group, and modify tracks. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_play_cntrls.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_play_cntrls.md new file mode 100644 index 0000000..69d5844 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_play_cntrls.md @@ -0,0 +1,104 @@ +# Timeline Playback Controls + +To play the Timeline instance and to control the location of the Timeline Playhead, use the Timeline Playback Controls. + +![Timeline Playback Controls](images/timeline_playback_controls.png) + +_Timeline Playback Controls_ + +## Timeline Start button + +![](images/timeline_start_button.png) + +To move the Timeline Playhead to the start of the Timeline instance, click the Timeline Start button, or hold Shift and press Comma (,). + +## Previous Frame button + +![](images/timeline_previous_frame_button.png) + +To move the Timeline Playhead to the previous frame, click the Previous Frame button, or press Comma (,). + + +## Timeline Play button + +![](images/timeline_play_button.png) + +To preview the Timeline instance in Timeline Playback mode, click the Timeline Play button, or press the Spacebar. Timeline Playback mode does the following: + +* Begins playback at the current location of the Timeline Playhead and continues to the end of the Timeline instance. If the Play Range button is enabled, playback is restricted to a specified time range. +* The Timeline Playhead position moves along the Timeline instance. The Playhead Location field shows the position of the Timeline Playhead in either frames or seconds, depending on the [Timeline settings](tl_settings.md). +* To pause playback, click the Timeline Play button again, or press the Spacebar. +* When playback reaches the end of the Timeline instance, the Wrap Mode determines whether playback should hold, repeat, or do nothing. The Wrap Mode setting is a [Playable Director component](play_director.md) property. + +Timeline Playback mode provides a preview of the Timeline instance while in the Timeline window. Timeline Playback mode is only a simulation of [Play Mode in the Game View](https://docs.unity3d.com/Manual/GameView.html). + +The Timeline Playback mode does not support audio playback. To preview a Timeline instance with audio, enable the Play on Awake option in the [Playable Director component](play_director.md) and preview game play in Play Mode. + +## Next Frame button + +![](images/timeline_next_frame_button.png) + +To move the Timeline Playhead to the next frame, click the Next Frame button, or press Period (.). + +## Timeline End button + +![](images/timeline_end_button.png) + +To move the Timeline Playhead to the end of the Timeline instance, click the Timeline End button, or hold Shift and press Period (.). + + +## Play Range button + +![](images/timeline_play_range_button.png) + +Enable the **Play Range** button to restrict playback to a specific range of seconds or frames. You can only set a play range when previewing a Timeline instance within the Timeline window. Unity ignores the play range in [Play Mode](https://docs.unity3d.com/Manual/GameView.html). + +The Timeline ruler highlights the play range and indicates its start and end with white markers. To modify the play range, drag either marker. + +![Play Range (red circle) enabled with while markers and highlighted area defining range](images/timeline_play_range.png) + +_Play Range (red circle) enabled with while markers and highlighted area defining range_ + +Use **Play Range Mode**, in the [Timeline Settings](tl_settings.md), to set whether the play range plays once or repeatedly. + + +## Timeline Playhead and Playhead Location field + +The Timeline Playhead indicates the exact point in time being previewed in the Timeline window. The Playhead Location field expresses the location of the Timeline Playhead in either frames or seconds. + +![Playhead Location field and Timeline Playhead (red). The Timeline Playhead also appears on the Zoombar (red arrow).](images/timeline_playhead_location.png) + +_Playhead Location field and Timeline Playhead (red). The Timeline Playhead also appears on the Zoombar (red arrow)._ + +Use the [Zoombar to navigate, scroll, and zoom](clp_pan_zoom.md) the Clips view. A white line indicates the location of the Timeline Playhead in relation to the entire Timeline instance. + +To jump the Timeline Playhead to a specific time, click the Timeline ruler. You can also enter the time value in the Playhead Location field and press Enter. When entering a value, frames are converted to seconds or seconds are converted to frames, based on the Timeline settings. For example, if the Timeline ruler is expressed as seconds with a frame rate of 30 frames per second, entering 180 in the Playhead Location field converts 180 frames to seconds and moves the Timeline Playhead to 6:00. To set the time format that the Timeline window uses, configure the [Timeline Settings](tl_settings.md). + +## Switching between Local and Global + +Use the Local or Global button to change the Timeline ruler from local time to global time. Local time and global time are only relevant when editing a nested Timeline instance. + +[To create a nested Timeline instance](wf_nested.md), drag a GameObject associated with a Timeline instance into another Timeline instance. The Timeline instance you are dragging into becomes the master Timeline instance. The Timeline instance associated with the GameObject becomes a nested Timeline instance. + +![A nested Timeline instance appears as a Control clip on a Control track (red arrow)](images/timeline_nesting_example.png) + +_A nested Timeline instance appears as a Control clip on a Control track (red arrow)_ + +To edit a nested Timeline instance, double-click the Control clip that contains the nested Timeline instance. The Timeline window switches to the nested Timeline instance, indicated by the Timeline title which shows the name and GameObject of the master Timeline instance, followed by the name and GameObject of the nested Timeline instance. + +![The Timeline title indicates that you are editing a nested Timeline instance (red outline). The Global button (red arrow) indicates that the nested Timeline instance is shown using global time.](images/timeline_nesting_editing.png) + +_The Timeline title indicates that you are editing a nested Timeline instance (red outline). The Global button (red arrow) indicates that the nested Timeline instance is shown using global time._ + +When editing a nested Timeline instance, click **Global** to switch the Timeline ruler to Local time. Local time is relative to the nested Timeline. This means that the Timeline ruler starts at zero. + +![A nested Timeline instance in Local time.](images/timeline_nesting_local.png) + +_A nested Timeline instance in Local time._ + +Click **Local** to view the Timeline ruler in relation to the placement of the nested Timeline in the master Timeline instance. This means that if, for example, if the Control clip is placed at frame 70 of the master Timeline then the Timeline ruler starts at 70 at the beginning of the nested Timeline instance. + +![A nested Timeline instance in Global time.](images/timeline_nesting_global.png) + +_A nested Timeline instance in Global time._ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_selector.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_selector.md new file mode 100644 index 0000000..36be7f6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_selector.md @@ -0,0 +1,11 @@ +# Timeline Preview and Timeline Selector + +Use the Timeline Selector to select the Timeline instance to view, modify, or preview in the Timeline window. The Timeline **Preview** button enables or disables previewing the effect that the selected Timeline instance has on your Scene. + +![Timeline **Preview** button with Timeline Selector and menu. Selecting a Timeline instance automatically enables the Timeline Preview button.](images/timeline_preview_selector.png) + +_Timeline **Preview** button with Timeline Selector and menu. Selecting a Timeline instance automatically enables the Timeline Preview button._ + +To select a Timeline instance, click the Timeline Selector and choose from the list of Timeline instances in the current Scene. + +Each menu item displays the name of the Timeline Asset and its associated GameObject in the current Scene. For example, the Timeline Asset named GroundATL that is associated with the Ground GameObject, displays as "GroundATL (Ground)." diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_settings.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_settings.md new file mode 100644 index 0000000..f2227ef --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_settings.md @@ -0,0 +1,70 @@ +# Timeline Settings + +Use the Timeline Settings to choose the Timeline window and Timeline Asset settings such as the unit of measurement, the duration mode, audio waveform, and window snap settings. + +![Click the Cog icon in the Timeline window to view the Timeline Settings menu](images/timeline_cog_menu.png) + +_Click the Cog icon in the Timeline window to view the Timeline Settings menu_ + +## Seconds or Frames + +Select either **Seconds** or **Frames** to set the Timeline window to display time as either seconds or frames. + +## Duration Mode + +Use the **Duration Mode** to set whether the duration of the Timeline Asset extends to the end of the last clip (**Based On Clips**), or ends at a specific time or frame (**Fixed Length**). When the **Duration Mode** is set to **Fixed Length**, use one of the following methods to change the length of the Timeline Asset: + +* Select the Timeline Asset in the Project window and use the Inspector window to set the Duration in seconds or frames. +* In the Timeline window, drag the blue marker on the timeline. The blue marker indicates the end of the Timeline Asset. A blue line indicates the duration of the Timeline Asset. + +![Timeline Asset duration (red rectangle) and end marker (green circle)](images/timeline_duration_mode.png) + +_Timeline Asset duration (red rectangle) and end marker (green circle)_ + +## Frame Rate + +Select one of the options under **Frame Rate** to set the unit of measurement for the Timeline ruler. Change the Frame Rate to align clips at precise frames but changing the Frame Rate is only visual and has no effect on play speed, keys, tracks, or clips. The following standard frame rates are listed: Film (24 fps), PAL (25 fps), NTSC (29.97 fps), 30, 50, or 60. + +Timeline supports custom frame rates from 1e-6 to 1000. To set a custom frame rate, you must use the **Frame Rate** property in the [Timeline Asset settings](insp_tl.md). When the Timeline Asset is set to a custom frame rate, the Custom menu item is enabled and is automatically selected for the Timeline instance. The Custom menu item shows the custom frame rate in parentheses. + +## Play Range Mode + +Select one of the options under **Play Range Mode** to set the behaviour of the Timeline window when the [Play Range button](tl_play_cntrls.md#playrange) is enabled. + +* When **Play Range Mode** is set to **Loop**, the Timeline instance plays the defined Play Range repeatedly, until playback is interrupted. +* When **Play Range Mode** is set to **Hold**, the Timeline instance plays the defined Play Range once and stops at the end of the Play Range. + +You can only set a play range when previewing a Timeline instance within the Timeline window. Unity ignores the play range in [Play Mode](https://docs.unity3d.com/Manual/GameView.html). + +## Show Audio Waveforms + +Enable **Show Audio Waveforms** to draw the waveforms for all audio clips on all audio tracks. For example, use an audio waveform as a guide when manually positioning an Audio clip of footsteps with the Animation clip of a humanoid walking. Disable **Show Audio Waveform** to hide audio waveforms. **Show Audio Waveforms** is enabled by default. + +## Enable Audio Scrubbing + +**Enable Audio Scrubbing** to play audio while dragging the Timeline Playhead. + +Disable **Enable Audio Scrubbing** to stop playing audio while dragging the Timeline Playhead. When disabled, Timeline only plays audio when in [Timeline Playback mode](tl_play_cntrls.md#playbutton). + +## Snap to Frame + +Enable **Snap to Frame** to manipulate clips, preview Timeline instances, drag the Timeline Playhead, and position the Timeline Playhead using frames. Disable **Snap to Frame** to use subframes. **Snap to Frame** is enabled by default. + +![Disable **Snap to Frame** to position clips and drag the playhead between frames](images/timeline_frames_subframes.png) + +_Disable **Snap to Frame** to position clips and drag the playhead between frames_ + +For example, when **Snap to Frame** is disabled and you drag the Timeline Playhead, it moves the playhead between frames. The format of [Playhead Location](tl_play_cntrls.md#playheadlocation) displays differently depending on whether the Timeline window is set to **Seconds** or **Frames**: + +* When the Timeline window is set to **Frames**, the Playhead Location shows frames and subframes. For example, 8 frames and 34 subframes displays as 8.34. +* When the Timeline window is set to **Seconds**, the Playhead Location shows seconds, frames, and subframes. For example, 6 seconds, 17 frames, and 59 subframes displays as 6:17 [.59]. + +Manipulating clips, previewing Timeline instances, and positioning the playhead at the subframes level is useful when attempting to synchronize animation and effects with audio. Many high-end audio processing software products create audio waveforms with subframe accuracy. + +## Edge Snap + +Enable the **Edge Snap** option to snap clips when you position, trim, and create blends. + +When enabled, the Timeline window snaps the start or end of a clip when dragged within 10 pixels of the Timeline Playhead, the start or end of a clip on the same track, the start or end of a clip on another track, or the start or end of the entire Timeline instance. The start guide or end guide is redrawn in white to indicate that the clip has snapped to the edge of another clip or the Timeline Playhead. + +Disable **Edge Snap** to create more accurate blends, ease-ins, or ease-outs. **Edge Snap** is enabled by default. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_window.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_window.md new file mode 100644 index 0000000..aceb46b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/tl_window.md @@ -0,0 +1,29 @@ +# Timeline window + +To access the Timeline window, select **Sequencing** > **Timeline** from the Window menu. What the Timeline window shows depends on what you select in either the Project window or the Scene view. + +For example, if you select a GameObject that is associated with a Timeline Asset, the Timeline window shows the tracks and clips from the Timeline Asset and the GameObject bindings from the Timeline instance. + +![Selecting a GameObject associated with a Timeline Asset displays its tracks and clips, and the bindings from the Timeline instance](images/timeline_editor_bindings.png) + +_Selecting a GameObject associated with a Timeline Asset displays its tracks and clips, and the bindings from the Timeline instance_ + +If you haven’t selected a GameObject, the Timeline window informs you that the first step for creating a Timeline Asset and a Timeline instance is to select a GameObject. + +![With no GameObject selected, the Timeline window provides instructions](images/timeline_editor_to_start.png) + +_With no GameObject selected, the Timeline window provides instructions_ + +If a GameObject is selected and it is not associated with a Timeline Asset, the Timeline window provides the option for creating a new Timeline Asset, adding the necessary components to the selected GameObject, and creating a Timeline instance. + +![Select a GameObject that is not associated with a Timeline Asset to create a new Timeline Asset, add components, and create a Timeline instance](images/timeline_editor_create.png) + +_Select a GameObject that is not associated with a Timeline Asset to create a new Timeline Asset, add components, and create a Timeline instance_ + +To use the Timeline window to view a previously created Timeline Asset, select the Timeline Asset in the Project window and open the Timeline window. The Timeline window shows the tracks and clips associated with the Timeline Asset, but without the track bindings to GameObjects in the Scene. In addition, the Timeline Playback Controls are disabled and there is no Timeline Playhead. + +![Timeline Asset selected in the Project window shows its tracks and clips, but with no track bindings. The Timeline Playback Controls are disabled.](images/timeline_editor_project.png) + +_Timeline Asset selected in the Project window shows its tracks and clips, but with no track bindings. The Timeline Playback Controls are disabled._ + +Timeline saves the track bindings to GameObjects in the Scene with the Timeline instance, not the Timeline Asset. For details on the relationship between the Project, Scene, Timeline Assets, and Timeline instances, see [Timeline overview](tl_about.md). diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_add.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_add.md new file mode 100644 index 0000000..2436932 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_add.md @@ -0,0 +1,15 @@ +# Adding tracks + +The Timeline window supports many different methods of adding tracks to the Track list. Depending on the method you choose, the Timeline window may also add track bindings to the Track header, clips to tracks, and components to GameObjects. + +![Add Track menu](images/timeline_add_track_menu.png) + +_Add Track menu_ + +The simplest method to add a track is to click the **Add** button and select the type of track from the **Add Track** drop-down menu. You can also right-click an empty area of the Track list to make the **Add Track** menu appear. + +The Timeline window also supports dragging a GameObject into the Track list. Drag a GameObject into an empty area in the Track list and select the type of track to add from the context menu. Depending on the type of track selected, the Timeline window performs different actions: + +* Select **Animation Track** and the Timeline window binds the GameObject to the Animation track. If the GameObject doesn't already have an Animator component, the Timeline window creates an Animator component for the GameObject. +* Select **Activation Track** and the Timeline window binds the GameObject to the Activation track. There are some limitations when creating an Activation track when dragging a GameObject. For example, the main GameObject with the Playable Directory component should not be bound to an Activation track. Because this is the same GameObject that links the Timeline Asset to the Scene, activating and disabling the GameObject affects the length of Timeline instance. +* Select **Audio Track** and the Timeline window adds an Audio Source component to the GameObject and binds this Audio Source component to the Audio track. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_delete.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_delete.md new file mode 100644 index 0000000..208c728 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_delete.md @@ -0,0 +1,13 @@ +# Deleting tracks + +Delete a track to remove the track, its clips, blends, and properties from the Timeline window. This is a destructive action that modifies a Timeline Asset and affects all Timeline instances based on the Timeline Asset. + +There are many ways to delete tracks: + +* Select a track and press the **Delete** key (or hold **Command** and press **Delete**). +* Select a track. Right-click an empty area in the Track list and select **Delete** from the context menu. +* Right-click a track and select **Delete** from the context menu. + +Deleting an Animation track also deletes the recorded Infinite clips for Animation clips that were converted from Infinite clips. The Project window may still show recorded Infinite clips as children of a Timeline Asset because it is not updated until you save the Scene or Project. + +You cannot delete a locked track. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_dup.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_dup.md new file mode 100644 index 0000000..4b573d9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_dup.md @@ -0,0 +1,14 @@ +# Duplicating tracks + +Duplicating a track copies its clips, blends, and Inspector properties. If the duplicated track is bound to a GameObject, the binding is reset to **None**. + +![Track binding for a duplicated track is reset to **None**](images/timeline_track_duplicate.png) + +_Track binding for a duplicated track is reset to **None**_ + +There are many ways to duplicate tracks: + +* Select a track. Right-click an empty area in the Track list and select **Duplicate** from the context menu. +* Select a track. Hold Command/Control and press D. +* Select a track. Hold Command/Control and press C, for copy, then press V, for paste. +* Right-click a track and either select **Duplicate** from the context menu or hold Command/Control and press D. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_list_about.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_list_about.md new file mode 100644 index 0000000..0f535f9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_list_about.md @@ -0,0 +1,29 @@ +# Track list and Track headers + +Use the Track list to add, select, duplicate, delete, lock, mute, and reorder the tracks that comprise a Timeline Asset. You can also organize tracks into Track groups. + +![Track list and Track headers for the Timeline instance named GroundETL](images/timeline_track_list.png) + +_Track list and Track headers for the Timeline instance named GroundETL_ + +Each track has two areas: + +* Track list: Shows a Track header for each track. +* Clips view: Shows the clips for each track. + +The Track header contains the name of the track or its binding information. Track bindings are saved to the Playable Director component associated with the GameObject that is linked to the Timeline Asset. This association is referred to as a **Timeline instance** (see [Timeline overview](tl_about.md)). + +Each Track header has a colored accent that identifies the track type and its clips: + +* Activation tracks are green. Use Activation tracks to add Activation clips which set when the bound GameObject is active (shown). The GameObject is bound to the Activation track. +* Animation tracks are blue. Use Animation tracks to add Animation clips that animate the bound GameObject. Use an Animation track and its Animation clips to [record basic animation](wf_rec_anim.md) or [animate a humanoid](wf_char_anim.md). +* Audio tracks are orange. Use Audio tracks to add Audio clips for playing background music or sound effects. Each Audio clip is bound to an audio waveform. The audio source, that plays each waveform, is bound to the Audio track. +* Control tracks are turquoise. Use Control tracks to add Control clips which are special clips that control a nested Timeline instance, Particle System, Prefab instance, or ITimeControl Script. [How the Control clip is created](insp_clp_ctrl_com.md) determines what it controls. +* Playable tracks are white. Use Playable tracks to add Playable clips. Each Playable clip is bound to a script that uses the [Playables API](https://docs.unity3d.com/Manual/Playables.html) to create custom animation tools, effects or gameplay mechanisms. + +Each Track header is also identified by an icon. If a track has a binding error or if the bound GameObject is disabled, the icon representing a track changes to an alert icon. For example, if an Animation track is bound to a GameObject that is disabled at the location of the Playhead, the icon switches to an alert icon. + +![An alert icon indicates that the RedCube bound GameObject is disabled at the start of the Timeline instance](images/timeline_track_alert_icon.png) + +_An alert icon indicates that the RedCube bound GameObject is disabled at the start of the Timeline instance_ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_lock.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_lock.md new file mode 100644 index 0000000..d274e47 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_lock.md @@ -0,0 +1,13 @@ +# Locking tracks + +Lock a track to prevent editing of the track and any of the clips used by the track. + +Use lock when you have finished animating a track and you want to avoid inadvertently modifying the track. You cannot edit or delete a locked track, or select its clips. The Lock icon identifies a locked track. + +![Selected and locked track with Lock icon (red circle)](images/timeline_track_locked.png) + +_Selected and locked track with Lock icon (red circle)_ + +To lock a track, right-click on the track and select **Lock** from the context menu. You can also select a track and press L. You can select and lock multiple tracks at a time. A track can be both locked and muted. + +To unlock a track, click the Lock icon. You can also select a locked track and press L, or right-click and select **Unlock**. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_mute.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_mute.md new file mode 100644 index 0000000..26cb1f3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_mute.md @@ -0,0 +1,15 @@ +# Muting tracks + +Mute a track to disable its clips and their effect on the Scene. + +You can also use mute when your Timeline instance includes many tracks with animations and you want to focus on the animation of one or a few tracks. The Mute icon identifies a muted track. + +![Selected and muted track with Mute icon (red circle)](images/timeline_track_muted.png) + +_Selected and muted track with Mute icon (red circle)_ + +To mute a track, right-click on the track and select **Mute** from the context menu. You can also select a track and press M. You can select and mute multiple tracks at a time. A track can be both muted and locked. + +To unmute a track, click the Mute icon. You can also select a muted track and press M, or right-click and select **Unmute**. + +**Note:** Muted tracks can be deleted. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_reorder.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_reorder.md new file mode 100644 index 0000000..dbd2035 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_reorder.md @@ -0,0 +1,17 @@ +# Reordering tracks and rendering priority + +In the Timeline window, the rendering and animation priority is from the last track to the first track, where the last track takes priority. You can reorder tracks to change their rendering or animation priority. + +For example, a Timeline instance has four Animation tracks, where the second and fourth Animation tracks animate the same GameObject. The fourth track overrides the animation on any of the preceding tracks. This animation priority is the reason why Animation Override tracks are added as child tracks, under Animation tracks. + +![The second track (red arrow) and fourth track (selected, green arrow) animate the same GameObject (GreenCube). The fourth track has priority and overrides the second track.)](images/timeline_track_priority.png) + +_The second track (red arrow) and fourth track (selected, green arrow) animate the same GameObject (GreenCube). The fourth track has priority and overrides the second track.)_ + +To reorder tracks, select one or more tracks and drag until a white insert line appears between tracks in the Track list. The white insert line indicates the destination of the tracks you are dragging. The last selected track type displays beside the cursor. Release the mouse button to reorder tracks. + +![For example, the white insert line indicates that the Control track (Storm) will be placed between the first track (Ground) and second track (Audio Src)](images/timeline_track_reorder.png) + +_For example, the white insert line indicates that the Control track (Storm) will be placed between the first track (Ground) and second track (Audio Src)_ + +An Animation Override track is bound to the same GameObject as its parent Animation track. Reordering an Animation Override track converts it to an Animation track and resets its binding to none. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_select.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_select.md new file mode 100644 index 0000000..954031d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/trk_select.md @@ -0,0 +1,25 @@ +# Selecting tracks + +To select a single track, click its Track header in the Track list. You can also click an empty area in the Clips view. When you select a track, Timeline highlights its Track header and Clips view. Selecting a track deselects all other tracks or clips. + +Selecting a track shows its properties in the Inspector window. The track properties change depending on the type of track and how many tracks you select. See [Timeline Inspector](insp_about.md) for details. + +To select contiguous tracks, select the first track and then hold Shift and click the last track in the series. For example, to select three contiguous tracks, click the first track, then hold Shift and click the third track. All three tracks are selected. + +![Click to select the first track](images/timeline_track_select_first.png) + +_Click to select the first track_ + +![Hold Shift and click to select contiguous tracks](images/timeline_track_select_last.png) + +_Hold Shift and click to select contiguous tracks_ + +Hold Command/Control and click to select discontiguous tracks. Hold Command/Control and click to deselect a selected track. + +There are many other ways to select tracks: + +* Hold down Shift and press the Up arrow or Down arrow keys to add and remove tracks from the selection. +* To deselect all tracks or clips, click on an empty area in the Track list. +* When a clip is selected on a track, press Tab to select the track. +* Use the arrow keys to change the selected track. The Up and Down arrow keys select the previous or next track. +* The Right arrow key selects the first clip on the track. If a Track group is already selected, the Left arrow and Right arrow keys collapse and expand the Track group. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_about.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_about.md new file mode 100644 index 0000000..57d5b0a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_about.md @@ -0,0 +1,10 @@ +# Using the Timeline window + +Use the Timeline window to create Timeline Assets and Timeline instances, record animation, schedule animation, and create cinematic content. This section shows you how to do the following tasks: + +* [Create a Timeline Asset and Timeline instance](wf_instance.md) +* [Record basic animation with an Infinite clip](wf_rec_anim.md) +* [Convert an Infinite clip to an Animation clip](wf_conv_infinite.md) +* [Animate a humanoid](wf_char_anim.md) +* [Use Animation Override tracks and Avatar Masking](wf_mask.md) +* [Nest Timeline Instances](wf_nested.md) diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_char_anim.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_char_anim.md new file mode 100644 index 0000000..3ab7467 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_char_anim.md @@ -0,0 +1,75 @@ +# Animating a humanoid + +This task demonstrates how to use a Timeline instance to animate a humanoid with external motion clips. This workflow also demonstrates how to match clip offsets, manually adjust clip offsets, and create blends between clips to minimize jumping and sliding. Although this workflow uses a humanoid, you can use this animation method for any GameObject. + +This workflow assumes that you have already created a Timeline instance with an empty Animation track bound to a humanoid. For example, the DefaultMale humanoid is bound to an empty Animation track: + +![DefaultMale humanoid bound to an empty Animation track.](images/timeline_humanoid_start.png) + +_DefaultMale humanoid bound to an empty Animation track._ + +From your Project, drag a motion clip into the Animation track to create a new Animation clip. For example, drag an idle pose as the first clip to start the humanoid from an idle stance. + +To position, resize, or trim your Animation clip in the Clips view, select **Mix mode** as the Clip Edit mode. There are [three different Clip Edit modes](clp_about.md) that change the editing behaviour of the Timeline window. When the Timeline window is in **Mix mode**, you can drag and trim clips to create blends. + +![Animation track, bound to the DefaultMale humanoid, with an idle pose (Idle) as its Animation clip. The Mix mode (red circle) is the selected Clip Edit mode.](images/timeline_humanoid_idle.png) + +_Animation track, bound to the DefaultMale humanoid, with an idle pose (Idle) as its Animation clip. The Mix mode (red circle) is the selected Clip Edit mode._ + +Add a second Animation clip. This example adds a run and turn left clip (named Run_Left) to the Animation track, and then resizes the clip to include one loop, so the DefaultMale runs and turns 180 degrees. + +![Animation track with an Idle clip and a Run_Left clip](images/timeline_humanoid_runleft.png) + +_Animation track with an Idle clip and a Run_Left clip_ + +Play the Timeline instance. In this example, the DefaultMale humanoid jumps between each Animation clip because the position of the humanoid at the end of the first Animation clip (Idle) does not match the position of the humanoid at the start of the next Animation clip (RunLeft). + +![The humanoid jumps between the first Animation clip, which ends at frame 29 (red arrow and box), and the second Animation clip, which starts at frame 30 (ghost with green arrow and box)](images/timeline_humanoid_before_match.png) + +_The humanoid jumps between the first Animation clip, which ends at frame 29 (red arrow and box), and the second Animation clip, which starts at frame 30 (ghost with green arrow and box)_ + +## Matching clips + +To fix the animation jump between clips, match the offset of each Animation clip. The Timeline window provides [different methods for matching offsets](clp_match.md). In this example, Timeline matches the second Animation clip with the previous clip. To do this, select the Run_Left clip, right-click and select **Match Offsets to Previous Clip**. + +![Right-click and select Match Offsets to Previous Clip to match the offsets of the selected Animation clip with the preceding Animation clip](images/timeline_humanoid_match_menu.png) + +_Right-click and select Match Offsets to Previous Clip to match the offsets of the selected Animation clip with the preceding Animation clip_ + +![After matching offsets, the position and rotation of the humanoid at the start of the second Animation clip (frame 30, ghost with green arrow) matches the position and rotation of the humanoid at the end of the first Animation clip (frame 29, red arrow)](images/timeline_humanoid_after_match.png) + +_After matching offsets, the position and rotation of the humanoid at the start of the second Animation clip (frame 30, ghost with green arrow) matches the position and rotation of the humanoid at the end of the first Animation clip (frame 29, red arrow)_ + +Play the Timeline instance again. Although the position and rotation of the humanoid matches, there is still a jump between the two Animation clips because the humanoid is in different poses. At the end of the first Animation clip, the humanoid is standing upright with its feet together. At the start of the second Animation clip, the humanoid is bent forward with its feet apart. + +## Blending clips + +[Create a blend](clp_blend.md) to remove the jump and transition between the two poses. Adjust the size of the clips, the Blend Area, the Clip In, and the shape of each Blend Curve to create a transition between the two poses. For example, in the transition between the Idle clip and the Run_Left clip, the Idle clip was resized to 36 frames and the Run_Left clip was repositioned to start at frame 25. The rest of the clip properties are unchanged from their default values. + +![With Mix mode selected, you can create a blend (red circle) between two clips to create a smooth transition between two animations.](images/timeline_humanoid_blend.png) + +_With Mix mode selected, you can create a blend (red circle) between two clips to create a smooth transition between two animations._ + +As the Idle clip transitions to the Run_Left clip, the blend removes the obvious jump between poses. The transition between most body parts appears natural, however in this example, the blend between the different positions of the foot results in an unnatural foot slide. + +## Reducing foot slide + +To reduce foot sliding, manually adjust the offset of an Animation clip so that the position of the foot changes less drastically. To manually adjust the offset, select the Animation clip in the Timeline window. In the Inspector window, expand **Animation Playable Asset**. + +![Select an Animation clip. In the Inspector window, expand **Animation Playable Asset** (red) to view the **Clip Transform Offsets**.](images/workflow_inspector_animation_clip_playable.png) + +_Select an Animation clip. In the Inspector window, expand **Animation Playable Asset** (red) to view the **Clip Transform Offsets**._ + +The rotation and position **Clip Transform Offsets** are not zero because performing **Match Offsets to Previous Clip** already set these values to match the root (hips) of the humanoid at the end of the previous Animation clip. + +Under **Clip Transform Offsets**, enable the Move tool. The Move Gizmo appears in the Scene view, at the root of the Animation clip. + +![Enable the Move tool (Inspector window, red arrow) to show the Move Gizmo (green arrow) in the Scene view](images/timeline_humanoid_manual.png) + +_Enable the Move tool (Inspector window, red arrow) to show the Move Gizmo (green arrow) in the Scene view_ + +Use one of the following methods to manually adjust the offset position of the Animation clip: + +* In the Scene view, drag the Move Gizmo. +* In the Inspector window, under **Clip Transform Offsets**, change the value of the appropriate **Position** property. + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_conv_infinite.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_conv_infinite.md new file mode 100644 index 0000000..2939448 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_conv_infinite.md @@ -0,0 +1,16 @@ +# Converting an Infinite clip to an Animation clip + +An Infinite clip appears as a dope sheet. An Infinite clip cannot be positioned, trimmed, or split because it does not have a defined duration. To position, trim, split, or perform other clip manipulations on an Infinite clip, you must first convert it to an Animation clip. You cannot convert an Animation clip back to an Infinite clip. + +To convert an Infinite clip to an Animation clip, click the Track menu icon and select **Convert to Clip Track**: + +![The Track menu (circled) converts an Infinite clip to an Animation clip.](images/timeline_workflow_recorded_clip_track_menu.png) + +_The Track menu (circled) converts an Infinite clip to an Animation clip._ + +You can also right-click the track and select **Convert to Clip Track** from the context menu. The Track menu and context menu are the same. + +![An Infinite clip after it has been converted to an Animation clip](images/timeline_workflow_converted_clip.png) + +_An infinite clip after it has been converted to an Animation clip_ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_instance.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_instance.md new file mode 100644 index 0000000..79fbb34 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_instance.md @@ -0,0 +1,23 @@ +# Creating a Timeline Asset and Timeline instance + +To use a Timeline Asset in your Scene, associate the Timeline Asset with a GameObject using a [Playable Director](play_director.md) component. Associating a Timeline Asset with a Playable Director component creates a Timeline instance and allows you to specify which objects in the Scene are animated by the Timeline Asset. To animate a GameObject, it must also have an [Animator](https://docs.unity3d.com/Manual/class-Animator.html) component. + +The Timeline window automatically creates a Timeline instance while creating a new Timeline Asset. The Timeline window also creates the necessary components. + +To create a new Timeline Asset and Timeline instance, follow these steps: + +1. In your Scene, select the GameObject that you want to use as the focus of your cinematic or other gameplay-based sequence. +2. Open the Timeline window (menu: **Window** > **Sequencing** > **Timeline**). If the GameObject does not yet have a Playable Director component attached to a Timeline Asset, a message in the Timeline window prompts you to click the **Create** button. +3. Click **Create**. A dialog box prompts you for the name and location of the Timeline Asset you are creating. You can also specify tags to identify the Timeline Asset. +4. Click **Save**. + +![](images/timeline_editor_create.png) + + +The Timeline window does the following: + +* Saves a new Timeline Asset to the Assets directory of your Project. If you did not change the name and location of the Timeline Asset you are creating, the Timeline window creates a name based on the selected GameObject with the "Timeline" suffix. For example, selecting the GameObject called "Enemy" names the Asset "EnemyTimeline". +* Adds an empty Animation track to the Timeline Asset. +* Adds a Playable Director component to the selected GameObject, and sets the **Playable** property to the Timeline Asset. This creates a Timeline instance. +* Sets the binding on the Animation track in the Playable Director component to the selected GameObject. The Animation track does not have any clips, so the selected GameObject is not animated. +* Adds an Animator component to the selected GameObject. The Animator component animates the GameObject through the Timeline instance. The GameObject cannot be animated without an Animator component. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_mask.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_mask.md new file mode 100644 index 0000000..5972245 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_mask.md @@ -0,0 +1,44 @@ +# Using an Animation Override track and an Avatar Mask + +This task demonstrates how to use an Animation Override track and an Avatar Mask to replace the upper-body animation of an Animation track. Use this technique to animate a humanoid to, for example, run and carry an object. For information on creating an Avatar mask, see [Avatar Mask window](https://docs.unity3d.com/Manual/class-AvatarMask.html). + +This task assumes that you have already [created a Timeline instance](wf_instance.md) with a simple Animation clip on an Animation track bound to a humanoid: + +![This example uses a humanoid bound to a simple run cycle animation (RunForward) that loops once](images/timeline_masking_start.png) + +_This example uses a humanoid bound to a simple run cycle animation (RunForward) that loops once_ + +Right-click the Animation track and select **Add Override Track** from the context menu. An Animation Override track, named Override 0, is linked to the selected Animation track. Notice that the Animation Override track is not bound to a GameObject. Because the Override track is linked to the Animation track above, the Override track is bound to the same GameObject, in this case, the DefaultMale humanoid. + +![To add an Override track, right-click the Animation track and select Add Override Track from the context menu](images/timeline_masking_override.png) + +_To add an Override track, right-click the Animation track and select Add Override Track from the context menu]_ + +From your Project, drag an Animation Clip with upper-body animation into the Override track. For example, drag an animation of a humanoid standing still and waving their arms. Position and resize the clip to match the Animation clip that you want to override. + +![The Animation Override track contains an Animation clip of a humanoid standing still, waving their arms (WavingArms). This clip was resized to match the Animation clip (RunForward) of the parent Animation track.](images/timeline_masking_waving.png) + +_The Animation Override track contains an Animation clip of a humanoid standing still, waving their arms (WavingArms). This clip was resized to match the Animation clip (RunForward) of the parent Animation track._ + +Play the Timeline instance. In this example, the WavingArms clip completely overrides the RunForward clip. To combine the lower-body animation from one Animation clip with upper-body animation from another Animation clip, specify an Avatar Mask for the Animation Override track. + +![To specify an Avatar Mask, select the Override track to view its properties in the Inspector window](images/timeline_masking_override_selected.png) + +_To specify an Avatar Mask, select the Override track to view its properties in the Inspector window_ + +From the Project, drag an Avatar Mask, that masks the lower body animation, into the Avatar Mask property in the Inspector window. Enable the **Apply Avatar Mask** checkbox. An Avatar Mask icon appears beside the track name. + +![An Avatar Mask, that masks the lower body animation, is specified for the Animation Overview clip in the Inspector window. This allows the upper body animation to pass through.](images/timeline_masking_avatar_inspector.png) + +_An Avatar Mask, that masks the lower body animation, is specified for the Animation Overview clip in the Inspector window. This allows the upper body animation to pass through._ + +![The Avatar Mask icon (red) indicates that the Animation Override track uses an Avatar Mask.](images/timeline_masking_avatar_on.png) + +_The Avatar Mask icon (red) indicates that the Animation Override track uses an Avatar Mask._ + +Play the Timeline instance. In this example, the DefaultMale humanoid uses upper-body animation from the WavingArms clip and lower-body animation from the RunForward clip. To temporarily disable the Avatar Mask, click the Avatar Mask icon. + +![The Avatar Mask icon (red) is gray when disabled. The WavingArms clip completely overrides the RunForward clip.](images/timeline_masking_avatar_off.png) + +_The Avatar Mask icon (red) is gray when disabled. The WavingArms clip completely overrides the RunForward clip._ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_nested.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_nested.md new file mode 100644 index 0000000..a2ffc88 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_nested.md @@ -0,0 +1,50 @@ +# Nesting Timeline instances + +Timeline supports nesting Timeline instances. A nested Timeline instance refers to a Timeline instance that is added within another Timeline instance. The **master Timeline instance** refers to the main or parent Timeline instance that includes other Timeline instances. + +Nesting Timeline instances is useful if you have a large team working on different aspects of a Project and you want them to collaborate on the same cinematic or cut-scene. + +For example, you are developing a puzzle game that starts with a cinematic of the character walking into frame while the pieces on the game board move into position. You could create a master Timeline instance for the character walking into frame. You could create another Timeline instance for the game board animation. You could then nest the game board animation into the master Timeline instance of the character walking into frame. + +![The master NestTL Timeline instance has a character walking and theme music. A Control track nests the BoardTL Timeline instance for the game board animation.](images/workflow_nesting_done.png) + +_The master NestTL Timeline instance has a character walking and theme music. A Control track nests the BoardTL Timeline instance for the game board animation._ + +By creating a master Timeline instance with nested Timeline instances, different teams can work on different animations and then combine the animations into one master Timeline. In the puzzle game example, one team could work on the character Timeline instance, and another team could work on the game board animation. + +When you have two Timeline instances, and you want to nest one instance into the other, open the Timeline instance that you want to be the master Timeline instance. To ensure that the Timeline window does not switch while you select GameObjects, click the lock icon (red arrow): + +![The master NestTL Timeline instance has a character walking and theme music.](images/workflow_nesting_master.png) + +_The master NestTL Timeline instance has a character walking and theme music._ + +Find the GameObject in your Scene that is associated with the Timeline instance that you want to nest inside the master Timeline instance. Drag the GameObject into the Clips view of the Timeline window. + +![The Board GameObject is associated with the BoardTL Timeline instance. Drag the Board GameObject into the NestTL master Timeline to nest the BoardTL Timeline instance in the NestTL Timeline instance.](images/workflow_nesting_drag_board.png) + +_The Board GameObject is associated with the BoardTL Timeline instance. Drag the Board GameObject into the NestTL master Timeline to nest the BoardTL Timeline instance in the NestTL Timeline instance._ + +The Timeline window creates a Control track and places the Control clip where you drop the GameObject. The Control clip is set to the same size as the Timeline instance. When a Control clip contains a nested Timeline instance, a downward arrow appears beside its name. To edit a nested Timeline instance from the master timeline, double-click its Control clip. + +![Double-click the Control clip to edit the nested BoardTL Timeline instance from within the master](images/workflow_nesting_double_click.png) + +_Double-click the Control clip to edit the nested BoardTL Timeline instance from within the master_ + +A warning icon appears beside the name of the nested Timeline instance because the Timeline Playhead is outside the range of the nested Timeline. Timeline also disables the Timeline Playhead controls. + +When you edit a nested Timeline instance, you cannot change the duration of the nested Timeline instance. You must return to the master Timeline instance and change the duration of the Control clip to change the duration of the nested Timeline instance. To return to the master, click the name of the master Timeline instance (red arrow): + +![Warning icon (red circle) means the Timeline Playhead Controls are disabled.](images/workflow_nesting_edit_warning.png) + +_Warning icon (red circle) means the Timeline Playhead Controls are disabled._ + +The Timeline window is in this state because, by default, the size of the Control clip in the master Timeline instance determines when the nested Timeline instance is active. Use one of the following methods to change this state and edit the nested Timeline instance: + +* Click the Timeline ruler to move the Timeline Playhead into the nested Timeline. This enables editing and the Timeline Playback Controls. +* In the master Timeline instance, move the Timeline Playhead to within the Control clip before you double-click the Control clip. +* In the master Timeline instance, select the Control clip, and disable the Control Activation property in the Inspector window. + +![Disable the Control Activation property (red outline) to have the nested Timeline instance active throughout the duration of the master Timeline instance.](images/workflow_nesting_control_disabled.png) + +_Disable the Control Activation property (red outline) to have the nested Timeline instance active throughout the duration of the master Timeline instance._ + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_rec_anim.md b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_rec_anim.md new file mode 100644 index 0000000..c8ffc47 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Documentation~/wf_rec_anim.md @@ -0,0 +1,60 @@ +# Recording basic animation with an Infinite clip + +You can record animation directly to an Animation track. When you record directly to an empty Animation track, you create an **Infinite clip**. + +An Infinite clip is a clip that contains basic key animation recorded through the Timeline window. An Infinite clip cannot be positioned, trimmed, or split because it does not have a defined size: it spans the entirety of an Animation track. + +Before creating an Infinite clip, you must [add an empty Animation track](trk_add.md) for the GameObject that you want to animate. + +In the Track list, click the red circular Record button for the empty Animation track to enable Record mode. + +![Click the Record button on an empty track to enable Record mode](images/timeline_workflow_record_button.png) + +_Click the Record button on an empty track to enable Record mode_ + +When a track is in Record mode, the clip area of the track is drawn in red with the "Recording..." message, and the Record button blinks on and off. + +![Timeline window in Record mode](images/timeline_workflow_recording.png) + +_Timeline window in Record mode_ + +When in Record mode, any modification to an animatable property of the GameObject sets a key at the location of the Timeline Playhead. + +To start creating an animation, move the Timeline Playhead to the location of the first key, and do **one** of the following: + +* In the Inspector window, right-click the name of the property and choose **Add Key**. This adds an animation key for the property without changing its value. A diamond appears in the Infinite clip to show the position of the key. +* In the Inspector window, change the value of the animatable property of the GameObject. This adds an animation key for the property with its changed value. A diamond appears in the Infinite clip. +* In the Scene view, either move, rotate, or scale the GameObject. This automatically adds a key for the properties you change. A diamond appears in the Infinite clip. + +![Red background indicates that you’ve added an animation curve for the property to the clip](images/timeline_property_red.png) + +_Red background indicates that you’ve added an animation curve for the property to the clip_ + +![Setting a key adds a diamond to the Infinite clip](images/timeline_workflow_recording_diamonds.png) + +_Setting a key adds a diamond to the Infinite clip_ + +Move the playhead to a different position on the Timeline and change the animatable properties of the GameObject. At each position, the Timeline window adds a diamond to the Infinite clip for any changed properties and adds a key to its associated animation curves. + +While in Record mode, you can right-click the name of an animatable property name to perform keying operations such as setting a key without changing its value, jumping to the next or previous keys, and removing keys. For example, to set a key for the position of a GameObject without changing its value, right-click **Position** and select **Add Key** from the context menu. + +![Right-click the name of an animatable property to perform keying operations](images/timeline_workflow_keyframing_menu.png) + +_Right-click the name of an animatable property to perform keying operations_ + +When you finish the animation, click the blinking Record button to disable Record mode. + +An Infinite clip appears as a dope sheet in the Timeline window, but you cannot edit the keys in this view. Use [the Curves view to edit keys](crv_keys_edit.md). You can also double-click the Infinite clip and edit the keys with the Animation window. + +![An Infinite clip appears as a dope sheet](images/timeline_workflow_dopesheet.png) + +_An Infinite clip appears as a dope sheet_ + +Save the Scene or Project to save the Timeline Asset and the Infinite clip. The Timeline window saves the key animation from the Infinite clip as a source asset. The source asset is named "Recorded" and saved as a child of the Timeline Asset in the Project. + +![Recorded clips are saved under the Timeline Asset in the Project](images/timeline_workflow_clip_in_project.png) + +_Recorded clips are saved under the Timeline Asset in the Project_ + +For every additional recorded Infinite clip, the Timeline window numbers each clip sequentially, starting at "(1)". For example, a Timeline Asset with three recorded Infinite clips are named "Recorded", "Recorded (1)", and "Recorded (2)". If you delete a Timeline Asset, its recorded clips are also removed. + diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor.meta new file mode 100644 index 0000000..45c148f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9b4f21acd14fdd445b37b76f6587539e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions.meta new file mode 100644 index 0000000..bc1e1e5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8620e97e7e9859049934889a52248435 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ClipsActions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ClipsActions.cs new file mode 100644 index 0000000..e12af71 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ClipsActions.cs @@ -0,0 +1,376 @@ +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; +using ClipAction = UnityEditor.Timeline.ItemAction; + +namespace UnityEditor.Timeline +{ + [MenuEntry("Edit in Animation Window", MenuOrder.ClipEditAction.EditInAnimationWindow), UsedImplicitly] + class EditClipInAnimationWindow : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + if (clips.Length == 1 && clips[0].animationClip != null) + return MenuActionDisplayState.Visible; + return MenuActionDisplayState.Hidden; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + var clip = clips[0]; + + if (clip.curves != null || clip.animationClip != null) + { + var clipToEdit = clip.animationClip != null ? clip.animationClip : clip.curves; + if (clipToEdit == null) + return false; + + var gameObject = state.GetSceneReference(clip.parentTrack); + var timeController = TimelineAnimationUtilities.CreateTimeController(state, clip); + TimelineAnimationUtilities.EditAnimationClipWithTimeController( + clipToEdit, timeController, clip.animationClip != null ? gameObject : null); + return true; + } + + return false; + } + } + + [MenuEntry("Edit Sub-Timeline", MenuOrder.ClipEditAction.EditSubTimeline), UsedImplicitly] + class EditSubTimeline : ClipAction + { + private static readonly string MultiItemPrefix = "Edit Sub-Timelines/"; + private static readonly string SingleItemPrefix = "Edit "; + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + return IsValid(state, clips) ? MenuActionDisplayState.Visible : MenuActionDisplayState.Hidden; + } + + bool IsValid(WindowState state, TimelineClip[] clips) + { + if (clips.Length != 1 || state == null || state.editSequence.director == null) return false; + var clip = clips[0]; + + var directors = TimelineUtility.GetSubTimelines(clip, state.editSequence.director); + return directors.Any(x => x != null); + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + if (!IsValid(state, clips)) return false; + + var clip = clips[0]; + + var directors = TimelineUtility.GetSubTimelines(clip, state.editSequence.director); + ExecuteInternal(state, directors, 0, clip); + + return true; + } + + static void ExecuteInternal(WindowState state, IList directors, int directorIndex, TimelineClip clip) + { + SelectionManager.Clear(); + state.GetWindow().SetCurrentTimeline(directors[directorIndex], clip); + } + + protected override void AddMenuItem(WindowState state, TimelineClip[] items, List menuItems) + { + if (items == null || items.Length != 1) + return; + + var mode = TimelineWindow.instance.currentMode.mode; + var menuItem = new MenuActionItem() + { + category = category, + entryName = GetDisplayName(items), + shortCut = string.Empty, + isChecked = false, + isActiveInMode = IsActionActiveInMode(this, mode), + priority = priority, + state = GetDisplayState(state, items), + callback = null + }; + + var subDirectors = TimelineUtility.GetSubTimelines(items[0], state.editSequence.director); + if (subDirectors.Count == 1) + { + menuItem.entryName = SingleItemPrefix + DisplayNameHelper.GetDisplayName(subDirectors[0]); + menuItem.callback = () => Execute(state, items); + menuItems.Add(menuItem); + } + else + { + for (int i = 0; i < subDirectors.Count; i++) + { + var index = i; + menuItem.category = MultiItemPrefix; + menuItem.entryName = DisplayNameHelper.GetDisplayName(subDirectors[i]); + menuItem.callback = () => ExecuteInternal(state, subDirectors, index, items[0]); + menuItems.Add(menuItem); + } + } + } + } + + [MenuEntry("Editing/Trim Start", MenuOrder.ClipAction.TrimStart)] + [Shortcut(Shortcuts.Clip.trimStart), UsedImplicitly] + class TrimStart : ItemAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + return clips.All(x => state.editSequence.time <= x.start || state.editSequence.time >= x.start + x.duration) ? + MenuActionDisplayState.Disabled : MenuActionDisplayState.Visible; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.TrimStart(clips, state.editSequence.time); + } + } + + [MenuEntry("Editing/Trim End", MenuOrder.ClipAction.TrimEnd), UsedImplicitly] + [Shortcut(Shortcuts.Clip.trimEnd)] + class TrimEnd : ItemAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + return clips.All(x => state.editSequence.time <= x.start || state.editSequence.time >= x.start + x.duration) ? + MenuActionDisplayState.Disabled : MenuActionDisplayState.Visible; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.TrimEnd(clips, state.editSequence.time); + } + } + + [Shortcut(Shortcuts.Clip.split), MenuEntry("Editing/Split", MenuOrder.ClipAction.Split), UsedImplicitly] + class Split : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + return clips.All(x => state.editSequence.time <= x.start || state.editSequence.time >= x.start + x.duration) ? + MenuActionDisplayState.Disabled : MenuActionDisplayState.Visible; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + bool success = ClipModifier.Split(clips, state.editSequence.time, state.editSequence.director); + if (success) + state.Refresh(); + return success; + } + } + + [MenuEntry("Editing/Complete Last Loop", MenuOrder.ClipAction.CompleteLastLoop), UsedImplicitly] + class CompleteLastLoop : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + bool canDisplay = clips.Any(TimelineHelpers.HasUsableAssetDuration); + return canDisplay ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.CompleteLastLoop(clips); + } + } + + [MenuEntry("Editing/Trim Last Loop", MenuOrder.ClipAction.TrimLastLoop), UsedImplicitly] + class TrimLastLoop : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + bool canDisplay = clips.Any(TimelineHelpers.HasUsableAssetDuration); + return canDisplay ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.TrimLastLoop(clips); + } + } + + [MenuEntry("Editing/Match Duration", MenuOrder.ClipAction.MatchDuration), UsedImplicitly] + class MatchDuration : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + return clips.Length > 1 ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.MatchDuration(clips); + } + } + + [MenuEntry("Editing/Double Speed", MenuOrder.ClipAction.DoubleSpeed), UsedImplicitly] + class DoubleSpeed : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + bool canDisplay = clips.All(x => x.SupportsSpeedMultiplier()); + + return canDisplay ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.DoubleSpeed(clips); + } + } + + [MenuEntry("Editing/Half Speed", MenuOrder.ClipAction.HalfSpeed), UsedImplicitly] + class HalfSpeed : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + bool canDisplay = clips.All(x => x.SupportsSpeedMultiplier()); + + return canDisplay ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.HalfSpeed(clips); + } + } + + [MenuEntry("Editing/Reset Duration", MenuOrder.ClipAction.ResetDuration), UsedImplicitly] + class ResetDuration : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + bool canDisplay = clips.Any(TimelineHelpers.HasUsableAssetDuration); + return canDisplay ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.ResetEditing(clips); + } + } + + [MenuEntry("Editing/Reset Speed", MenuOrder.ClipAction.ResetSpeed), UsedImplicitly] + class ResetSpeed : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + bool canDisplay = clips.All(x => x.SupportsSpeedMultiplier()); + + return canDisplay ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.ResetSpeed(clips); + } + } + + [MenuEntry("Editing/Reset All", MenuOrder.ClipAction.ResetAll), UsedImplicitly] + class ResetAll : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + bool canDisplay = clips.Any(TimelineHelpers.HasUsableAssetDuration) || + clips.All(x => x.SupportsSpeedMultiplier()); + + return canDisplay ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + var speedResult = ClipModifier.ResetSpeed(clips); + var editResult = ClipModifier.ResetEditing(clips); + return speedResult || editResult; + } + } + + [MenuEntry("Tile", MenuOrder.ClipAction.Tile), UsedImplicitly] + class Tile : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] clips) + { + return clips.Length > 1 ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + return ClipModifier.Tile(clips); + } + } + + [MenuEntry("Find Source Asset", MenuOrder.ClipAction.FindSourceAsset), UsedImplicitly] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class FindSourceAsset : ClipAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, + TimelineClip[] clips) + { + if (clips.Length > 1) + return MenuActionDisplayState.Disabled; + + if (GetUnderlyingAsset(state, clips[0]) == null) + return MenuActionDisplayState.Disabled; + + return MenuActionDisplayState.Visible; + } + + public override bool Execute(WindowState state, TimelineClip[] clips) + { + EditorGUIUtility.PingObject(GetUnderlyingAsset(state, clips[0])); + return true; + } + + private static UnityEngine.Object GetExternalPlayableAsset(TimelineClip clip) + { + if (clip.asset == null) + return null; + + if ((clip.asset.hideFlags & HideFlags.HideInHierarchy) != 0) + return null; + + return clip.asset; + } + + private static UnityEngine.Object GetUnderlyingAsset(WindowState state, TimelineClip clip) + { + var asset = clip.asset as ScriptableObject; + if (asset == null) + return null; + + var fields = ObjectReferenceField.FindObjectReferences(asset.GetType()); + if (fields.Length == 0) + return GetExternalPlayableAsset(clip); + + // Find the first non-null field + foreach (var field in fields) + { + // skip scene refs in asset mode + if (state.editSequence.director == null && field.isSceneReference) + continue; + var obj = field.Find(asset, state.editSequence.director); + if (obj != null) + return obj; + } + + return GetExternalPlayableAsset(clip); + } + } + + class CopyClipsToClipboard : ClipAction + { + public override bool Execute(WindowState state, TimelineClip[] clips) + { + TimelineEditor.clipboard.CopyItems(clips.ToItems()); + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ClipsActions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ClipsActions.cs.meta new file mode 100644 index 0000000..666f56e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ClipsActions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b721099b5d509d4093e516f59ad9ad6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ItemAction.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ItemAction.cs new file mode 100644 index 0000000..cd4c3a4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ItemAction.cs @@ -0,0 +1,124 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [ActiveInMode(TimelineModes.Default)] + abstract class ItemAction : MenuItemActionBase where T : class + { + public abstract bool Execute(WindowState state, T[] items); + + protected virtual MenuActionDisplayState GetDisplayState(WindowState state, T[] items) + { + return items.Length > 0 ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + protected virtual string GetDisplayName(T[] items) + { + return menuName; + } + + public bool CanExecute(WindowState state, T[] items) + { + return GetDisplayState(state, items) == MenuActionDisplayState.Visible; + } + + protected virtual void AddMenuItem(WindowState state, T[] items, List menuItem) + { + var mode = TimelineWindow.instance.currentMode.mode; + menuItem.Add( + new MenuActionItem() + { + category = category, + entryName = GetDisplayName(items), + shortCut = this.shortCut, + isChecked = false, + isActiveInMode = IsActionActiveInMode(this, mode), + priority = priority, + state = GetDisplayState(state, items), + callback = () => Execute(state, items) + } + ); + } + + public static bool HandleShortcut(WindowState state, Event evt, T item) + { + T[] items = { item }; + + foreach (ItemAction action in actions) + { + var attr = action.GetType().GetCustomAttributes(typeof(ShortcutAttribute), true); + + foreach (ShortcutAttribute shortcut in attr) + { + if (shortcut.MatchesEvent(evt)) + { + if (s_ShowActionTriggeredByShortcut) + Debug.Log(action.GetType().Name); + + if (!IsActionActiveInMode(action, TimelineWindow.instance.currentMode.mode)) + return false; + + var result = action.Execute(state, items); + state.Refresh(); + state.Evaluate(); + return result; + } + } + } + + return false; + } + + static List> s_ActionClasses; + + static List> actions + { + get + { + if (s_ActionClasses == null) + { + s_ActionClasses = GetActionsOfType(typeof(ItemAction)).Select(x => (ItemAction)x.GetConstructors()[0].Invoke(null)).ToList(); + } + + return s_ActionClasses; + } + } + + public static void GetMenuEntries(T[] items, List menuItems) + { + if (items == null || items.Length == 0) + return; + + foreach (var action in actions) + { + if (action.showInMenu) + action.AddMenuItem(TimelineWindow.instance.state, items, menuItems); + } + } + + public static bool Invoke(WindowState state, T[] items) + where TAction : ItemAction + { + var itemsDerived = items.ToArray(); + + if (!itemsDerived.Any()) + return false; + + var action = actions.FirstOrDefault(x => x.GetType() == typeof(TAction)); + + if (action != null) + return action.Execute(state, itemsDerived); + + return false; + } + + public static bool Invoke(WindowState state, T item) + where TAction : ItemAction + { + return Invoke(state, new[] {item}); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ItemAction.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ItemAction.cs.meta new file mode 100644 index 0000000..fef443a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/ItemAction.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 84b5362754a9d934ba259398b757d0be +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/MarkerActions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/MarkerActions.cs new file mode 100644 index 0000000..410b5c3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/MarkerActions.cs @@ -0,0 +1,17 @@ +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; +using MarkerAction = UnityEditor.Timeline.ItemAction; + +namespace UnityEditor.Timeline +{ + [UsedImplicitly] + class CopyMarkersToClipboard : MarkerAction + { + public override bool Execute(WindowState state, IMarker[] markers) + { + TimelineEditor.clipboard.CopyItems(markers.ToItems()); + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/MarkerActions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/MarkerActions.cs.meta new file mode 100644 index 0000000..2733046 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/MarkerActions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5da77d4d078922b4c8466e9e35fb3f5e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus.meta new file mode 100644 index 0000000..45d9fa7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 985eed4bc2fbee941b761b8816d9055d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/MenuItemActionBase.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/MenuItemActionBase.cs new file mode 100644 index 0000000..241650f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/MenuItemActionBase.cs @@ -0,0 +1,177 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + enum MenuActionDisplayState + { + Visible, + Disabled, + Hidden + } + + struct MenuActionItem + { + public string category; + public string entryName; + public string shortCut; + public int priority; + public bool isChecked; + public bool isActiveInMode; + public MenuActionDisplayState state; + public GenericMenu.MenuFunction callback; + } + + class MenuItemActionBase + { + public Vector2? mousePosition { get; set; } + + protected static bool s_ShowActionTriggeredByShortcut = false; + + private static MenuEntryAttribute NoMenu = new MenuEntryAttribute(null, MenuOrder.DefaultPriority); + private MenuEntryAttribute m_MenuInfo; + private string m_ShortCut = null; + + + public static IEnumerable GetActionsOfType(Type actionType) + { + var query = TypeCache.GetTypesDerivedFrom(actionType).Where(type => !type.IsGenericType && !type.IsNested && !type.IsAbstract); + return query; + } + + public static ShortcutAttribute GetShortcutAttributeForAction(MenuItemActionBase action) + { + var shortcutAttributes = action.GetType() + .GetCustomAttributes(typeof(ShortcutAttribute), true) + .Cast(); + + foreach (var shortcutAttribute in shortcutAttributes) + { + var shortcutOverride = shortcutAttribute as ShortcutPlatformOverrideAttribute; + if (shortcutOverride != null) + { + if (shortcutOverride.MatchesCurrentPlatform()) + return shortcutOverride; + } + else + { + return shortcutAttribute; + } + } + + return null; + } + + public static void BuildMenu(GenericMenu menu, List items) + { + // sorted the outer menu by priority, then sort the innermenu by priority + var sortedItems = + items.GroupBy(x => string.IsNullOrEmpty(x.category) ? x.entryName : x.category). + OrderBy(x => x.Min(y => y.priority)). + SelectMany(x => x.OrderBy(z => z.priority)); + + int lastPriority = Int32.MinValue; + string lastCategory = string.Empty; + + foreach (var s in sortedItems) + { + if (s.state == MenuActionDisplayState.Hidden) + continue; + + var priority = s.priority; + if (lastPriority == Int32.MinValue) + { + lastPriority = priority; + } + else if ((priority / MenuOrder.SeparatorAt) > (lastPriority / MenuOrder.SeparatorAt)) + { + string path = String.Empty; + if (lastCategory == s.category) + path = s.category; + menu.AddSeparator(path); + } + + lastPriority = priority; + lastCategory = s.category; + + string entry = s.category + s.entryName; + if (!string.IsNullOrEmpty(s.shortCut)) + entry += " " + s.shortCut; + + if (s.state == MenuActionDisplayState.Visible && s.isActiveInMode) + menu.AddItem(new GUIContent(entry), s.isChecked, s.callback); + else + menu.AddDisabledItem(new GUIContent(entry)); + } + } + + public static ActiveInModeAttribute GetActiveInModeAttribute(MenuItemActionBase action) + { + var attr = action.GetType().GetCustomAttributes(typeof(ActiveInModeAttribute), true); + + if (attr.Length > 0) + return (attr[0] as ActiveInModeAttribute); + + return null; + } + + public static bool IsActionActiveInMode(MenuItemActionBase action, TimelineModes mode) + { + ActiveInModeAttribute attr = GetActiveInModeAttribute(action); + return attr != null && (attr.modes & mode) != 0; + } + + public int priority + { + get { return menuInfo.priority; } + } + + public string category + { + get { return menuInfo.subMenuPath; } + } + + public string menuName + { + get + { + if (string.IsNullOrEmpty(menuInfo.name)) + return L10n.Tr(GetType().Name); + return menuInfo.name; + } + } + + // shortcut used by the menu + public string shortCut + { + get + { + if (m_ShortCut == null) + { + var shortcutAttribute = GetShortcutAttributeForAction(this); + m_ShortCut = shortcutAttribute == null ? string.Empty : shortcutAttribute.GetMenuShortcut(); + } + return m_ShortCut; + } + } + + public bool showInMenu + { + get { return menuInfo != NoMenu; } + } + + private MenuEntryAttribute menuInfo + { + get + { + if (m_MenuInfo == null) + m_MenuInfo = GetType().GetCustomAttributes(typeof(MenuEntryAttribute), false).OfType().DefaultIfEmpty(NoMenu).First(); + return m_MenuInfo; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/MenuItemActionBase.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/MenuItemActionBase.cs.meta new file mode 100644 index 0000000..045ed68 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/MenuItemActionBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5882d0e4313310143acb11d1a66c597f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/TimelineContextMenu.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/TimelineContextMenu.cs new file mode 100644 index 0000000..495a9c3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/TimelineContextMenu.cs @@ -0,0 +1,448 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + static class SequencerContextMenu + { + static readonly TimelineAction[] MarkerHeaderCommonOperations = + { + new PasteAction() + }; + + public static readonly TimelineAction[] MarkerHeaderMenuItems = + TimelineAction.AllActions.OfType(). + Where(a => a.showInMenu). + Union(MarkerHeaderCommonOperations). + ToArray(); + + + static class Styles + { + public static readonly string addItemFromAssetTemplate = L10n.Tr("Add {0} From {1}"); + public static readonly string addSingleItemFromAssetTemplate = L10n.Tr("Add From {1}"); + public static readonly string addItemTemplate = L10n.Tr("Add {0}"); + public static readonly string typeSelectorTemplate = L10n.Tr("Select {0}"); + public static readonly string trackGroup = L10n.Tr("Track Group"); + public static readonly string trackSubGroup = L10n.Tr("Track Sub-Group"); + public static readonly string addTrackLayer = L10n.Tr("Add Layer"); + public static readonly string layerName = L10n.Tr("Layer {0}"); + } + + public static void ShowMarkerHeaderContextMenu(Vector2? mousePosition, WindowState state) + { + var menu = new GenericMenu(); + List items = new List(100); + BuildMarkerHeaderContextMenu(items, mousePosition, state); + MenuItemActionBase.BuildMenu(menu, items); + menu.ShowAsContext(); + } + + public static void ShowNewTracksContextMenu(ICollection tracks, WindowState state) + { + var menu = new GenericMenu(); + List items = new List(100); + BuildNewTracksContextMenu(items, tracks, state); + MenuItemActionBase.BuildMenu(menu, items); + menu.ShowAsContext(); + } + + public static void ShowNewTracksContextMenu(ICollection tracks, WindowState state, Rect rect) + { + var menu = new GenericMenu(); + List items = new List(100); + BuildNewTracksContextMenu(items, tracks, state); + MenuItemActionBase.BuildMenu(menu, items); + menu.DropDown(rect); + } + + public static void ShowTrackContextMenu(TrackAsset[] tracks, Vector2? mousePosition) + { + if (tracks == null || tracks.Length == 0) + return; + + var items = new List(); + var menu = new GenericMenu(); + BuildTrackContextMenu(items, tracks, mousePosition); + MenuItemActionBase.BuildMenu(menu, items); + menu.ShowAsContext(); + } + + public static void ShowItemContextMenu(Vector2 mousePosition, TimelineClip[] clips, IMarker[] markers) + { + var menu = new GenericMenu(); + var items = new List(); + BuildItemContextMenu(items, mousePosition, clips, markers); + MenuItemActionBase.BuildMenu(menu, items); + menu.ShowAsContext(); + } + + internal static void BuildItemContextMenu(List items, Vector2 mousePosition, TimelineClip[] clips, IMarker[] markers) + { + var state = TimelineWindow.instance.state; + + TimelineAction.GetMenuEntries(TimelineAction.MenuActions, mousePosition, items); + ItemAction.GetMenuEntries(clips, items); + ItemAction.GetMenuEntries(markers, items); + + if (clips.Length > 0) + AddMarkerMenuCommands(items, clips.Select(c => c.parentTrack).Distinct().ToList(), TimelineHelpers.GetCandidateTime(state, mousePosition)); + } + + internal static void BuildNewTracksContextMenu(List menuItems, ICollection parentTracks, WindowState state, string format = null) + { + if (parentTracks == null) + parentTracks = new TrackAsset[0]; + + if (string.IsNullOrEmpty(format)) + format = "{0}"; + + // Add Group or SubGroup + var title = string.Format(format, parentTracks.Any(t => t != null) ? Styles.trackSubGroup : Styles.trackGroup); + var menuState = MenuActionDisplayState.Visible; + if (state.editSequence.isReadOnly) + menuState = MenuActionDisplayState.Disabled; + if (parentTracks.Any() && parentTracks.Any(t => t != null && t.lockedInHierarchy)) + menuState = MenuActionDisplayState.Disabled; + + GenericMenu.MenuFunction command = () => + { + SelectionManager.Clear(); + if (parentTracks.Count == 0) + Selection.Add(TimelineHelpers.CreateTrack(null, title)); + + foreach (var parentTrack in parentTracks) + Selection.Add(TimelineHelpers.CreateTrack(parentTrack, title)); + + TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved); + }; + + menuItems.Add( + new MenuActionItem() + { + category = string.Empty, + entryName = title, + shortCut = string.Empty, + isActiveInMode = true, + isChecked = false, + priority = MenuOrder.AddGroupItemStart, + state = menuState, + callback = command + } + ); + + + var allTypes = TypeUtility.AllTrackTypes().Where(x => x != typeof(GroupTrack) && !TypeUtility.IsHiddenInMenu(x)).ToList(); + + int builtInPriority = MenuOrder.AddTrackItemStart; + int customPriority = MenuOrder.AddCustomTrackItemStart; + foreach (var trackType in allTypes) + { + var trackItemType = trackType; + + command = () => + { + SelectionManager.Clear(); + + if (parentTracks.Count == 0) + SelectionManager.Add(TimelineHelpers.CreateTrack((Type)trackItemType, null)); + + foreach (var parentTrack in parentTracks) + SelectionManager.Add(TimelineHelpers.CreateTrack((Type)trackItemType, parentTrack)); + }; + + menuItems.Add( + new MenuActionItem() + { + category = TimelineHelpers.GetTrackCategoryName(trackType), + entryName = string.Format(format, TimelineHelpers.GetTrackMenuName(trackItemType)), + shortCut = string.Empty, + isActiveInMode = true, + isChecked = false, + priority = TypeUtility.IsBuiltIn(trackType) ? builtInPriority++ : customPriority++, + state = menuState, + callback = command + } + ); + } + } + + internal static void BuildMarkerHeaderContextMenu(List menu, Vector2? mousePosition, WindowState state) + { + TimelineAction.GetMenuEntries(MarkerHeaderMenuItems, null, menu); + + var timeline = state.editSequence.asset; + var time = TimelineHelpers.GetCandidateTime(state, mousePosition); + var enabled = timeline.markerTrack == null || !timeline.markerTrack.lockedInHierarchy; + + var addMarkerCommand = new Action + ( + (type, obj) => AddSingleMarkerCallback(type, time, timeline, state.editSequence.director, obj) + ); + + AddMarkerMenuCommands(menu, new TrackAsset[] {timeline.markerTrack}, addMarkerCommand, enabled); + } + + internal static void BuildTrackContextMenu(List items, TrackAsset[] tracks, Vector2? mousePosition) + { + if (tracks == null || tracks.Length == 0) + return; + + TimelineAction.GetMenuEntries(TimelineAction.MenuActions, mousePosition, items); + TrackAction.GetMenuEntries(TimelineWindow.instance.state, mousePosition, tracks, items); + AddLayeredTrackCommands(items, tracks); + + var first = tracks.First().GetType(); + var allTheSame = tracks.All(t => t.GetType() == first); + if (allTheSame) + { + if (first != typeof(GroupTrack)) + { + var candidateTime = TimelineHelpers.GetCandidateTime(TimelineWindow.instance.state, mousePosition, tracks); + AddClipMenuCommands(items, tracks, candidateTime); + AddMarkerMenuCommands(items, tracks, candidateTime); + } + else + { + BuildNewTracksContextMenu(items, tracks, TimelineWindow.instance.state, Styles.addItemTemplate); + } + } + } + + static void AddLayeredTrackCommands(List menuItems, ICollection tracks) + { + if (tracks.Count == 0) + return; + + var layeredType = tracks.First().GetType(); + // animation tracks have a special menu. + if (layeredType == typeof(AnimationTrack)) + return; + + // must implement ILayerable + if (!typeof(UnityEngine.Timeline.ILayerable).IsAssignableFrom(layeredType)) + return; + + if (tracks.Any(t => t.GetType() != layeredType)) + return; + + // only supported on the master track no nesting. + if (tracks.Any(t => t.isSubTrack)) + return; + + var enabled = tracks.All(t => t != null && !t.lockedInHierarchy) && !TimelineWindow.instance.state.editSequence.isReadOnly; + int priority = MenuOrder.TrackAddMenu.AddLayerTrack; + GenericMenu.MenuFunction menuCallback = () => + { + foreach (var track in tracks) + TimelineHelpers.CreateTrack(layeredType, track, string.Format(Styles.layerName, track.GetChildTracks().Count() + 1)); + }; + + var entryName = Styles.addTrackLayer; + menuItems.Add( + new MenuActionItem() + { + category = string.Empty, + entryName = entryName, + shortCut = string.Empty, + isActiveInMode = true, + isChecked = false, + priority = priority++, + state = enabled ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled, + callback = menuCallback + } + ); + } + + static void AddClipMenuCommands(List menuItems, ICollection tracks, double candidateTime) + { + if (!tracks.Any()) + return; + + var trackAsset = tracks.First(); + var trackType = trackAsset.GetType(); + if (tracks.Any(t => t.GetType() != trackType)) + return; + + var enabled = tracks.All(t => t != null && !t.lockedInHierarchy) && !TimelineWindow.instance.state.editSequence.isReadOnly; + var assetTypes = TypeUtility.GetPlayableAssetsHandledByTrack(trackType); + var visibleAssetTypes = TypeUtility.GetVisiblePlayableAssetsHandledByTrack(trackType); + + // skips the name if there is only a single type + var commandNameTemplate = assetTypes.Count() == 1 ? Styles.addSingleItemFromAssetTemplate : Styles.addItemFromAssetTemplate; + int builtInPriority = MenuOrder.AddClipItemStart; + int customPriority = MenuOrder.AddCustomClipItemStart; + foreach (var assetType in assetTypes) + { + var assetItemType = assetType; + var category = TimelineHelpers.GetItemCategoryName(assetType); + Action onObjectChanged = obj => + { + if (obj != null) + { + foreach (var t in tracks) + { + TimelineHelpers.CreateClipOnTrack(assetItemType, obj, t, candidateTime); + } + } + }; + + foreach (var objectReference in TypeUtility.ObjectReferencesForType(assetType)) + { + var isSceneReference = objectReference.isSceneReference; + var dataType = objectReference.type; + GenericMenu.MenuFunction menuCallback = () => + { + ObjectSelector.get.Show(null, dataType, null, isSceneReference, null, (obj) => onObjectChanged(obj), null); + ObjectSelector.get.titleContent = EditorGUIUtility.TrTextContent(string.Format(Styles.typeSelectorTemplate, TypeUtility.GetDisplayName(dataType))); + }; + + menuItems.Add( + new MenuActionItem() + { + category = category, + entryName = string.Format(commandNameTemplate, TypeUtility.GetDisplayName(assetType), TypeUtility.GetDisplayName(objectReference.type)), + shortCut = string.Empty, + isActiveInMode = true, + isChecked = false, + priority = TypeUtility.IsBuiltIn(assetType) ? builtInPriority++ : customPriority++, + state = enabled ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled, + callback = menuCallback + } + ); + } + } + + foreach (var assetType in visibleAssetTypes) + { + var assetItemType = assetType; + var category = TimelineHelpers.GetItemCategoryName(assetType); + var commandName = string.Format(Styles.addItemTemplate, TypeUtility.GetDisplayName(assetType)); + GenericMenu.MenuFunction command = () => + { + foreach (var t in tracks) + { + TimelineHelpers.CreateClipOnTrack(assetItemType, t, candidateTime); + } + }; + + menuItems.Add( + new MenuActionItem() + { + category = category, + entryName = commandName, + shortCut = string.Empty, + isActiveInMode = true, + isChecked = false, + priority = TypeUtility.IsBuiltIn(assetItemType) ? builtInPriority++ : customPriority++, + state = enabled ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled, + callback = command + } + ); + } + } + + static void AddMarkerMenuCommands(List menu, IEnumerable markerTypes, Action addMarkerCommand, bool enabled) + { + int builtInPriority = MenuOrder.AddMarkerItemStart; + int customPriority = MenuOrder.AddCustomMarkerItemStart; + foreach (var markerType in markerTypes) + { + var markerItemType = markerType; + string category = TimelineHelpers.GetItemCategoryName(markerItemType); + menu.Add( + new MenuActionItem() + { + category = category, + entryName = string.Format(Styles.addItemTemplate, TypeUtility.GetDisplayName(markerType)), + shortCut = string.Empty, + isActiveInMode = true, + isChecked = false, + priority = TypeUtility.IsBuiltIn(markerType) ? builtInPriority++ : customPriority++, + state = enabled ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled, + callback = () => addMarkerCommand(markerItemType, null) + } + ); + + foreach (var objectReference in TypeUtility.ObjectReferencesForType(markerType)) + { + var isSceneReference = objectReference.isSceneReference; + GenericMenu.MenuFunction menuCallback = () => + { + var dataType = markerItemType; + ObjectSelector.get.Show(null, dataType, null, isSceneReference, null, (obj) => addMarkerCommand(markerItemType, obj), null); + ObjectSelector.get.titleContent = EditorGUIUtility.TrTextContent(string.Format(Styles.typeSelectorTemplate, TypeUtility.GetDisplayName(dataType))); + }; + + menu.Add( + new MenuActionItem() + { + category = TimelineHelpers.GetItemCategoryName(markerItemType), + entryName = string.Format(Styles.addItemFromAssetTemplate, TypeUtility.GetDisplayName(markerType), TypeUtility.GetDisplayName(objectReference.type)), + shortCut = string.Empty, + isActiveInMode = true, + isChecked = false, + priority = TypeUtility.IsBuiltIn(markerType) ? builtInPriority++ : customPriority++, + state = enabled ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled, + callback = menuCallback + } + ); + } + } + } + + static void AddMarkerMenuCommands(List menuItems, ICollection tracks, double candidateTime) + { + if (tracks.Count == 0) + return; + + var enabled = tracks.All(t => !t.lockedInHierarchy) && !TimelineWindow.instance.state.editSequence.isReadOnly; + var addMarkerCommand = new Action((type, obj) => AddMarkersCallback(tracks, type, candidateTime, obj)); + + AddMarkerMenuCommands(menuItems, tracks, addMarkerCommand, enabled); + } + + static void AddMarkerMenuCommands(List menuItems, ICollection tracks, Action command, bool enabled) + { + var markerTypes = TypeUtility.GetBuiltInMarkerTypes().Union(TypeUtility.GetUserMarkerTypes()); + if (tracks != null) + markerTypes = markerTypes.Where(x => tracks.All(track => (track == null) || TypeUtility.DoesTrackSupportMarkerType(track, x))); // null track indicates marker track to be created + + AddMarkerMenuCommands(menuItems, markerTypes, command, enabled); + } + + static void AddMarkersCallback(ICollection targets, Type markerType, double time, Object obj) + { + SelectionManager.Clear(); + foreach (var target in targets) + { + var marker = TimelineHelpers.CreateMarkerOnTrack(markerType, obj, target, time); + SelectionManager.Add(marker); + } + TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved); + } + + static void AddSingleMarkerCallback(Type markerType, double time, TimelineAsset timeline, PlayableDirector director, Object assignableObject) + { + timeline.CreateMarkerTrack(); + var markerTrack = timeline.markerTrack; + + SelectionManager.Clear(); + var marker = TimelineHelpers.CreateMarkerOnTrack(markerType, assignableObject, markerTrack, time); + SelectionManager.Add(marker); + + if (typeof(INotification).IsAssignableFrom(markerType) && director != null) + { + if (director != null && director.GetGenericBinding(markerTrack) == null) + director.SetGenericBinding(markerTrack, director.gameObject); + } + + TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/TimelineContextMenu.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/TimelineContextMenu.cs.meta new file mode 100644 index 0000000..adfa86d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/Menus/TimelineContextMenu.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: de86b4ed8106fd84a8bc2f5d69798d53 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TimelineActions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TimelineActions.cs new file mode 100644 index 0000000..25e72e8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TimelineActions.cs @@ -0,0 +1,946 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using UnityEditor.ShortcutManagement; +using UnityEngine; +using UnityEngine.Timeline; +using MenuEntryPair = System.Collections.Generic.KeyValuePair; + +namespace UnityEditor.Timeline +{ + [ActiveInMode(TimelineModes.Default)] + abstract class TimelineAction : MenuItemActionBase + { + public abstract bool Execute(WindowState state); + + public virtual MenuActionDisplayState GetDisplayState(WindowState state) + { + return MenuActionDisplayState.Visible; + } + + public virtual bool IsChecked(WindowState state) + { + return false; + } + + protected string GetDisplayName(WindowState state) + { + return menuName; + } + + bool CanExecute(WindowState state) + { + return GetDisplayState(state) == MenuActionDisplayState.Visible; + } + + public static void Invoke(WindowState state) where T : TimelineAction + { + var action = AllActions.FirstOrDefault(x => x.GetType() == typeof(T)); + if (action != null && action.CanExecute(state)) + action.Execute(state); + } + + // an instance of all TimelineActions + public static readonly TimelineAction[] AllActions = GetActionsOfType(typeof(TimelineAction)).Select(x => (TimelineAction)x.GetConstructors()[0].Invoke(null)).ToArray(); + + // an instance of all TimelineActions that should appear in a regular contextMenu + public static readonly TimelineAction[] MenuActions = AllActions.Where(a => a.showInMenu && !(a is MarkerHeaderAction)).ToArray(); + + public static void GetMenuEntries(IEnumerable actions, Vector2? mousePos, List items) + { + var state = TimelineWindow.instance.state; + var mode = TimelineWindow.instance.currentMode.mode; + + foreach (var action in actions) + { + var actionItem = action; + action.mousePosition = mousePos; + items.Add( + new MenuActionItem() + { + category = action.category, + entryName = action.GetDisplayName(state), + shortCut = action.shortCut, + isChecked = action.IsChecked(state), + isActiveInMode = IsActionActiveInMode(action, mode), + priority = action.priority, + state = action.GetDisplayState(state), + callback = () => + { + actionItem.mousePosition = mousePos; + actionItem.Execute(state); + actionItem.mousePosition = null; + } + } + ); + action.mousePosition = null; + } + } + + public static bool HandleShortcut(WindowState state, Event evt) + { + if (EditorGUI.IsEditingTextField()) + return false; + + foreach (var action in AllActions) + { + var attr = action.GetType().GetCustomAttributes(typeof(ShortcutAttribute), true); + + foreach (ShortcutAttribute shortcut in attr) + { + if (shortcut.MatchesEvent(evt)) + { + if (s_ShowActionTriggeredByShortcut) + Debug.Log(action.GetType().Name); + + if (!IsActionActiveInMode(action, TimelineWindow.instance.currentMode.mode)) + return false; + + var handled = action.Execute(state); + if (handled) + return true; + } + } + } + + return false; + } + + protected static bool DoInternal(Type t, WindowState state) + { + var action = (TimelineAction)t.GetConstructors()[0].Invoke(null); + + if (action.CanExecute(state)) + return action.Execute(state); + + return false; + } + } + + // indicates the action only applies to the marker header menu + abstract class MarkerHeaderAction : TimelineAction + { + } + + + [MenuEntry("Copy", MenuOrder.TimelineAction.Copy)] + [Shortcut("Main Menu/Edit/Copy", EventCommandNames.Copy)] + class CopyAction : TimelineAction + { + public static bool Do(WindowState state) + { + return DoInternal(typeof(CopyAction), state); + } + + public override MenuActionDisplayState GetDisplayState(WindowState state) + { + return SelectionManager.Count() > 0 ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state) + { + TimelineEditor.clipboard.Clear(); + + var clips = SelectionManager.SelectedClips().ToArray(); + if (clips.Length > 0) + { + ItemAction.Invoke(state, clips); + } + var markers = SelectionManager.SelectedMarkers().ToArray(); + if (markers.Length > 0) + { + ItemAction.Invoke(state, markers); + } + var tracks = SelectionManager.SelectedTracks().ToArray(); + if (tracks.Length > 0) + { + CopyTracksToClipboard.Do(state, tracks); + } + + return true; + } + } + + [MenuEntry("Paste", MenuOrder.TimelineAction.Paste)] + [Shortcut("Main Menu/Edit/Paste", EventCommandNames.Paste)] + class PasteAction : TimelineAction + { + public static bool Do(WindowState state) + { + return DoInternal(typeof(PasteAction), state); + } + + public override MenuActionDisplayState GetDisplayState(WindowState state) + { + return CanPaste(state) ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state) + { + if (!CanPaste(state)) + return false; + + PasteItems(state, mousePosition); + PasteTracks(state); + + state.Refresh(); + + mousePosition = null; + return true; + } + + bool CanPaste(WindowState state) + { + var copiedItems = TimelineEditor.clipboard.GetCopiedItems().ToList(); + + if (!copiedItems.Any()) + return TimelineEditor.clipboard.GetTracks().Any(); + + return CanPasteItems(copiedItems, state, mousePosition); + } + + static bool CanPasteItems(ICollection itemsGroups, WindowState state, Vector2? mousePosition) + { + var hasItemsCopiedFromMultipleTracks = itemsGroups.Count > 1; + var allItemsCopiedFromCurrentAsset = itemsGroups.All(x => x.targetTrack.timelineAsset == state.editSequence.asset); + var hasUsedShortcut = mousePosition == null; + var anySourceLocked = itemsGroups.Any(x => x.targetTrack != null && x.targetTrack.lockedInHierarchy); + + var targetTrack = GetPickedTrack(); + if (targetTrack == null) + targetTrack = SelectionManager.SelectedTracks().FirstOrDefault(); + + //do not paste if the user copied items from another timeline + //if the copied items comes from > 1 track (since we do not know where to paste the copied items) + //or if a keyboard shortcut was used (since the user will not see the paste result) + if (!allItemsCopiedFromCurrentAsset) + { + var isSelectedTrackInCurrentAsset = targetTrack != null && targetTrack.timelineAsset == state.editSequence.asset; + if (hasItemsCopiedFromMultipleTracks || (hasUsedShortcut && !isSelectedTrackInCurrentAsset)) + return false; + } + + if (hasUsedShortcut) + return !anySourceLocked; // copy/paste to same track + + if (hasItemsCopiedFromMultipleTracks) + { + //do not paste if the track which received the paste action does not contain a copied clip + return !anySourceLocked && itemsGroups.Select(x => x.targetTrack).Contains(targetTrack); + } + + var copiedItems = itemsGroups.SelectMany(i => i.items); + return IsTrackValidForItems(targetTrack, copiedItems); + } + + static void PasteItems(WindowState state, Vector2? mousePosition) + { + var copiedItems = TimelineEditor.clipboard.GetCopiedItems().ToList(); + var numberOfUniqueParentsInClipboard = copiedItems.Count(); + + if (numberOfUniqueParentsInClipboard == 0) return; + List newItems; + + //if the copied items were on a single parent, then use the mouse position to get the parent OR the original parent + if (numberOfUniqueParentsInClipboard == 1) + { + var itemsGroup = copiedItems.First(); + TrackAsset target = null; + if (mousePosition.HasValue) + target = GetPickedTrack(); + if (target == null) + target = FindSuitableParentForSingleTrackPasteWithoutMouse(itemsGroup); + + var candidateTime = TimelineHelpers.GetCandidateTime(state, mousePosition, target); + newItems = TimelineHelpers.DuplicateItemsUsingCurrentEditMode(state, TimelineEditor.clipboard.exposedPropertyTable, TimelineEditor.inspectedDirector, itemsGroup, target, candidateTime, "Paste Items").ToList(); + } + //if copied items were on multiple parents, then the destination parents are the same as the original parents + else + { + var time = TimelineHelpers.GetCandidateTime(state, mousePosition, copiedItems.Select(c => c.targetTrack).ToArray()); + newItems = TimelineHelpers.DuplicateItemsUsingCurrentEditMode(state, TimelineEditor.clipboard.exposedPropertyTable, TimelineEditor.inspectedDirector, copiedItems, time, "Paste Items").ToList(); + } + + TimelineHelpers.FrameItems(state, newItems); + SelectionManager.RemoveTimelineSelection(); + foreach (var item in newItems) + { + SelectionManager.Add(item); + } + } + + static TrackAsset FindSuitableParentForSingleTrackPasteWithoutMouse(ItemsPerTrack itemsGroup) + { + var groupParent = itemsGroup.targetTrack; //set a main parent in the clipboard + var selectedTracks = SelectionManager.SelectedTracks(); + + if (selectedTracks.Contains(groupParent)) + { + return groupParent; + } + + //find a selected track suitable for all items + var itemsToPaste = itemsGroup.items; + var compatibleTrack = selectedTracks.FirstOrDefault(t => IsTrackValidForItems(t, itemsToPaste)); + return compatibleTrack != null ? compatibleTrack : groupParent; + } + + static bool IsTrackValidForItems(TrackAsset track, IEnumerable items) + { + if (track == null || track.lockedInHierarchy) return false; + return items.All(i => i.IsCompatibleWithTrack(track)); + } + + static TrackAsset GetPickedTrack() + { + var rowGUI = PickerUtils.pickedElements.OfType().FirstOrDefault(); + if (rowGUI != null) + return rowGUI.asset; + + return null; + } + + static void PasteTracks(WindowState state) + { + var trackData = TimelineEditor.clipboard.GetTracks().ToList(); + if (trackData.Any()) + { + SelectionManager.RemoveTimelineSelection(); + } + + foreach (var track in trackData) + { + var newTrack = track.item.Duplicate(TimelineEditor.clipboard.exposedPropertyTable, TimelineEditor.inspectedDirector, TimelineEditor.inspectedAsset); + SelectionManager.Add(newTrack); + foreach (var childTrack in newTrack.GetFlattenedChildTracks()) + { + SelectionManager.Add(childTrack); + } + + if (track.parent != null && track.parent.timelineAsset == state.editSequence.asset) + { + TrackExtensions.ReparentTracks(new List { newTrack }, track.parent, track.item); + } + } + } + } + + [MenuEntry("Duplicate", MenuOrder.TimelineAction.Duplicate)] + [Shortcut("Main Menu/Edit/Duplicate", EventCommandNames.Duplicate)] + class DuplicateAction : TimelineAction + { + public override bool Execute(WindowState state) + { + return Execute(state, (item1, item2) => ItemsUtils.TimeGapBetweenItems(item1, item2, state)); + } + + internal bool Execute(WindowState state, Func gapBetweenItems) + { + var selectedItems = SelectionManager.SelectedItems().ToItemsPerTrack().ToList(); + if (selectedItems.Any()) + { + var requestedTime = CalculateDuplicateTime(selectedItems, gapBetweenItems); + var duplicatedItems = TimelineHelpers.DuplicateItemsUsingCurrentEditMode(state, TimelineEditor.inspectedDirector, TimelineEditor.inspectedDirector, selectedItems, requestedTime, "Duplicate Items"); + + TimelineHelpers.FrameItems(state, duplicatedItems); + SelectionManager.RemoveTimelineSelection(); + foreach (var item in duplicatedItems) + SelectionManager.Add(item); + } + + var tracks = SelectionManager.SelectedTracks().ToArray(); + if (tracks.Length > 0) + TrackAction.Invoke(state, tracks); + + state.Refresh(); + return true; + } + + static double CalculateDuplicateTime(IEnumerable duplicatedItems, Func gapBetweenItems) + { + //Find the end time of the rightmost item + var itemsOnTracks = duplicatedItems.SelectMany(i => i.targetTrack.GetItems()).ToList(); + var time = itemsOnTracks.Max(i => i.end); + + //From all the duplicated items, select the leftmost items + var firstDuplicatedItems = duplicatedItems.Select(i => i.leftMostItem); + var leftMostDuplicatedItems = firstDuplicatedItems.OrderBy(i => i.start).GroupBy(i => i.start).FirstOrDefault(); + if (leftMostDuplicatedItems == null) return 0.0; + + foreach (var leftMostItem in leftMostDuplicatedItems) + { + var siblings = leftMostItem.parentTrack.GetItems(); + var rightMostSiblings = siblings.OrderByDescending(i => i.end).GroupBy(i => i.end).FirstOrDefault(); + if (rightMostSiblings == null) continue; + + foreach (var sibling in rightMostSiblings) + time = Math.Max(time, sibling.end + gapBetweenItems(leftMostItem, sibling)); + } + + return time; + } + } + + [MenuEntry("Delete", MenuOrder.TimelineAction.Delete)] + [Shortcut("Main Menu/Edit/Delete", EventCommandNames.Delete)] + [ShortcutPlatformOverride(RuntimePlatform.OSXEditor, KeyCode.Backspace, ShortcutModifiers.Action)] + [ActiveInMode(TimelineModes.Default)] + class DeleteAction : TimelineAction + { + public override MenuActionDisplayState GetDisplayState(WindowState state) + { + return CanDelete(state) ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + static bool CanDelete(WindowState state) + { + if (state.editSequence.isReadOnly) + return false; + // All() returns true when empty + return SelectionManager.SelectedTracks().All(x => !x.lockedInHierarchy) && + SelectionManager.SelectedItems().All(x => x.parentTrack == null || !x.parentTrack.lockedInHierarchy); + } + + public override bool Execute(WindowState state) + { + if (SelectionManager.GetCurrentInlineEditorCurve() != null) + return false; + + if (!CanDelete(state)) + return false; + + var selectedItems = SelectionManager.SelectedItems(); + DeleteItems(selectedItems); + + var tracks = SelectionManager.SelectedTracks().ToArray(); + if (tracks.Any()) + TrackAction.Invoke(state, tracks); + + state.Refresh(); + return selectedItems.Any() || tracks.Length > 0; + } + + internal static void DeleteItems(IEnumerable items) + { + var tracks = items.GroupBy(c => c.parentTrack); + + foreach (var track in tracks) + TimelineUndo.PushUndo(track.Key, "Delete Items"); + + TimelineAnimationUtilities.UnlinkAnimationWindowFromClips(items.OfType().Select(i => i.clip)); + + EditMode.PrepareItemsDelete(ItemsUtils.ToItemsPerTrack(items)); + EditModeUtils.Delete(items); + + SelectionManager.RemoveAllClips(); + } + } + + [MenuEntry("Match Content", MenuOrder.TimelineAction.MatchContent)] + [Shortcut(Shortcuts.Timeline.matchContent)] + class MatchContent : TimelineAction + { + public override MenuActionDisplayState GetDisplayState(WindowState state) + { + var clips = SelectionManager.SelectedClips().ToArray(); + + if (!clips.Any() || SelectionManager.GetCurrentInlineEditorCurve() != null) + return MenuActionDisplayState.Hidden; + + return clips.Any(TimelineHelpers.HasUsableAssetDuration) + ? MenuActionDisplayState.Visible + : MenuActionDisplayState.Disabled; + } + + public override bool Execute(WindowState state) + { + if (SelectionManager.GetCurrentInlineEditorCurve() != null) + return false; + + var clips = SelectionManager.SelectedClips().ToArray(); + return clips.Length > 0 && ClipModifier.MatchContent(clips); + } + } + + [Shortcut(Shortcuts.Timeline.play)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class PlayTimelineAction : TimelineAction + { + public override bool Execute(WindowState state) + { + var currentState = state.playing; + state.SetPlaying(!currentState); + return true; + } + } + + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class SelectAllAction : TimelineAction + { + public override bool Execute(WindowState state) + { + // otherwise select all tracks. + SelectionManager.Clear(); + state.GetWindow().allTracks.ForEach(x => SelectionManager.Add(x.track)); + + return true; + } + } + + [Shortcut(Shortcuts.Timeline.previousFrame)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class PreviousFrameAction : TimelineAction + { + public override bool Execute(WindowState state) + { + state.editSequence.frame--; + return true; + } + } + + [Shortcut(Shortcuts.Timeline.nextFrame)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class NextFrameAction : TimelineAction + { + public override bool Execute(WindowState state) + { + state.editSequence.frame++; + return true; + } + } + + [Shortcut(Shortcuts.Timeline.frameAll)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class FrameAllAction : TimelineAction + { + public override bool Execute(WindowState state) + { + var inlineCurveEditor = SelectionManager.GetCurrentInlineEditorCurve(); + if (inlineCurveEditor != null && inlineCurveEditor.inlineCurvesSelected) + { + FrameSelectedAction.FrameInlineCurves(inlineCurveEditor, state, false); + return true; + } + + if (state.IsEditingASubItem()) + return false; + + var w = state.GetWindow(); + if (w == null || w.treeView == null) + return false; + + var visibleTracks = w.treeView.visibleTracks.ToList(); + if (state.editSequence.asset != null && state.editSequence.asset.markerTrack != null) + visibleTracks.Add(state.editSequence.asset.markerTrack); + + if (visibleTracks.Count == 0) + return false; + + var startTime = float.MaxValue; + var endTime = float.MinValue; + + foreach (var t in visibleTracks) + { + if (t == null) + continue; + + double trackStart, trackEnd; + t.GetItemRange(out trackStart, out trackEnd); + startTime = Mathf.Min(startTime, (float)trackStart); + endTime = Mathf.Max(endTime, (float)(trackEnd)); + } + + if (startTime != float.MinValue) + { + FrameSelectedAction.FrameRange(startTime, endTime, state); + return true; + } + + return false; + } + } + + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class FrameSelectedAction : TimelineAction + { + public static void FrameRange(float startTime, float endTime, WindowState state) + { + if (startTime > endTime) + { + return; + } + + var halfDuration = endTime - Math.Max(0.0f, startTime); + + if (halfDuration > 0.0f) + { + state.SetTimeAreaShownRange(Mathf.Max(-10.0f, startTime - (halfDuration * 0.1f)), + endTime + (halfDuration * 0.1f)); + } + else + { + // start == end + // keep the zoom level constant, only pan the time area to center the item + var currentRange = state.timeAreaShownRange.y - state.timeAreaShownRange.x; + state.SetTimeAreaShownRange(startTime - currentRange / 2, startTime + currentRange / 2); + } + + TimelineZoomManipulator.InvalidateWheelZoom(); + state.Evaluate(); + } + + public override bool Execute(WindowState state) + { + var inlineCurveEditor = SelectionManager.GetCurrentInlineEditorCurve(); + if (inlineCurveEditor != null && inlineCurveEditor.inlineCurvesSelected) + { + FrameInlineCurves(inlineCurveEditor, state, true); + return true; + } + + if (state.IsEditingASubItem()) + return false; + + if (SelectionManager.Count() == 0) + return false; + + var startTime = float.MaxValue; + var endTime = float.MinValue; + + var clips = SelectionManager.SelectedClipGUI(); + var markers = SelectionManager.SelectedMarkers(); + if (!clips.Any() && !markers.Any()) + return false; + + foreach (var c in clips) + { + startTime = Mathf.Min(startTime, (float)c.clip.start); + endTime = Mathf.Max(endTime, (float)c.clip.end); + if (c.clipCurveEditor != null) + { + c.clipCurveEditor.FrameClip(); + } + } + + foreach (var marker in markers) + { + startTime = Mathf.Min(startTime, (float)marker.time); + endTime = Mathf.Max(endTime, (float)marker.time); + } + + FrameRange(startTime, endTime, state); + + return true; + } + + public static void FrameInlineCurves(IClipCurveEditorOwner curveEditorOwner, WindowState state, bool selectionOnly) + { + var curveEditor = curveEditorOwner.clipCurveEditor.curveEditor; + var frameBounds = selectionOnly ? curveEditor.GetSelectionBounds() : curveEditor.GetClipBounds(); + + var clipGUI = curveEditorOwner as TimelineClipGUI; + var areaOffset = 0.0f; + + if (clipGUI != null) + { + areaOffset = (float)Math.Max(0.0, clipGUI.clip.FromLocalTimeUnbound(0.0)); + + var timeScale = (float)clipGUI.clip.timeScale; // Note: The getter for clip.timeScale is guaranteed to never be zero. + + // Apply scaling + var newMin = frameBounds.min.x / timeScale; + var newMax = (frameBounds.max.x - frameBounds.min.x) / timeScale + newMin; + + frameBounds.SetMinMax( + new Vector3(newMin, frameBounds.min.y, frameBounds.min.z), + new Vector3(newMax, frameBounds.max.y, frameBounds.max.z)); + } + + curveEditor.Frame(frameBounds, true, true); + + var area = curveEditor.shownAreaInsideMargins; + area.x += areaOffset; + + var curveStart = curveEditorOwner.clipCurveEditor.dataSource.start; + FrameRange(curveStart + frameBounds.min.x, curveStart + frameBounds.max.x, state); + } + } + + [Shortcut(Shortcuts.Timeline.previousKey)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class PrevKeyAction : TimelineAction + { + public override bool Execute(WindowState state) + { + var keyTraverser = new Utilities.KeyTraverser(state.editSequence.asset, 0.01f / state.referenceSequence.frameRate); + var time = keyTraverser.GetPrevKey((float)state.editSequence.time, state.dirtyStamp); + if (time != state.editSequence.time) + { + state.editSequence.time = time; + } + + return true; + } + } + + [Shortcut(Shortcuts.Timeline.nextKey)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class NextKeyAction : TimelineAction + { + public override bool Execute(WindowState state) + { + var keyTraverser = new Utilities.KeyTraverser(state.editSequence.asset, 0.01f / state.referenceSequence.frameRate); + var time = keyTraverser.GetNextKey((float)state.editSequence.time, state.dirtyStamp); + if (time != state.editSequence.time) + { + state.editSequence.time = time; + } + + return true; + } + } + + [Shortcut(Shortcuts.Timeline.goToStart)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class GotoStartAction : TimelineAction + { + public override bool Execute(WindowState state) + { + state.editSequence.time = 0.0f; + state.EnsurePlayHeadIsVisible(); + + return true; + } + } + + [Shortcut(Shortcuts.Timeline.goToEnd)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class GotoEndAction : TimelineAction + { + public override bool Execute(WindowState state) + { + state.editSequence.time = state.editSequence.duration; + state.EnsurePlayHeadIsVisible(); + + return true; + } + } + + [Shortcut(Shortcuts.Timeline.zoomIn)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class ZoomIn : TimelineAction + { + public override bool Execute(WindowState state) + { + TimelineZoomManipulator.Instance.DoZoom(1.15f, state); + return true; + } + } + + [Shortcut(Shortcuts.Timeline.zoomOut)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class ZoomOut : TimelineAction + { + public override bool Execute(WindowState state) + { + TimelineZoomManipulator.Instance.DoZoom(0.85f, state); + return true; + } + } + + [Shortcut(Shortcuts.Timeline.collapseGroup)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class CollapseGroup : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.CollapseGroup(state); + } + } + + [Shortcut(Shortcuts.Timeline.unCollapseGroup)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class UnCollapseGroup : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.UnCollapseGroup(state); + } + } + + [Shortcut(Shortcuts.Timeline.selectLeftItem)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class SelectLeftClip : TimelineAction + { + public override bool Execute(WindowState state) + { + // Switches to track header if no left track exists + return KeyboardNavigation.SelectLeftItem(state); + } + } + + [Shortcut(Shortcuts.Timeline.selectRightItem)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class SelectRightClip : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.SelectRightItem(state); + } + } + + [Shortcut(Shortcuts.Timeline.selectUpItem)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class SelectUpClip : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.SelectUpItem(state); + } + } + + [Shortcut(Shortcuts.Timeline.selectUpTrack)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class SelectUpTrack : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.SelectUpTrack(); + } + } + + [Shortcut(Shortcuts.Timeline.selectDownItem)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class SelectDownClip : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.SelectDownItem(state); + } + } + + [Shortcut(Shortcuts.Timeline.selectDownTrack)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class SelectDownTrack : TimelineAction + { + public override bool Execute(WindowState state) + { + if (!KeyboardNavigation.ClipAreaActive() && !KeyboardNavigation.TrackHeadActive()) + return KeyboardNavigation.FocusFirstVisibleItem(state); + else + return KeyboardNavigation.SelectDownTrack(); + } + } + + [Shortcut(Shortcuts.Timeline.multiSelectLeft)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class MultiselectLeftClip : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.SelectLeftItem(state, true); + } + } + + [Shortcut(Shortcuts.Timeline.multiSelectRight)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class MultiselectRightClip : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.SelectRightItem(state, true); + } + } + + [Shortcut(Shortcuts.Timeline.multiSelectUp)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class MultiselectUpTrack : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.SelectUpTrack(true); + } + } + + [Shortcut(Shortcuts.Timeline.multiSelectDown)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class MultiselectDownTrack : TimelineAction + { + public override bool Execute(WindowState state) + { + return KeyboardNavigation.SelectDownTrack(true); + } + } + + [Shortcut(Shortcuts.Timeline.toggleClipTrackArea)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class ToggleClipTrackArea : TimelineAction + { + public override bool Execute(WindowState state) + { + if (KeyboardNavigation.TrackHeadActive()) + return KeyboardNavigation.FocusFirstVisibleItem(state, SelectionManager.SelectedTracks()); + + if (!KeyboardNavigation.ClipAreaActive()) + return KeyboardNavigation.FocusFirstVisibleItem(state); + + var item = KeyboardNavigation.GetVisibleSelectedItems().LastOrDefault(); + if (item != null) + SelectionManager.SelectOnly(item.parentTrack); + return true; + } + } + + [MenuEntry("Mute", MenuOrder.TrackAction.MuteTrack)] + class ToggleMuteMarkersOnTimeline : MarkerHeaderAction + { + public override bool IsChecked(WindowState state) + { + return IsMarkerTrackValid(state) && state.editSequence.asset.markerTrack.muted; + } + + public override bool Execute(WindowState state) + { + if (state.showMarkerHeader) + ToggleMute(state); + return true; + } + + static void ToggleMute(WindowState state) + { + var timeline = state.editSequence.asset; + timeline.CreateMarkerTrack(); + + TimelineUndo.PushUndo(timeline.markerTrack, "Toggle Mute"); + timeline.markerTrack.muted = !timeline.markerTrack.muted; + } + + static bool IsMarkerTrackValid(WindowState state) + { + var timeline = state.editSequence.asset; + return timeline != null && timeline.markerTrack != null; + } + } + + [MenuEntry("Show Markers", MenuOrder.TrackAction.ShowHideMarkers)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class ToggleShowMarkersOnTimeline : MarkerHeaderAction + { + public override bool IsChecked(WindowState state) + { + return state.showMarkerHeader; + } + + public override bool Execute(WindowState state) + { + ToggleShow(state); + return true; + } + + static void ToggleShow(WindowState state) + { + state.GetWindow().SetShowMarkerHeader(!state.showMarkerHeader); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TimelineActions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TimelineActions.cs.meta new file mode 100644 index 0000000..39295c4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TimelineActions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b1c789407b55e3a4c9cc86135a714e33 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TrackActions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TrackActions.cs new file mode 100644 index 0000000..d379bd0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TrackActions.cs @@ -0,0 +1,521 @@ +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [ActiveInMode(TimelineModes.Default)] + abstract class TrackAction : MenuItemActionBase + { + public abstract bool Execute(WindowState state, TrackAsset[] tracks); + + protected virtual MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + return tracks.Length > 0 ? MenuActionDisplayState.Visible : MenuActionDisplayState.Disabled; + } + + protected virtual bool IsChecked(WindowState state, TrackAsset[] tracks) + { + return false; + } + + protected virtual string GetDisplayName(TrackAsset[] tracks) + { + return menuName; + } + + public static void Invoke(WindowState state, TrackAsset[] tracks) where T : TrackAction + { + actions.First(x => x.GetType() == typeof(T)).Execute(state, tracks); + } + + static List s_ActionClasses; + + static List actions + { + get + { + if (s_ActionClasses == null) + s_ActionClasses = + GetActionsOfType(typeof(TrackAction)) + .Select(x => (TrackAction)x.GetConstructors()[0].Invoke(null)) + .OrderBy(x => x.priority).ThenBy(x => x.category) + .ToList(); + + return s_ActionClasses; + } + } + + public static void GetMenuEntries(WindowState state, Vector2? mousePos, TrackAsset[] tracks, List items) + { + var mode = TimelineWindow.instance.currentMode.mode; + foreach (var action in actions) + { + if (!action.showInMenu) + continue; + + var actionItem = action; + items.Add( + new MenuActionItem() + { + category = action.category, + entryName = action.GetDisplayName(tracks), + shortCut = action.shortCut, + isChecked = action.IsChecked(state, tracks), + isActiveInMode = IsActionActiveInMode(action, mode), + priority = action.priority, + state = action.GetDisplayState(state, tracks), + callback = () => + { + actionItem.mousePosition = mousePos; + actionItem.Execute(state, tracks); + actionItem.mousePosition = null; + } + } + ); + } + } + + public static bool HandleShortcut(WindowState state, Event evt, TrackAsset[] tracks) + { + foreach (var action in actions) + { + var attr = action.GetType().GetCustomAttributes(typeof(ShortcutAttribute), true); + + foreach (ShortcutAttribute shortcut in attr) + { + if (shortcut.MatchesEvent(evt)) + { + if (s_ShowActionTriggeredByShortcut) + Debug.Log(action.GetType().Name); + + if (!IsActionActiveInMode(action, TimelineWindow.instance.currentMode.mode)) + return false; + + return action.Execute(state, tracks); + } + } + } + + return false; + } + + // For testing + internal MenuActionDisplayState InternalGetDisplayState(WindowState state, TrackAsset[] tracks) + { + return GetDisplayState(state, tracks); + } + } + + [MenuEntry("Edit in Animation Window", MenuOrder.TrackAction.EditInAnimationWindow)] + class EditTrackInAnimationWindow : TrackAction + { + public static bool Do(WindowState state, TrackAsset track) + { + AnimationClip clipToEdit = null; + + AnimationTrack animationTrack = track as AnimationTrack; + if (animationTrack != null) + { + if (!animationTrack.CanConvertToClipMode()) + return false; + + clipToEdit = animationTrack.infiniteClip; + } + else if (track.hasCurves) + { + clipToEdit = track.curves; + } + + if (clipToEdit == null) + return false; + + var gameObject = state.GetSceneReference(track); + var timeController = TimelineAnimationUtilities.CreateTimeController(state, CreateTimeControlClipData(track)); + TimelineAnimationUtilities.EditAnimationClipWithTimeController(clipToEdit, timeController, gameObject); + + return true; + } + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Length == 0) + return MenuActionDisplayState.Hidden; + + if (tracks[0] is AnimationTrack) + { + var animTrack = tracks[0] as AnimationTrack; + if (animTrack.CanConvertToClipMode()) + return MenuActionDisplayState.Visible; + } + else if (tracks[0].hasCurves) + { + return MenuActionDisplayState.Visible; + } + + return MenuActionDisplayState.Hidden; + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + return Do(state, tracks[0]); + } + + static TimelineWindowTimeControl.ClipData CreateTimeControlClipData(TrackAsset track) + { + var data = new TimelineWindowTimeControl.ClipData(); + data.track = track; + data.start = track.start; + data.duration = track.duration; + return data; + } + } + + [MenuEntry("Lock selected track only", MenuOrder.TrackAction.LockSelected)] + class LockSelectedTrack : TrackAction + { + public static readonly string LockSelectedTrackOnlyText = L10n.Tr("Lock selected track only"); + public static readonly string UnlockSelectedTrackOnlyText = L10n.Tr("Unlock selected track only"); + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any(track => TimelineUtility.IsLockedFromGroup(track) || track is GroupTrack || + !track.subTracksObjects.Any())) + return MenuActionDisplayState.Hidden; + return MenuActionDisplayState.Visible; + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + if (!tracks.Any()) return false; + + var hasUnlockedTracks = tracks.Any(x => !x.locked); + Lock(state, tracks.Where(p => !(p is GroupTrack)).ToArray(), hasUnlockedTracks); + return true; + } + + protected override string GetDisplayName(TrackAsset[] tracks) + { + return tracks.All(t => t.locked) ? UnlockSelectedTrackOnlyText : LockSelectedTrackOnlyText; + } + + public static void Lock(WindowState state, TrackAsset[] tracks, bool shouldlock) + { + if (tracks.Length == 0) + return; + + foreach (var track in tracks.Where(t => !TimelineUtility.IsLockedFromGroup(t))) + { + TimelineUndo.PushUndo(track, "Lock Tracks"); + track.locked = shouldlock; + } + TimelineEditor.Refresh(RefreshReason.WindowNeedsRedraw); + } + } + + [MenuEntry("Lock", MenuOrder.TrackAction.LockTrack)] + [Shortcut(Shortcuts.Timeline.toggleLock)] + class LockTrack : TrackAction + { + public static readonly string UnlockText = L10n.Tr("Unlock"); + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + bool hasUnlockableTracks = tracks.Any(x => TimelineUtility.IsLockedFromGroup(x)); + if (hasUnlockableTracks) + return MenuActionDisplayState.Disabled; + return MenuActionDisplayState.Visible; + } + + protected override string GetDisplayName(TrackAsset[] tracks) + { + return tracks.Any(x => !x.locked) ? base.GetDisplayName(tracks) : UnlockText; + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + if (!tracks.Any()) return false; + + var hasUnlockedTracks = tracks.Any(x => !x.locked); + SetLockState(tracks, hasUnlockedTracks, state); + return true; + } + + public static void SetLockState(TrackAsset[] tracks, bool shouldLock, WindowState state = null) + { + if (tracks.Length == 0) + return; + + foreach (var track in tracks) + { + if (TimelineUtility.IsLockedFromGroup(track)) + continue; + + if (track as GroupTrack == null) + SetLockState(track.GetChildTracks().ToArray(), shouldLock, state); + + TimelineUndo.PushUndo(track, "Lock Tracks"); + track.locked = shouldLock; + } + + if (state != null) + { + // find the tracks we've locked. unselect anything locked and remove recording. + foreach (var track in tracks) + { + if (TimelineUtility.IsLockedFromGroup(track) || !track.locked) + continue; + + var flattenedChildTracks = track.GetFlattenedChildTracks(); + foreach (var i in track.clips) + SelectionManager.Remove(i); + state.UnarmForRecord(track); + foreach (var child in flattenedChildTracks) + { + SelectionManager.Remove(child); + state.UnarmForRecord(child); + foreach (var clip in child.GetClips()) + SelectionManager.Remove(clip); + } + } + + // no need to rebuild, just repaint (including inspectors) + InspectorWindow.RepaintAllInspectors(); + state.editorWindow.Repaint(); + } + } + } + + [UsedImplicitly] + [MenuEntry("Show Markers", MenuOrder.TrackAction.ShowHideMarkers)] + [ActiveInMode(TimelineModes.Default | TimelineModes.ReadOnly)] + class ShowHideMarkers : TrackAction + { + protected override bool IsChecked(WindowState state, TrackAsset[] tracks) + { + return tracks.All(x => x.GetShowMarkers()); + } + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any(x => x is GroupTrack) || tracks.Any(t => t.GetMarkerCount() == 0)) + return MenuActionDisplayState.Hidden; + + if (tracks.Any(t => t.lockedInHierarchy)) + return MenuActionDisplayState.Disabled; + + return MenuActionDisplayState.Visible; + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + if (!tracks.Any()) return false; + + var hasUnlockedTracks = tracks.Any(x => !x.GetShowMarkers()); + ShowHide(state, tracks, hasUnlockedTracks); + return true; + } + + static void ShowHide(WindowState state, TrackAsset[] tracks, bool shouldLock) + { + if (tracks.Length == 0) + return; + + var window = state.GetWindow(); + foreach (var track in tracks) + { + window.SetShowTrackMarkers(track, shouldLock); + } + + TimelineEditor.Refresh(RefreshReason.WindowNeedsRedraw); + } + } + + [MenuEntry("Mute selected track only", MenuOrder.TrackAction.MuteSelected), UsedImplicitly] + class MuteSelectedTrack : TrackAction + { + public static readonly string UnmuteSelectedText = L10n.Tr("Unmute selected track only"); + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any(track => TimelineUtility.IsParentMuted(track) || track is GroupTrack || + !track.subTracksObjects.Any())) + return MenuActionDisplayState.Hidden; + return MenuActionDisplayState.Visible; + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + if (!tracks.Any()) + return false; + + var hasUnmutedTracks = tracks.Any(x => !x.muted); + Mute(state, tracks.Where(p => !(p is GroupTrack)).ToArray(), hasUnmutedTracks); + return true; + } + + protected override string GetDisplayName(TrackAsset[] tracks) + { + return tracks.All(t => t.muted) ? UnmuteSelectedText : base.GetDisplayName(tracks); + } + + public static void Mute(WindowState state, TrackAsset[] tracks, bool shouldMute) + { + if (tracks.Length == 0) + return; + + foreach (var track in tracks.Where(t => !TimelineUtility.IsParentMuted(t))) + { + TimelineUndo.PushUndo(track, "Mute Tracks"); + track.muted = shouldMute; + } + + state.Refresh(); + } + } + + [MenuEntry("Mute", MenuOrder.TrackAction.MuteTrack)] + [Shortcut(Shortcuts.Timeline.toggleMute)] + class MuteTrack : TrackAction + { + public static readonly string UnMuteText = L10n.Tr("Unmute"); + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any(track => TimelineUtility.IsParentMuted(track))) + return MenuActionDisplayState.Disabled; + return MenuActionDisplayState.Visible; + } + + protected override string GetDisplayName(TrackAsset[] tracks) + { + return tracks.Any(x => !x.muted) ? base.GetDisplayName(tracks) : UnMuteText; + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + if (!tracks.Any() || tracks.Any(track => TimelineUtility.IsParentMuted(track))) + return false; + + var hasUnmutedTracks = tracks.Any(x => !x.muted); + Mute(state, tracks, hasUnmutedTracks); + return true; + } + + public static void Mute(WindowState state, TrackAsset[] tracks, bool shouldMute) + { + if (tracks.Length == 0) + return; + + foreach (var track in tracks) + { + if (track as GroupTrack == null) + Mute(state, track.GetChildTracks().ToArray(), shouldMute); + TimelineUndo.PushUndo(track, "Mute Tracks"); + track.muted = shouldMute; + } + + state.Refresh(); + } + } + + class DeleteTracks : TrackAction + { + public static void Do(TimelineAsset timeline, TrackAsset track) + { + SelectionManager.Remove(track); + TrackModifier.DeleteTrack(timeline, track); + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + // disable preview mode so deleted tracks revert to default state + // Case 956129: Disable preview mode _before_ deleting the tracks, since clip data is still needed + state.previewMode = false; + + TimelineAnimationUtilities.UnlinkAnimationWindowFromTracks(tracks); + + foreach (var track in tracks) + Do(state.editSequence.asset, track); + + state.Refresh(); + + return true; + } + } + + class CopyTracksToClipboard : TrackAction + { + public static bool Do(WindowState state, TrackAsset[] tracks) + { + var action = new CopyTracksToClipboard(); + + return action.Execute(state, tracks); + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + TimelineEditor.clipboard.CopyTracks(tracks); + + return true; + } + } + + class DuplicateTracks : TrackAction + { + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any()) + { + SelectionManager.RemoveTimelineSelection(); + } + + foreach (var track in TrackExtensions.FilterTracks(tracks)) + { + var newTrack = track.Duplicate(TimelineEditor.inspectedDirector, TimelineEditor.inspectedDirector); + SelectionManager.Add(newTrack); + foreach (var childTrack in newTrack.GetFlattenedChildTracks()) + { + SelectionManager.Add(childTrack); + } + } + + state.Refresh(); + + return true; + } + } + + [MenuEntry("Remove Invalid Markers", MenuOrder.TrackAction.RemoveInvalidMarkers), UsedImplicitly] + class RemoveInvalidMarkersAction : TrackAction + { + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any(target => target != null && target.GetMarkerCount() != target.GetMarkersRaw().Count())) + return MenuActionDisplayState.Visible; + + return MenuActionDisplayState.Hidden; + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + bool anyRemoved = false; + foreach (var target in tracks) + { + var invalids = target.GetMarkersRaw().Where(x => !(x is IMarker)).ToList(); + foreach (var m in invalids) + { + anyRemoved = true; + target.DeleteMarkerRaw(m); + } + } + + if (anyRemoved) + TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved); + + return anyRemoved; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TrackActions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TrackActions.cs.meta new file mode 100644 index 0000000..483f9eb --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Actions/TrackActions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fda82b5ca7a4c5f40b497c4f5f4bd950 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation.meta new file mode 100644 index 0000000..d6b7c25 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b124f0b8ca43e6e46bdc0322fad15ea3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackEditor.cs new file mode 100644 index 0000000..a7552f1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackEditor.cs @@ -0,0 +1,56 @@ +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + [UsedImplicitly] + [CustomTimelineEditor(typeof(ActivationTrack))] + class ActivationTrackEditor : TrackEditor + { + static readonly string ClipText = LocalizationDatabase.GetLocalizedString("Active"); + + static readonly string k_ErrorParentString = LocalizationDatabase.GetLocalizedString("The bound GameObject is a parent of the PlayableDirector."); + static readonly string k_ErrorString = LocalizationDatabase.GetLocalizedString("The bound GameObject contains the PlayableDirector."); + + public override TrackDrawOptions GetTrackOptions(TrackAsset track, Object binding) + { + var options = base.GetTrackOptions(track, binding); + options.errorText = GetErrorText(track, binding); + return options; + } + + string GetErrorText(TrackAsset track, Object binding) + { + var gameObject = binding as GameObject; + var currentDirector = TimelineEditor.inspectedDirector; + if (gameObject != null && currentDirector != null) + { + var director = gameObject.GetComponent(); + if (currentDirector == director) + { + return k_ErrorString; + } + + if (currentDirector.gameObject.transform.IsChildOf(gameObject.transform)) + { + return k_ErrorParentString; + } + } + + return base.GetErrorText(track, binding, TrackBindingErrors.PrefabBound); + } + + public override void OnCreate(TrackAsset track, TrackAsset copiedFrom) + { + // Add a default clip to the newly created track + if (copiedFrom == null) + { + var clip = track.CreateClip(0); + clip.displayName = ClipText; + clip.duration = System.Math.Max(clip.duration, track.timelineAsset.duration * 0.5f); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackEditor.cs.meta new file mode 100644 index 0000000..64f81a1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4fbcc9b1f6ace8c4f8724a88dccca5f8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackInspector.cs new file mode 100644 index 0000000..f391e69 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackInspector.cs @@ -0,0 +1,43 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomEditor(typeof(ActivationTrack))] + class ActivationTrackInspector : TrackAssetInspector + { + static class Styles + { + public static readonly GUIContent PostPlaybackStateText = EditorGUIUtility.TrTextContent("Post-playback state"); + } + + SerializedProperty m_PostPlaybackProperty; + + public override void OnInspectorGUI() + { + using (new EditorGUI.DisabledScope(IsTrackLocked())) + { + serializedObject.Update(); + + EditorGUI.BeginChangeCheck(); + + if (m_PostPlaybackProperty != null) + EditorGUILayout.PropertyField(m_PostPlaybackProperty, Styles.PostPlaybackStateText); + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + var activationTrack = target as ActivationTrack; + if (activationTrack != null) + activationTrack.UpdateTrackMode(); + } + } + } + + public override void OnEnable() + { + base.OnEnable(); + m_PostPlaybackProperty = serializedObject.FindProperty("m_PostPlaybackState"); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackInspector.cs.meta new file mode 100644 index 0000000..9c3910c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Activation/ActivationTrackInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c46b007a3762fc84cb1ee7ca30060f0b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics.meta new file mode 100644 index 0000000..e6cdda6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 57ff740bce4ab0c498ada374a8ca1dc0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics/TimelineAnalytics.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics/TimelineAnalytics.cs new file mode 100644 index 0000000..7e2cc61 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics/TimelineAnalytics.cs @@ -0,0 +1,170 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.Build; +using UnityEditor.Build.Reporting; +using UnityEngine.Playables; +using UnityEngine.SceneManagement; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline.Analytics +{ + class TimelineSceneInfo + { + public Dictionary trackCount = new Dictionary + { + {"ActivationTrack", 0}, + {"AnimationTrack", 0}, + {"AudioTrack", 0}, + {"ControlTrack", 0}, + {"PlayableTrack", 0}, + {"UserType", 0}, + {"Other", 0} + }; + + public Dictionary userTrackTypesCount = new Dictionary(); + public HashSet uniqueDirectors = new HashSet(); + public int numTracks = 0; + public int minDuration = int.MaxValue; + public int maxDuration = int.MinValue; + public int minNumTracks = int.MaxValue; + public int maxNumTracks = int.MinValue; + public int numRecorded = 0; + } + + [Serializable] + struct TrackInfo + { + public string name; + public double percent; + } + + [Serializable] + class TimelineEventInfo + { + public int num_timelines; + public int min_duration, max_duration; + public int min_num_tracks, max_num_tracks; + public double recorded_percent; + public List track_info = new List(); + public string most_popular_user_track = string.Empty; + + public TimelineEventInfo(TimelineSceneInfo sceneInfo) + { + num_timelines = sceneInfo.uniqueDirectors.Count; + min_duration = sceneInfo.minDuration; + max_duration = sceneInfo.maxDuration; + min_num_tracks = sceneInfo.minNumTracks; + max_num_tracks = sceneInfo.maxNumTracks; + recorded_percent = Math.Round(100.0 * sceneInfo.numRecorded / sceneInfo.numTracks, 1); + + foreach (KeyValuePair kv in sceneInfo.trackCount.Where(x => x.Value > 0)) + { + track_info.Add(new TrackInfo() + { + name = kv.Key, + percent = Math.Round(100.0 * kv.Value / sceneInfo.numTracks, 1) + }); + } + + if (sceneInfo.userTrackTypesCount.Any()) + { + most_popular_user_track = sceneInfo.userTrackTypesCount + .First(x => x.Value == sceneInfo.userTrackTypesCount.Values.Max()).Key; + } + } + + public static bool IsUserType(Type t) + { + string nameSpace = t.Namespace; + return string.IsNullOrEmpty(nameSpace) || !nameSpace.StartsWith("UnityEngine.Timeline"); + } + } + + + static class TimelineAnalytics + { + static TimelineSceneInfo _timelineSceneInfo = new TimelineSceneInfo(); + + class TimelineAnalyticsPreProcess : IPreprocessBuildWithReport + { + public int callbackOrder { get { return 0; } } + public void OnPreprocessBuild(BuildReport report) + { + _timelineSceneInfo = new TimelineSceneInfo(); + } + } + + class TimelineAnalyticsProcess : IProcessSceneWithReport + { + public int callbackOrder + { + get { return 0; } + } + + public void OnProcessScene(Scene scene, BuildReport report) + { + var timelines = UnityEngine.Object.FindObjectsOfType().Select(pd => pd.playableAsset).OfType().Distinct(); + + foreach (var timeline in timelines) + { + if (_timelineSceneInfo.uniqueDirectors.Add(timeline)) + { + _timelineSceneInfo.numTracks += timeline.flattenedTracks.Count(); + _timelineSceneInfo.minDuration = Math.Min(_timelineSceneInfo.minDuration, (int)(timeline.duration * 1000)); + _timelineSceneInfo.maxDuration = Math.Max(_timelineSceneInfo.maxDuration, (int)(timeline.duration * 1000)); + _timelineSceneInfo.minNumTracks = Math.Min(_timelineSceneInfo.minNumTracks, timeline.flattenedTracks.Count()); + _timelineSceneInfo.maxNumTracks = Math.Max(_timelineSceneInfo.maxNumTracks, timeline.flattenedTracks.Count()); + + foreach (var track in timeline.flattenedTracks) + { + string key = track.GetType().Name; + if (_timelineSceneInfo.trackCount.ContainsKey(key)) + { + _timelineSceneInfo.trackCount[key]++; + } + else + { + if (TimelineEventInfo.IsUserType(track.GetType())) + { + _timelineSceneInfo.trackCount["UserType"]++; + if (_timelineSceneInfo.userTrackTypesCount.ContainsKey(key)) + _timelineSceneInfo.userTrackTypesCount[key]++; + else + _timelineSceneInfo.userTrackTypesCount[key] = 1; + } + else + _timelineSceneInfo.trackCount["Other"]++; + } + + if (track.clips.Any(x => x.recordable)) + _timelineSceneInfo.numRecorded++; + else + { + var animationTrack = track as AnimationTrack; + if (animationTrack != null) + { + if (animationTrack.CanConvertToClipMode()) + _timelineSceneInfo.numRecorded++; + } + } + } + } + } + } + } + + class TimelineAnalyticsPostProcess : IPostprocessBuildWithReport + { + public int callbackOrder {get { return 0; }} + public void OnPostprocessBuild(BuildReport report) + { + if (_timelineSceneInfo.uniqueDirectors.Count > 0) + { + var timelineEvent = new TimelineEventInfo(_timelineSceneInfo); + EditorAnalytics.SendEventTimelineInfo(timelineEvent); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics/TimelineAnalytics.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics/TimelineAnalytics.cs.meta new file mode 100644 index 0000000..e296bda --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Analytics/TimelineAnalytics.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 10ba9bc9317e315439b0223674162c52 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation.meta new file mode 100644 index 0000000..2900939 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3174898fbcdf12448963cdb5f5b60a33 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipActions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipActions.cs new file mode 100644 index 0000000..4c79048 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipActions.cs @@ -0,0 +1,96 @@ +using System.ComponentModel; +using System.Linq; +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; +using ClipAction = UnityEditor.Timeline.ItemAction; + +namespace UnityEditor.Timeline +{ + [MenuEntry("Match Offsets To Previous Clip", MenuOrder.CustomClipAction.AnimClipMatchPrevious), UsedImplicitly] + class MatchOffsetsPreviousAction : ClipAction + { + public override bool Execute(WindowState state, TimelineClip[] items) + { + AnimationOffsetMenu.MatchClipsToPrevious(state, items.Where(x => IsValidClip(x, TimelineEditor.inspectedDirector)).ToArray()); + return true; + } + + private static bool IsValidClip(TimelineClip clip, PlayableDirector director) + { + return clip != null && + clip.parentTrack != null && + (clip.asset as AnimationPlayableAsset) != null && + clip.parentTrack.clips.Any(x => x.start < clip.start) && + TimelineUtility.GetSceneGameObject(director, clip.parentTrack) != null; + } + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] items) + { + if (!items.All(TimelineAnimationUtilities.IsAnimationClip)) + return MenuActionDisplayState.Hidden; + + var director = TimelineEditor.inspectedDirector; + if (TimelineEditor.inspectedDirector == null) + return MenuActionDisplayState.Hidden; + + if (items.Any(c => IsValidClip(c, director))) + return MenuActionDisplayState.Visible; + + return MenuActionDisplayState.Hidden; + } + } + + [MenuEntry("Match Offsets To Next Clip", MenuOrder.CustomClipAction.AnimClipMatchNext), UsedImplicitly] + class MatchOffsetsNextAction : ClipAction + { + public override bool Execute(WindowState state, TimelineClip[] items) + { + AnimationOffsetMenu.MatchClipsToNext(state, items.Where(x => IsValidClip(x, TimelineEditor.inspectedDirector)).ToArray()); + return true; + } + + private static bool IsValidClip(TimelineClip clip, PlayableDirector director) + { + return clip != null && + clip.parentTrack != null && + (clip.asset as AnimationPlayableAsset) != null && + clip.parentTrack.clips.Any(x => x.start > clip.start) && + TimelineUtility.GetSceneGameObject(director, clip.parentTrack) != null; + } + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] items) + { + if (!items.All(TimelineAnimationUtilities.IsAnimationClip)) + return MenuActionDisplayState.Hidden; + + var director = TimelineEditor.inspectedDirector; + if (TimelineEditor.inspectedDirector == null) + return MenuActionDisplayState.Hidden; + + if (items.Any(c => IsValidClip(c, director))) + return MenuActionDisplayState.Visible; + + return MenuActionDisplayState.Hidden; + } + } + + [MenuEntry("Reset Offsets", MenuOrder.CustomClipAction.AnimClipResetOffset), UsedImplicitly] + class ResetOffsets : ClipAction + { + public override bool Execute(WindowState state, TimelineClip[] items) + { + AnimationOffsetMenu.ResetClipOffsets(state, items.Where(TimelineAnimationUtilities.IsAnimationClip).ToArray()); + return true; + } + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TimelineClip[] items) + { + if (!items.All(TimelineAnimationUtilities.IsAnimationClip)) + return MenuActionDisplayState.Hidden; + + return MenuActionDisplayState.Visible; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipActions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipActions.cs.meta new file mode 100644 index 0000000..0632984 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipActions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bf22284ca28e7ef4490033b61e9b52cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipCurveCache.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipCurveCache.cs new file mode 100644 index 0000000..8570a73 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipCurveCache.cs @@ -0,0 +1,436 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEditor; +using UnityEditorInternal; + +namespace UnityEditor.Timeline +{ + struct CurveBindingPair + { + public EditorCurveBinding binding; + public AnimationCurve curve; + public ObjectReferenceKeyframe[] objectCurve; + } + + class CurveBindingGroup + { + public CurveBindingPair[] curveBindingPairs { get; set; } + public Vector2 timeRange { get; set; } + public Vector2 valueRange { get; set; } + + public bool isFloatCurve + { + get + { + return curveBindingPairs != null && curveBindingPairs.Length > 0 && + curveBindingPairs[0].curve != null; + } + } + + public bool isObjectCurve + { + get + { + return curveBindingPairs != null && curveBindingPairs.Length > 0 && + curveBindingPairs[0].objectCurve != null; + } + } + + public int count + { + get + { + if (curveBindingPairs == null) + return 0; + return curveBindingPairs.Length; + } + } + } + + class AnimationClipCurveInfo + { + bool m_CurveDirty = true; + bool m_KeysDirty = true; + + public bool dirty + { + get { return m_CurveDirty; } + set + { + m_CurveDirty = value; + if (m_CurveDirty) + { + m_KeysDirty = true; + if (m_groupings != null) + m_groupings.Clear(); + } + } + } + + public AnimationCurve[] curves; + public EditorCurveBinding[] bindings; + + public EditorCurveBinding[] objectBindings; + public List objectCurves; + + Dictionary m_groupings; + + // to tell whether the cache has changed + public int version { get; private set; } + + float[] m_KeyTimes; + + Dictionary m_individualBindinsKey; + + public float[] keyTimes + { + get + { + if (m_KeysDirty || m_KeyTimes == null) + { + RebuildKeyCache(); + } + return m_KeyTimes; + } + } + + public float[] GetCurveTimes(EditorCurveBinding curve) + { + return GetCurveTimes(new[] { curve }); + } + + public float[] GetCurveTimes(EditorCurveBinding[] curves) + { + if (m_KeysDirty || m_KeyTimes == null) + { + RebuildKeyCache(); + } + + var keyTimes = new List(); + for (int i = 0; i < curves.Length; i++) + { + var c = curves[i]; + if (m_individualBindinsKey.ContainsKey(c)) + { + keyTimes.AddRange(m_individualBindinsKey[c]); + } + } + return keyTimes.ToArray(); + } + + void RebuildKeyCache() + { + m_individualBindinsKey = new Dictionary(); + + List keys = curves.SelectMany(y => y.keys).Select(z => z.time).ToList(); + for (int i = 0; i < objectCurves.Count; i++) + { + var kf = objectCurves[i]; + keys.AddRange(kf.Select(x => x.time)); + } + + for (int b = 0; b < bindings.Count(); b++) + { + m_individualBindinsKey.Add(bindings[b], curves[b].keys.Select(k => k.time).Distinct().ToArray()); + } + + m_KeyTimes = keys.OrderBy(x => x).Distinct().ToArray(); + m_KeysDirty = false; + } + + public void Update(AnimationClip clip) + { + List postfilter = new List(); + var clipBindings = AnimationUtility.GetCurveBindings(clip); + for (int i = 0; i < clipBindings.Length; i++) + { + var bind = clipBindings[i]; + if (!bind.propertyName.Contains("LocalRotation.w")) + postfilter.Add(RotationCurveInterpolation.RemapAnimationBindingForRotationCurves(bind, clip)); + } + bindings = postfilter.ToArray(); + + curves = new AnimationCurve[bindings.Length]; + for (int i = 0; i < bindings.Length; i++) + { + curves[i] = AnimationUtility.GetEditorCurve(clip, bindings[i]); + } + + objectBindings = AnimationUtility.GetObjectReferenceCurveBindings(clip); + objectCurves = new List(objectBindings.Length); + for (int i = 0; i < objectBindings.Length; i++) + { + objectCurves.Add(AnimationUtility.GetObjectReferenceCurve(clip, objectBindings[i])); + } + + m_CurveDirty = false; + m_KeysDirty = true; + + version = version + 1; + } + + public bool GetBindingForCurve(AnimationCurve curve, ref EditorCurveBinding binding) + { + for (int i = 0; i < curves.Length; i++) + { + if (curve == curves[i]) + { + binding = bindings[i]; + return true; + } + } + return false; + } + + public AnimationCurve GetCurveForBinding(EditorCurveBinding binding) + { + for (int i = 0; i < curves.Length; i++) + { + if (binding.Equals(bindings[i])) + { + return curves[i]; + } + } + return null; + } + + public ObjectReferenceKeyframe[] GetObjectCurveForBinding(EditorCurveBinding binding) + { + if (objectCurves == null) + return null; + + for (int i = 0; i < objectCurves.Count; i++) + { + if (binding.Equals(objectBindings[i])) + { + return objectCurves[i]; + } + } + return null; + } + + // given a groupID, get the list of curve bindings + public CurveBindingGroup GetGroupBinding(string groupID) + { + if (m_groupings == null) + m_groupings = new Dictionary(); + + CurveBindingGroup result = null; + if (!m_groupings.TryGetValue(groupID, out result)) + { + result = new CurveBindingGroup(); + result.timeRange = new Vector2(float.MaxValue, float.MinValue); + result.valueRange = new Vector2(float.MaxValue, float.MinValue); + List found = new List(); + for (int i = 0; i < bindings.Length; i++) + { + if (bindings[i].GetGroupID() == groupID) + { + CurveBindingPair pair = new CurveBindingPair(); + pair.binding = bindings[i]; + pair.curve = curves[i]; + found.Add(pair); + + for (int k = 0; k < curves[i].keys.Length; k++) + { + var key = curves[i].keys[k]; + result.timeRange = new Vector2(Mathf.Min(key.time, result.timeRange.x), Mathf.Max(key.time, result.timeRange.y)); + result.valueRange = new Vector2(Mathf.Min(key.value, result.valueRange.x), Mathf.Max(key.value, result.valueRange.y)); + } + } + } + for (int i = 0; i < objectBindings.Length; i++) + { + if (objectBindings[i].GetGroupID() == groupID) + { + CurveBindingPair pair = new CurveBindingPair(); + pair.binding = objectBindings[i]; + pair.objectCurve = objectCurves[i]; + found.Add(pair); + + for (int k = 0; k < objectCurves[i].Length; k++) + { + var key = objectCurves[i][k]; + result.timeRange = new Vector2(Mathf.Min(key.time, result.timeRange.x), Mathf.Max(key.time, result.timeRange.y)); + } + } + } + + result.curveBindingPairs = found.OrderBy(x => AnimationWindowUtility.GetComponentIndex(x.binding.propertyName)).ToArray(); + + m_groupings.Add(groupID, result); + } + return result; + } + } + + // Cache for storing the animation clip data + class AnimationClipCurveCache + { + static AnimationClipCurveCache s_Instance; + Dictionary m_ClipCache = new Dictionary(); + bool m_IsEnabled; + + + public static AnimationClipCurveCache Instance + { + get + { + if (s_Instance == null) + { + s_Instance = new AnimationClipCurveCache(); + } + + return s_Instance; + } + } + + public void OnEnable() + { + if (!m_IsEnabled) + { + AnimationUtility.onCurveWasModified += OnCurveWasModified; + m_IsEnabled = true; + } + } + + public void OnDisable() + { + if (m_IsEnabled) + { + AnimationUtility.onCurveWasModified -= OnCurveWasModified; + m_IsEnabled = false; + } + } + + // callback when a curve is edited. Force the cache to update next time it's accessed + void OnCurveWasModified(AnimationClip clip, EditorCurveBinding binding, AnimationUtility.CurveModifiedType modification) + { + if (modification == AnimationUtility.CurveModifiedType.CurveDeleted) + { + m_ClipCache.Remove(clip); + } + else + { + AnimationClipCurveInfo data; + if (m_ClipCache.TryGetValue(clip, out data)) + { + data.dirty = true; + } + } + } + + public AnimationClipCurveInfo GetCurveInfo(AnimationClip clip) + { + AnimationClipCurveInfo data; + if (clip == null) + return null; + if (!m_ClipCache.TryGetValue(clip, out data)) + { + data = new AnimationClipCurveInfo(); + data.dirty = true; + m_ClipCache[clip] = data; + } + if (data.dirty) + { + data.Update(clip); + } + return data; + } + + public void ClearCachedProxyClips() + { + var toRemove = new List(); + foreach (var entry in m_ClipCache) + { + var clip = entry.Key; + if (clip != null && (clip.hideFlags & HideFlags.HideAndDontSave) == HideFlags.HideAndDontSave) + toRemove.Add(clip); + } + + foreach (var clip in toRemove) + { + m_ClipCache.Remove(clip); + Object.DestroyImmediate(clip, true); + } + } + + + public void Clear() + { + ClearCachedProxyClips(); + m_ClipCache.Clear(); + } + + } + + static class EditorCurveBindingExtension + { + // identifier to generate an id thats the same for all curves in the same group + public static string GetGroupID(this EditorCurveBinding binding) + { + return binding.type + AnimationWindowUtility.GetPropertyGroupName(binding.propertyName); + } + } + + + static class CurveBindingGroupExtensions + { + // Extentions to determine curve types + public static bool IsEnableGroup(this CurveBindingGroup curves) + { + return curves.isFloatCurve && curves.count == 1 && curves.curveBindingPairs[0].binding.propertyName == "m_Enabled"; + } + + public static bool IsVectorGroup(this CurveBindingGroup curves) + { + if (!curves.isFloatCurve) + return false; + if (curves.count <= 1 || curves.count > 4) + return false; + char l = curves.curveBindingPairs[0].binding.propertyName.Last(); + return l == 'x' || l == 'y' || l == 'z' || l == 'w'; + } + + public static bool IsColorGroup(this CurveBindingGroup curves) + { + if (!curves.isFloatCurve) + return false; + if (curves.count != 3 && curves.count != 4) + return false; + char l = curves.curveBindingPairs[0].binding.propertyName.Last(); + return l == 'r' || l == 'g' || l == 'b' || l == 'a'; + } + + public static string GetDescription(this CurveBindingGroup group, float t) + { + string result = string.Empty; + if (group.isFloatCurve) + { + if (group.count > 1) + { + result += "(" + group.curveBindingPairs[0].curve.Evaluate(t).ToString("0.##"); + for (int j = 1; j < group.curveBindingPairs.Length; j++) + { + result += "," + group.curveBindingPairs[j].curve.Evaluate(t).ToString("0.##"); + } + result += ")"; + } + else + { + result = group.curveBindingPairs[0].curve.Evaluate(t).ToString("0.##"); + } + } + else if (group.isObjectCurve) + { + Object obj = null; + if (group.curveBindingPairs[0].objectCurve.Length > 0) + obj = CurveEditUtility.Evaluate(group.curveBindingPairs[0].objectCurve, t); + result = (obj == null ? "None" : obj.name); + } + + return result; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipCurveCache.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipCurveCache.cs.meta new file mode 100644 index 0000000..47fcaa3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationClipCurveCache.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 07a967d2fca95324f8922df8394a5655 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationOffsetMenu.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationOffsetMenu.cs new file mode 100644 index 0000000..dbfc688 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationOffsetMenu.cs @@ -0,0 +1,82 @@ +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class AnimationOffsetMenu + { + public static GUIContent MatchPreviousMenuItem = EditorGUIUtility.TrTextContent("Match Offsets To Previous Clip"); + public static GUIContent MatchNextMenuItem = EditorGUIUtility.TrTextContent("Match Offsets To Next Clip"); + public static string MatchFieldsPrefix = "Match Offsets Fields/"; + public static GUIContent ResetOffsetMenuItem = EditorGUIUtility.TrTextContent("Reset Offsets"); + + static bool EnforcePreviewMode(WindowState state) + { + state.previewMode = true; // try and set the preview mode + if (!state.previewMode) + { + Debug.LogError("Match clips cannot be completed because preview mode cannot be enabed"); + return false; + } + return true; + } + + internal static void MatchClipsToPrevious(WindowState state, TimelineClip[] clips) + { + if (!EnforcePreviewMode(state)) + return; + + clips = clips.OrderBy(x => x.start).ToArray(); + foreach (var clip in clips) + { + var sceneObject = TimelineUtility.GetSceneGameObject(state.editSequence.director, clip.parentTrack); + if (sceneObject != null) + { + TimelineUndo.PushUndo(clip.asset, "Match Clip"); + TimelineAnimationUtilities.MatchPrevious(clip, sceneObject.transform, state.editSequence.director); + } + } + + InspectorWindow.RepaintAllInspectors(); + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + + internal static void MatchClipsToNext(WindowState state, TimelineClip[] clips) + { + if (!EnforcePreviewMode(state)) + return; + + clips = clips.OrderByDescending(x => x.start).ToArray(); + foreach (var clip in clips) + { + var sceneObject = TimelineUtility.GetSceneGameObject(state.editSequence.director, clip.parentTrack); + if (sceneObject != null) + { + TimelineUndo.PushUndo(clip.asset, "Match Clip"); + TimelineAnimationUtilities.MatchNext(clip, sceneObject.transform, state.editSequence.director); + } + } + + InspectorWindow.RepaintAllInspectors(); + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + + public static void ResetClipOffsets(WindowState state, TimelineClip[] clips) + { + foreach (var clip in clips) + { + if (clip.asset is AnimationPlayableAsset) + { + TimelineUndo.PushUndo(clip.asset, "Reset Offsets"); + var playableAsset = (AnimationPlayableAsset)clip.asset; + playableAsset.ResetOffsets(); + } + } + state.rebuildGraph = true; + + InspectorWindow.RepaintAllInspectors(); + TimelineEditor.Refresh(RefreshReason.SceneNeedsUpdate); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationOffsetMenu.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationOffsetMenu.cs.meta new file mode 100644 index 0000000..e628663 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationOffsetMenu.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9ace5095cc37ed849b52109d2ee305d4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationPlayableAssetEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationPlayableAssetEditor.cs new file mode 100644 index 0000000..e4bebc1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationPlayableAssetEditor.cs @@ -0,0 +1,65 @@ +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomTimelineEditor(typeof(AnimationPlayableAsset)), UsedImplicitly] + class AnimationPlayableAssetEditor : ClipEditor + { + public static readonly string k_NoClipAssignedError = LocalizationDatabase.GetLocalizedString("No animation clip assigned"); + public static readonly string k_LegacyClipError = LocalizationDatabase.GetLocalizedString("Legacy animation clips are not supported"); + static readonly string k_MotionCurveError = LocalizationDatabase.GetLocalizedString("You are using motion curves without applyRootMotion enabled on the Animator. The root transform will not be animated"); + static readonly string k_RootCurveError = LocalizationDatabase.GetLocalizedString("You are using root curves without applyRootMotion enabled on the Animator. The root transform will not be animated"); + + /// + public override ClipDrawOptions GetClipOptions(TimelineClip clip) + { + var clipOptions = base.GetClipOptions(clip); + var asset = clip.asset as AnimationPlayableAsset; + + if (asset != null) + clipOptions.errorText = GetErrorText(asset, clip.parentTrack as AnimationTrack, clipOptions.errorText); + + if (clip.recordable) + clipOptions.highlightColor = DirectorStyles.Instance.customSkin.colorAnimationRecorded; + + return clipOptions; + } + + /// + public override void OnCreate(TimelineClip clip, TrackAsset track, TimelineClip clonedFrom) + { + var asset = clip.asset as AnimationPlayableAsset; + if (asset != null && asset.clip != null && asset.clip.legacy) + { + asset.clip = null; + Debug.LogError("Legacy Animation Clips are not supported"); + } + } + + string GetErrorText(AnimationPlayableAsset animationAsset, AnimationTrack track, string defaultError) + { + if (animationAsset.clip == null) + return k_NoClipAssignedError; + if (animationAsset.clip.legacy) + return k_LegacyClipError; + if (animationAsset.clip.hasMotionCurves || animationAsset.clip.hasRootCurves) + { + if (track != null && track.trackOffset == TrackOffset.Auto) + { + var animator = track.GetBinding(TimelineEditor.inspectedDirector); + if (animator != null && !animator.applyRootMotion && !animationAsset.clip.hasGenericRootTransform) + { + if (animationAsset.clip.hasMotionCurves) + return k_MotionCurveError; + return k_RootCurveError; + } + } + } + + return defaultError; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationPlayableAssetEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationPlayableAssetEditor.cs.meta new file mode 100644 index 0000000..0a749e8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationPlayableAssetEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f7fed0d9d0f7a7f41a8525aa79e790b1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationTrackActions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationTrackActions.cs new file mode 100644 index 0000000..0b1a171 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationTrackActions.cs @@ -0,0 +1,151 @@ +using System.ComponentModel; +using System.Linq; +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [MenuEntry("Add Override Track", MenuOrder.CustomTrackAction.AnimAddOverrideTrack), UsedImplicitly] + class AddOverrideTrackAction : TrackAction + { + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + foreach (var animTrack in tracks.OfType()) + { + TimelineHelpers.CreateTrack(typeof(AnimationTrack), animTrack, "Override " + animTrack.GetChildTracks().Count()); + } + + return true; + } + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any(t => t.isSubTrack || !t.GetType().IsAssignableFrom(typeof(AnimationTrack)))) + return MenuActionDisplayState.Hidden; + + if (tracks.Any(t => t.lockedInHierarchy)) + return MenuActionDisplayState.Disabled; + + return MenuActionDisplayState.Visible; + } + } + + [MenuEntry("Convert To Clip Track", MenuOrder.CustomTrackAction.AnimConvertToClipMode), UsedImplicitly] + class ConvertToClipModeAction : TrackAction + { + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + foreach (var animTrack in tracks.OfType()) + animTrack.ConvertToClipMode(); + + TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved); + + return true; + } + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any(t => !t.GetType().IsAssignableFrom(typeof(AnimationTrack)))) + return MenuActionDisplayState.Hidden; + + if (tracks.Any(t => t.lockedInHierarchy)) + return MenuActionDisplayState.Disabled; + + if (tracks.OfType().All(a => a.CanConvertToClipMode())) + return MenuActionDisplayState.Visible; + + return MenuActionDisplayState.Hidden; + } + } + + [MenuEntry("Convert To Infinite Clip", MenuOrder.CustomTrackAction.AnimConvertFromClipMode), UsedImplicitly] + class ConvertFromClipTrackAction : TrackAction + { + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + foreach (var animTrack in tracks.OfType()) + animTrack.ConvertFromClipMode(state.editSequence.asset); + + TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved); + + return true; + } + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any(t => !t.GetType().IsAssignableFrom(typeof(AnimationTrack)))) + return MenuActionDisplayState.Hidden; + + if (tracks.Any(t => t.lockedInHierarchy)) + return MenuActionDisplayState.Disabled; + + if (tracks.OfType().All(a => a.CanConvertFromClipMode())) + return MenuActionDisplayState.Visible; + + return MenuActionDisplayState.Hidden; + } + } + + abstract class TrackOffsetBaseAction : TrackAction + { + public abstract TrackOffset trackOffset { get; } + + protected override MenuActionDisplayState GetDisplayState(WindowState state, TrackAsset[] tracks) + { + if (tracks.Any(t => !t.GetType().IsAssignableFrom(typeof(AnimationTrack)))) + return MenuActionDisplayState.Hidden; + + if (tracks.Any(t => t.lockedInHierarchy)) + return MenuActionDisplayState.Disabled; + + return MenuActionDisplayState.Visible; + } + + protected override bool IsChecked(WindowState state, TrackAsset[] tracks) + { + return tracks.OfType().All(t => t.trackOffset == trackOffset); + } + + public override bool Execute(WindowState state, TrackAsset[] tracks) + { + foreach (var animTrack in tracks.OfType()) + { + state.UnarmForRecord(animTrack); + TimelineUndo.PushUndo(animTrack, "Set Transform Offsets"); + animTrack.trackOffset = trackOffset; + } + + TimelineEditor.Refresh(RefreshReason.ContentsModified); + return true; + } + } + + + [MenuEntry("Track Offsets/Apply Transform Offsets", MenuOrder.CustomTrackAction.AnimApplyTrackOffset), UsedImplicitly] + class ApplyTransformOffsetAction : TrackOffsetBaseAction + { + public override TrackOffset trackOffset + { + get { return TrackOffset.ApplyTransformOffsets; } + } + } + + [MenuEntry("Track Offsets/Apply Scene Offsets", MenuOrder.CustomTrackAction.AnimApplySceneOffset), UsedImplicitly] + class ApplySceneOffsetAction : TrackOffsetBaseAction + { + public override TrackOffset trackOffset + { + get { return TrackOffset.ApplySceneOffsets; } + } + } + + [MenuEntry("Track Offsets/Auto (Deprecated)", MenuOrder.CustomTrackAction.AnimApplyAutoOffset), UsedImplicitly] + class ApplyAutoAction : TrackOffsetBaseAction + { + public override TrackOffset trackOffset + { + get { return TrackOffset.Auto; } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationTrackActions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationTrackActions.cs.meta new file mode 100644 index 0000000..4ca0e4d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/AnimationTrackActions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d4553f2006f48b6448553cb525d2876e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingSelector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingSelector.cs new file mode 100644 index 0000000..7f3cdde --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingSelector.cs @@ -0,0 +1,224 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEditor.Timeline; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor +{ + class BindingSelector + { + TreeViewController m_TreeView; + public TreeViewController treeViewController + { + get { return m_TreeView; } + } + + TreeViewState m_TrackGlobalTreeViewState; + TreeViewState m_TreeViewState; + BindingTreeViewDataSource m_TreeViewDataSource; + CurveDataSource m_CurveDataSource; + TimelineWindow m_Window; + CurveEditor m_CurveEditor; + ReorderableList m_DopeLines; + string[] m_StringList = {}; + int[] m_Selection; + bool m_PartOfSelection; + public BindingSelector(EditorWindow window, CurveEditor curveEditor, TreeViewState trackGlobalTreeViewState) + { + m_Window = window as TimelineWindow; + m_CurveEditor = curveEditor; + m_TrackGlobalTreeViewState = trackGlobalTreeViewState; + + m_DopeLines = new ReorderableList(m_StringList, typeof(string), false, false, false, false); + m_DopeLines.drawElementBackgroundCallback = null; + m_DopeLines.showDefaultBackground = false; + m_DopeLines.index = 0; + m_DopeLines.headerHeight = 0; + m_DopeLines.elementHeight = 20; + m_DopeLines.draggable = false; + } + + public bool selectable { get { return true; } } + + public object selectableObject + { + get { return this; } + } + + public bool selected + { + get { return m_PartOfSelection; } + set + { + m_PartOfSelection = value; + + if (!m_PartOfSelection) + { + m_DopeLines.index = -1; + } + } + } + + public virtual void Delete(WindowState state) + { + // we dont support deleting the summary + if (m_DopeLines.index < 1) + return; + + if (m_CurveDataSource == null) + return; + + var clip = m_CurveDataSource.animationClip; + if (clip == null) + return; + + int curveIndexToDelete = m_DopeLines.index - 1; + var bindings = AnimationUtility.GetCurveBindings(clip); + + if (curveIndexToDelete >= bindings.Length) + return; + + TimelineUndo.PushUndo(clip, "Delete Curve"); + AnimationUtility.SetEditorCurve(clip, bindings[m_DopeLines.index - 1], null); + state.rebuildGraph = true; + } + + public void OnGUI(Rect targetRect) + { + if (m_TreeView == null) + return; + + m_TreeView.OnEvent(); + m_TreeView.OnGUI(targetRect, GUIUtility.GetControlID(FocusType.Passive)); + } + + public void InitIfNeeded(Rect rect, CurveDataSource dataSource, bool isNewSelection) + { + if (Event.current.type != EventType.Layout) + return; + + m_CurveDataSource = dataSource; + var clip = dataSource.animationClip; + + List allBindings = new List(); + allBindings.Add(new EditorCurveBinding { propertyName = "Summary" }); + if (clip != null) + allBindings.AddRange(AnimationUtility.GetCurveBindings(clip)); + + m_DopeLines.list = allBindings.ToArray(); + + if (m_TreeViewState != null) + { + if (isNewSelection) + RefreshAll(); + + return; + } + + m_TreeViewState = m_TrackGlobalTreeViewState != null ? m_TrackGlobalTreeViewState : new TreeViewState(); + + m_TreeView = new TreeViewController(m_Window, m_TreeViewState) + { + useExpansionAnimation = false, + deselectOnUnhandledMouseDown = true + }; + + m_TreeView.selectionChangedCallback += OnItemSelectionChanged; + + m_TreeViewDataSource = new BindingTreeViewDataSource(m_TreeView, clip, m_CurveDataSource); + + m_TreeView.Init(rect, m_TreeViewDataSource, new BindingTreeViewGUI(m_TreeView), null); + + m_TreeViewDataSource.UpdateData(); + + RefreshSelection(); + } + + void OnItemSelectionChanged(int[] selection) + { + RefreshSelection(selection); + } + + void RefreshAll() + { + RefreshTree(); + RefreshSelection(); + } + + void RefreshSelection() + { + RefreshSelection(m_TreeViewState.selectedIDs != null ? m_TreeViewState.selectedIDs.ToArray() : null); + } + + void RefreshSelection(int[] selection) + { + if (selection == null || selection.Length == 0) + { + // select all. + if (m_TreeViewDataSource.GetRows().Count > 0) + { + m_Selection = m_TreeViewDataSource.GetRows().Select(r => r.id).ToArray(); + } + } + else + { + m_Selection = selection; + } + + RefreshCurves(); + } + + public void RefreshCurves() + { + if (m_CurveDataSource == null || m_Selection == null) + return; + + var bindings = new List(); + foreach (int s in m_Selection) + { + var item = (CurveTreeViewNode)m_TreeView.FindItem(s); + if (item != null && item.bindings != null) + bindings.AddRange(item.bindings); + } + + var wrappers = m_CurveDataSource.GenerateWrappers(bindings); + m_CurveEditor.animationCurves = wrappers.ToArray(); + } + + public void RefreshTree() + { + if (m_TreeViewDataSource == null) + return; + + if (m_Selection == null) + m_Selection = new int[0]; + + // get the names of the previous items + var selected = m_Selection.Select(x => m_TreeViewDataSource.FindItem(x)).Where(t => t != null).Select(c => c.displayName).ToArray(); + + // update the source + m_TreeViewDataSource.UpdateData(); + + // find the same items + var reselected = m_TreeViewDataSource.GetRows().Where(x => selected.Contains(x.displayName)).Select(x => x.id).ToArray(); + if (!reselected.Any()) + { + if (m_TreeViewDataSource.GetRows().Count > 0) + { + reselected = new[] { m_TreeViewDataSource.GetItem(0).id }; + } + } + + // update the selection + OnItemSelectionChanged(reselected); + } + + internal virtual bool IsRenamingNodeAllowed(TreeViewItem node) + { + return false; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingSelector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingSelector.cs.meta new file mode 100644 index 0000000..b08aa56 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingSelector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c171b9ca03610ea4faa426e082a1075d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSource.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSource.cs new file mode 100644 index 0000000..8118285 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSource.cs @@ -0,0 +1,139 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEditor.IMGUI.Controls; +using UnityEditor.Timeline; +using UnityEngine; + +namespace UnityEditorInternal +{ + class BindingTreeViewDataSource : TreeViewDataSource + { + public const int RootID = int.MinValue; + public const int GroupID = -1; + + AnimationClip m_Clip; + CurveDataSource m_CurveDataSource; + + public BindingTreeViewDataSource( + TreeViewController treeView, AnimationClip clip, CurveDataSource curveDataSource) + : base(treeView) + { + m_Clip = clip; + showRootItem = false; + m_CurveDataSource = curveDataSource; + } + + void SetupRootNodeSettings() + { + showRootItem = false; + SetExpanded(RootID, true); + SetExpanded(GroupID, true); + } + + static string GroupName(EditorCurveBinding binding) + { + string property = AnimationWindowUtility.NicifyPropertyGroupName(binding.type, binding.propertyName); + if (!string.IsNullOrEmpty(binding.path)) + { + property = binding.path + " : " + property; + } + + int lastArrayIdx = property.LastIndexOf("Array."); + if (lastArrayIdx != -1) + { + property = property.Substring(0, lastArrayIdx - 1); + } + return property; + } + + static string PropertyName(EditorCurveBinding binding, string arrayPrefixToRemove = "") + { + string propertyName = AnimationWindowUtility.GetPropertyDisplayName(binding.propertyName); + if (propertyName.Contains("Array")) + { + propertyName = propertyName.Replace("Array.", ""); + propertyName = propertyName.Replace(arrayPrefixToRemove, ""); + propertyName = propertyName.TrimStart('.'); + } + return propertyName; + } + + public override void FetchData() + { + if (m_Clip == null) + return; + + var bindings = AnimationUtility.GetCurveBindings(m_Clip) + .Union(AnimationUtility.GetObjectReferenceCurveBindings(m_Clip)) + .ToArray(); + + var results = bindings.GroupBy(p => GroupName(p), p => p, (key, g) => new + { + parent = key, + bindings = g.ToList() + }).OrderBy(t => + { + //Force transform order first + if (t.parent == "Position") return -3; + if (t.parent == "Rotation") return -2; + if (t.parent == "Scale") return -1; + return 0; + }).ThenBy(t => t.parent); + + m_RootItem = new CurveTreeViewNode(RootID, null, "root", null) + { + children = new List(1) + }; + + var groupingNode = new CurveTreeViewNode(GroupID, m_RootItem, m_CurveDataSource.groupingName, bindings) + { + children = new List() + }; + + m_RootItem.children.Add(groupingNode); + + foreach (var r in results) + { + var newNode = new CurveTreeViewNode(r.parent.GetHashCode(), groupingNode, r.parent, r.bindings.ToArray()); + groupingNode.children.Add(newNode); + if (r.bindings.Count > 1) + { + for (int b = 0; b < r.bindings.Count; b++) + { + if (newNode.children == null) + newNode.children = new List(); + + var binding = r.bindings[b]; + var bindingNode = new CurveTreeViewNode(binding.GetHashCode(), newNode, PropertyName(binding, newNode.displayName), new[] {binding}); + newNode.children.Add(bindingNode); + } + } + } + + SetupRootNodeSettings(); + m_NeedRefreshRows = true; + } + + public void UpdateData() + { + m_TreeView.ReloadData(); + } + } + + class CurveTreeViewNode : TreeViewItem + { + EditorCurveBinding[] m_Bindings; + + public EditorCurveBinding[] bindings + { + get { return m_Bindings; } + } + + public CurveTreeViewNode(int id, TreeViewItem parent, string displayName, EditorCurveBinding[] bindings) + : base(id, parent != null ? parent.depth + 1 : -1, parent, displayName) + { + m_Bindings = bindings; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSource.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSource.cs.meta new file mode 100644 index 0000000..b553947 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c2177aaf0fde92439246adc2dc0bfa2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSourceGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSourceGUI.cs new file mode 100644 index 0000000..443a216 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSourceGUI.cs @@ -0,0 +1,80 @@ +using UnityEditor; +using UnityEditor.IMGUI.Controls; +using UnityEngine; + +namespace UnityEditorInternal +{ + class BindingTreeViewGUI : TreeViewGUI + { + static readonly float s_RowRightOffset = 10; + static readonly float s_ColorIndicatorTopMargin = 3; + static readonly Color s_KeyColorForNonCurves = new Color(0.7f, 0.7f, 0.7f, 0.5f); + static readonly Color s_ChildrenCurveLabelColor = new Color(1.0f, 1.0f, 1.0f, 0.7f); + + public BindingTreeViewGUI(TreeViewController treeView) + : base(treeView, true) + { + k_IconWidth = 13.0f; + } + + public override void OnRowGUI(Rect rowRect, TreeViewItem node, int row, bool selected, bool focused) + { + Color originalColor = GUI.color; + GUI.color = node.parent == null || + node.parent.id == BindingTreeViewDataSource.RootID || + node.parent.id == BindingTreeViewDataSource.GroupID ? + Color.white : + s_ChildrenCurveLabelColor; + + base.OnRowGUI(rowRect, node, row, selected, focused); + + GUI.color = originalColor; + DoCurveColorIndicator(rowRect, node as CurveTreeViewNode); + } + + protected override bool IsRenaming(int id) + { + return false; + } + + public override bool BeginRename(TreeViewItem item, float delay) + { + return false; + } + + void DoCurveColorIndicator(Rect rect, CurveTreeViewNode node) + { + if (node == null) + return; + + if (Event.current.type != EventType.Repaint) + return; + + Color originalColor = GUI.color; + + if (node.bindings.Length == 1 && !node.bindings[0].isPPtrCurve) + GUI.color = CurveUtility.GetPropertyColor(node.bindings[0].propertyName); + else + GUI.color = s_KeyColorForNonCurves; + + Texture icon = CurveUtility.GetIconCurve(); + rect = new Rect(rect.xMax - s_RowRightOffset - (icon.width * 0.5f) - 5, rect.yMin + s_ColorIndicatorTopMargin, icon.width, icon.height); + + GUI.DrawTexture(rect, icon, ScaleMode.ScaleToFit, true, 1); + + GUI.color = originalColor; + } + + protected override Texture GetIconForItem(TreeViewItem item) + { + var node = item as CurveTreeViewNode; + if (node == null) + return null; + + if (node.bindings == null || node.bindings.Length == 0) + return null; + + return AssetPreview.GetMiniTypeThumbnail(node.bindings[0].type); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSourceGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSourceGUI.cs.meta new file mode 100644 index 0000000..2e16c1b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/BindingTreeViewDataSourceGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3c09dc5cd0a70cf40856b7d406106ee1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/ClipCurveEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/ClipCurveEditor.cs new file mode 100644 index 0000000..da1d0e6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/ClipCurveEditor.cs @@ -0,0 +1,332 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.Timeline; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor +{ + class ClipCurveEditor + { + internal readonly CurveEditor m_CurveEditor; + static readonly CurveEditorSettings s_CurveEditorSettings = new CurveEditorSettings + { + hSlider = false, + vSlider = false, + hRangeLocked = false, + vRangeLocked = false, + scaleWithWindow = true, + hRangeMin = 0.0f, + showAxisLabels = true, + allowDeleteLastKeyInCurve = true, + rectangleToolFlags = CurveEditorSettings.RectangleToolFlags.MiniRectangleTool + }; + + static readonly float s_GridLabelWidth = 40.0f; + + readonly BindingSelector m_BindingHierarchy; + public BindingSelector bindingHierarchy + { + get { return m_BindingHierarchy; } + } + + public Rect shownAreaInsideMargins + { + get { return m_CurveEditor != null ? m_CurveEditor.shownAreaInsideMargins : new Rect(1, 1, 1, 1); } + } + + Vector2 m_ScrollPosition = Vector2.zero; + + readonly CurveDataSource m_DataSource; + + float m_LastFrameRate = 30.0f; + int m_LastClipVersion = -1; + int m_LastCurveCount = -1; + TrackViewModelData m_ViewModel; + bool m_ShouldRestoreShownArea; + + bool isNewSelection + { + get + { + if (m_ViewModel == null || m_DataSource == null) + return true; + + return m_ViewModel.lastInlineCurveDataID != m_DataSource.id; + } + } + + internal CurveEditor curveEditor + { + get { return m_CurveEditor; } + } + + public ClipCurveEditor(CurveDataSource dataSource, TimelineWindow parentWindow, TrackAsset hostTrack) + { + m_DataSource = dataSource; + + m_CurveEditor = new CurveEditor(new Rect(0, 0, 1000, 100), new CurveWrapper[0], false); + + s_CurveEditorSettings.vTickStyle = new TickStyle + { + tickColor = { color = DirectorStyles.Instance.customSkin.colorInlineCurveVerticalLines }, + distLabel = 20, + stubs = true + }; + + s_CurveEditorSettings.hTickStyle = new TickStyle + { + // hide horizontal lines by giving them a transparent color + tickColor = { color = new Color(0.0f, 0.0f, 0.0f, 0.0f) }, + distLabel = 0 + }; + + m_CurveEditor.settings = s_CurveEditorSettings; + + m_ViewModel = TimelineWindowViewPrefs.GetTrackViewModelData(hostTrack); + + m_ShouldRestoreShownArea = true; + m_CurveEditor.ignoreScrollWheelUntilClicked = true; + m_CurveEditor.curvesUpdated = OnCurvesUpdated; + + m_BindingHierarchy = new BindingSelector(parentWindow, m_CurveEditor, m_ViewModel.inlineCurvesState); + } + + public void SelectAllKeys() + { + m_CurveEditor.SelectAll(); + } + + public void FrameClip() + { + m_CurveEditor.InvalidateBounds(); + m_CurveEditor.FrameClip(false, true); + } + + public CurveDataSource dataSource + { + get { return m_DataSource; } + } + + internal void OnCurvesUpdated() + { + if (m_DataSource == null) + return; + + if (m_CurveEditor == null) + return; + + if (m_CurveEditor.animationCurves.Length == 0) + return; + + List curvesToUpdate = m_CurveEditor.animationCurves.Where(c => c.changed).ToList(); + + // nothing changed, return. + if (curvesToUpdate.Count == 0) + return; + + AnimationClip clip = m_DataSource.animationClip; + + // something changed, manage the undo properly. + Undo.RegisterCompleteObjectUndo(clip, "Edit Clip Curve"); + + foreach (CurveWrapper c in curvesToUpdate) + { + AnimationUtility.SetEditorCurve(clip, c.binding, c.curve); + c.changed = false; + } + + m_DataSource.UpdateCurves(curvesToUpdate); + } + + public void DrawHeader(Rect headerRect) + { + m_BindingHierarchy.InitIfNeeded(headerRect, m_DataSource, isNewSelection); + + try + { + GUILayout.BeginArea(headerRect); + m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition, GUIStyle.none, GUI.skin.verticalScrollbar); + m_BindingHierarchy.OnGUI(new Rect(0, 0, headerRect.width, headerRect.height)); + GUILayout.EndScrollView(); + GUILayout.EndArea(); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + + class FrameFormatCurveEditorState : ICurveEditorState + { + public TimeArea.TimeFormat timeFormat + { + get { return TimeArea.TimeFormat.Frame; } + } + public Vector2 timeRange { get { return new Vector2(0, 1); } } + public bool rippleTime { get { return false; } } + } + + class UnformattedCurveEditorState : ICurveEditorState + { + public TimeArea.TimeFormat timeFormat + { + get { return TimeArea.TimeFormat.None; } + } + public Vector2 timeRange { get { return new Vector2(0, 1); } } + public bool rippleTime { get { return false; } } + } + + void UpdateCurveEditorIfNeeded(WindowState state) + { + if ((Event.current.type != EventType.Layout) || (m_DataSource == null) || (m_BindingHierarchy == null) || (m_DataSource.animationClip == null)) + return; + + AnimationClipCurveInfo curveInfo = AnimationClipCurveCache.Instance.GetCurveInfo(m_DataSource.animationClip); + int version = curveInfo.version; + if (version != m_LastClipVersion) + { + // tree has changed + if (m_LastCurveCount != curveInfo.curves.Length) + { + m_BindingHierarchy.RefreshTree(); + m_LastCurveCount = curveInfo.curves.Length; + } + else + { + // update just the curves + m_BindingHierarchy.RefreshCurves(); + } + m_LastClipVersion = version; + } + + if (state.timeInFrames) + m_CurveEditor.state = new FrameFormatCurveEditorState(); + else + m_CurveEditor.state = new UnformattedCurveEditorState(); + + m_CurveEditor.invSnap = state.referenceSequence.frameRate; + } + + public void DrawCurveEditor(Rect rect, WindowState state, Vector2 clipRange, bool loop, bool selected) + { + var curveEndTime = m_DataSource.start + m_DataSource.animationClip.length / m_DataSource.timeScale; + var curveRange = new Vector2(state.TimeToPixel(m_DataSource.start), state.TimeToPixel(curveEndTime)); + + SetupMarginsAndRect(rect, curveRange, state); + UpdateCurveEditorIfNeeded(state); + + if (m_ShouldRestoreShownArea) + RestoreShownArea(); + m_CurveEditor.SetShownHRangeInsideMargins(0.0f, m_DataSource.animationClip.length); //align the curve with the clip. + + if (m_LastFrameRate != state.referenceSequence.frameRate) + { + m_CurveEditor.hTicks.SetTickModulosForFrameRate(state.referenceSequence.frameRate); + m_LastFrameRate = state.referenceSequence.frameRate; + } + + foreach (var cw in m_CurveEditor.animationCurves) + cw.renderer.SetWrap(WrapMode.Default, loop ? WrapMode.Loop : WrapMode.Default); + + using (new GUIGroupScope(rect)) + { + var localRect = new Rect(0.0f, 0.0f, rect.width, rect.height); + var localClipRange = new Vector2(Mathf.Floor(clipRange.x - rect.xMin), Mathf.Ceil(clipRange.y - rect.xMin)); + var localCurveRange = new Vector2(Mathf.Floor(curveRange.x - rect.xMin), Mathf.Ceil(curveRange.y - rect.xMin)); + + EditorGUI.DrawRect(new Rect(localCurveRange.x, 0.0f, 1.0f, rect.height), new Color(1.0f, 1.0f, 1.0f, 0.5f)); + DrawCurveEditorBackground(localRect, localClipRange); + + if (selected) + { + var selectionRect = new Rect(localClipRange.x, 0.0f, localClipRange.y - localClipRange.x, localRect.height); + DrawOutline(selectionRect); + } + + EditorGUI.BeginChangeCheck(); + { + var evt = Event.current; + if (evt.type == EventType.Layout || evt.type == EventType.Repaint || selected) + m_CurveEditor.CurveGUI(); + } + if (EditorGUI.EndChangeCheck()) + OnCurvesUpdated(); + + DrawOverlay(localRect, localClipRange, DirectorStyles.Instance.customSkin.colorInlineCurveOutOfRangeOverlay); + DrawGrid(localRect, localCurveRange); + } + } + + void SetupMarginsAndRect(Rect rect, Vector2 curveRange, WindowState state) + { + var timelineWidth = state.TimeToPixel(Mathf.Max((float)state.editSequence.duration, state.timeAreaShownRange.y)); + m_CurveEditor.rect = new Rect(-rect.xMin, 0.0f, timelineWidth, rect.height); + m_CurveEditor.leftmargin = curveRange.x; + m_CurveEditor.rightmargin = timelineWidth - curveRange.y; + m_CurveEditor.topmargin = m_CurveEditor.bottommargin = CalculateTopMargin(rect.height); + } + + void RestoreShownArea() + { + if (isNewSelection) + FrameClip(); + else + m_CurveEditor.shownAreaInsideMargins = m_ViewModel.inlineCurvesShownAreaInsideMargins; + m_ShouldRestoreShownArea = false; + } + + static void DrawCurveEditorBackground(Rect rect, Vector2 activeRange) + { + if (EditorGUIUtility.isProSkin) + return; + + var animEditorBackgroundRect = Rect.MinMaxRect(0.0f, rect.yMin, rect.xMax, rect.yMax); + + // Curves are not legible in Personal Skin so we need to darken the background a bit. + EditorGUI.DrawRect(animEditorBackgroundRect, DirectorStyles.Instance.customSkin.colorInlineCurvesBackground); + } + + static float CalculateTopMargin(float height) + { + return Mathf.Clamp(0.15f * height, 10.0f, 40.0f); + } + + static void DrawOutline(Rect rect, float thickness = 2.0f) + { + // Draw top selected lines. + EditorGUI.DrawRect(new Rect(rect.xMin, rect.yMin, rect.width, thickness), Color.white); + + // Draw bottom selected lines. + EditorGUI.DrawRect(new Rect(rect.xMin, rect.yMax - thickness, rect.width, thickness), Color.white); + + // Draw Left Selected Lines + EditorGUI.DrawRect(new Rect(rect.xMin, rect.yMin, thickness, rect.height), Color.white); + + // Draw Right Selected Lines + EditorGUI.DrawRect(new Rect(rect.xMax - thickness, rect.yMin, thickness, rect.height), Color.white); + } + + static void DrawOverlay(Rect rect, Vector2 clipRange, Color color) + { + var leftSide = new Rect(rect.xMin, rect.yMin, clipRange.x - rect.xMin, rect.height); + EditorGUI.DrawRect(leftSide, color); + + var rightSide = new Rect(Mathf.Max(0.0f, clipRange.y), rect.yMin, rect.xMax, rect.height); + EditorGUI.DrawRect(rightSide, color); + } + + void DrawGrid(Rect rect, Vector2 curveRange) + { + var gridXPos = Mathf.Max(curveRange.x - s_GridLabelWidth, rect.xMin); + var gridRect = new Rect(gridXPos, rect.y, s_GridLabelWidth, rect.height); + var originalRect = m_CurveEditor.rect; + + m_CurveEditor.rect = new Rect(0.0f, 0.0f, rect.width, rect.height); + using (new GUIGroupScope(gridRect)) + m_CurveEditor.GridGUI(); + m_CurveEditor.rect = originalRect; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/ClipCurveEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/ClipCurveEditor.cs.meta new file mode 100644 index 0000000..5ae80d2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/ClipCurveEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d49b2ed20045e034f9cdf6a6d95e6183 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurveDataSource.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurveDataSource.cs new file mode 100644 index 0000000..b5ad13b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurveDataSource.cs @@ -0,0 +1,272 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + abstract class CurveDataSource + { + public static CurveDataSource Create(IRowGUI trackGUI) + { + if (trackGUI.asset is AnimationTrack) + return new InfiniteClipCurveDataSource(trackGUI); + + return new TrackParametersCurveDataSource(trackGUI); + } + + public static CurveDataSource Create(TimelineClipGUI clipGUI) + { + if (clipGUI.clip.animationClip != null) + return new ClipAnimationCurveDataSource(clipGUI); + + return new ClipParametersCurveDataSource(clipGUI); + } + + int? m_ID = null; + public int id + { + get + { + if (!m_ID.HasValue) + m_ID = CreateHashCode(); + + return m_ID.Value; + } + } + + readonly IRowGUI m_TrackGUI; + protected IRowGUI trackGUI { get { return m_TrackGUI; } } + + protected CurveDataSource(IRowGUI trackGUI) + { + m_TrackGUI = trackGUI; + } + + public abstract AnimationClip animationClip { get; } + public abstract float start { get; } + public abstract float timeScale { get; } + public abstract string groupingName { get; } + public virtual void UpdateCurves(List updatedCurves) {} + public virtual void RebuildCurves() {} // Only necessary when using proxies + + public Rect GetBackgroundRect(WindowState state) + { + var trackRect = m_TrackGUI.boundingRect; + return new Rect( + state.timeAreaTranslation.x + trackRect.xMin, + trackRect.y, + (float)state.editSequence.asset.duration * state.timeAreaScale.x, + trackRect.height + ); + } + + public List GenerateWrappers(List bindings) + { + var wrappers = new List(bindings.Count); + int curveWrapperId = 0; + + foreach (EditorCurveBinding b in bindings) + { + // General configuration + var wrapper = new CurveWrapper + { + id = curveWrapperId++, + binding = b, + groupId = -1, + hidden = false, + readOnly = false, + getAxisUiScalarsCallback = () => new Vector2(1, 1) + }; + + // Specific configuration + ConfigureCurveWrapper(wrapper); + + wrappers.Add(wrapper); + } + + return wrappers; + } + + protected virtual void ConfigureCurveWrapper(CurveWrapper wrapper) + { + wrapper.color = CurveUtility.GetPropertyColor(wrapper.binding.propertyName); + wrapper.renderer = new NormalCurveRenderer(AnimationUtility.GetEditorCurve(animationClip, wrapper.binding)); + wrapper.renderer.SetCustomRange(0.0f, animationClip.length); + } + + protected virtual int CreateHashCode() + { + return m_TrackGUI.asset.GetHashCode(); + } + } + + class ClipAnimationCurveDataSource : CurveDataSource + { + static readonly string k_GroupingName = L10n.Tr("Animated Values"); + + readonly TimelineClipGUI m_ClipGUI; + + public ClipAnimationCurveDataSource(TimelineClipGUI clipGUI) : base(clipGUI.parent) + { + m_ClipGUI = clipGUI; + } + + public override AnimationClip animationClip + { + get { return m_ClipGUI.clip.animationClip; } + } + + public override float start + { + get { return (float)m_ClipGUI.clip.FromLocalTimeUnbound(0.0); } + } + + public override float timeScale + { + get { return (float)m_ClipGUI.clip.timeScale; } + } + + public override string groupingName + { + get { return k_GroupingName; } + } + + protected override int CreateHashCode() + { + return base.CreateHashCode().CombineHash(m_ClipGUI.clip.GetHashCode()); + } + } + + class ClipParametersCurveDataSource : CurveDataSource + { + static readonly string k_GroupingName = L10n.Tr("Clip Properties"); + + readonly TimelineClipGUI m_ClipGUI; + readonly CurvesProxy m_CurvesProxy; + + public ClipParametersCurveDataSource(TimelineClipGUI clipGUI) : base(clipGUI.parent) + { + m_ClipGUI = clipGUI; + m_CurvesProxy = new CurvesProxy(clipGUI.clip); + } + + public override AnimationClip animationClip + { + get { return m_CurvesProxy.curves; } + } + + public override float start + { + get { return (float)m_ClipGUI.clip.FromLocalTimeUnbound(0.0); } + } + + public override float timeScale + { + get { return (float)m_ClipGUI.clip.timeScale; } + } + + public override string groupingName + { + get { return k_GroupingName; } + } + + public override void UpdateCurves(List updatedCurves) + { + m_CurvesProxy.UpdateCurves(updatedCurves); + } + + public override void RebuildCurves() + { + m_CurvesProxy.RebuildCurves(); + } + + protected override void ConfigureCurveWrapper(CurveWrapper wrapper) + { + m_CurvesProxy.ConfigureCurveWrapper(wrapper); + } + + protected override int CreateHashCode() + { + return base.CreateHashCode().CombineHash(m_ClipGUI.clip.GetHashCode()); + } + } + + class InfiniteClipCurveDataSource : CurveDataSource + { + static readonly string k_GroupingName = L10n.Tr("Animated Values"); + + readonly AnimationTrack m_AnimationTrack; + + public InfiniteClipCurveDataSource(IRowGUI trackGui) : base(trackGui) + { + m_AnimationTrack = trackGui.asset as AnimationTrack; + } + + public override AnimationClip animationClip + { + get { return m_AnimationTrack.infiniteClip; } + } + + public override float start + { + get { return 0.0f; } + } + + public override float timeScale + { + get { return 1.0f; } + } + + public override string groupingName + { + get { return k_GroupingName; } + } + } + + class TrackParametersCurveDataSource : CurveDataSource + { + static readonly string k_GroupingName = L10n.Tr("Track Properties"); + + readonly CurvesProxy m_CurvesProxy; + + public TrackParametersCurveDataSource(IRowGUI trackGui) : base(trackGui) + { + m_CurvesProxy = new CurvesProxy(trackGui.asset); + } + + public override AnimationClip animationClip + { + get { return m_CurvesProxy.curves; } + } + + public override float start + { + get { return 0.0f; } + } + + public override float timeScale + { + get { return 1.0f; } + } + + public override string groupingName + { + get { return k_GroupingName; } + } + + public override void UpdateCurves(List updatedCurves) + { + m_CurvesProxy.UpdateCurves(updatedCurves); + } + + public override void RebuildCurves() + { + m_CurvesProxy.RebuildCurves(); + } + + protected override void ConfigureCurveWrapper(CurveWrapper wrapper) + { + m_CurvesProxy.ConfigureCurveWrapper(wrapper); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurveDataSource.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurveDataSource.cs.meta new file mode 100644 index 0000000..6416ecf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurveDataSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 87a1ae9719ec25d44a4dbec20ec0f892 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurvesProxy.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurvesProxy.cs new file mode 100644 index 0000000..ce17112 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurvesProxy.cs @@ -0,0 +1,302 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class CurvesProxy : ICurvesOwner + { + public AnimationClip curves + { + get { return proxyCurves != null ? proxyCurves : m_OriginalOwner.curves; } + } + + public bool hasCurves + { + get { return m_IsAnimatable || m_OriginalOwner.hasCurves; } + } + + public double duration + { + get { return m_OriginalOwner.duration; } + } + + public string defaultCurvesName + { + get { return m_OriginalOwner.defaultCurvesName; } + } + + public UnityObject asset + { + get { return m_OriginalOwner.asset; } + } + + public UnityObject assetOwner + { + get { return m_OriginalOwner.assetOwner; } + } + + public TrackAsset targetTrack + { + get { return m_OriginalOwner.targetTrack; } + } + + readonly ICurvesOwner m_OriginalOwner; + readonly bool m_IsAnimatable; + readonly Dictionary m_PropertiesMap = new Dictionary(); + int m_ProxyIsRebuilding = 0; + + AnimationClip m_ProxyCurves; + AnimationClip proxyCurves + { + get + { + if (!m_IsAnimatable) return null; + + if (m_ProxyCurves == null) + RebuildProxyCurves(); + + return m_ProxyCurves; + } + } + + List m_AllAnimatableParameters; + List allAnimatableParameters + { + get + { + var so = AnimatedParameterUtility.GetSerializedPlayableAsset(m_OriginalOwner.asset); + if (so == null) + return null; + + so.UpdateIfRequiredOrScript(); + + if (m_AllAnimatableParameters == null) + m_AllAnimatableParameters = m_OriginalOwner.GetAllAnimatableParameters().ToList(); + + return m_AllAnimatableParameters; + } + } + + public CurvesProxy([NotNull] ICurvesOwner originalOwner) + { + m_OriginalOwner = originalOwner; + m_IsAnimatable = originalOwner.HasAnyAnimatableParameters(); + + RebuildProxyCurves(); + } + + public void CreateCurves(string curvesClipName) + { + m_OriginalOwner.CreateCurves(curvesClipName); + } + + public void ConfigureCurveWrapper(CurveWrapper wrapper) + { + var color = CurveUtility.GetPropertyColor(wrapper.binding.propertyName); + wrapper.color = color; + + float h, s, v; + Color.RGBToHSV(color, out h, out s, out v); + wrapper.wrapColorMultiplier = Color.HSVToRGB(h, s * 0.33f, v * 1.15f); + + var curve = AnimationUtility.GetEditorCurve(proxyCurves, wrapper.binding); + + wrapper.renderer = new NormalCurveRenderer(curve); + + // Use curve length instead of animation clip length + wrapper.renderer.SetCustomRange(0.0f, curve.keys.Last().time); + } + + public void RebuildCurves() + { + RebuildProxyCurves(); + } + + public void UpdateCurves(List updatedCurves) + { + if (m_ProxyIsRebuilding > 0) + return; + + Undo.RegisterCompleteObjectUndo(m_OriginalOwner.asset, "Edit Clip Curve"); + + if (m_OriginalOwner.curves != null) + Undo.RegisterCompleteObjectUndo(m_OriginalOwner.curves, "Edit Clip Curve"); + + foreach (var curve in updatedCurves) + { + UpdateCurve(curve.binding, curve.curve); + } + + AnimatedParameterUtility.UpdateSerializedPlayableAsset(m_OriginalOwner.asset); + } + + void UpdateCurve(EditorCurveBinding binding, AnimationCurve curve) + { + ApplyConstraints(binding, curve); + + if (curve.length == 0) + { + HandleAllKeysDeleted(binding); + } + else if (curve.length == 1) + { + HandleConstantCurveValueChanged(binding, curve); + } + else + { + HandleCurveUpdated(binding, curve); + } + } + + void ApplyConstraints(EditorCurveBinding binding, AnimationCurve curve) + { + if (curve.length == 0) + return; + + var curveUpdated = false; + + var property = m_PropertiesMap[binding]; + if (property.propertyType == SerializedPropertyType.Boolean) + { + TimelineAnimationUtilities.ConstrainCurveToBooleanValues(curve); + curveUpdated = true; + } + else + { + var range = AnimatedParameterUtility.GetAttributeForProperty(property); + if (range != null) + { + TimelineAnimationUtilities.ConstrainCurveToRange(curve, range.min, range.max); + curveUpdated = true; + } + } + + if (!curveUpdated) + return; + + using (new RebuildGuard(this)) + { + AnimationUtility.SetEditorCurve(m_ProxyCurves, binding, curve); + } + } + + void HandleCurveUpdated(EditorCurveBinding binding, AnimationCurve updatedCurve) + { + if (!m_OriginalOwner.hasCurves) + m_OriginalOwner.CreateCurves(null); + + AnimationUtility.SetEditorCurve(m_OriginalOwner.curves, binding, updatedCurve); + } + + void HandleConstantCurveValueChanged(EditorCurveBinding binding, AnimationCurve updatedCurve) + { + var prop = m_PropertiesMap[binding]; + if (prop == null) + return; + + Undo.RegisterCompleteObjectUndo(prop.serializedObject.targetObject, "Edit Clip Curve"); + prop.serializedObject.UpdateIfRequiredOrScript(); + CurveEditUtility.SetFromKeyValue(prop, updatedCurve.keys[0].value); + prop.serializedObject.ApplyModifiedProperties(); + } + + void HandleAllKeysDeleted(EditorCurveBinding binding) + { + if (m_OriginalOwner.hasCurves) + { + // Remove curve from original asset + AnimationUtility.SetEditorCurve(m_OriginalOwner.curves, binding, null); + m_OriginalOwner.SanitizeCurvesData(); + } + + // Ensure proxy still has constant value + RebuildProxyCurves(); + } + + void RebuildProxyCurves() + { + if (!m_IsAnimatable) + return; + + using (new RebuildGuard(this)) + { + if (m_ProxyCurves == null) + { + m_ProxyCurves = new AnimationClip + { + legacy = true, + name = "Constant Curves", + hideFlags = HideFlags.HideAndDontSave, + frameRate = m_OriginalOwner.targetTrack.timelineAsset == null + ? TimelineAsset.EditorSettings.kDefaultFps + : m_OriginalOwner.targetTrack.timelineAsset.editorSettings.fps + }; + } + else + { + m_ProxyCurves.ClearCurves(); + } + + m_OriginalOwner.SanitizeCurvesData(); + AnimatedParameterUtility.UpdateSerializedPlayableAsset(m_OriginalOwner.asset); + + foreach (var param in allAnimatableParameters) + CreateProxyCurve(param, m_ProxyCurves, m_OriginalOwner.asset, param.propertyPath); + + AnimationClipCurveCache.Instance.GetCurveInfo(m_ProxyCurves).dirty = true; + } + } + + void CreateProxyCurve(SerializedProperty prop, AnimationClip clip, UnityObject owner, string propertyName) + { + var binding = AnimatedParameterUtility.GetCurveBinding(owner, propertyName); + + var originalCurve = m_OriginalOwner.hasCurves + ? AnimationUtility.GetEditorCurve(m_OriginalOwner.curves, binding) + : null; + + if (originalCurve != null) + { + AnimationUtility.SetEditorCurve(clip, binding, originalCurve); + } + else + { + var curve = new AnimationCurve(); + + CurveEditUtility.AddKeyFrameToCurve( + curve, 0.0f, clip.frameRate, CurveEditUtility.GetKeyValue(prop), + prop.propertyType == SerializedPropertyType.Boolean); + + AnimationUtility.SetEditorCurve(clip, binding, curve); + } + + m_PropertiesMap[binding] = prop; + } + + struct RebuildGuard : IDisposable + { + CurvesProxy m_Owner; + AnimationUtility.OnCurveWasModified m_Callback; + + public RebuildGuard(CurvesProxy owner) + { + m_Callback = AnimationUtility.onCurveWasModified; + AnimationUtility.onCurveWasModified = null; + m_Owner = owner; + m_Owner.m_ProxyIsRebuilding++; + } + + public void Dispose() + { + AnimationUtility.onCurveWasModified = m_Callback; + m_Owner.m_ProxyIsRebuilding--; + m_Owner = null; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurvesProxy.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurvesProxy.cs.meta new file mode 100644 index 0000000..18e3029 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/CurvesProxy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d72ccd2c66ea846fc842adf682b11526 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/TimelineAnimationUtilities.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/TimelineAnimationUtilities.cs new file mode 100644 index 0000000..60cf7cc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/TimelineAnimationUtilities.cs @@ -0,0 +1,435 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEditor; +using UnityEngineInternal; +using UnityEngine.Timeline; +using UnityEngine.Playables; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class TimelineAnimationUtilities + { + public enum OffsetEditMode + { + None = -1, + Translation = 0, + Rotation = 1 + } + + public static bool ValidateOffsetAvailabitity(PlayableDirector director, Animator animator) + { + if (director == null || animator == null) + return false; + + return true; + } + + public static TimelineClip GetPreviousClip(TimelineClip clip) + { + TimelineClip previousClip = null; + foreach (var c in clip.parentTrack.clips) + { + if (c.start < clip.start && (previousClip == null || c.start >= previousClip.start)) + previousClip = c; + } + return previousClip; + } + + public static TimelineClip GetNextClip(TimelineClip clip) + { + return clip.parentTrack.clips.Where(c => c.start > clip.start).OrderBy(c => c.start).FirstOrDefault(); + } + + public struct RigidTransform + { + public Vector3 position; + public Quaternion rotation; + + public static RigidTransform Compose(Vector3 pos, Quaternion rot) + { + RigidTransform ret; + ret.position = pos; + ret.rotation = rot; + return ret; + } + + public static RigidTransform Mul(RigidTransform a, RigidTransform b) + { + RigidTransform ret; + ret.rotation = a.rotation * b.rotation; + ret.position = a.position + a.rotation * b.position; + return ret; + } + + public static RigidTransform Inverse(RigidTransform a) + { + RigidTransform ret; + ret.rotation = Quaternion.Inverse(a.rotation); + ret.position = ret.rotation * (-a.position); + return ret; + } + + public static RigidTransform identity + { + get { return Compose(Vector3.zero, Quaternion.identity); } + } + } + + + private static Matrix4x4 GetTrackMatrix(Transform transform, AnimationTrack track) + { + Matrix4x4 trackMatrix = Matrix4x4.TRS(track.position, track.rotation, Vector3.one); + + // in scene off mode, the track offsets are set to the preview position which is stored in the track + if (track.trackOffset == TrackOffset.ApplySceneOffsets) + { + trackMatrix = Matrix4x4.TRS(track.sceneOffsetPosition, Quaternion.Euler(track.sceneOffsetRotation), Vector3.one); + } + + // put the parent transform on to the track matrix + if (transform.parent != null) + { + trackMatrix = transform.parent.localToWorldMatrix * trackMatrix; + } + + return trackMatrix; + } + + // Given a world space position and rotation, updates the clip offsets to match that + public static RigidTransform UpdateClipOffsets(AnimationPlayableAsset asset, AnimationTrack track, Transform transform, Vector3 globalPosition, Quaternion globalRotation) + { + Matrix4x4 worldToLocal = transform.worldToLocalMatrix; + Matrix4x4 clipMatrix = Matrix4x4.TRS(asset.position, asset.rotation, Vector3.one); + Matrix4x4 trackMatrix = GetTrackMatrix(transform, track); + + + // Use the transform to find the proper goal matrix with scale taken into account + var oldPos = transform.position; + var oldRot = transform.rotation; + transform.position = globalPosition; + transform.rotation = globalRotation; + Matrix4x4 goal = transform.localToWorldMatrix; + transform.position = oldPos; + transform.rotation = oldRot; + + // compute the new clip matrix. + Matrix4x4 newClip = trackMatrix.inverse * goal * worldToLocal * trackMatrix * clipMatrix; + return RigidTransform.Compose(newClip.GetColumn(3), MathUtils.QuaternionFromMatrix(newClip)); + } + + public static RigidTransform GetTrackOffsets(AnimationTrack track, Transform transform) + { + Vector3 position = track.position; + Quaternion rotation = track.rotation; + if (transform != null && transform.parent != null) + { + position = transform.parent.TransformPoint(position); + rotation = transform.parent.rotation * rotation; + MathUtils.QuaternionNormalize(ref rotation); + } + + return RigidTransform.Compose(position, rotation); + } + + public static void UpdateTrackOffset(AnimationTrack track, Transform transform, RigidTransform offsets) + { + if (transform != null && transform.parent != null) + { + offsets.position = transform.parent.InverseTransformPoint(offsets.position); + offsets.rotation = Quaternion.Inverse(transform.parent.rotation) * offsets.rotation; + MathUtils.QuaternionNormalize(ref offsets.rotation); + } + + track.position = offsets.position; + track.eulerAngles = AnimationUtility.GetClosestEuler(offsets.rotation, track.eulerAngles, RotationOrder.OrderZXY); + track.UpdateClipOffsets(); + } + + static MatchTargetFields GetMatchFields(TimelineClip clip) + { + var track = clip.parentTrack as AnimationTrack; + if (track == null) + return MatchTargetFieldConstants.None; + + var asset = clip.asset as AnimationPlayableAsset; + var fields = track.matchTargetFields; + if (asset != null && !asset.useTrackMatchFields) + fields = asset.matchTargetFields; + return fields; + } + + static void WriteMatchFields(AnimationPlayableAsset asset, RigidTransform result, MatchTargetFields fields) + { + Vector3 position = asset.position; + + position.x = fields.HasAny(MatchTargetFields.PositionX) ? result.position.x : position.x; + position.y = fields.HasAny(MatchTargetFields.PositionY) ? result.position.y : position.y; + position.z = fields.HasAny(MatchTargetFields.PositionZ) ? result.position.z : position.z; + + asset.position = position; + + // check first to avoid unnecessary conversion errors + if (fields.HasAny(MatchTargetFieldConstants.Rotation)) + { + Vector3 eulers = asset.eulerAngles; + Vector3 resultEulers = result.rotation.eulerAngles; + + eulers.x = fields.HasAny(MatchTargetFields.RotationX) ? resultEulers.x : eulers.x; + eulers.y = fields.HasAny(MatchTargetFields.RotationY) ? resultEulers.y : eulers.y; + eulers.z = fields.HasAny(MatchTargetFields.RotationZ) ? resultEulers.z : eulers.z; + + asset.eulerAngles = AnimationUtility.GetClosestEuler(Quaternion.Euler(eulers), asset.eulerAngles, RotationOrder.OrderZXY); + } + } + + public static void MatchPrevious(TimelineClip currentClip, Transform matchPoint, PlayableDirector director) + { + const double timeEpsilon = 0.00001; + MatchTargetFields matchFields = GetMatchFields(currentClip); + if (matchFields == MatchTargetFieldConstants.None || matchPoint == null) + return; + + double cachedTime = director.time; + + // finds previous clip + TimelineClip previousClip = GetPreviousClip(currentClip); + if (previousClip == null || currentClip == previousClip) + return; + + // make sure the transform is properly updated before modifying the graph + director.Evaluate(); + + var parentTrack = currentClip.parentTrack as AnimationTrack; + + var blendIn = currentClip.blendInDuration; + currentClip.blendInDuration = 0; + var blendOut = previousClip.blendOutDuration; + previousClip.blendOutDuration = 0; + + //evaluate previous without current + parentTrack.RemoveClip(currentClip); + director.RebuildGraph(); + double previousEndTime = currentClip.start > previousClip.end ? previousClip.end : currentClip.start; + director.time = previousEndTime - timeEpsilon; + director.Evaluate(); // add port to evaluate only track + + var targetPosition = matchPoint.position; + var targetRotation = matchPoint.rotation; + + // evaluate current without previous + parentTrack.AddClip(currentClip); + parentTrack.RemoveClip(previousClip); + director.RebuildGraph(); + director.time = currentClip.start + timeEpsilon; + director.Evaluate(); + + ////////////////////////////////////////////////////////////////////// + //compute offsets + + var animationPlayable = currentClip.asset as AnimationPlayableAsset; + var match = UpdateClipOffsets(animationPlayable, parentTrack, matchPoint, targetPosition, targetRotation); + WriteMatchFields(animationPlayable, match, matchFields); + + ////////////////////////////////////////////////////////////////////// + + currentClip.blendInDuration = blendIn; + previousClip.blendOutDuration = blendOut; + + parentTrack.AddClip(previousClip); + director.RebuildGraph(); + director.time = cachedTime; + director.Evaluate(); + } + + public static void MatchNext(TimelineClip currentClip, Transform matchPoint, PlayableDirector director) + { + const double timeEpsilon = 0.00001; + MatchTargetFields matchFields = GetMatchFields(currentClip); + if (matchFields == MatchTargetFieldConstants.None || matchPoint == null) + return; + + double cachedTime = director.time; + + // finds next clip + TimelineClip nextClip = GetNextClip(currentClip); + if (nextClip == null || currentClip == nextClip) + return; + + // make sure the transform is properly updated before modifying the graph + director.Evaluate(); + + var parentTrack = currentClip.parentTrack as AnimationTrack; + + var blendOut = currentClip.blendOutDuration; + var blendIn = nextClip.blendInDuration; + currentClip.blendOutDuration = 0; + nextClip.blendInDuration = 0; + + //evaluate previous without current + parentTrack.RemoveClip(currentClip); + director.RebuildGraph(); + director.time = nextClip.start + timeEpsilon; + director.Evaluate(); // add port to evaluate only track + + var targetPosition = matchPoint.position; + var targetRotation = matchPoint.rotation; + + // evaluate current without next + parentTrack.AddClip(currentClip); + parentTrack.RemoveClip(nextClip); + director.RebuildGraph(); + director.time = Math.Min(nextClip.start, currentClip.end - timeEpsilon); + director.Evaluate(); + + ////////////////////////////////////////////////////////////////////// + //compute offsets + + var animationPlayable = currentClip.asset as AnimationPlayableAsset; + var match = UpdateClipOffsets(animationPlayable, parentTrack, matchPoint, targetPosition, targetRotation); + WriteMatchFields(animationPlayable, match, matchFields); + + ////////////////////////////////////////////////////////////////////// + + currentClip.blendOutDuration = blendOut; + nextClip.blendInDuration = blendIn; + + parentTrack.AddClip(nextClip); + director.RebuildGraph(); + director.time = cachedTime; + director.Evaluate(); + } + + public static TimelineWindowTimeControl CreateTimeController(WindowState state, TimelineClip clip) + { + var animationWindow = EditorWindow.GetWindow(); + var timeController = ScriptableObject.CreateInstance(); + timeController.Init(animationWindow.state, clip); + return timeController; + } + + public static TimelineWindowTimeControl CreateTimeController(WindowState state, TimelineWindowTimeControl.ClipData clipData) + { + var animationWindow = EditorWindow.GetWindow(); + var timeController = ScriptableObject.CreateInstance(); + timeController.Init(animationWindow.state, clipData); + return timeController; + } + + public static void EditAnimationClipWithTimeController(AnimationClip animationClip, TimelineWindowTimeControl timeController, Object sourceObject) + { + var animationWindow = EditorWindow.GetWindow(); + animationWindow.EditSequencerClip(animationClip, sourceObject, timeController); + } + + public static void UnlinkAnimationWindowFromTracks(IEnumerable tracks) + { + var clips = new List(); + foreach (var track in tracks) + { + var animationTrack = track as AnimationTrack; + if (animationTrack != null && animationTrack.infiniteClip != null) + clips.Add(animationTrack.infiniteClip); + + GetAnimationClips(track.GetClips(), clips); + } + UnlinkAnimationWindowFromAnimationClips(clips); + } + + public static void UnlinkAnimationWindowFromClips(IEnumerable timelineClips) + { + var clips = new List(); + GetAnimationClips(timelineClips, clips); + UnlinkAnimationWindowFromAnimationClips(clips); + } + + public static void UnlinkAnimationWindowFromAnimationClips(ICollection clips) + { + if (clips.Count == 0) + return; + + UnityEngine.Object[] windows = Resources.FindObjectsOfTypeAll(typeof(AnimationWindow)); + foreach (var animWindow in windows.OfType()) + { + if (animWindow != null && animWindow.state != null && animWindow.state.linkedWithSequencer && clips.Contains(animWindow.state.activeAnimationClip)) + animWindow.UnlinkSequencer(); + } + } + + public static void UnlinkAnimationWindow() + { + UnityEngine.Object[] windows = Resources.FindObjectsOfTypeAll(typeof(AnimationWindow)); + foreach (var animWindow in windows.OfType()) + { + if (animWindow != null && animWindow.state != null && animWindow.state.linkedWithSequencer) + animWindow.UnlinkSequencer(); + } + } + + private static void GetAnimationClips(IEnumerable timelineClips, List clips) + { + foreach (var timelineClip in timelineClips) + { + if (timelineClip.curves != null) + clips.Add(timelineClip.curves); + AnimationPlayableAsset apa = timelineClip.asset as AnimationPlayableAsset; + if (apa != null && apa.clip != null) + clips.Add(apa.clip); + } + } + + public static int GetAnimationWindowCurrentFrame() + { + var animationWindow = EditorWindow.GetWindow(); + if (animationWindow) + return animationWindow.state.currentFrame; + return -1; + } + + public static void SetAnimationWindowCurrentFrame(int frame) + { + var animationWindow = EditorWindow.GetWindow(); + if (animationWindow) + animationWindow.state.currentFrame = frame; + } + + public static void ConstrainCurveToBooleanValues(AnimationCurve curve) + { + // Clamp the values first + var keys = curve.keys; + for (var i = 0; i < keys.Length; i++) + { + var key = keys[i]; + key.value = key.value < 0.5f ? 0.0f : 1.0f; + keys[i] = key; + } + curve.keys = keys; + + // Update the tangents once all the values are clamped + for (var i = 0; i < curve.length; i++) + { + AnimationUtility.SetKeyLeftTangentMode(curve, i, AnimationUtility.TangentMode.Constant); + AnimationUtility.SetKeyRightTangentMode(curve, i, AnimationUtility.TangentMode.Constant); + } + } + + public static void ConstrainCurveToRange(AnimationCurve curve, float minValue, float maxValue) + { + var keys = curve.keys; + for (var i = 0; i < keys.Length; i++) + { + var key = keys[i]; + key.value = Mathf.Clamp(key.value, minValue, maxValue); + keys[i] = key; + } + curve.keys = keys; + } + + public static bool IsAnimationClip(TimelineClip clip) + { + return clip != null && (clip.asset as AnimationPlayableAsset) != null; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/TimelineAnimationUtilities.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/TimelineAnimationUtilities.cs.meta new file mode 100644 index 0000000..78ae589 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Animation/TimelineAnimationUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9685354eb873b8d4699078b307b0f260 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes.meta new file mode 100644 index 0000000..ceac198 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 919d97c1a707113409177d498d31cf51 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs new file mode 100644 index 0000000..3032bc5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs @@ -0,0 +1,14 @@ +using System; + +namespace UnityEditor.Timeline +{ + [AttributeUsage(AttributeTargets.Class)] + class ActiveInModeAttribute : Attribute + { + public TimelineModes modes { get; private set; } + public ActiveInModeAttribute(TimelineModes timelineModes) + { + modes = timelineModes; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs.meta new file mode 100644 index 0000000..63fafba --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ActiveInModeAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a784fb721704576b3b4c3a7f3324264 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs new file mode 100644 index 0000000..29623d2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + /// + /// Used to indicate path and priority of classes that are auto added to the menu + /// + [AttributeUsage(AttributeTargets.Class)] + internal class MenuEntryAttribute : Attribute + { + public readonly int priority; + public readonly string name; + public readonly string subMenuPath; + + public MenuEntryAttribute(string path, int priority) + { + path = path ?? string.Empty; + path = L10n.Tr(path); + this.priority = priority; + + int index = path.LastIndexOf('/'); + if (index >= 0) + { + name = (index == path.Length - 1) ? string.Empty : path.Substring(index + 1); + subMenuPath = path.Substring(0, index + 1); + } + else + { + name = path; + subMenuPath = string.Empty; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs.meta new file mode 100644 index 0000000..39a11ce --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/MenuEntryAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e6870f707805737429a719f575621041 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs new file mode 100644 index 0000000..756a092 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs @@ -0,0 +1,71 @@ +using System; +using System.Linq; +using UnityEditor.ShortcutManagement; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + [AttributeUsage(AttributeTargets.Class, Inherited = false)] + class ShortcutAttribute : Attribute + { + readonly string m_Identifier; + readonly string m_EventCommandName; + readonly string m_MenuShortcut; + + public ShortcutAttribute(string identifier) + { + m_Identifier = identifier; + m_EventCommandName = identifier; + } + + public ShortcutAttribute(string identifier, string commandName) + { + m_Identifier = identifier; + m_EventCommandName = commandName; + } + + public ShortcutAttribute(KeyCode key, ShortcutModifiers modifiers = ShortcutModifiers.None) + { + m_MenuShortcut = new KeyCombination(key, modifiers).ToMenuShortcutString(); + } + + public string GetMenuShortcut() + { + if (m_MenuShortcut != null) + return m_MenuShortcut; + + //find the mapped shortcut in the shortcut manager + var shortcut = ShortcutIntegration.instance.directory.FindShortcutEntry(m_Identifier); + if (shortcut != null && shortcut.combinations.Any()) + { + return KeyCombination.SequenceToMenuString(shortcut.combinations); + } + + return string.Empty; + } + + public bool MatchesEvent(Event evt) + { + if (evt.type != EventType.ExecuteCommand) + return false; + return evt.commandName == m_EventCommandName; + } + } + + [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] + class ShortcutPlatformOverrideAttribute : ShortcutAttribute + { + RuntimePlatform platform { get; } + + public ShortcutPlatformOverrideAttribute(RuntimePlatform platform, KeyCode key, ShortcutModifiers modifiers = ShortcutModifiers.None) + : base(key, modifiers) + { + this.platform = platform; + } + + public bool MatchesCurrentPlatform() + { + return Application.platform == platform; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs.meta new file mode 100644 index 0000000..2d02db9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Attributes/ShortcutAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c50a694a8232898498c1cdd47ce9873f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio.meta new file mode 100644 index 0000000..0313c34 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e091bb444874ef244b1ba4a813fc1e34 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioClipPropertiesDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioClipPropertiesDrawer.cs new file mode 100644 index 0000000..e3ec132 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioClipPropertiesDrawer.cs @@ -0,0 +1,81 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Text; +using JetBrains.Annotations; +using UnityEditor; +using UnityEditor.Timeline; + +namespace UnityEngine.Timeline +{ + [CustomPropertyDrawer(typeof(AudioClipProperties))] + class AudioClipPropertiesDrawer : PropertyDrawer + { + [UsedImplicitly] // Also used by tests + internal static class Styles + { + public const string VolumeControl = "AudioClipPropertiesDrawer.volume"; + + const string k_Indent = " "; + public const string valuesFormatter = "0.###"; + public static string mixedPropertiesInfo = L10n.Tr("The final {3} is {0}\n" + + "Calculated from:\n" + + k_Indent + "Clip: {1}\n" + + k_Indent + "Track: {2}"); + + public static string audioSourceContribution = L10n.Tr(k_Indent + "AudioSource: {0}"); + } + + static StringBuilder s_MixInfoBuilder = new StringBuilder(); + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + var volumeProp = property.FindPropertyRelative("volume"); + + GUI.SetNextControlName(Styles.VolumeControl); + EditorGUI.Slider(position, volumeProp, 0.0f, 1.0f, AudioSourceInspector.Styles.volumeLabel); + + if (TimelineEditor.inspectedDirector == null) + // Nothing more to do in asset mode + return; + + var clip = SelectionManager.SelectedClips().FirstOrDefault(c => c.asset == property.serializedObject.targetObject); + + if (clip == null || clip.parentTrack == null) + return; + + var clipVolume = volumeProp.floatValue; + var trackVolume = new SerializedObject(clip.parentTrack).FindProperty("m_TrackProperties.volume").floatValue; + var binding = TimelineEditor.inspectedDirector.GetGenericBinding(clip.parentTrack) as AudioSource; + + if (Math.Abs(clipVolume) < float.Epsilon && + Math.Abs(trackVolume) < float.Epsilon && + (binding == null || Math.Abs(binding.volume) < float.Epsilon)) + return; + + if (Math.Abs(clipVolume - 1) < float.Epsilon && + Math.Abs(trackVolume - 1) < float.Epsilon && + (binding == null || Math.Abs(binding.volume - 1) < float.Epsilon)) + return; + + s_MixInfoBuilder.Length = 0; + + var audioSourceVolume = binding == null ? 1.0f : binding.volume; + + s_MixInfoBuilder.AppendFormat( + Styles.mixedPropertiesInfo, + (clipVolume * trackVolume * audioSourceVolume).ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + clipVolume.ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + trackVolume.ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + AudioSourceInspector.Styles.volumeLabel.text); + + if (binding != null) + s_MixInfoBuilder.Append("\n") + .AppendFormat(Styles.audioSourceContribution, + audioSourceVolume.ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture)); + + EditorGUILayout.Space(); + EditorGUILayout.HelpBox(new GUIContent(s_MixInfoBuilder.ToString())); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioClipPropertiesDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioClipPropertiesDrawer.cs.meta new file mode 100644 index 0000000..60501c3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioClipPropertiesDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5b6cac4a98010394791c66942a33caf4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetEditor.cs new file mode 100644 index 0000000..553c4d8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetEditor.cs @@ -0,0 +1,84 @@ +using System.Collections.Generic; +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomTimelineEditor(typeof(AudioPlayableAsset)), UsedImplicitly] + class AudioPlayableAssetEditor : ClipEditor + { + readonly string k_NoClipAssignedError = LocalizationDatabase.GetLocalizedString("No audio clip assigned"); + readonly Dictionary m_PersistentPreviews = new Dictionary(); + ColorSpace m_ColorSpace = ColorSpace.Uninitialized; + + /// + public override ClipDrawOptions GetClipOptions(TimelineClip clip) + { + var clipOptions = base.GetClipOptions(clip); + var audioAsset = clip.asset as AudioPlayableAsset; + if (audioAsset != null && audioAsset.clip == null) + clipOptions.errorText = k_NoClipAssignedError; + return clipOptions; + } + + /// + public override void DrawBackground(TimelineClip clip, ClipBackgroundRegion region) + { + if (!TimelineWindow.instance.state.showAudioWaveform) + return; + + var rect = region.position; + if (rect.width <= 0) + return; + + var audioClip = clip.asset as AudioClip; + if (audioClip == null) + { + var audioPlayableAsset = clip.asset as AudioPlayableAsset; + if (audioPlayableAsset != null) + audioClip = audioPlayableAsset.clip; + } + + if (audioClip == null) + return; + + var quantizedRect = new Rect(Mathf.Ceil(rect.x), Mathf.Ceil(rect.y), Mathf.Ceil(rect.width), Mathf.Ceil(rect.height)); + WaveformPreview preview; + + if (QualitySettings.activeColorSpace != m_ColorSpace) + { + m_ColorSpace = QualitySettings.activeColorSpace; + m_PersistentPreviews.Clear(); + } + + if (!m_PersistentPreviews.TryGetValue(clip, out preview) || audioClip != preview.presentedObject) + { + preview = m_PersistentPreviews[clip] = WaveformPreviewFactory.Create((int)quantizedRect.width, audioClip); + Color waveColour = GammaCorrect(DirectorStyles.Instance.customSkin.colorAudioWaveform); + Color transparent = waveColour; + transparent.a = 0; + preview.backgroundColor = transparent; + preview.waveColor = waveColour; + preview.SetChannelMode(WaveformPreview.ChannelMode.MonoSum); + preview.updated += () => TimelineEditor.Refresh(RefreshReason.WindowNeedsRedraw); + } + + preview.looping = clip.SupportsLooping(); + preview.SetTimeInfo(region.startTime, region.endTime - region.startTime); + preview.OptimizeForSize(quantizedRect.size); + + if (Event.current.type == EventType.Repaint) + { + preview.ApplyModifications(); + preview.Render(quantizedRect); + } + } + + static Color GammaCorrect(Color color) + { + return (QualitySettings.activeColorSpace == ColorSpace.Linear) ? color.gamma : color; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetEditor.cs.meta new file mode 100644 index 0000000..e9bee5a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 74374298effb78d47b85450f7f724cef +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetInspector.cs new file mode 100644 index 0000000..31897fc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetInspector.cs @@ -0,0 +1,27 @@ +using UnityEditor; +using UnityEditor.Timeline; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + [CustomEditor(typeof(AudioPlayableAsset))] + class AudioPlayableAssetInspector : BasicAssetInspector + { + public override void ApplyChanges() + { + // At this point, we are guaranteed that the Timeline window is focused on + // the correct asset and that a single clip is selected (see ClipInspector) + + if (TimelineEditor.inspectedDirector == null) + // Do nothing if in asset mode + return; + + var asset = (AudioPlayableAsset)target; + + if (TimelineEditor.inspectedDirector.state == PlayState.Playing) + asset.LiveLink(); + else + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetInspector.cs.meta new file mode 100644 index 0000000..b768ab9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioPlayableAssetInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 23884ce4c1de32846adafea2d53a4cee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioTrackInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioTrackInspector.cs new file mode 100644 index 0000000..0c1a110 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioTrackInspector.cs @@ -0,0 +1,164 @@ +using System; +using System.Globalization; +using System.Linq; +using System.Text; +using JetBrains.Annotations; +using UnityEditor; +using UnityEditor.Timeline; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + [CustomEditor(typeof(AudioTrack))] + [CanEditMultipleObjects] + class AudioTrackInspector : TrackAssetInspector + { + [UsedImplicitly] // Also used by tests + internal static class Styles + { + public const string VolumeControl = "AudioTrackInspector.volume"; + public const string StereoPanControl = "AudioTrackInspector.stereoPan"; + public const string SpatialBlendControl = "AudioTrackInspector.spatialBlend"; + + const string k_Indent = " "; + public const string valuesFormatter = "0.###"; + public const string mixInfoSectionSeparator = "\n\n"; + public static string mixedPropertiesInfo = L10n.Tr("The final {3} is {0}\n" + + "Calculated from:\n" + + k_Indent + "Track: {1}\n" + + k_Indent + "AudioSource: {2}"); + } + + static StringBuilder s_MixInfoBuilder = new StringBuilder(); + + SerializedProperty m_VolumeProperty; + SerializedProperty m_StereoPanProperty; + SerializedProperty m_SpatialBlendProperty; + PlayableDirector m_Director; + + public override void OnEnable() + { + base.OnEnable(); + + if (((AudioTrack)target).timelineAsset == TimelineEditor.inspectedAsset) + m_Director = TimelineEditor.inspectedDirector; + + m_VolumeProperty = serializedObject.FindProperty("m_TrackProperties.volume"); + m_StereoPanProperty = serializedObject.FindProperty("m_TrackProperties.stereoPan"); + m_SpatialBlendProperty = serializedObject.FindProperty("m_TrackProperties.spatialBlend"); + } + + protected override void DrawTrackProperties() + { + // Volume + GUI.SetNextControlName(Styles.VolumeControl); + EditorGUILayout.Slider(m_VolumeProperty, 0.0f, 1.0f, AudioSourceInspector.Styles.volumeLabel); + EditorGUILayout.Space(); + + // Stereo Pan + GUI.SetNextControlName(Styles.StereoPanControl); + EditorGUIUtility.sliderLabels.SetLabels(AudioSourceInspector.Styles.panLeftLabel, AudioSourceInspector.Styles.panRightLabel); + EditorGUILayout.Slider(m_StereoPanProperty, -1.0f, 1.0f, AudioSourceInspector.Styles.panStereoLabel); + EditorGUIUtility.sliderLabels.SetLabels(null, null); + EditorGUILayout.Space(); + + // Spatial Blend + using (new EditorGUI.DisabledScope(ShouldDisableSpatialBlend())) + { + GUI.SetNextControlName(Styles.SpatialBlendControl); + EditorGUIUtility.sliderLabels.SetLabels(AudioSourceInspector.Styles.spatialLeftLabel, AudioSourceInspector.Styles.spatialRightLabel); + EditorGUILayout.Slider(m_SpatialBlendProperty, 0.0f, 1.0f, AudioSourceInspector.Styles.spatialBlendLabel); + EditorGUIUtility.sliderLabels.SetLabels(null, null); + } + + DrawMixInfoSection(); + } + + void DrawMixInfoSection() + { + if (m_Director == null || targets.Length > 1) + return; + + var binding = m_Director.GetGenericBinding(target) as AudioSource; + if (binding == null) + return; + + var audioSourceVolume = binding.volume; + var audioSourcePan = binding.panStereo; + var audioSourceBlend = binding.spatialBlend; + + var trackVolume = m_VolumeProperty.floatValue; + var trackPan = m_StereoPanProperty.floatValue; + var trackBlend = m_SpatialBlendProperty.floatValue; + + // Skip sections when result is obvious + + var skipVolumeInfo = Math.Abs(audioSourceVolume) < float.Epsilon && Math.Abs(trackVolume) < float.Epsilon || // All muted + Math.Abs(audioSourceVolume - 1) < float.Epsilon && Math.Abs(trackVolume - 1) < float.Epsilon; // All max volume + + var skipPanInfo = Math.Abs(audioSourcePan) < float.Epsilon && Math.Abs(trackPan) < float.Epsilon || // All centered + Math.Abs(audioSourcePan - 1) < float.Epsilon && Math.Abs(trackPan - 1) < float.Epsilon || // All right + Math.Abs(audioSourcePan - (-1.0f)) < float.Epsilon && Math.Abs(trackPan - (-1.0f)) < float.Epsilon; // All left + + var skipBlendInfo = Math.Abs(audioSourceBlend) < float.Epsilon && Math.Abs(trackBlend) < float.Epsilon || // All 2D + Math.Abs(audioSourceBlend - 1) < float.Epsilon && Math.Abs(trackBlend - 1) < float.Epsilon; // All 3D + + if (skipVolumeInfo && skipPanInfo && skipBlendInfo) + return; + + s_MixInfoBuilder.Length = 0; + + if (!skipVolumeInfo) + s_MixInfoBuilder.AppendFormat( + Styles.mixedPropertiesInfo, + (audioSourceVolume * trackVolume).ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + trackVolume.ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + audioSourceVolume.ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + AudioSourceInspector.Styles.volumeLabel.text); + + if (!skipVolumeInfo && !skipPanInfo) + s_MixInfoBuilder.Append(Styles.mixInfoSectionSeparator); + + if (!skipPanInfo) + s_MixInfoBuilder.AppendFormat( + Styles.mixedPropertiesInfo, + Mathf.Clamp(audioSourcePan + trackPan, -1.0f, 1.0f).ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + trackPan.ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + audioSourcePan.ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + AudioSourceInspector.Styles.panStereoLabel.text); + + if ((!skipVolumeInfo || !skipPanInfo) && !skipBlendInfo) + s_MixInfoBuilder.Append(Styles.mixInfoSectionSeparator); + + if (!skipBlendInfo) + s_MixInfoBuilder.AppendFormat( + Styles.mixedPropertiesInfo, + Mathf.Clamp01(audioSourceBlend + trackBlend).ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + trackBlend.ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + audioSourceBlend.ToString(Styles.valuesFormatter, CultureInfo.InvariantCulture), + AudioSourceInspector.Styles.spatialBlendLabel.text); + + EditorGUILayout.Space(); + EditorGUILayout.HelpBox(new GUIContent(s_MixInfoBuilder.ToString())); + } + + protected override void ApplyChanges() + { + var track = (AudioTrack)target; + + if (TimelineEditor.inspectedAsset != track.timelineAsset || TimelineEditor.inspectedDirector == null) + return; + + if (TimelineEditor.inspectedDirector.state == PlayState.Playing) + track.LiveLink(); + else + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + + bool ShouldDisableSpatialBlend() + { + return m_Director == null || + targets.Any(selectedTrack => m_Director.GetGenericBinding(selectedTrack) == null); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioTrackInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioTrackInspector.cs.meta new file mode 100644 index 0000000..4d4bc76 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Audio/AudioTrackInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 57acdaad593b8d143b8fb5052a09d7d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack.meta new file mode 100644 index 0000000..5489b64 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a24ec4b5c3e08e47bf50c8298c1fe0d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack/ControlPlayableAssetEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack/ControlPlayableAssetEditor.cs new file mode 100644 index 0000000..066e943 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack/ControlPlayableAssetEditor.cs @@ -0,0 +1,69 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + [CustomTimelineEditor(typeof(ControlPlayableAsset))] + class ControlPlayableAssetEditor : ClipEditor + { + static readonly Texture2D[] s_ParticleSystemIcon = {AssetPreview.GetMiniTypeThumbnail(typeof(ParticleSystem))}; + + public override ClipDrawOptions GetClipOptions(TimelineClip clip) + { + var asset = (ControlPlayableAsset)clip.asset; + var options = base.GetClipOptions(clip); + if (asset.updateParticle && TimelineEditor.inspectedDirector != null && asset.controllingParticles) + options.icons = s_ParticleSystemIcon; + return options; + } + + public override void OnCreate(TimelineClip clip, TrackAsset track, TimelineClip clonedFrom) + { + var asset = (ControlPlayableAsset)clip.asset; + GameObject sourceObject = null; + + // go by sourceObject first, then by prefab + if (TimelineEditor.inspectedDirector != null) + sourceObject = asset.sourceGameObject.Resolve(TimelineEditor.inspectedDirector); + + if (sourceObject == null && asset.prefabGameObject != null) + sourceObject = asset.prefabGameObject; + + if (sourceObject) + { + var directors = asset.GetComponent(sourceObject); + var particleSystems = asset.GetComponent(sourceObject); + + // update the duration and loop values (used for UI purposes) here + // so they are tied to the latest gameObject bound + asset.UpdateDurationAndLoopFlag(directors, particleSystems); + + clip.displayName = sourceObject.name; + } + } + + public override void GetSubTimelines(TimelineClip clip, PlayableDirector director, List subTimelines) + { + var asset = (ControlPlayableAsset)clip.asset; + + // If there is a prefab, it will override the source GameObject + if (!asset.updateDirector || asset.prefabGameObject != null || director == null) + return; + + var go = asset.sourceGameObject.Resolve(director); + if (go == null) + return; + + foreach (var subTimeline in asset.GetComponent(go)) + { + if (subTimeline == director || subTimeline == TimelineEditor.masterDirector || subTimeline == TimelineEditor.inspectedDirector) + continue; + + if (subTimeline.playableAsset is TimelineAsset) + subTimelines.Add(subTimeline); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack/ControlPlayableAssetEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack/ControlPlayableAssetEditor.cs.meta new file mode 100644 index 0000000..ece3e1f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/ControlTrack/ControlPlayableAssetEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b5489bb3cd68836439785588fffc67a4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CurveEditUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CurveEditUtility.cs new file mode 100644 index 0000000..0a4321e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CurveEditUtility.cs @@ -0,0 +1,657 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditorInternal; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + // Utility class for editing animation clips from serialized properties + static class CurveEditUtility + { + static bool IsRotationKey(EditorCurveBinding binding) + { + return binding.propertyName.Contains("localEulerAnglesRaw"); + } + + public static void AddKey(AnimationClip clip, EditorCurveBinding sourceBinding, SerializedProperty prop, double time) + { + if (sourceBinding.isPPtrCurve) + { + AddObjectKey(clip, sourceBinding, prop, time); + } + else if (IsRotationKey(sourceBinding)) + { + AddRotationKey(clip, sourceBinding, prop, time); + } + else + { + AddFloatKey(clip, sourceBinding, prop, time); + } + } + + static void AddObjectKey(AnimationClip clip, EditorCurveBinding sourceBinding, SerializedProperty prop, double time) + { + if (prop.propertyType != SerializedPropertyType.ObjectReference) + return; + + ObjectReferenceKeyframe[] curve = null; + var info = AnimationClipCurveCache.Instance.GetCurveInfo(clip); + var curveIndex = Array.IndexOf(info.objectBindings, sourceBinding); + if (curveIndex >= 0) + { + curve = info.objectCurves[curveIndex]; + + // where in the array does the evaluation land? + var evalIndex = EvaluateIndex(curve, (float)time); + + if (KeyCompare(curve[evalIndex].time, (float)time, clip.frameRate) == 0) + { + curve[evalIndex].value = prop.objectReferenceValue; + } + // check the next key (always return the minimum value) + else if (evalIndex < curve.Length - 1 && KeyCompare(curve[evalIndex + 1].time, (float)time, clip.frameRate) == 0) + { + curve[evalIndex + 1].value = prop.objectReferenceValue; + } + // resize the array + else + { + if (time > curve[0].time) + evalIndex++; + var key = new ObjectReferenceKeyframe(); + key.time = (float)time; + key.value = prop.objectReferenceValue; + ArrayUtility.Insert(ref curve, evalIndex, key); + } + } + else // curve doesn't exist, add it + { + curve = new ObjectReferenceKeyframe[1]; + curve[0].time = (float)time; + curve[0].value = prop.objectReferenceValue; + } + + AnimationUtility.SetObjectReferenceCurve(clip, sourceBinding, curve); + EditorUtility.SetDirty(clip); + } + + static void AddRotationKey(AnimationClip clip, EditorCurveBinding sourceBind, SerializedProperty prop, double time) + { + if (prop.propertyType != SerializedPropertyType.Quaternion) + { + return; + } + + var updateCurves = new List(); + var updateBindings = new List(); + + var info = AnimationClipCurveCache.Instance.GetCurveInfo(clip); + for (var i = 0; i < info.bindings.Length; i++) + { + if (sourceBind.type != info.bindings[i].type) + continue; + + if (info.bindings[i].propertyName.Contains("localEuler")) + { + updateBindings.Add(info.bindings[i]); + updateCurves.Add(info.curves[i]); + } + } + + // use this instead of serialized properties because the editor will attempt to maintain + // correct localeulers + var eulers = ((Transform)prop.serializedObject.targetObject).localEulerAngles; + if (updateBindings.Count == 0) + { + var propName = AnimationWindowUtility.GetPropertyGroupName(sourceBind.propertyName); + updateBindings.Add(EditorCurveBinding.FloatCurve(sourceBind.path, sourceBind.type, propName + ".x")); + updateBindings.Add(EditorCurveBinding.FloatCurve(sourceBind.path, sourceBind.type, propName + ".y")); + updateBindings.Add(EditorCurveBinding.FloatCurve(sourceBind.path, sourceBind.type, propName + ".z")); + + var curveX = new AnimationCurve(); + var curveY = new AnimationCurve(); + var curveZ = new AnimationCurve(); + AddKeyFrameToCurve(curveX, (float)time, clip.frameRate, eulers.x, false); + AddKeyFrameToCurve(curveY, (float)time, clip.frameRate, eulers.y, false); + AddKeyFrameToCurve(curveZ, (float)time, clip.frameRate, eulers.z, false); + + updateCurves.Add(curveX); + updateCurves.Add(curveY); + updateCurves.Add(curveZ); + } + + for (var i = 0; i < updateBindings.Count; i++) + { + var c = updateBindings[i].propertyName.Last(); + var value = eulers.x; + if (c == 'y') value = eulers.y; + else if (c == 'z') value = eulers.z; + AddKeyFrameToCurve(updateCurves[i], (float)time, clip.frameRate, value, false); + } + + UpdateEditorCurves(clip, updateBindings, updateCurves); + } + + // Add a floating point curve key + static void AddFloatKey(AnimationClip clip, EditorCurveBinding sourceBind, SerializedProperty prop, double time) + { + var updateCurves = new List(); + var updateBindings = new List(); + + var updated = false; + var info = AnimationClipCurveCache.Instance.GetCurveInfo(clip); + for (var i = 0; i < info.bindings.Length; i++) + { + var binding = info.bindings[i]; + if (binding.type != sourceBind.type) + continue; + + SerializedProperty valProp = null; + var curve = info.curves[i]; + + // perfect match on property path, editting a float + if (prop.propertyPath.Equals(binding.propertyName)) + { + valProp = prop; + } + // this is a child object + else if (binding.propertyName.Contains(prop.propertyPath)) + { + valProp = prop.serializedObject.FindProperty(binding.propertyName); + } + + if (valProp != null) + { + var value = GetKeyValue(valProp); + if (!float.IsNaN(value)) // Nan indicates an error retrieving the property value + { + updated = true; + AddKeyFrameToCurve(curve, (float)time, clip.frameRate, value, valProp.propertyType == SerializedPropertyType.Boolean); + updateCurves.Add(curve); + updateBindings.Add(binding); + } + } + } + + // Curves don't exist, add them + if (!updated) + { + var propName = AnimationWindowUtility.GetPropertyGroupName(sourceBind.propertyName); + if (!prop.hasChildren) + { + var value = GetKeyValue(prop); + if (!float.IsNaN(value)) + { + updateBindings.Add(EditorCurveBinding.FloatCurve(sourceBind.path, sourceBind.type, sourceBind.propertyName)); + var curve = new AnimationCurve(); + AddKeyFrameToCurve(curve, (float)time, clip.frameRate, value, prop.propertyType == SerializedPropertyType.Boolean); + updateCurves.Add(curve); + } + } + else + { + // special case because subproperties on color aren't 'visible' so you can't iterate over them + if (prop.propertyType == SerializedPropertyType.Color) + { + updateBindings.Add(EditorCurveBinding.FloatCurve(sourceBind.path, sourceBind.type, propName + ".r")); + updateBindings.Add(EditorCurveBinding.FloatCurve(sourceBind.path, sourceBind.type, propName + ".g")); + updateBindings.Add(EditorCurveBinding.FloatCurve(sourceBind.path, sourceBind.type, propName + ".b")); + updateBindings.Add(EditorCurveBinding.FloatCurve(sourceBind.path, sourceBind.type, propName + ".a")); + + var c = prop.colorValue; + for (var i = 0; i < 4; i++) + { + var curve = new AnimationCurve(); + AddKeyFrameToCurve(curve, (float)time, clip.frameRate, c[i], prop.propertyType == SerializedPropertyType.Boolean); + updateCurves.Add(curve); + } + } + else + { + prop = prop.Copy(); + foreach (SerializedProperty cp in prop) + { + updateBindings.Add(EditorCurveBinding.FloatCurve(sourceBind.path, sourceBind.type, cp.propertyPath)); + var curve = new AnimationCurve(); + AddKeyFrameToCurve(curve, (float)time, clip.frameRate, GetKeyValue(cp), cp.propertyType == SerializedPropertyType.Boolean); + updateCurves.Add(curve); + } + } + } + } + + UpdateEditorCurves(clip, updateBindings, updateCurves); + } + + public static void RemoveKey(AnimationClip clip, EditorCurveBinding sourceBinding, SerializedProperty prop, double time) + { + if (sourceBinding.isPPtrCurve) + { + RemoveObjectKey(clip, sourceBinding, time); + } + else if (IsRotationKey(sourceBinding)) + { + RemoveRotationKey(clip, sourceBinding, prop, time); + } + else + { + RemoveFloatKey(clip, sourceBinding, prop, time); + } + } + + public static void RemoveObjectKey(AnimationClip clip, EditorCurveBinding sourceBinding, double time) + { + var info = AnimationClipCurveCache.Instance.GetCurveInfo(clip); + var curveIndex = Array.IndexOf(info.objectBindings, sourceBinding); + if (curveIndex >= 0) + { + var curve = info.objectCurves[curveIndex]; + var evalIndex = GetKeyframeAtTime(curve, (float)time, clip.frameRate); + if (evalIndex >= 0) + { + ArrayUtility.RemoveAt(ref curve, evalIndex); + AnimationUtility.SetObjectReferenceCurve(clip, sourceBinding, curve.Length == 0 ? null : curve); + EditorUtility.SetDirty(clip); + } + } + } + + public static int GetObjectKeyCount(AnimationClip clip, EditorCurveBinding sourceBinding) + { + var info = AnimationClipCurveCache.Instance.GetCurveInfo(clip); + var curveIndex = Array.IndexOf(info.objectBindings, sourceBinding); + if (curveIndex >= 0) + { + var curve = info.objectCurves[curveIndex]; + return curve.Length; + } + + return 0; + } + + static void RemoveRotationKey(AnimationClip clip, EditorCurveBinding sourceBind, SerializedProperty prop, double time) + { + if (prop.propertyType != SerializedPropertyType.Quaternion) + { + return; + } + + var updateCurves = new List(); + var updateBindings = new List(); + + var info = AnimationClipCurveCache.Instance.GetCurveInfo(clip); + for (var i = 0; i < info.bindings.Length; i++) + { + if (sourceBind.type != info.bindings[i].type) + continue; + + if (info.bindings[i].propertyName.Contains("localEuler")) + { + updateBindings.Add(info.bindings[i]); + updateCurves.Add(info.curves[i]); + } + } + + foreach (var c in updateCurves) + { + RemoveKeyFrameFromCurve(c, (float)time, clip.frameRate); + } + + UpdateEditorCurves(clip, updateBindings, updateCurves); + } + + // Removes the float keys from curves + static void RemoveFloatKey(AnimationClip clip, EditorCurveBinding sourceBind, SerializedProperty prop, double time) + { + var updateCurves = new List(); + var updateBindings = new List(); + + var info = AnimationClipCurveCache.Instance.GetCurveInfo(clip); + for (var i = 0; i < info.bindings.Length; i++) + { + var binding = info.bindings[i]; + if (binding.type != sourceBind.type) + continue; + + SerializedProperty valProp = null; + var curve = info.curves[i]; + + // perfect match on property path, editting a float + if (prop.propertyPath.Equals(binding.propertyName)) + { + valProp = prop; + } + // this is a child object + else if (binding.propertyName.Contains(prop.propertyPath)) + { + valProp = prop.serializedObject.FindProperty(binding.propertyName); + } + if (valProp != null) + { + RemoveKeyFrameFromCurve(curve, (float)time, clip.frameRate); + updateCurves.Add(curve); + updateBindings.Add(binding); + } + } + + // update the curve. Do this last to not mess with the curve caches we are iterating over + UpdateEditorCurves(clip, updateBindings, updateCurves); + } + + static void UpdateEditorCurve(AnimationClip clip, EditorCurveBinding binding, AnimationCurve curve) + { + if (curve.keys.Length == 0) + AnimationUtility.SetEditorCurve(clip, binding, null); + else + AnimationUtility.SetEditorCurve(clip, binding, curve); + } + + static void UpdateEditorCurves(AnimationClip clip, List bindings, List curves) + { + if (curves.Count == 0) + return; + + for (var i = 0; i < curves.Count; i++) + { + UpdateEditorCurve(clip, bindings[i], curves[i]); + } + EditorUtility.SetDirty(clip); + } + + public static void RemoveCurves(AnimationClip clip, SerializedProperty prop) + { + if (clip == null || prop == null) + return; + + var toRemove = new List(); + var info = AnimationClipCurveCache.Instance.GetCurveInfo(clip); + for (var i = 0; i < info.bindings.Length; i++) + { + var binding = info.bindings[i]; + + // check if we match directly, or with a child object + if (prop.propertyPath.Equals(binding.propertyName) || binding.propertyName.Contains(prop.propertyPath)) + { + toRemove.Add(binding); + } + } + for (int i = 0; i < toRemove.Count; i++) + { + AnimationUtility.SetEditorCurve(clip, toRemove[i], null); + } + } + + // adds a stepped key frame to the given curve + public static void AddKeyFrameToCurve(AnimationCurve curve, float time, float framerate, float value, bool stepped) + { + var key = new Keyframe(); + + bool add = true; + var keyIndex = GetKeyframeAtTime(curve, time, framerate); + if (keyIndex != -1) + { + add = false; + key = curve[keyIndex]; // retain the tangents and mode + curve.RemoveKey(keyIndex); + } + + key.value = value; + key.time = GetKeyTime(time, framerate); + keyIndex = curve.AddKey(key); + + if (stepped) + { + AnimationUtility.SetKeyBroken(curve, keyIndex, stepped); + AnimationUtility.SetKeyLeftTangentMode(curve, keyIndex, AnimationUtility.TangentMode.Constant); + AnimationUtility.SetKeyRightTangentMode(curve, keyIndex, AnimationUtility.TangentMode.Constant); + key.outTangent = Mathf.Infinity; + key.inTangent = Mathf.Infinity; + } + else if (add) + { + AnimationUtility.SetKeyLeftTangentMode(curve, keyIndex, AnimationUtility.TangentMode.ClampedAuto); + AnimationUtility.SetKeyRightTangentMode(curve, keyIndex, AnimationUtility.TangentMode.ClampedAuto); + } + + if (keyIndex != -1 && !stepped) + { + AnimationUtility.UpdateTangentsFromModeSurrounding(curve, keyIndex); + AnimationUtility.SetKeyBroken(curve, keyIndex, false); + } + } + + // Removes a keyframe at the given time from the animation curve + public static bool RemoveKeyFrameFromCurve(AnimationCurve curve, float time, float framerate) + { + var keyIndex = GetKeyframeAtTime(curve, time, framerate); + if (keyIndex == -1) + return false; + + curve.RemoveKey(keyIndex); + return true; + } + + // gets the value of the key + public static float GetKeyValue(SerializedProperty prop) + { + switch (prop.propertyType) + { + case SerializedPropertyType.Integer: + return prop.intValue; + case SerializedPropertyType.Boolean: + return prop.boolValue ? 1.0f : 0.0f; + case SerializedPropertyType.Float: + return prop.floatValue; + default: + Debug.LogError("Could not convert property type " + prop.propertyType.ToString() + " to float"); + break; + } + return float.NaN; + } + + public static void SetFromKeyValue(SerializedProperty prop, float keyValue) + { + switch (prop.propertyType) + { + case SerializedPropertyType.Float: + { + prop.floatValue = keyValue; + return; + } + case SerializedPropertyType.Integer: + { + prop.intValue = (int)keyValue; + return; + } + case SerializedPropertyType.Boolean: + { + prop.boolValue = Math.Abs(keyValue) > 0.001f; + return; + } + } + + Debug.LogError("Could not convert float to property type " + prop.propertyType.ToString()); + } + + // gets the index of the key, -1 if not found + public static int GetKeyframeAtTime(AnimationCurve curve, float time, float frameRate) + { + var range = 0.5f / frameRate; + var keys = curve.keys; + for (var i = 0; i < keys.Length; i++) + { + var k = keys[i]; + if (k.time >= time - range && k.time < time + range) + { + return i; + } + } + + return -1; + } + + public static int GetKeyframeAtTime(ObjectReferenceKeyframe[] curve, float time, float frameRate) + { + if (curve == null || curve.Length == 0) + return -1; + + var range = 0.5f / frameRate; + for (var i = 0; i < curve.Length; i++) + { + var t = curve[i].time; + if (t >= time - range && t < time + range) + { + return i; + } + } + return -1; + } + + public static float GetKeyTime(float time, float frameRate) + { + return Mathf.Round(time * frameRate) / frameRate; + } + + public static int KeyCompare(float timeA, float timeB, float frameRate) + { + if (Mathf.Abs(timeA - timeB) <= 0.5f / frameRate) + return 0; + return timeA < timeB ? -1 : 1; + } + + // Evaluates an object (bool curve) + public static Object Evaluate(ObjectReferenceKeyframe[] curve, float time) + { + return curve[EvaluateIndex(curve, time)].value; + } + + // returns the index from evaluation + public static int EvaluateIndex(ObjectReferenceKeyframe[] curve, float time) + { + if (curve == null || curve.Length == 0) + throw new InvalidOperationException("Can not evaluate a PPtr curve with no entries"); + + // clamp conditions + if (time <= curve[0].time) + return 0; + if (time >= curve.Last().time) + return curve.Length - 1; + + // binary search + var max = curve.Length - 1; + var min = 0; + while (max - min > 1) + { + var imid = (min + max) / 2; + if (Mathf.Approximately(curve[imid].time, time)) + return imid; + if (curve[imid].time < time) + min = imid; + else if (curve[imid].time > time) + max = imid; + } + return min; + } + + // Shifts the animation clip so the time start at 0 + public static void ShiftBySeconds(this AnimationClip clip, float time) + { + var floatBindings = AnimationUtility.GetCurveBindings(clip); + var objectBindings = AnimationUtility.GetObjectReferenceCurveBindings(clip); + + // update the float curves + foreach (var bind in floatBindings) + { + var curve = AnimationUtility.GetEditorCurve(clip, bind); + var keys = curve.keys; + for (var i = 0; i < keys.Length; i++) + keys[i].time += time; + curve.keys = keys; + AnimationUtility.SetEditorCurve(clip, bind, curve); + } + + // update the PPtr curves + foreach (var bind in objectBindings) + { + var curve = AnimationUtility.GetObjectReferenceCurve(clip, bind); + for (var i = 0; i < curve.Length; i++) + curve[i].time += time; + AnimationUtility.SetObjectReferenceCurve(clip, bind, curve); + } + + EditorUtility.SetDirty(clip); + } + + public static void ScaleTime(this AnimationClip clip, float scale) + { + var floatBindings = AnimationUtility.GetCurveBindings(clip); + var objectBindings = AnimationUtility.GetObjectReferenceCurveBindings(clip); + + // update the float curves + foreach (var bind in floatBindings) + { + var curve = AnimationUtility.GetEditorCurve(clip, bind); + var keys = curve.keys; + for (var i = 0; i < keys.Length; i++) + keys[i].time *= scale; + curve.keys = keys.OrderBy(x => x.time).ToArray(); + AnimationUtility.SetEditorCurve(clip, bind, curve); + } + + // update the PPtr curves + foreach (var bind in objectBindings) + { + var curve = AnimationUtility.GetObjectReferenceCurve(clip, bind); + for (var i = 0; i < curve.Length; i++) + curve[i].time *= scale; + curve = curve.OrderBy(x => x.time).ToArray(); + AnimationUtility.SetObjectReferenceCurve(clip, bind, curve); + } + + EditorUtility.SetDirty(clip); + } + + // Creates an opposing blend curve that matches the given curve to make sure the result is normalized + public static AnimationCurve CreateMatchingCurve(AnimationCurve curve) + { + Keyframe[] keys = curve.keys; + + for (var i = 0; i != keys.Length; i++) + { + if (!Single.IsPositiveInfinity(keys[i].inTangent)) + keys[i].inTangent = -keys[i].inTangent; + if (!Single.IsPositiveInfinity(keys[i].outTangent)) + keys[i].outTangent = -keys[i].outTangent; + keys[i].value = 1.0f - keys[i].value; + } + return new AnimationCurve(keys); + } + + // Sanitizes the keys on an animation to force the property to be normalized + public static Keyframe[] SanitizeCurveKeys(Keyframe[] keys, bool easeIn) + { + if (keys.Length < 2) + { + if (easeIn) + keys = new[] { new Keyframe(0, 0), new Keyframe(1, 1) }; + else + keys = new[] { new Keyframe(0, 1), new Keyframe(1, 0) }; + } + else if (easeIn) + { + keys[0].time = 0; + keys[keys.Length - 1].time = 1; + keys[keys.Length - 1].value = 1; + } + else + { + keys[0].time = 0; + keys[0].value = 1; + keys[keys.Length - 1].time = 1; + } + return keys; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CurveEditUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CurveEditUtility.cs.meta new file mode 100644 index 0000000..966ab3a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CurveEditUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9e2b7a65f0a52974193ed497d145b0bc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors.meta new file mode 100644 index 0000000..2516d0e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ad70ff8d98b257540b683737743828cb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/ClipEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/ClipEditor.cs new file mode 100644 index 0000000..9f133a1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/ClipEditor.cs @@ -0,0 +1,256 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + /// + /// Description of the on-screen area where a clip is drawn + /// + public struct ClipBackgroundRegion + { + /// + /// The rectangle where the background of the clip is drawn. + /// + /// + /// The rectangle is clipped to the screen. The rectangle does not include clip borders. + /// + public Rect position { get; private set; } + + /// + /// The start time of the region, relative to the clip. + /// + public double startTime { get; private set; } + + /// + /// The end time of the region, relative to the clip. + /// + public double endTime { get; private set; } + + /// + /// Constructor + /// + /// + /// + /// + public ClipBackgroundRegion(Rect _position, double _startTime, double _endTime) + { + position = _position; + startTime = _startTime; + endTime = _endTime; + } + + public override bool Equals(object obj) + { + if (!(obj is ClipBackgroundRegion)) + return false; + + return Equals((ClipBackgroundRegion)obj); + } + + public bool Equals(ClipBackgroundRegion other) + { + return position.Equals(other.position) && + startTime == other.startTime && + endTime == other.endTime; + } + + public override int GetHashCode() + { + return HashUtility.CombineHash( + position.GetHashCode(), + startTime.GetHashCode(), + endTime.GetHashCode() + ); + } + + public static bool operator==(ClipBackgroundRegion region1, ClipBackgroundRegion region2) + { + return region1.Equals(region2); + } + + public static bool operator!=(ClipBackgroundRegion region1, ClipBackgroundRegion region2) + { + return !region1.Equals(region2); + } + } + + /// + /// The user-defined options for drawing a clip. + /// + public struct ClipDrawOptions + { + private IEnumerable m_Icons; + + /// + /// Text that indicates if the clip should display an error. + /// + /// + /// If the error text is not empty or null, then the clip displays a warning. The error text is used as the tooltip. + /// + public string errorText { get; set; } + + /// + /// The tooltip to show for the clip. + /// + public string tooltip { get; set; } + + /// + /// The color drawn under the clip. By default, the color is the same as the track color. + /// + public Color highlightColor { get; set; } + + + /// + /// Icons to display on the clip. + /// + public IEnumerable icons + { + get { return m_Icons ?? System.Linq.Enumerable.Empty(); } + set { m_Icons = value;} + } + + public override bool Equals(object obj) + { + if (!(obj is ClipDrawOptions)) + return false; + + return Equals((ClipDrawOptions)obj); + } + + public bool Equals(ClipDrawOptions other) + { + return errorText == other.errorText && + tooltip == other.tooltip && + highlightColor == other.highlightColor && + System.Linq.Enumerable.SequenceEqual(icons, other.icons); + } + + public override int GetHashCode() + { + return HashUtility.CombineHash( + errorText != null ? errorText.GetHashCode() : 0, + tooltip != null ? tooltip.GetHashCode() : 0, + highlightColor.GetHashCode(), + icons != null ? icons.GetHashCode() : 0 + ); + } + + public static bool operator==(ClipDrawOptions options1, ClipDrawOptions options2) + { + return options1.Equals(options2); + } + + public static bool operator!=(ClipDrawOptions options1, ClipDrawOptions options2) + { + return !options1.Equals(options2); + } + } + + + /// + /// Use this class to customize clip types in the TimelineEditor. + /// + public class ClipEditor + { + static readonly string k_NoPlayableAssetError = LocalizationDatabase.GetLocalizedString("This clip does not contain a valid playable asset"); + static readonly string k_ScriptLoadError = LocalizationDatabase.GetLocalizedString("The associated script can not be loaded"); + + internal readonly bool supportsSubTimelines; + + /// + /// Default constructor + /// + public ClipEditor() + { + supportsSubTimelines = TypeUtility.HasOverrideMethod(GetType(), nameof(GetSubTimelines)); + } + + /// + /// Implement this method to override the default options for drawing a clip. + /// + /// The clip being drawn. + /// The options for drawing a clip. + public virtual ClipDrawOptions GetClipOptions(TimelineClip clip) + { + return new ClipDrawOptions() + { + errorText = GetErrorText(clip), + tooltip = string.Empty, + highlightColor = GetDefaultHighlightColor(clip), + icons = System.Linq.Enumerable.Empty() + }; + } + + /// + /// Override this method to draw a background for a clip . + /// + /// The clip being drawn. + /// The on-screen area where the clip is drawn. + public virtual void DrawBackground(TimelineClip clip, ClipBackgroundRegion region) + { + } + + /// + /// Called when a clip is created. + /// + /// The newly created clip. + /// The track that the clip is assigned to. + /// The source that the clip was copied from. This can be set to null if the clip is not a copy. + /// + /// The callback occurs before the clip is assigned to the track. + /// + public virtual void OnCreate(TimelineClip clip, TrackAsset track, TimelineClip clonedFrom) + { + } + + /// + /// Gets the error text for the specified clip. + /// + /// The clip being drawn. + /// Returns the error text to be displayed as the tool tip for the clip. If there is no error to be displayed, this method returns string.Empty. + public string GetErrorText(TimelineClip clip) + { + if (clip == null || clip.asset == null) + return k_NoPlayableAssetError; + + var playableAsset = clip.asset as ScriptableObject; + if (playableAsset == null || MonoScript.FromScriptableObject(playableAsset) == null) + return k_ScriptLoadError; + + return string.Empty; + } + + /// + /// The color drawn under the clip. By default, the color is the same as the track color. + /// + /// The clip being drawn. + /// Returns the highlight color of the clip being drawn. + public Color GetDefaultHighlightColor(TimelineClip clip) + { + if (clip == null) + return Color.white; + + return TrackResourceCache.GetTrackColor(clip.parentTrack); + } + + /// + /// Called when a clip is changed by the Editor. + /// + /// The clip that changed. + public virtual void OnClipChanged(TimelineClip clip) + { + } + + /// + /// Gets the sub-timelines for a specific clip. Implement this method if your clip supports playing nested timelines. + /// + /// The clip with the ControlPlayableAsset. + /// The playable director driving the Timeline Clip. This may not be the same as TimelineEditor.inspectedDirector. + /// Specify the sub-timelines to control. + public virtual void GetSubTimelines(TimelineClip clip, PlayableDirector director, List subTimelines) + { + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/ClipEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/ClipEditor.cs.meta new file mode 100644 index 0000000..da1b7b5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/ClipEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2537ddddebaa455409dec422eb08fd7e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/CustomTimelineEditorCache.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/CustomTimelineEditorCache.cs new file mode 100644 index 0000000..8211a98 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/CustomTimelineEditorCache.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class CustomTimelineEditorCache + { + static class SubClassCache where TEditorClass : class, new() + { + private static Type[] s_SubClasses = null; + private static readonly TEditorClass s_DefaultInstance = new TEditorClass(); + private static readonly Dictionary s_TypeMap = new Dictionary(); + + public static TEditorClass DefaultInstance + { + get { return s_DefaultInstance; } + } + + static Type[] SubClasses + { + get + { + // order the subclass array by built-ins then user defined so built-in classes are chosen first + return s_SubClasses ?? + (s_SubClasses = TypeCache.GetTypesDerivedFrom().OrderBy(t => t.Assembly == typeof(UnityEditor.Timeline.TimelineEditor).Assembly ? 1 : 0).ToArray()); + } + } + + public static TEditorClass GetEditorForType(Type type) + { + TEditorClass editorClass = null; + if (!s_TypeMap.TryGetValue(type, out editorClass) || editorClass == null) + { + Type editorClassType = null; + Type searchType = type; + while (searchType != null) + { + // search our way up the runtime class hierarchy so we get the best match + editorClassType = GetExactEditorClassForType(searchType); + if (editorClassType != null) + break; + searchType = searchType.BaseType; + } + + if (editorClassType == null) + { + editorClass = s_DefaultInstance; + } + else + { + try + { + editorClass = (TEditorClass)Activator.CreateInstance(editorClassType); + } + catch (Exception e) + { + Debug.LogWarningFormat("Could not create a Timeline editor class of type {0}: {1}", editorClassType, e.Message); + editorClass = s_DefaultInstance; + } + } + + s_TypeMap[type] = editorClass; + } + + return editorClass; + } + + private static Type GetExactEditorClassForType(Type type) + { + foreach (var subClass in SubClasses) + { + // first check for exact match + var attr = (CustomTimelineEditorAttribute)Attribute.GetCustomAttribute(subClass, typeof(CustomTimelineEditorAttribute), false); + if (attr != null && attr.classToEdit == type) + { + return subClass; + } + } + + return null; + } + + public static void Clear() + { + s_TypeMap.Clear(); + s_SubClasses = null; + } + } + + public static TEditorClass GetEditorForType(Type type) where TEditorClass : class, new() + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + if (!typeof(TRuntimeClass).IsAssignableFrom(type)) + throw new ArgumentException(type.FullName + " does not inherit from" + typeof(TRuntimeClass)); + + return SubClassCache.GetEditorForType(type); + } + + public static void ClearCache() where TEditorClass : class, new() + { + SubClassCache.Clear(); + } + + public static ClipEditor GetClipEditor(TimelineClip clip) + { + if (clip == null) + throw new ArgumentNullException(nameof(clip)); + + var type = typeof(IPlayableAsset); + if (clip.asset != null) + type = clip.asset.GetType(); + + if (!typeof(IPlayableAsset).IsAssignableFrom(type)) + return GetDefaultClipEditor(); + + return GetEditorForType(type); + } + + public static ClipEditor GetDefaultClipEditor() + { + return SubClassCache.DefaultInstance; + } + + public static TrackEditor GetTrackEditor(TrackAsset track) + { + if (track == null) + throw new ArgumentNullException(nameof(track)); + + return GetEditorForType(track.GetType()); + } + + public static TrackEditor GetDefaultTrackEditor() + { + return SubClassCache.DefaultInstance; + } + + public static MarkerEditor GetMarkerEditor(IMarker marker) + { + if (marker == null) + throw new ArgumentNullException(nameof(marker)); + return GetEditorForType(marker.GetType()); + } + + public static MarkerEditor GetDefaultMarkerEditor() + { + return SubClassCache.DefaultInstance; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/CustomTimelineEditorCache.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/CustomTimelineEditorCache.cs.meta new file mode 100644 index 0000000..03cae8e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/CustomTimelineEditorCache.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fd6ede1d2f47ab146b2ec0a3969a37cc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerEditor.cs new file mode 100644 index 0000000..c0cf995 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerEditor.cs @@ -0,0 +1,209 @@ +using UnityEngine; +using UnityEditor.Timeline; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + /// + /// The flags that indicate the view status of a marker. + /// + [System.Flags] + public enum MarkerUIStates + { + /// + /// No extra state specified. + /// + None = 0, + + /// + /// The marker is selected. + /// + Selected = 1 << 0, + + /// + /// The marker is in a collapsed state. + /// + Collapsed = 1 << 1 + } + + /// + /// The user-defined options for drawing a marker. + /// + public struct MarkerDrawOptions + { + /// + /// The tooltip for the marker. + /// + public string tooltip { get; set; } + + /// + /// Text that indicates if the marker should display an error. + /// + /// + /// If the error text is not empty or null, then the marker displays a warning. The error text is used as the tooltip. + /// + public string errorText { get; set; } + + public override bool Equals(object obj) + { + if (!(obj is MarkerDrawOptions)) + return false; + + return Equals((MarkerDrawOptions)obj); + } + + public bool Equals(MarkerDrawOptions other) + { + return errorText == other.errorText && + tooltip == other.tooltip; + } + + public override int GetHashCode() + { + return HashUtility.CombineHash( + errorText != null ? errorText.GetHashCode() : 0, + tooltip != null ? tooltip.GetHashCode() : 0 + ); + } + + public static bool operator==(MarkerDrawOptions options1, MarkerDrawOptions options2) + { + return options1.Equals(options2); + } + + public static bool operator!=(MarkerDrawOptions options1, MarkerDrawOptions options2) + { + return !options1.Equals(options2); + } + } + + + /// + /// The description of the on-screen area where the marker is drawn. + /// + public struct MarkerOverlayRegion + { + /// + /// The area where the marker is being drawn. + /// + public Rect markerRegion { get; private set; } + + /// + /// TThe area where the overlay is being drawn. + /// + public Rect timelineRegion { get; private set; } + + /// + /// The start time of the visible region of the window. + /// + public double startTime { get; private set; } + + /// + /// The end time of the visible region of the window. + /// + public double endTime { get; private set; } + + /// Constructor + public MarkerOverlayRegion(Rect _markerRegion, Rect _timelineRegion, double _startTime, double _endTime) + { + markerRegion = _markerRegion; + timelineRegion = _timelineRegion; + startTime = _startTime; + endTime = _endTime; + } + + public override bool Equals(object obj) + { + if (!(obj is MarkerOverlayRegion)) + return false; + + return Equals((MarkerOverlayRegion)obj); + } + + public bool Equals(MarkerOverlayRegion other) + { + return markerRegion == other.markerRegion && + timelineRegion == other.timelineRegion && + startTime == other.startTime && + endTime == other.endTime; + } + + public override int GetHashCode() + { + return HashUtility.CombineHash( + markerRegion.GetHashCode(), + timelineRegion.GetHashCode(), + startTime.GetHashCode(), + endTime.GetHashCode() + ); + } + + public static bool operator==(MarkerOverlayRegion region1, MarkerOverlayRegion region2) + { + return region1.Equals(region2); + } + + public static bool operator!=(MarkerOverlayRegion region1, MarkerOverlayRegion region2) + { + return !region1.Equals(region2); + } + } + + /// + /// Use this class to customize marker types in the TimelineEditor. + /// + public class MarkerEditor + { + internal readonly bool supportsDrawOverlay; + + /// + /// Default constructor + /// + public MarkerEditor() + { + supportsDrawOverlay = TypeUtility.HasOverrideMethod(GetType(), nameof(DrawOverlay)); + } + + /// + /// Implement this method to override the default options for drawing a marker. + /// + /// The marker to draw. + /// + public virtual MarkerDrawOptions GetMarkerOptions(IMarker marker) + { + return new MarkerDrawOptions() + { + tooltip = string.Empty, + errorText = string.Empty, + }; + } + + /// + /// Called when a marker is created. + /// + /// The marker that is created. + /// TThe source that the marker was copied from. This can be set to null if the marker is not a copy. + /// + /// The callback occurs before the marker is assigned to the track. + /// + public virtual void OnCreate(IMarker marker, IMarker clonedFrom) + { + } + + /// + /// Draws additional overlays for a marker. + /// + /// The marker to draw. + /// The visual state of the marker. + /// The on-screen area where the marker is being drawn. + /// + /// Notes: + /// * It is only called during TimelineWindow's Repaint step. + /// * If there are multiple markers on top of each other, only the topmost marker receives the DrawOverlay call. + /// + public virtual void DrawOverlay(IMarker marker, MarkerUIStates uiState, MarkerOverlayRegion region) + { + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerEditor.cs.meta new file mode 100644 index 0000000..7cbab44 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 99c5970046bb263469514e56eb6aa519 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerTrackEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerTrackEditor.cs new file mode 100644 index 0000000..e6e06fb --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerTrackEditor.cs @@ -0,0 +1,18 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomTimelineEditor(typeof(MarkerTrack))] + class MarkerTrackEditor : TrackEditor + { + public static readonly float DefaultMarkerTrackHeight = 20; + + public override TrackDrawOptions GetTrackOptions(TrackAsset track, Object binding) + { + var options = base.GetTrackOptions(track, binding); + options.minimumHeight = DefaultMarkerTrackHeight; + return options; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerTrackEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerTrackEditor.cs.meta new file mode 100644 index 0000000..5c4b7a9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/MarkerTrackEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 844873d1afe1c3142ab922324950e1dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/TrackEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/TrackEditor.cs new file mode 100644 index 0000000..cd4f67c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/TrackEditor.cs @@ -0,0 +1,284 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + /// + /// The user-defined options for drawing a track." + /// + public struct TrackDrawOptions + { + /// + /// Text that indicates if the track should display an error. + /// + /// + /// If the error text is not empty or null, then the track displays a warning. The error text is used as the tooltip. + /// + public string errorText { get; set; } + + /// + /// The highlight color of the track. + /// + public Color trackColor { get; set; } + + /// + /// The minimum height of the track. + /// + public float minimumHeight { get; set; } + + /// + /// The icon displayed on the track header. + /// + /// + /// If this value is null, then the default icon for the track is used. + /// + public Texture2D icon { get; set; } + + public override bool Equals(object obj) + { + if (!(obj is TrackDrawOptions)) + return false; + + return Equals((TrackDrawOptions)obj); + } + + public bool Equals(TrackDrawOptions other) + { + return errorText == other.errorText && + trackColor == other.trackColor && + minimumHeight == other.minimumHeight && + icon == other.icon; + } + + public override int GetHashCode() + { + return HashUtility.CombineHash( + errorText != null ? errorText.GetHashCode() : 0, + trackColor.GetHashCode(), + minimumHeight.GetHashCode(), + icon != null ? icon.GetHashCode() : 0 + ); + } + + public static bool operator==(TrackDrawOptions options1, TrackDrawOptions options2) + { + return options1.Equals(options2); + } + + public static bool operator!=(TrackDrawOptions options1, TrackDrawOptions options2) + { + return !options1.Equals(options2); + } + } + + + /// + /// The errors displayed for the track binding. + /// + public enum TrackBindingErrors + { + /// + /// Select no errors. + /// + None = 0, + + /// + /// The bound GameObject is disabled. + /// + BoundGameObjectDisabled = 1 << 0, + + /// + /// The bound GameObject does not have a valid component. + /// + NoValidComponent = 1 << 1, + + /// + /// The bound Object is a disabled Behaviour. + /// + BehaviourIsDisabled = 1 << 2, + + /// + /// The bound Object is not of the correct type. + /// + InvalidBinding = 1 << 3, + + /// + /// The bound Object is part of a prefab, and not an instance. + /// + PrefabBound = 1 << 4, + + /// + /// Select all errors. + /// + All = Int32.MaxValue + } + + /// + /// Use this class to customize track types in the TimelineEditor. + /// + public class TrackEditor + { + static readonly string k_BoundGameObjectDisabled = LocalizationDatabase.GetLocalizedString("The bound GameObject is disabled."); + static readonly string k_NoValidComponent = LocalizationDatabase.GetLocalizedString("Could not find appropriate component on this gameObject"); + static readonly string k_RequiredComponentIsDisabled = LocalizationDatabase.GetLocalizedString("The component is disabled"); + static readonly string k_InvalidBinding = LocalizationDatabase.GetLocalizedString("The bound object is not the correct type."); + static readonly string k_PrefabBound = LocalizationDatabase.GetLocalizedString("The bound object is a Prefab"); + + readonly Dictionary m_BindingCache = new Dictionary(); + + /// + /// The default height of a track. + /// + public static readonly float DefaultTrackHeight = 30.0f; + + /// + /// The minimum unscaled height of a track. + /// + public static readonly float MinimumTrackHeight = 10.0f; + + /// + /// The maximum height of a track. + /// + public static readonly float MaximumTrackHeight = 256.0f; + + /// + /// Implement this method to override the default options for drawing a track. + /// + /// The track from which track options are retrieved. + /// The binding for the track. + /// The options for drawing the track. + public virtual TrackDrawOptions GetTrackOptions(TrackAsset track, UnityEngine.Object binding) + { + return new TrackDrawOptions() + { + errorText = GetErrorText(track, binding, TrackBindingErrors.All), + minimumHeight = DefaultTrackHeight, + trackColor = GetTrackColor(track), + icon = null + }; + } + + /// + /// Gets the error text for the specified track. + /// + /// The track to retrieve options for. + /// The binding for the track. + /// The errors to check for. + /// An error to be displayed on the track, or string.Empty if there is no error. + public string GetErrorText(TrackAsset track, UnityEngine.Object boundObject, TrackBindingErrors detectErrors) + { + if (track == null || boundObject == null) + return string.Empty; + + var bindingType = GetBindingType(track); + if (bindingType != null) + { + // bound to a prefab asset + if (HasFlag(detectErrors, TrackBindingErrors.PrefabBound) && PrefabUtility.IsPartOfPrefabAsset(boundObject)) + { + return k_PrefabBound; + } + + // If we are a component, allow for bound game objects (legacy) + if (typeof(Component).IsAssignableFrom(bindingType)) + { + var gameObject = boundObject as GameObject; + var component = boundObject as Component; + if (component != null) + gameObject = component.gameObject; + + // game object is bound with no component + if (HasFlag(detectErrors, TrackBindingErrors.NoValidComponent) && gameObject != null && component == null) + { + component = gameObject.GetComponent(bindingType); + if (component == null) + { + return k_NoValidComponent; + } + } + + // attached gameObject is disables (ignores Activation Track) + if (HasFlag(detectErrors, TrackBindingErrors.BoundGameObjectDisabled) && gameObject != null && !gameObject.activeInHierarchy) + { + return k_BoundGameObjectDisabled; + } + + // component is disabled + var behaviour = component as Behaviour; + if (HasFlag(detectErrors, TrackBindingErrors.BehaviourIsDisabled) && behaviour != null && !behaviour.enabled) + { + return k_RequiredComponentIsDisabled; + } + + // mismatched binding + if (HasFlag(detectErrors, TrackBindingErrors.InvalidBinding) && component != null && !bindingType.IsAssignableFrom(component.GetType())) + { + return k_InvalidBinding; + } + } + // Mismatched binding (non-component) + else if (HasFlag(detectErrors, TrackBindingErrors.InvalidBinding) && !bindingType.IsAssignableFrom(boundObject.GetType())) + { + return k_InvalidBinding; + } + } + + return string.Empty; + } + + /// + /// Gets the color information of a track. + /// + /// + /// Returns the color for the specified track. + public Color GetTrackColor(TrackAsset track) + { + return TrackResourceCache.GetTrackColor(track); + } + + /// + /// Gets the binding type for a track. + /// + /// The track to retrieve the binding type from. + /// Returns the binding type for the specified track. Returns null if the track does not have binding. + public System.Type GetBindingType(TrackAsset track) + { + if (track == null) + return null; + + System.Type result = null; + if (m_BindingCache.TryGetValue(track, out result)) + return result; + + result = track.outputs.Select(x => x.outputTargetType).FirstOrDefault(); + m_BindingCache[track] = result; + return result; + } + + /// + /// Callback for when a track is created. + /// + /// The track that is created. + /// The source that the track is copied from. This can be set to null if the track is not a copy. + public virtual void OnCreate(TrackAsset track, TrackAsset copiedFrom) + { + } + + /// + /// Callback for when a track is changed. + /// + /// The track that is changed. + public virtual void OnTrackChanged(TrackAsset track) + { + } + + private static bool HasFlag(TrackBindingErrors errors, TrackBindingErrors flag) + { + return (errors & flag) != 0; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/TrackEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/TrackEditor.cs.meta new file mode 100644 index 0000000..a7ae571 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/CustomEditors/TrackEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 35cb34351b19cf44ba78afbd58746610 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorNamedColor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorNamedColor.cs new file mode 100644 index 0000000..0f08c04 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorNamedColor.cs @@ -0,0 +1,288 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Reflection; +using System.Text; +using UnityEditor.Timeline; + +namespace UnityEngine.Timeline +{ + [Serializable] + class DirectorNamedColor : ScriptableObject + { + [SerializeField] + public Color colorPlayhead; + + [SerializeField] + public Color colorSelection; + + [SerializeField] + public Color colorEndmarker; + + [SerializeField] + public Color colorGroup; + + [SerializeField] + public Color colorGroupTrackBackground; + + [SerializeField] + public Color colorAnimation; + + [SerializeField] + public Color colorAnimationRecorded; + + [SerializeField] + public Color colorAudio; + + [SerializeField] + public Color colorAudioWaveform; + + [SerializeField] + public Color colorActivation; + + [SerializeField] + public Color colorDropTarget; + + [SerializeField] + public Color colorClipFont; + + [SerializeField] + public Color colorInvalidClipOverlay; + + [SerializeField] + public Color colorTrackBackground; + + [SerializeField] + public Color colorTrackHeaderBackground; + + [SerializeField] + public Color colorTrackDarken; + + [SerializeField] + public Color colorTrackBackgroundRecording; + + [SerializeField] + public Color colorInfiniteTrackBackgroundRecording; + + [SerializeField] + public Color colorTrackBackgroundSelected; + + [SerializeField] + public Color colorTrackFont; + + [SerializeField] + public Color colorClipUnion; + + [SerializeField] + public Color colorTopOutline3; + + [SerializeField] + public Color colorDurationLine; + + [SerializeField] + public Color colorRange; + + [SerializeField] + public Color colorSequenceBackground; + + [SerializeField] + public Color colorTooltipBackground; + + [SerializeField] + public Color colorInfiniteClipLine; + + [SerializeField] + public Color colorDefaultTrackDrawer; + + [SerializeField] + public Color colorDuration = new Color(0.66f, 0.66f, 0.66f, 1.0f); + + [SerializeField] + public Color colorRecordingClipOutline = new Color(1, 0, 0, 0.9f); + + [SerializeField] + public Color colorAnimEditorBinding = new Color(54.0f / 255.0f, 54.0f / 255.0f, 54.0f / 255.0f); + + [SerializeField] + public Color colorTimelineBackground = new Color(0.2f, 0.2f, 0.2f, 1.0f); + + [SerializeField] + public Color colorLockTextBG = Color.red; + + [SerializeField] + public Color colorInlineCurveVerticalLines = new Color(1.0f, 1.0f, 1.0f, 0.2f); + + [SerializeField] + public Color colorInlineCurveOutOfRangeOverlay = new Color(0.0f, 0.0f, 0.0f, 0.5f); + + [SerializeField] + public Color colorInlineCurvesBackground; + + [SerializeField] + public Color markerDrawerBackgroundColor = new Color(0.4f, 0.4f, 0.4f , 1.0f); + + [SerializeField] + public Color markerHeaderDrawerBackgroundColor = new Color(0.5f, 0.5f, 0.5f , 1.0f); + + [SerializeField] + public Color colorControl = new Color(0.2313f, 0.6353f, 0.5843f, 1.0f); + + [SerializeField] + public Color colorSubSequenceBackground = new Color(0.1294118f, 0.1764706f, 0.1764706f, 1.0f); + + [SerializeField] + public Color colorTrackSubSequenceBackground = new Color(0.1607843f, 0.2156863f, 0.2156863f, 1.0f); + + [SerializeField] + public Color colorTrackSubSequenceBackgroundSelected = new Color(0.0726923f, 0.252f, 0.252f, 1.0f); + + [SerializeField] + public Color colorSubSequenceOverlay = new Color(0.02f, 0.025f, 0.025f, 0.30f); + + [SerializeField] + public Color colorSubSequenceDurationLine = new Color(0.0f, 1.0f, 0.88f, 0.46f); + + [SerializeField] + public Color clipBckg = new Color(0.5f, 0.5f, 0.5f, 1.0f); + + [SerializeField] + public Color clipSelectedBckg = new Color(0.7f, 0.7f, 0.7f, 1.0f); + + [SerializeField] + public Color clipBorderColor = new Color(0.4f, 0.4f, 0.4f, 1.0f); + + [SerializeField] + public Color clipEaseBckgColor = new Color(0.4f, 0.4f, 0.4f, 1.0f); + + [SerializeField] + public Color clipBlendIn; + + [SerializeField] + public Color clipBlendInSelected; + + [SerializeField] + public Color clipBlendOut; + + [SerializeField] + public Color clipBlendOutSelected; + + public void SetDefault() + { + colorPlayhead = DirectorStyles.Instance.timeCursor.normal.textColor; + colorSelection = DirectorStyles.Instance.selectedStyle.normal.textColor; + colorEndmarker = DirectorStyles.Instance.endmarker.normal.textColor; + + colorGroup = new Color(0.094f, 0.357f, 0.384f, 0.310f); + colorGroupTrackBackground = new Color(0f, 0f, 0f, 1f); + colorAnimation = new Color(0.3f, 0.39f, 0.46f, 1.0f); + colorAnimationRecorded = new Color(colorAnimation.r * 0.75f, colorAnimation.g * 0.75f, colorAnimation.b * 0.75f, 1.0f); + colorAudio = new Color(1f, 0.635f, 0f); + colorAudioWaveform = new Color(0.129f, 0.164f, 0.254f); + colorActivation = Color.green; + + colorDropTarget = new Color(0.514f, 0.627f, 0.827f); + colorClipFont = DirectorStyles.Instance.fontClip.normal.textColor; + colorTrackBackground = new Color(0.2f, 0.2f, 0.2f, 1.0f); + colorTrackBackgroundSelected = new Color(1f, 1f, 1f, 0.33f); + + colorInlineCurvesBackground = new Color(0.25f, 0.25f, 0.25f, 0.6f); + + colorTrackFont = DirectorStyles.Instance.trackHeaderFont.normal.textColor; + + colorClipUnion = new Color(0.72f, 0.72f, 0.72f, 0.8f); + colorTopOutline3 = new Color(0.274f, 0.274f, 0.274f, 1.0f); + + colorDurationLine = new Color(33.0f / 255.0f, 109.0f / 255.0f, 120.0f / 255.0f); + + colorRange = new Color(0.733f, 0.733f, 0.733f, 0.70f); + + colorSequenceBackground = new Color(0.16f, 0.16f, 0.16f, 1.0f); + + colorTooltipBackground = new Color(29.0f / 255.0f, 32.0f / 255.0f, 33.0f / 255.0f); + + colorInfiniteClipLine = new Color(72.0f / 255.0f, 78.0f / 255.0f, 82.0f / 255.0f); + + colorTrackBackgroundRecording = new Color(1, 0, 0, 0.1f); + + colorTrackDarken = new Color(0.0f, 0.0f, 0.0f, 0.4f); + + colorTrackHeaderBackground = new Color(51.0f / 255.0f, 51.0f / 255.0f, 51.0f / 255.0f, 1.0f); + + colorDefaultTrackDrawer = new Color(218.0f / 255.0f, 220.0f / 255.0f, 222.0f / 255.0f); + + colorRecordingClipOutline = new Color(1, 0, 0, 0.9f); + colorInlineCurveVerticalLines = new Color(1.0f, 1.0f, 1.0f, 0.2f); + colorInlineCurveOutOfRangeOverlay = new Color(0.0f, 0.0f, 0.0f, 0.5f); + } + + public void ToText(string path) + { + StringBuilder builder = new StringBuilder(); + + var fields = GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly); + foreach (var f in fields) + { + if (f.FieldType != typeof(Color)) + continue; + + Color c = (Color)f.GetValue(this); + builder.Append(f.Name + "," + c); + builder.Append("\n"); + } + File.WriteAllText(path, builder.ToString()); + } + + public void FromText(string text) + { + // parse to a map + string[] lines = text.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries); + var map = new Dictionary(); + foreach (var line in lines) + { + var pieces = line.Replace("RGBA(", "").Replace(")", "").Split(','); + if (pieces.Length == 5) + { + string name = pieces[0].Trim(); + Color c = Color.black; + bool b = ParseFloat(pieces[1], out c.r) && + ParseFloat(pieces[2], out c.g) && + ParseFloat(pieces[3], out c.b) && + ParseFloat(pieces[4], out c.a); + + if (b) + { + map[name] = c; + } + } + } + + var fields = typeof(DirectorNamedColor).GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly); + foreach (var f in fields) + { + if (f.FieldType != typeof(Color)) + continue; + + Color c = Color.black; + if (map.TryGetValue(f.Name, out c)) + { + f.SetValue(this, c); + } + } + } + + // Case 938534 - Timeline window has white background when running on .NET 4.6 depending on the set system language + // Make sure we're using an invariant culture so "0.35" is parsed as 0.35 and not 35 + static bool ParseFloat(string str, out float f) + { + return float.TryParse(str, NumberStyles.Any, CultureInfo.InvariantCulture, out f); + } + + public static DirectorNamedColor CreateAndLoadFromText(string text) + { + DirectorNamedColor instance = CreateInstance(); + instance.FromText(text); + return instance; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorNamedColor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorNamedColor.cs.meta new file mode 100644 index 0000000..4ea6baf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorNamedColor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7116e04a377b195458798657c617e324 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorStyles.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorStyles.cs new file mode 100644 index 0000000..da3823e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorStyles.cs @@ -0,0 +1,362 @@ +using UnityEditor.Experimental; +using UnityEditor.StyleSheets; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class DirectorStyles + { + const string k_Elipsis = "…"; + const string k_ImagePath = "Packages/com.unity.timeline/Editor/StyleSheets/Images/Icons/{0}.png"; + public const string resourcesPath = "Packages/com.unity.timeline/Editor/StyleSheets/res/"; + + //Timeline resources + public static readonly GUIContent referenceTrackLabel = TrTextContent("R", "This track references an external asset"); + public static readonly GUIContent recordingLabel = TrTextContent("Recording..."); + public static readonly GUIContent noTimelineAssetSelected = TrTextContent("To start creating a timeline, select a GameObject"); + public static readonly GUIContent createTimelineOnSelection = TrTextContent("To begin a new timeline with {0}, create {1}"); + public static readonly GUIContent noTimelinesInScene = TrTextContent("No timeline found in the scene"); + public static readonly GUIContent createNewTimelineText = TrTextContent("Create a new Timeline and Director Component for Game Object"); + public static readonly GUIContent previewContent = TrTextContent("Preview", "Enable/disable scene preview mode"); + public static readonly GUIContent mixOff = TrIconContent("TimelineEditModeMixOFF", "Mix Mode (1)"); + public static readonly GUIContent mixOn = TrIconContent("TimelineEditModeMixON", "Mix Mode (1)"); + public static readonly GUIContent rippleOff = TrIconContent("TimelineEditModeRippleOFF", "Ripple Mode (2)"); + public static readonly GUIContent rippleOn = TrIconContent("TimelineEditModeRippleON", "Ripple Mode (2)"); + public static readonly GUIContent replaceOff = TrIconContent("TimelineEditModeReplaceOFF", "Replace Mode (3)"); + public static readonly GUIContent replaceOn = TrIconContent("TimelineEditModeReplaceON", "Replace Mode (3)"); + public static readonly GUIContent showMarkersOn = TrIconContent("TimelineMarkerAreaButtonEnabled", "Show / Hide Timeline Markers"); + public static readonly GUIContent showMarkersOff = TrIconContent("TimelineMarkerAreaButtonDisabled", "Show / Hide Timeline Markers"); + public static readonly GUIContent showMarkersOnTimeline = TrTextContent("Show markers"); + public static readonly GUIContent timelineMarkerTrackHeader = TrTextContentWithIcon("Markers", string.Empty, "TimelineHeaderMarkerIcon"); + public static readonly GUIContent markerCollapseButton = TrTextContent(string.Empty, "Expand / Collapse Track Markers"); + public static readonly GUIContent signalTrackIcon = IconContent("TimelineSignal"); + + //Unity Default Resources + public static readonly GUIContent playContent = EditorGUIUtility.TrIconContent("Animation.Play", "Play the timeline (Space)"); + public static readonly GUIContent gotoBeginingContent = EditorGUIUtility.TrIconContent("Animation.FirstKey", "Go to the beginning of the timeline (Shift+<)"); + public static readonly GUIContent gotoEndContent = EditorGUIUtility.TrIconContent("Animation.LastKey", "Go to the end of the timeline (Shift+>)"); + public static readonly GUIContent nextFrameContent = EditorGUIUtility.TrIconContent("Animation.NextKey", "Go to the next frame"); + public static readonly GUIContent previousFrameContent = EditorGUIUtility.TrIconContent("Animation.PrevKey", "Go to the previous frame"); + public static readonly GUIContent newContent = EditorGUIUtility.IconContent("CreateAddNew", "Add new tracks."); + public static readonly GUIContent optionsCogIcon = EditorGUIUtility.TrIconContent("_Popup", "Options"); + public static readonly GUIContent animationTrackIcon = EditorGUIUtility.IconContent("AnimationClip Icon"); + public static readonly GUIContent audioTrackIcon = EditorGUIUtility.IconContent("AudioSource Icon"); + public static readonly GUIContent playableTrackIcon = EditorGUIUtility.IconContent("cs Script Icon"); + public static readonly GUIContent timelineSelectorArrow = EditorGUIUtility.TrIconContent("icon dropdown", "Timeline Selector"); + + public GUIContent playrangeContent; + + public static readonly float kBaseIndent = 15.0f; + public static readonly float kDurationGuiThickness = 5.0f; + + // matches dark skin warning color. + public static readonly Color kClipErrorColor = new Color(0.957f, 0.737f, 0.008f, 1f); + + // TODO: Make skinnable? If we do, we should probably also make the associated cursors skinnable... + public static readonly Color kMixToolColor = Color.white; + public static readonly Color kRippleToolColor = new Color(255f / 255f, 210f / 255f, 51f / 255f); + public static readonly Color kReplaceToolColor = new Color(165f / 255f, 30f / 255f, 30f / 255f); + + public const string markerDefaultStyle = "MarkerItem"; + + public GUIStyle groupBackground; + public GUIStyle displayBackground; + public GUIStyle fontClip; + public GUIStyle fontClipLoop; + public GUIStyle trackHeaderFont; + public GUIStyle trackGroupAddButton; + public GUIStyle groupFont; + public GUIStyle timeCursor; + public GUIStyle endmarker; + public GUIStyle tinyFont; + public GUIStyle foldout; + public GUIStyle mute; + public GUIStyle locked; + public GUIStyle autoKey; + public GUIStyle playTimeRangeStart; + public GUIStyle playTimeRangeEnd; + public GUIStyle selectedStyle; + public GUIStyle trackSwatchStyle; + public GUIStyle connector; + public GUIStyle keyframe; + public GUIStyle warning; + public GUIStyle extrapolationHold; + public GUIStyle extrapolationLoop; + public GUIStyle extrapolationPingPong; + public GUIStyle extrapolationContinue; + public GUIStyle collapseMarkers; + public GUIStyle markerMultiOverlay; + public GUIStyle bottomShadow; + public GUIStyle trackOptions; + public GUIStyle infiniteTrack; + public GUIStyle clipOut; + public GUIStyle clipIn; + public GUIStyle curves; + public GUIStyle lockedBG; + public GUIStyle activation; + public GUIStyle playrange; + public GUIStyle lockButton; + public GUIStyle avatarMaskOn; + public GUIStyle avatarMaskOff; + public GUIStyle markerWarning; + public GUIStyle editModeBtn; + public GUIStyle showMarkersBtn; + public GUIStyle sequenceSwitcher; + + static internal DirectorStyles s_Instance; + + DirectorNamedColor m_DarkSkinColors; + DirectorNamedColor m_LightSkinColors; + DirectorNamedColor m_DefaultSkinColors; + + const string k_DarkSkinPath = resourcesPath + "Timeline_DarkSkin.txt"; + const string k_LightSkinPath = resourcesPath + "Timeline_LightSkin.txt"; + + static readonly GUIContent s_TempContent = new GUIContent(); + + public static bool IsInitialized + { + get { return s_Instance != null; } + } + + public static DirectorStyles Instance + { + get + { + if (s_Instance == null) + { + s_Instance = new DirectorStyles(); + s_Instance.Initialize(); + } + + return s_Instance; + } + } + + public static void ReloadStylesIfNeeded() + { + if (Instance.ShouldLoadStyles()) + { + Instance.LoadStyles(); + if (!Instance.ShouldLoadStyles()) + Instance.Initialize(); + } + } + + public DirectorNamedColor customSkin + { + get { return EditorGUIUtility.isProSkin ? m_DarkSkinColors : m_LightSkinColors; } + internal set + { + if (EditorGUIUtility.isProSkin) + m_DarkSkinColors = value; + else + m_LightSkinColors = value; + } + } + + DirectorNamedColor LoadColorSkin(string path) + { + var asset = EditorGUIUtility.LoadRequired(path) as TextAsset; + + if (asset != null && !string.IsNullOrEmpty(asset.text)) + { + return DirectorNamedColor.CreateAndLoadFromText(asset.text); + } + + return m_DefaultSkinColors; + } + + static DirectorNamedColor CreateDefaultSkin() + { + var nc = ScriptableObject.CreateInstance(); + nc.SetDefault(); + return nc; + } + + public void ExportSkinToFile() + { + if (customSkin == m_DarkSkinColors) + customSkin.ToText(k_DarkSkinPath); + + if (customSkin == m_LightSkinColors) + customSkin.ToText(k_LightSkinPath); + } + + public void ReloadSkin() + { + if (customSkin == m_DarkSkinColors) + { + m_DarkSkinColors = LoadColorSkin(k_DarkSkinPath); + } + else if (customSkin == m_LightSkinColors) + { + m_LightSkinColors = LoadColorSkin(k_LightSkinPath); + } + } + + public void Initialize() + { + m_DefaultSkinColors = CreateDefaultSkin(); + m_DarkSkinColors = LoadColorSkin(k_DarkSkinPath); + m_LightSkinColors = LoadColorSkin(k_LightSkinPath); + + // add the built in colors (control track uses attribute) + TrackResourceCache.ClearTrackColorCache(); + TrackResourceCache.SetTrackColor(customSkin.colorAnimation); + TrackResourceCache.SetTrackColor(Color.white); + TrackResourceCache.SetTrackColor(customSkin.colorAudio); + TrackResourceCache.SetTrackColor(customSkin.colorActivation); + TrackResourceCache.SetTrackColor(customSkin.colorGroup); + TrackResourceCache.SetTrackColor(customSkin.colorControl); + + // add default icons + TrackResourceCache.ClearTrackIconCache(); + TrackResourceCache.SetTrackIcon(animationTrackIcon); + TrackResourceCache.SetTrackIcon(audioTrackIcon); + TrackResourceCache.SetTrackIcon(playableTrackIcon); + TrackResourceCache.SetTrackIcon(new GUIContent(GetBackgroundImage(activation))); + TrackResourceCache.SetTrackIcon(signalTrackIcon); + } + + DirectorStyles() + { + LoadStyles(); + } + + bool ShouldLoadStyles() + { + return endmarker == null || + endmarker.name == GUISkin.error.name; + } + + void LoadStyles() + { + endmarker = GetGUIStyle("Icon-Endmarker"); + groupBackground = GetGUIStyle("groupBackground"); + displayBackground = GetGUIStyle("sequenceClip"); + fontClip = GetGUIStyle("Font-Clip"); + trackHeaderFont = GetGUIStyle("sequenceTrackHeaderFont"); + trackGroupAddButton = GetGUIStyle("sequenceTrackGroupAddButton"); + groupFont = GetGUIStyle("sequenceGroupFont"); + timeCursor = GetGUIStyle("Icon-TimeCursor"); + tinyFont = GetGUIStyle("tinyFont"); + foldout = GetGUIStyle("Icon-Foldout"); + mute = GetGUIStyle("Icon-Mute"); + locked = GetGUIStyle("Icon-Locked"); + autoKey = GetGUIStyle("Icon-AutoKey"); + playTimeRangeStart = GetGUIStyle("Icon-PlayAreaStart"); + playTimeRangeEnd = GetGUIStyle("Icon-PlayAreaEnd"); + selectedStyle = GetGUIStyle("Color-Selected"); + trackSwatchStyle = GetGUIStyle("Icon-TrackHeaderSwatch"); + connector = GetGUIStyle("Icon-Connector"); + keyframe = GetGUIStyle("Icon-Keyframe"); + warning = GetGUIStyle("Icon-Warning"); + extrapolationHold = GetGUIStyle("Icon-ExtrapolationHold"); + extrapolationLoop = GetGUIStyle("Icon-ExtrapolationLoop"); + extrapolationPingPong = GetGUIStyle("Icon-ExtrapolationPingPong"); + extrapolationContinue = GetGUIStyle("Icon-ExtrapolationContinue"); + bottomShadow = GetGUIStyle("Icon-Shadow"); + trackOptions = GetGUIStyle("Icon-TrackOptions"); + infiniteTrack = GetGUIStyle("Icon-InfiniteTrack"); + clipOut = GetGUIStyle("Icon-ClipOut"); + clipIn = GetGUIStyle("Icon-ClipIn"); + curves = GetGUIStyle("Icon-Curves"); + lockedBG = GetGUIStyle("Icon-LockedBG"); + activation = GetGUIStyle("Icon-Activation"); + playrange = GetGUIStyle("Icon-Playrange"); + lockButton = GetGUIStyle("IN LockButton"); + avatarMaskOn = GetGUIStyle("Icon-AvatarMaskOn"); + avatarMaskOff = GetGUIStyle("Icon-AvatarMaskOff"); + collapseMarkers = GetGUIStyle("TrackCollapseMarkerButton"); + markerMultiOverlay = GetGUIStyle("MarkerMultiOverlay"); + editModeBtn = GetGUIStyle("editModeBtn"); + showMarkersBtn = GetGUIStyle("showMarkerBtn"); + markerWarning = GetGUIStyle("markerWarningOverlay"); + sequenceSwitcher = GetGUIStyle("sequenceSwitcher"); + + playrangeContent = new GUIContent(GetBackgroundImage(playrange)) { tooltip = "Toggle play range markers." }; + + fontClipLoop = new GUIStyle(fontClip) { fontStyle = FontStyle.Bold }; + } + + public static GUIStyle GetGUIStyle(string s) + { + return EditorStyles.FromUSS(s); + } + + public static GUIContent TrIconContent(string iconName, string tooltip = null) + { + return EditorGUIUtility.TrIconContent(iconName == null ? null : ResolveIcon(iconName), tooltip); + } + + public static GUIContent IconContent(string iconName) + { + return EditorGUIUtility.IconContent(iconName == null ? null : ResolveIcon(iconName)); + } + + public static GUIContent TrTextContentWithIcon(string text, string tooltip, string iconName) + { + return EditorGUIUtility.TrTextContentWithIcon(text, tooltip, iconName == null ? null : ResolveIcon(iconName)); + } + + public static GUIContent TrTextContent(string text, string tooltip = null) + { + return EditorGUIUtility.TrTextContent(text, tooltip); + } + + public static Texture2D LoadIcon(string iconName) + { + return EditorGUIUtility.LoadIconRequired(iconName == null ? null : ResolveIcon(iconName)); + } + + static string ResolveIcon(string icon) + { + return string.Format(k_ImagePath, icon); + } + + public static string Elipsify(string label, Rect rect, GUIStyle style) + { + var ret = label; + + if (label.Length == 0) + return ret; + + s_TempContent.text = label; + float neededWidth = style.CalcSize(s_TempContent).x; + + return Elipsify(label, rect.width, neededWidth); + } + + public static string Elipsify(string label, float destinationWidth, float neededWidth) + { + var ret = label; + + if (label.Length == 0) + return ret; + + if (destinationWidth < neededWidth) + { + float averageWidthOfOneChar = neededWidth / label.Length; + int floor = Mathf.Max((int)Mathf.Floor(destinationWidth / averageWidthOfOneChar), 0); + + if (floor < k_Elipsis.Length) + ret = string.Empty; + else if (floor == k_Elipsis.Length) + ret = k_Elipsis; + else if (floor < label.Length) + ret = label.Substring(0, floor - k_Elipsis.Length) + k_Elipsis; + } + + return ret; + } + + public static Texture2D GetBackgroundImage(GUIStyle style, StyleState state = StyleState.normal) + { + var blockName = GUIStyleExtensions.StyleNameToBlockName(style.name, false); + var styleBlock = EditorResources.GetStyle(blockName, state); + return styleBlock.GetTexture(StyleCatalogKeyword.backgroundImage); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorStyles.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorStyles.cs.meta new file mode 100644 index 0000000..22f86b1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/DirectorStyles.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d7b5b883d3aae8d479647d5ae6182974 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions.meta new file mode 100644 index 0000000..6018dab --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f601c0d674119f74db9c15166b3a58c4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimatedParameterExtensions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimatedParameterExtensions.cs new file mode 100644 index 0000000..06f5e47 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimatedParameterExtensions.cs @@ -0,0 +1,150 @@ +using System.Collections.Generic; +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class AnimatedParameterExtensions + { + public static bool HasAnyAnimatableParameters(this ICurvesOwner curvesOwner) + { + return AnimatedParameterUtility.HasAnyAnimatableParameters(curvesOwner.asset); + } + + public static IEnumerable GetAllAnimatableParameters(this ICurvesOwner curvesOwner) + { + return AnimatedParameterUtility.GetAllAnimatableParameters(curvesOwner.asset); + } + + public static bool IsParameterAnimatable(this ICurvesOwner curvesOwner, string parameterName) + { + return AnimatedParameterUtility.IsParameterAnimatable(curvesOwner.asset, parameterName); + } + + public static bool IsParameterAnimated(this ICurvesOwner curvesOwner, string parameterName) + { + return AnimatedParameterUtility.IsParameterAnimated(curvesOwner.asset, curvesOwner.curves, parameterName); + } + + public static EditorCurveBinding GetCurveBinding(this ICurvesOwner curvesOwner, string parameterName) + { + return AnimatedParameterUtility.GetCurveBinding(curvesOwner.asset, parameterName); + } + + public static string GetUniqueRecordedClipName(this ICurvesOwner curvesOwner) + { + return AnimationTrackRecorder.GetUniqueRecordedClipName(curvesOwner.assetOwner, curvesOwner.defaultCurvesName); + } + + public static AnimationCurve GetAnimatedParameter(this ICurvesOwner curvesOwner, string bindingName) + { + return AnimatedParameterUtility.GetAnimatedParameter(curvesOwner.asset, curvesOwner.curves, bindingName); + } + + public static bool AddAnimatedParameterValueAt(this ICurvesOwner curvesOwner, string parameterName, float value, float time) + { + if (!curvesOwner.IsParameterAnimatable(parameterName)) + return false; + + if (curvesOwner.curves == null) + curvesOwner.CreateCurves(curvesOwner.GetUniqueRecordedClipName()); + + var binding = curvesOwner.GetCurveBinding(parameterName); + var curve = AnimationUtility.GetEditorCurve(curvesOwner.curves, binding) ?? new AnimationCurve(); + + var serializedObject = AnimatedParameterUtility.GetSerializedPlayableAsset(curvesOwner.asset); + var property = serializedObject.FindProperty(parameterName); + + bool isStepped = property.propertyType == SerializedPropertyType.Boolean || + property.propertyType == SerializedPropertyType.Integer || + property.propertyType == SerializedPropertyType.Enum; + + CurveEditUtility.AddKeyFrameToCurve(curve, time, curvesOwner.curves.frameRate, value, isStepped); + AnimationUtility.SetEditorCurve(curvesOwner.curves, binding, curve); + + return true; + } + + public static void SanitizeCurvesData(this ICurvesOwner curvesOwner) + { + var curves = curvesOwner.curves; + if (curves == null) + return; + + // Remove any 0-length curves + foreach (var binding in AnimationUtility.GetCurveBindings(curves)) + { + var curve = AnimationUtility.GetEditorCurve(curves, binding); + if (curve.length == 0) + AnimationUtility.SetEditorCurve(curves, binding, null); + } + + // If no curves remain, delete the curves asset + if (curves.empty) + { + var track = curvesOwner.targetTrack; + var timeline = track != null ? track.timelineAsset : null; + TimelineUndo.PushDestroyUndo(timeline, track, curves, "Delete Parameter Curves"); + } + } + + public static bool AddAnimatedParameter(this ICurvesOwner curvesOwner, string parameterName) + { + var newBinding = new EditorCurveBinding(); + + SerializedProperty property; + if (!InternalAddParameter(curvesOwner, parameterName, ref newBinding, out property)) + return false; + + var duration = (float)curvesOwner.duration; + CurveEditUtility.AddKey(curvesOwner.curves, newBinding, property, 0); + CurveEditUtility.AddKey(curvesOwner.curves, newBinding, property, duration); + return true; + } + + public static bool RemoveAnimatedParameter(this ICurvesOwner curvesOwner, string parameterName) + { + if (!curvesOwner.IsParameterAnimated(parameterName) || curvesOwner.curves == null) + return false; + + var binding = curvesOwner.GetCurveBinding(parameterName); + AnimationUtility.SetEditorCurve(curvesOwner.curves, binding, null); + return true; + } + + // Set an animated parameter. Requires the field identifier 'position.x', but will add default curves to all fields + public static bool SetAnimatedParameter(this ICurvesOwner curvesOwner, string parameterName, AnimationCurve curve) + { + // this will add a basic curve for all the related parameters + if (!curvesOwner.IsParameterAnimated(parameterName) && !curvesOwner.AddAnimatedParameter(parameterName)) + return false; + + var binding = curvesOwner.GetCurveBinding(parameterName); + AnimationUtility.SetEditorCurve(curvesOwner.curves, binding, curve); + return true; + } + + static bool InternalAddParameter([NotNull] ICurvesOwner curvesOwner, string parameterName, ref EditorCurveBinding binding, out SerializedProperty property) + { + property = null; + + if (curvesOwner.IsParameterAnimated(parameterName)) + return false; + + var serializedObject = AnimatedParameterUtility.GetSerializedPlayableAsset(curvesOwner.asset); + if (serializedObject == null) + return false; + + property = serializedObject.FindProperty(parameterName); + if (property == null || !AnimatedParameterUtility.IsTypeAnimatable(property.propertyType)) + return false; + + if (curvesOwner.curves == null) + curvesOwner.CreateCurves(curvesOwner.GetUniqueRecordedClipName()); + + binding = curvesOwner.GetCurveBinding(parameterName); + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimatedParameterExtensions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimatedParameterExtensions.cs.meta new file mode 100644 index 0000000..21de3d3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimatedParameterExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7d3aa106cfe752241997b3759bf80163 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimationTrackExtensions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimationTrackExtensions.cs new file mode 100644 index 0000000..41677ec --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimationTrackExtensions.cs @@ -0,0 +1,134 @@ +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class AnimationTrackExtensions + { + public static void ConvertToClipMode(this AnimationTrack track) + { + if (!track.CanConvertToClipMode()) + return; + + TimelineUndo.PushUndo(track, "Convert To Clip"); + + if (!track.infiniteClip.empty) + { + var animClip = track.infiniteClip; + TimelineUndo.PushUndo(animClip, "Convert To Clip"); + TimelineUndo.PushUndo(track, "Convert To Clip"); + var start = AnimationClipCurveCache.Instance.GetCurveInfo(animClip).keyTimes.FirstOrDefault(); + animClip.ShiftBySeconds(-start); + + track.infiniteClip = null; + var clip = track.CreateClip(animClip); + + clip.start = start; + clip.preExtrapolationMode = track.infiniteClipPreExtrapolation; + clip.postExtrapolationMode = track.infiniteClipPostExtrapolation; + clip.recordable = true; + if (Mathf.Abs(animClip.length) < TimelineClip.kMinDuration) + { + clip.duration = 1; + } + + var animationAsset = clip.asset as AnimationPlayableAsset; + if (animationAsset) + { + animationAsset.position = track.infiniteClipOffsetPosition; + animationAsset.eulerAngles = track.infiniteClipOffsetEulerAngles; + + // going to / from infinite mode should reset this. infinite mode + animationAsset.removeStartOffset = track.infiniteClipRemoveOffset; + animationAsset.applyFootIK = track.infiniteClipApplyFootIK; + animationAsset.loop = track.infiniteClipLoop; + + track.infiniteClipOffsetPosition = Vector3.zero; + track.infiniteClipOffsetEulerAngles = Vector3.zero; + } + + track.CalculateExtrapolationTimes(); + } + + track.infiniteClip = null; + + EditorUtility.SetDirty(track); + } + + public static void ConvertFromClipMode(this AnimationTrack track, TimelineAsset timeline) + { + if (!track.CanConvertFromClipMode()) + return; + + TimelineUndo.PushUndo(track, "Convert From Clip"); + + var clip = track.clips[0]; + var delta = (float)clip.start; + track.infiniteClipTimeOffset = 0.0f; + track.infiniteClipPreExtrapolation = clip.preExtrapolationMode; + track.infiniteClipPostExtrapolation = clip.postExtrapolationMode; + + var animAsset = clip.asset as AnimationPlayableAsset; + if (animAsset) + { + track.infiniteClipOffsetPosition = animAsset.position; + track.infiniteClipOffsetEulerAngles = animAsset.eulerAngles; + track.infiniteClipRemoveOffset = animAsset.removeStartOffset; + track.infiniteClipApplyFootIK = animAsset.applyFootIK; + track.infiniteClipLoop = animAsset.loop; + } + + // clone it, it may not be in the same asset + var animClip = clip.animationClip; + + float scale = (float)clip.timeScale; + if (!Mathf.Approximately(scale, 1.0f)) + { + if (!Mathf.Approximately(scale, 0.0f)) + scale = 1.0f / scale; + animClip.ScaleTime(scale); + } + + TimelineUndo.PushUndo(animClip, "Convert From Clip"); + animClip.ShiftBySeconds(delta); + + // manually delete the clip + var asset = clip.asset; + clip.asset = null; + + // Remove the clip, remove old assets + ClipModifier.Delete(timeline, clip); + TimelineUndo.PushDestroyUndo(null, track, asset, "Convert From Clip"); + + track.infiniteClip = animClip; + + EditorUtility.SetDirty(track); + } + + public static bool CanConvertToClipMode(this AnimationTrack track) + { + if (track == null || track.inClipMode) + return false; + return (track.infiniteClip != null && !track.infiniteClip.empty); + } + + // Requirements to go from clip mode + // - one clip, recordable, and animation clip belongs to the same asset as the track + public static bool CanConvertFromClipMode(this AnimationTrack track) + { + if ((track == null) || + (!track.inClipMode) || + (track.clips.Length != 1) || + (track.clips[0].start < 0) || + (!track.clips[0].recordable)) + return false; + + var asset = track.clips[0].asset as AnimationPlayableAsset; + if (asset == null) + return false; + + return TimelineHelpers.HaveSameContainerAsset(track, asset.clip); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimationTrackExtensions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimationTrackExtensions.cs.meta new file mode 100644 index 0000000..df81151 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/AnimationTrackExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5a31542ccf4e8584ca4f60843e9d02d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/TrackExtensions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/TrackExtensions.cs new file mode 100644 index 0000000..637e239 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/TrackExtensions.cs @@ -0,0 +1,495 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + // Editor-only extension methods on track assets + static class TrackExtensions + { + public static readonly double kMinOverlapTime = TimeUtility.kTimeEpsilon * 1000; + + public static AnimationClip GetOrCreateClip(this AnimationTrack track) + { + if (track.infiniteClip == null && !track.inClipMode) + track.CreateInfiniteClip(AnimationTrackRecorder.GetUniqueRecordedClipName(track, AnimationTrackRecorder.kRecordClipDefaultName)); + + return track.infiniteClip; + } + + public static TimelineClip CreateClip(this TrackAsset track, double time) + { + var attr = track.GetType().GetCustomAttributes(typeof(TrackClipTypeAttribute), true); + + if (attr.Length == 0) + return null; + + if (TimelineWindow.instance.state == null) + return null; + + if (attr.Length == 1) + { + var clipClass = (TrackClipTypeAttribute)attr[0]; + + var clip = TimelineHelpers.CreateClipOnTrack(clipClass.inspectedType, track, TimelineWindow.instance.state); + clip.start = time; + return clip; + } + + return null; + } + + static bool Overlaps(TimelineClip blendOut, TimelineClip blendIn) + { + if (blendIn == blendOut) + return false; + + if (Math.Abs(blendIn.start - blendOut.start) < TimeUtility.kTimeEpsilon) + { + return blendIn.duration >= blendOut.duration; + } + + return blendIn.start >= blendOut.start && blendIn.start < blendOut.end; + } + + public static void ComputeBlendsFromOverlaps(this TrackAsset asset) + { + ComputeBlendsFromOverlaps(asset.clips); + } + + internal static void ComputeBlendsFromOverlaps(TimelineClip[] clips) + { + foreach (var clip in clips) + { + clip.blendInDuration = -1; + clip.blendOutDuration = -1; + } + + foreach (var clip in clips) + { + var blendIn = clip; + var blendOut = clips + .Where(c => Overlaps(c, blendIn)) + .OrderBy(c => c.start) + .FirstOrDefault(); + + if (blendOut != null) + { + UpdateClipIntersection(blendOut, blendIn); + } + } + } + + internal static void UpdateClipIntersection(TimelineClip blendOutClip, TimelineClip blendInClip) + { + if (!blendOutClip.SupportsBlending() || !blendInClip.SupportsBlending()) + return; + + if (blendInClip.end < blendOutClip.end) + return; + + double duration = Math.Max(0, blendOutClip.start + blendOutClip.duration - blendInClip.start); + duration = duration <= kMinOverlapTime ? 0 : duration; + blendOutClip.blendOutDuration = duration; + blendInClip.blendInDuration = duration; + + var blendInMode = blendInClip.blendInCurveMode; + var blendOutMode = blendOutClip.blendOutCurveMode; + + if (blendInMode == TimelineClip.BlendCurveMode.Manual && blendOutMode == TimelineClip.BlendCurveMode.Auto) + { + blendOutClip.mixOutCurve = CurveEditUtility.CreateMatchingCurve(blendInClip.mixInCurve); + } + else if (blendInMode == TimelineClip.BlendCurveMode.Auto && blendOutMode == TimelineClip.BlendCurveMode.Manual) + { + blendInClip.mixInCurve = CurveEditUtility.CreateMatchingCurve(blendOutClip.mixOutCurve); + } + else if (blendInMode == TimelineClip.BlendCurveMode.Auto && blendOutMode == TimelineClip.BlendCurveMode.Auto) + { + blendInClip.mixInCurve = null; // resets to default curves + blendOutClip.mixOutCurve = null; + } + } + + internal static void RecursiveSubtrackClone(TrackAsset source, TrackAsset duplicate, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, PlayableAsset assetOwner) + { + var subtracks = source.GetChildTracks(); + foreach (var sub in subtracks) + { + var newSub = TimelineHelpers.Clone(duplicate, sub, sourceTable, destTable, assetOwner); + duplicate.AddChild(newSub); + RecursiveSubtrackClone(sub, newSub, sourceTable, destTable, assetOwner); + + // Call the custom editor on Create + var customEditor = CustomTimelineEditorCache.GetTrackEditor(newSub); + try + { + customEditor.OnCreate(newSub, sub); + } + catch (Exception e) + { + Debug.LogException(e); + } + + // registration has to happen AFTER recursion + TimelineCreateUtilities.SaveAssetIntoObject(newSub, assetOwner); + TimelineUndo.RegisterCreatedObjectUndo(newSub, "Duplicate"); + } + } + + internal static TrackAsset Duplicate(this TrackAsset track, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, + TimelineAsset destinationTimeline = null) + { + if (track == null) + return null; + + // if the destination is us, clear to avoid bad parenting (case 919421) + if (destinationTimeline == track.timelineAsset) + destinationTimeline = null; + + var timelineParent = track.parent as TimelineAsset; + var trackParent = track.parent as TrackAsset; + if (timelineParent == null && trackParent == null) + { + Debug.LogWarning("Cannot duplicate track because it is not parented to known type"); + return null; + } + + // Determine who the final parent is. If we are pasting into another track, it's always the timeline. + // Otherwise it's the original parent + PlayableAsset finalParent = destinationTimeline != null ? destinationTimeline : track.parent; + + // grab the list of tracks to generate a name from (923360) to get the list of names + // no need to do this part recursively + var finalTrackParent = finalParent as TrackAsset; + var finalTimelineAsset = finalParent as TimelineAsset; + var otherTracks = (finalTimelineAsset != null) ? finalTimelineAsset.trackObjects : finalTrackParent.subTracksObjects; + + // Important to create the new objects before pushing the original undo, or redo breaks the + // sequence + var newTrack = TimelineHelpers.Clone(finalParent, track, sourceTable, destTable, finalParent); + newTrack.name = TimelineCreateUtilities.GenerateUniqueActorName(otherTracks, newTrack.name); + + RecursiveSubtrackClone(track, newTrack, sourceTable, destTable, finalParent); + TimelineCreateUtilities.SaveAssetIntoObject(newTrack, finalParent); + TimelineUndo.RegisterCreatedObjectUndo(newTrack, "Duplicate"); + TimelineUndo.PushUndo(finalParent, "Duplicate"); + + if (destinationTimeline != null) // other timeline + destinationTimeline.AddTrackInternal(newTrack); + else if (timelineParent != null) // this timeline, no parent + ReparentTracks(new List { newTrack }, timelineParent, timelineParent.GetRootTracks().Last(), false); + else // this timeline, with parent + trackParent.AddChild(newTrack); + + // Call the custom editor. this check prevents the call when copying to the clipboard + if (destinationTimeline == null || destinationTimeline == TimelineEditor.inspectedAsset) + { + var customEditor = CustomTimelineEditorCache.GetTrackEditor(newTrack); + try + { + customEditor.OnCreate(newTrack, track); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + + return newTrack; + } + + // Reparents a list of tracks to a new parent + // the new parent cannot be null (has to be track asset or sequence) + // the insertAfter can be null (will not reorder) + internal static bool ReparentTracks(List tracksToMove, PlayableAsset targetParent, + TrackAsset insertMarker = null, bool insertBefore = false) + { + var targetParentTrack = targetParent as TrackAsset; + var targetSequenceTrack = targetParent as TimelineAsset; + + if (tracksToMove == null || tracksToMove.Count == 0 || (targetParentTrack == null && targetSequenceTrack == null)) + return false; + + // invalid parent type on a track + if (targetParentTrack != null && tracksToMove.Any(x => !TimelineCreateUtilities.ValidateParentTrack(targetParentTrack, x.GetType()))) + return false; + + // no valid tracks means this is simply a rearrangement + var validTracks = tracksToMove.Where(x => x.parent != targetParent).ToList(); + if (insertMarker == null && !validTracks.Any()) + return false; + + var parents = validTracks.Select(x => x.parent).Where(x => x != null).Distinct().ToList(); + + // push the current state of the tracks that will change + foreach (var p in parents) + { + TimelineUndo.PushUndo(p, "Reparent"); + } + foreach (var t in validTracks) + { + TimelineUndo.PushUndo(t, "Reparent"); + } + TimelineUndo.PushUndo(targetParent, "Reparent"); + + // need to reparent tracks first, before moving them. + foreach (var t in validTracks) + { + if (t.parent != targetParent) + { + TrackAsset toMoveParent = t.parent as TrackAsset; + TimelineAsset toMoveTimeline = t.parent as TimelineAsset; + if (toMoveTimeline != null) + { + toMoveTimeline.RemoveTrack(t); + } + else if (toMoveParent != null) + { + toMoveParent.RemoveSubTrack(t); + } + + if (targetParentTrack != null) + { + targetParentTrack.AddChild(t); + targetParentTrack.SetCollapsed(false); + } + else + { + targetSequenceTrack.AddTrackInternal(t); + } + } + } + + + if (insertMarker != null) + { + // re-ordering track. This is using internal APIs, so invalidation of the tracks must be done manually to avoid + // cache mismatches + var children = targetParentTrack != null ? targetParentTrack.subTracksObjects : targetSequenceTrack.trackObjects; + TimelineUtility.ReorderTracks(children, tracksToMove, insertMarker, insertBefore); + if (targetParentTrack != null) + targetParentTrack.Invalidate(); + if (insertMarker.timelineAsset != null) + insertMarker.timelineAsset.Invalidate(); + } + + return true; + } + + internal static IEnumerable FilterTracks(IEnumerable tracks) + { + var nTracks = tracks.Count(); + // Duplicate is recursive. If should not have parent and child in the list + var hash = new HashSet(tracks); + var take = new Dictionary(nTracks); + + foreach (var track in tracks) + { + var parent = track.parent as TrackAsset; + var foundParent = false; + // go up the hierarchy + while (parent != null && !foundParent) + { + if (hash.Contains(parent)) + { + foundParent = true; + } + + parent = parent.parent as TrackAsset; + } + + take[track] = !foundParent; + } + + foreach (var track in tracks) + { + if (take[track]) + yield return track; + } + } + + internal static bool IsVisibleRecursive(this TrackAsset track) + { + var t = track; + while ((t = t.parent as TrackAsset) != null) + { + if (t.GetCollapsed()) + return false; + } + + return true; + } + + internal static bool GetCollapsed(this TrackAsset track) + { + return TimelineWindowViewPrefs.IsTrackCollapsed(track); + } + + internal static void SetCollapsed(this TrackAsset track, bool collapsed) + { + TimelineWindowViewPrefs.SetTrackCollapsed(track, collapsed); + } + + internal static bool GetShowMarkers(this TrackAsset track) + { + return TimelineWindowViewPrefs.IsShowMarkers(track); + } + + internal static void SetShowMarkers(this TrackAsset track, bool collapsed) + { + TimelineWindowViewPrefs.SetTrackShowMarkers(track, collapsed); + } + + internal static bool GetShowInlineCurves(this TrackAsset track) + { + return TimelineWindowViewPrefs.GetShowInlineCurves(track); + } + + internal static void SetShowInlineCurves(this TrackAsset track, bool inlineOn) + { + TimelineWindowViewPrefs.SetShowInlineCurves(track, inlineOn); + } + + internal static bool ShouldShowInfiniteClipEditor(this TrackAsset track) + { + var animationTrack = track as AnimationTrack; + if (animationTrack != null) + return animationTrack.ShouldShowInfiniteClipEditor(); + + return track.HasAnyAnimatableParameters(); + } + + internal static bool ShouldShowInfiniteClipEditor(this AnimationTrack track) + { + return track != null && !track.inClipMode && track.infiniteClip != null; + } + + // Special method to remove a track that is in a broken state. i.e. the script won't load + internal static bool RemoveBrokenTrack(PlayableAsset parent, ScriptableObject track) + { + var parentTrack = parent as TrackAsset; + var parentTimeline = parent as TimelineAsset; + + if (parentTrack == null && parentTimeline == null) + throw new ArgumentException("parent is not a valid parent type", "parent"); + + // this object must be a Unity null, but not actually null; + object trackAsObject = track; + if (trackAsObject == null || track != null) // yes, this is correct + throw new ArgumentException("track is not in a broken state"); + + // this belongs to a parent track + if (parentTrack != null) + { + int index = parentTrack.subTracksObjects.FindIndex(t => t.GetInstanceID() == track.GetInstanceID()); + if (index >= 0) + { + TimelineUndo.PushUndo(parentTrack, "Remove Track"); + parentTrack.subTracksObjects.RemoveAt(index); + parentTrack.Invalidate(); + Undo.DestroyObjectImmediate(track); + return true; + } + } + else if (parentTimeline != null) + { + int index = parentTimeline.trackObjects.FindIndex(t => t.GetInstanceID() == track.GetInstanceID()); + if (index >= 0) + { + TimelineUndo.PushUndo(parentTimeline, "Remove Track"); + parentTimeline.trackObjects.RemoveAt(index); + parentTimeline.Invalidate(); + Undo.DestroyObjectImmediate(track); + return true; + } + } + + return false; + } + + // Find the gap at the given time + // return true if there is a gap, false if there is an intersection + // endGap will be Infinity if the gap has no end + internal static bool GetGapAtTime(this TrackAsset track, double time, out double startGap, out double endGap) + { + startGap = 0; + endGap = Double.PositiveInfinity; + + if (track == null || !track.GetClips().Any()) + { + return false; + } + + var discreteTime = new DiscreteTime(time); + + track.SortClips(); + var sortedByStartTime = track.clips; + for (int i = 0; i < sortedByStartTime.Length; i++) + { + var clip = sortedByStartTime[i]; + + // intersection + if (discreteTime >= new DiscreteTime(clip.start) && discreteTime < new DiscreteTime(clip.end)) + { + endGap = time; + startGap = time; + return false; + } + + if (clip.end < time) + { + startGap = clip.end; + } + if (clip.start > time) + { + endGap = clip.start; + break; + } + } + + if (endGap - startGap < TimelineClip.kMinDuration) + { + startGap = time; + endGap = time; + return false; + } + + return true; + } + + public static bool IsCompatibleWithClip(this TrackAsset track, TimelineClip clip) + { + if (track == null || clip == null || clip.asset == null) + return false; + + return TypeUtility.GetPlayableAssetsHandledByTrack(track.GetType()).Contains(clip.asset.GetType()); + } + + // Get a flattened list of all child tracks + public static void GetFlattenedChildTracks(this TrackAsset asset, List list) + { + if (asset == null || list == null) + return; + + foreach (var track in asset.GetChildTracks()) + { + list.Add(track); + GetFlattenedChildTracks(track, list); + } + } + + public static IEnumerable GetFlattenedChildTracks(this TrackAsset asset) + { + if (asset == null || !asset.GetChildTracks().Any()) + return Enumerable.Empty(); + + var flattenedChildTracks = new List(); + GetFlattenedChildTracks(asset, flattenedChildTracks); + return flattenedChildTracks; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/TrackExtensions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/TrackExtensions.cs.meta new file mode 100644 index 0000000..1e9f0c2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Extensions/TrackExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5b24618beecc3bf41acadfcf2246d772 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items.meta new file mode 100644 index 0000000..65e8d92 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3a5038547af7c7f46bd90a015862e0b3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ClipItem.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ClipItem.cs new file mode 100644 index 0000000..d500257 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ClipItem.cs @@ -0,0 +1,143 @@ +using System; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class ClipItem : IBlendable, ITrimmable + { + readonly TimelineClip m_Clip; + + public TimelineClip clip + { + get { return m_Clip; } + } + + public ClipItem(TimelineClip clip) + { + m_Clip = clip; + } + + public TrackAsset parentTrack + { + get { return m_Clip.parentTrack; } + set { m_Clip.parentTrack = value; } + } + + public double start + { + get { return m_Clip.start; } + set { m_Clip.start = value; } + } + + public double end + { + get { return m_Clip.end; } + } + + public double duration + { + get { return m_Clip.duration; } + } + + public bool IsCompatibleWithTrack(TrackAsset track) + { + return track.IsCompatibleWithClip(m_Clip); + } + + public void PushUndo(string operation) + { + TimelineUndo.PushUndo(m_Clip.parentTrack, operation); + } + + public TimelineItemGUI gui + { + get { return ItemToItemGui.GetGuiForClip(m_Clip); } + } + + public bool supportsBlending + { + get { return m_Clip.SupportsBlending(); } + } + + public bool hasLeftBlend + { + get { return m_Clip.hasBlendIn; } + } + + public bool hasRightBlend + { + get { return m_Clip.hasBlendOut; } + } + + public double leftBlendDuration + { + get { return m_Clip.hasBlendIn ? m_Clip.blendInDuration : m_Clip.easeInDuration; } + } + + public double rightBlendDuration + { + get { return m_Clip.hasBlendOut ? m_Clip.blendOutDuration : m_Clip.easeOutDuration; } + } + + public void SetStart(double time) + { + ClipModifier.SetStart(m_Clip, time); + } + + public void SetEnd(double time, bool affectTimeScale) + { + ClipModifier.SetEnd(m_Clip, time, affectTimeScale); + } + + public void Delete() + { + EditorClipFactory.RemoveEditorClip(m_Clip); + ClipModifier.Delete(m_Clip.parentTrack.timelineAsset, m_Clip); + } + + public void TrimStart(double time) + { + ClipModifier.TrimStart(m_Clip, time); + } + + public void TrimEnd(double time) + { + ClipModifier.TrimEnd(m_Clip, time); + } + + public ITimelineItem CloneTo(TrackAsset parent, double time) + { + return new ClipItem(TimelineHelpers.Clone(m_Clip, TimelineEditor.inspectedDirector, TimelineEditor.inspectedDirector, time, parent)); + } + + public override string ToString() + { + return m_Clip.ToString(); + } + + public bool Equals(ClipItem otherClip) + { + if (ReferenceEquals(null, otherClip)) return false; + if (ReferenceEquals(this, otherClip)) return true; + return Equals(m_Clip, otherClip.m_Clip); + } + + public override int GetHashCode() + { + return (m_Clip != null ? m_Clip.GetHashCode() : 0); + } + + public bool Equals(ITimelineItem other) + { + return Equals((object)other); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + var other = obj as ClipItem; + return other != null && Equals(other); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ClipItem.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ClipItem.cs.meta new file mode 100644 index 0000000..df97840 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ClipItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d143f3edd0494bc4c98a421bd59564fa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ITimelineItem.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ITimelineItem.cs new file mode 100644 index 0000000..092c2b0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ITimelineItem.cs @@ -0,0 +1,39 @@ +using System; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + interface ITimelineItem : IEquatable + { + double start { get; set; } + double end { get; } + double duration { get; } + + TrackAsset parentTrack { get; set; } + bool IsCompatibleWithTrack(TrackAsset track); + + void Delete(); + ITimelineItem CloneTo(TrackAsset parent, double time); + void PushUndo(string operation); + + TimelineItemGUI gui { get; } + } + + interface ITrimmable : ITimelineItem + { + void SetStart(double time); + void SetEnd(double time, bool affectTimeScale); + void TrimStart(double time); + void TrimEnd(double time); + } + + interface IBlendable : ITimelineItem + { + bool supportsBlending { get; } + bool hasLeftBlend { get; } + bool hasRightBlend { get; } + + double leftBlendDuration { get; } + double rightBlendDuration { get; } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ITimelineItem.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ITimelineItem.cs.meta new file mode 100644 index 0000000..a23827c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ITimelineItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2c87ec8c97244cd47945ec90a99abe35 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsGroup.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsGroup.cs new file mode 100644 index 0000000..41ff657 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsGroup.cs @@ -0,0 +1,63 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class ItemsGroup + { + readonly ITimelineItem[] m_Items; + readonly ITimelineItem m_LeftMostItem; + readonly ITimelineItem m_RightMostItem; + + public ITimelineItem[] items + { + get { return m_Items; } + } + + public double start + { + get { return m_LeftMostItem.start; } + set + { + var offset = value - m_LeftMostItem.start; + + foreach (var clip in m_Items) + clip.start += offset; + } + } + + public double end + { + get { return m_RightMostItem.end; } + } + + public ITimelineItem leftMostItem + { + get { return m_LeftMostItem; } + } + + public ITimelineItem rightMostItem + { + get { return m_RightMostItem; } + } + + public ItemsGroup(IEnumerable items) + { + Debug.Assert(items != null && items.Any()); + + m_Items = items.ToArray(); + m_LeftMostItem = null; + m_RightMostItem = null; + + foreach (var item in m_Items) + { + if (m_LeftMostItem == null || item.start < m_LeftMostItem.start) + m_LeftMostItem = item; + + if (m_RightMostItem == null || item.end > m_RightMostItem.end) + m_RightMostItem = item; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsGroup.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsGroup.cs.meta new file mode 100644 index 0000000..1da6246 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsGroup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1ec4b8ec4b34f4344bac53c19288eaa2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsPerTrack.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsPerTrack.cs new file mode 100644 index 0000000..78a86ef --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsPerTrack.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class ItemsPerTrack + { + public virtual TrackAsset targetTrack { get; } + + public IEnumerable items + { + get { return m_ItemsGroup.items; } + } + + public IEnumerable clips + { + get { return m_ItemsGroup.items.OfType().Select(i => i.clip); } + } + + public IEnumerable markers + { + get { return m_ItemsGroup.items.OfType().Select(i => i.marker); } + } + + public ITimelineItem leftMostItem + { + get { return m_ItemsGroup.leftMostItem; } + } + + public ITimelineItem rightMostItem + { + get { return m_ItemsGroup.rightMostItem; } + } + + protected readonly ItemsGroup m_ItemsGroup; + + public ItemsPerTrack(TrackAsset targetTrack, IEnumerable items) + { + this.targetTrack = targetTrack; + m_ItemsGroup = new ItemsGroup(items); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsPerTrack.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsPerTrack.cs.meta new file mode 100644 index 0000000..77da4ae --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsPerTrack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 647e1bbd3809b30459d946b4a1ddf22b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsUtils.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsUtils.cs new file mode 100644 index 0000000..90e7985 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsUtils.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class ItemsUtils + { + static readonly Dictionary s_ClipCache = new Dictionary(); + static readonly Dictionary s_MarkerCache = new Dictionary(); + + public static IEnumerable ToItemsPerTrack(this IEnumerable items) + { + var groupedItems = items.GroupBy(c => c.parentTrack); + foreach (var group in groupedItems) + { + yield return new ItemsPerTrack(group.Key, group.ToArray()); + } + } + + public static ITimelineItem ToItem(this TimelineClip clip) + { + if (s_ClipCache.ContainsKey(clip)) + return s_ClipCache[clip]; + + var ret = new ClipItem(clip); + s_ClipCache.Add(clip, ret); + return ret; + } + + public static ITimelineItem ToItem(this IMarker marker) + { + if (s_MarkerCache.ContainsKey(marker)) + return s_MarkerCache[marker]; + + var ret = new MarkerItem(marker); + s_MarkerCache.Add(marker, ret); + return ret; + } + + public static IEnumerable ToItems(this IEnumerable clips) + { + return clips.Select(ToItem); + } + + public static IEnumerable ToItems(this IEnumerable markers) + { + return markers.Select(ToItem); + } + + public static IEnumerable GetItems(this TrackAsset track) + { + var list = track.clips.Select(clip => (ITimelineItem) new ClipItem(clip)).ToList(); + list.AddRange(track.GetMarkers().Select(marker => (ITimelineItem) new MarkerItem(marker))); + + list = list.OrderBy(x => x.start).ThenBy(x => x.end).ToList(); + return list; + } + + public static void GetItemRange(this TrackAsset track, out double start, out double end) + { + start = 0; + end = 0; + var items = track.GetItems().ToList(); + if (items.Any()) + { + start = items.Min(p => p.start); + end = items.Max(p => p.end); + } + } + + public static IEnumerable GetItemsExcept(this TrackAsset track, IEnumerable items) + { + return GetItems(track).Except(items); + } + + public static IEnumerable GetItemTypes(IEnumerable items) + { + var types = new List(); + if (items.OfType().Any()) + types.Add(typeof(ClipItem)); + if (items.OfType().Any()) + types.Add(typeof(MarkerItem)); + + return types; + } + + public static IEnumerable GetItemTypes(IEnumerable itemsGroups) + { + return GetItemTypes(itemsGroups.SelectMany(i => i.items)).Distinct(); + } + + public static void SetItemsStartTime(IEnumerable newItems, double time) + { + var startTimes = newItems.Select(d => d.items.Min(x => x.start)).ToList(); + var min = startTimes.Min(); + startTimes = startTimes.Select(x => x - min + time).ToList(); + + for (int i = 0; i < newItems.Count(); ++i) + EditModeUtils.SetStart(newItems.ElementAt(i).items, startTimes[i]); + } + + public static double TimeGapBetweenItems(ITimelineItem leftItem, ITimelineItem rightItem, WindowState state) + { + if (leftItem is MarkerItem && rightItem is MarkerItem) + { + var markerType = ((MarkerItem)leftItem).marker.GetType(); + var gap = state.PixelDeltaToDeltaTime(StyleManager.UssStyleForType(markerType).fixedWidth); + return gap; + } + + return 0.0; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsUtils.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsUtils.cs.meta new file mode 100644 index 0000000..65dca1e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/ItemsUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5653477a5039f674da8f856adcf47172 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/MarkerItem.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/MarkerItem.cs new file mode 100644 index 0000000..e62c348 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/MarkerItem.cs @@ -0,0 +1,106 @@ +using System; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class MarkerItem : ITimelineItem + { + readonly IMarker m_Marker; + + public IMarker marker + { + get { return m_Marker; } + } + + public MarkerItem(IMarker marker) + { + m_Marker = marker; + } + + public TrackAsset parentTrack + { + get { return m_Marker.parent; } + set {} + } + + public double start + { + get { return m_Marker.time; } + set { m_Marker.time = value; } + } + + public double end + { + get { return m_Marker.time; } + } + + public double duration + { + get { return 0.0; } + } + + public bool IsCompatibleWithTrack(TrackAsset track) + { + return true; + } + + public void PushUndo(string operation) + { + var m = m_Marker as Object; + if (m != null) + { + TimelineUndo.PushUndo(m, operation); + } + else + { + TimelineUndo.PushUndo(m_Marker.parent, operation); + } + } + + public TimelineItemGUI gui + { + get { return ItemToItemGui.GetGuiForMarker(m_Marker); } + } + + public void Delete() + { + MarkerModifier.DeleteMarker(m_Marker); + } + + public ITimelineItem CloneTo(TrackAsset parent, double time) + { + var item = new MarkerItem(MarkerModifier.CloneMarkerToParent(m_Marker, parent)); + item.start = time; + return item; + } + + protected bool Equals(MarkerItem otherMarker) + { + return Equals(m_Marker, otherMarker.m_Marker); + } + + public override int GetHashCode() + { + return (m_Marker != null ? m_Marker.GetHashCode() : 0); + } + + public override string ToString() + { + return m_Marker.ToString(); + } + + public bool Equals(ITimelineItem other) + { + return Equals((object)other); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + var other = obj as MarkerItem; + return other != null && Equals(other); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/MarkerItem.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/MarkerItem.cs.meta new file mode 100644 index 0000000..8d20ad8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Items/MarkerItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 452534715106564439d2240d82999d88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators.meta new file mode 100644 index 0000000..c5ec4d2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cae60a41b37427b48a00027b3e0fc1e6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete.meta new file mode 100644 index 0000000..b18202d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: db34f310723c62440a05d3e69f262a70 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeMix.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeMix.cs new file mode 100644 index 0000000..2e8a429 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeMix.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace UnityEditor.Timeline +{ + class AddDeleteItemModeMix : IAddDeleteItemMode + { + public void InsertItemsAtTime(IEnumerable itemsGroups, double requestedTime) + { + ItemsUtils.SetItemsStartTime(itemsGroups, requestedTime); + EditModeMixUtils.PrepareItemsForInsertion(itemsGroups); + + if (!EditModeMixUtils.CanInsert(itemsGroups)) + { + var validTime = itemsGroups.Select(c => c.targetTrack).Max(parent => parent.duration); + ItemsUtils.SetItemsStartTime(itemsGroups, validTime); + } + } + + public void RemoveItems(IEnumerable itemsGroups) + { + // Nothing + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeMix.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeMix.cs.meta new file mode 100644 index 0000000..d3d73d7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeMix.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 41e14f40b915ca743a3dffd18ffc65ab +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeReplace.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeReplace.cs new file mode 100644 index 0000000..6cda779 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeReplace.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; + +namespace UnityEditor.Timeline +{ + class AddDeleteItemModeReplace : IAddDeleteItemMode + { + public void InsertItemsAtTime(IEnumerable itemsGroups, double requestedTime) + { + ItemsUtils.SetItemsStartTime(itemsGroups, requestedTime); + EditModeReplaceUtils.Insert(itemsGroups); + } + + public void RemoveItems(IEnumerable itemsGroups) + { + // Nothing + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeReplace.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeReplace.cs.meta new file mode 100644 index 0000000..ea32217 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeReplace.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ea28dc637ae40484da709200d3328587 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeRipple.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeRipple.cs new file mode 100644 index 0000000..97de7d1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeRipple.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; + +namespace UnityEditor.Timeline +{ + class AddDeleteItemModeRipple : IAddDeleteItemMode + { + public void InsertItemsAtTime(IEnumerable itemsGroups, double requestedTime) + { + ItemsUtils.SetItemsStartTime(itemsGroups, requestedTime); + EditModeRippleUtils.Insert(itemsGroups); + } + + public void RemoveItems(IEnumerable itemsGroups) + { + EditModeRippleUtils.Remove(itemsGroups); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeRipple.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeRipple.cs.meta new file mode 100644 index 0000000..94155e5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/AddDeleteItemModeRipple.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 88338eb35defad644a48718188e8f219 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/IAddDeleteItemMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/IAddDeleteItemMode.cs new file mode 100644 index 0000000..e943ac1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/IAddDeleteItemMode.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace UnityEditor.Timeline +{ + interface IAddDeleteItemMode + { + void InsertItemsAtTime(IEnumerable itemsGroups, double requestedTime); + void RemoveItems(IEnumerable itemsGroups); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/IAddDeleteItemMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/IAddDeleteItemMode.cs.meta new file mode 100644 index 0000000..1296e1f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/AddDelete/IAddDeleteItemMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4db13e1060deaae48b30246ed63b7c9b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors.meta new file mode 100644 index 0000000..0647cb5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4ad09461bf994e54da846f726a23118e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors/TimelineCursors.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors/TimelineCursors.cs new file mode 100644 index 0000000..4935cab --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors/TimelineCursors.cs @@ -0,0 +1,95 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class TimelineCursors + { + public enum CursorType + { + MixBoth, + MixLeft, + MixRight, + Replace, + Ripple, + + Pan + } + + class CursorInfo + { + public readonly string assetPath; + public readonly Vector2 hotSpot; + public readonly MouseCursor mouseCursorType; + + public CursorInfo(string assetPath, Vector2 hotSpot, MouseCursor mouseCursorType) + { + this.assetPath = assetPath; + this.hotSpot = hotSpot; + this.mouseCursorType = mouseCursorType; + } + } + + const string k_CursorAssetRoot = "Cursors/"; + const string k_CursorAssetsNamespace = "Timeline."; + const string k_CursorAssetExtension = ".png"; + + const string k_MixBothCursorAssetName = k_CursorAssetsNamespace + "MixBoth" + k_CursorAssetExtension; + const string k_MixLeftCursorAssetName = k_CursorAssetsNamespace + "MixLeft" + k_CursorAssetExtension; + const string k_MixRightCursorAssetName = k_CursorAssetsNamespace + "MixRight" + k_CursorAssetExtension; + const string k_ReplaceCursorAssetName = k_CursorAssetsNamespace + "Replace" + k_CursorAssetExtension; + const string k_RippleCursorAssetName = k_CursorAssetsNamespace + "Ripple" + k_CursorAssetExtension; + + static readonly string s_PlatformPath = (Application.platform == RuntimePlatform.WindowsEditor) ? "Windows/" : "macOS/"; + static readonly string s_CursorAssetDirectory = k_CursorAssetRoot + s_PlatformPath; + + static readonly Dictionary s_CursorInfoLookup = new Dictionary + { + {CursorType.MixBoth, new CursorInfo(s_CursorAssetDirectory + k_MixBothCursorAssetName, new Vector2(16, 18), MouseCursor.CustomCursor)}, + {CursorType.MixLeft, new CursorInfo(s_CursorAssetDirectory + k_MixLeftCursorAssetName, new Vector2(7, 18), MouseCursor.CustomCursor)}, + {CursorType.MixRight, new CursorInfo(s_CursorAssetDirectory + k_MixRightCursorAssetName, new Vector2(25, 18), MouseCursor.CustomCursor)}, + {CursorType.Replace, new CursorInfo(s_CursorAssetDirectory + k_ReplaceCursorAssetName, new Vector2(16, 28), MouseCursor.CustomCursor)}, + {CursorType.Ripple, new CursorInfo(s_CursorAssetDirectory + k_RippleCursorAssetName, new Vector2(26, 19), MouseCursor.CustomCursor)}, + {CursorType.Pan, new CursorInfo(null, Vector2.zero, MouseCursor.Pan)} + }; + + static readonly Dictionary s_CursorAssetCache = new Dictionary(); + + static CursorType? s_CurrentCursor; + + public static void SetCursor(CursorType cursorType) + { + if (s_CurrentCursor.HasValue && s_CurrentCursor.Value == cursorType) return; + + s_CurrentCursor = cursorType; + var cursorInfo = s_CursorInfoLookup[cursorType]; + + Texture2D cursorAsset = null; + + if (cursorInfo.mouseCursorType == MouseCursor.CustomCursor) + { + cursorAsset = LoadCursorAsset(cursorInfo.assetPath); + } + + EditorGUIUtility.SetCurrentViewCursor(cursorAsset, cursorInfo.hotSpot, cursorInfo.mouseCursorType); + } + + public static void ClearCursor() + { + if (!s_CurrentCursor.HasValue) return; + + EditorGUIUtility.ClearCurrentViewCursor(); + s_CurrentCursor = null; + } + + static Texture2D LoadCursorAsset(string assetPath) + { + if (!s_CursorAssetCache.ContainsKey(assetPath)) + { + s_CursorAssetCache.Add(assetPath, (Texture2D)EditorGUIUtility.Load(assetPath)); + } + + return s_CursorAssetCache[assetPath]; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors/TimelineCursors.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors/TimelineCursors.cs.meta new file mode 100644 index 0000000..0e017d0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Cursors/TimelineCursors.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f16e09785c984c445a0467e30f845636 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditMode.cs new file mode 100644 index 0000000..475b586 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditMode.cs @@ -0,0 +1,344 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class EditMode + { + public enum EditType + { + None = -1, + Mix = 0, + Ripple = 1, + Replace = 2 + } + + interface ISubEditMode + { + IMoveItemMode moveItemMode { get; } + IMoveItemDrawer moveItemDrawer { get; } + ITrimItemMode trimItemMode { get; } + ITrimItemDrawer trimItemDrawer { get; } + IAddDeleteItemMode addDeleteItemMode { get; } + + Color color { get; } + KeyCode clutchKey { get; } + + void Reset(); + } + + class SubEditMode: ISubEditMode + where TMoveMode : class, IMoveItemMode, IMoveItemDrawer, new() + where TTrimMode : class, ITrimItemMode, ITrimItemDrawer, new() + where TAddDeleteMode : class, IAddDeleteItemMode, new() + { + public SubEditMode(Color guiColor, KeyCode key) + { + color = guiColor; + clutchKey = key; + Reset(); + } + + public void Reset() + { + m_MoveItemMode = new TMoveMode(); + m_TrimItemMode = new TTrimMode(); + m_AddDeleteItemMode = new TAddDeleteMode(); + } + + TMoveMode m_MoveItemMode; + TTrimMode m_TrimItemMode; + TAddDeleteMode m_AddDeleteItemMode; + + public IMoveItemMode moveItemMode { get { return m_MoveItemMode; } } + public IMoveItemDrawer moveItemDrawer { get { return m_MoveItemMode; } } + public ITrimItemMode trimItemMode { get { return m_TrimItemMode; } } + public ITrimItemDrawer trimItemDrawer { get { return m_TrimItemMode; } } + public IAddDeleteItemMode addDeleteItemMode { get { return m_AddDeleteItemMode; } } + public Color color { get; } + public KeyCode clutchKey { get; } + } + + static readonly Dictionary k_EditModes = new Dictionary + { + { EditType.Mix, new SubEditMode(DirectorStyles.kMixToolColor, KeyCode.Alpha1) }, + { EditType.Ripple, new SubEditMode(DirectorStyles.kRippleToolColor, KeyCode.Alpha2) }, + { EditType.Replace, new SubEditMode(DirectorStyles.kReplaceToolColor, KeyCode.Alpha3) } + }; + + static EditType s_CurrentEditType = EditType.Mix; + static EditType s_OverrideEditType = EditType.None; + + static ITrimmable s_CurrentTrimItem; + static TrimEdge s_CurrentTrimDirection; + static MoveItemHandler s_CurrentMoveItemHandler; + static EditModeInputHandler s_InputHandler = new EditModeInputHandler(); + + static ITrimItemMode trimMode + { + get { return GetSubEditMode(editType).trimItemMode; } + } + + static ITrimItemDrawer trimDrawer + { + get { return GetSubEditMode(editType).trimItemDrawer; } + } + + static IMoveItemMode moveMode + { + get { return GetSubEditMode(editType).moveItemMode; } + } + + static IMoveItemDrawer moveDrawer + { + get { return GetSubEditMode(editType).moveItemDrawer; } + } + + static IAddDeleteItemMode addDeleteMode + { + get { return GetSubEditMode(editType).addDeleteItemMode; } + } + + public static EditModeInputHandler inputHandler + { + get { return s_InputHandler; } + } + + static Color modeColor + { + get { return GetSubEditMode(editType).color; } + } + + public static EditType editType + { + get + { + if (s_OverrideEditType != EditType.None) + return s_OverrideEditType; + + var window = TimelineWindow.instance; + if (window != null) + s_CurrentEditType = window.state.editType; + + return s_CurrentEditType; + } + set + { + s_CurrentEditType = value; + + var window = TimelineWindow.instance; + if (window != null) + window.state.editType = value; + + s_OverrideEditType = EditType.None; + } + } + + static ISubEditMode GetSubEditMode(EditType type) + { + var subEditMode = k_EditModes[type]; + if (subEditMode != null) + return subEditMode; + + Debug.LogError("Unsupported editmode type"); + return null; + } + + static EditType GetSubEditType(KeyCode key) + { + foreach (var subEditMode in k_EditModes) + { + if (subEditMode.Value.clutchKey == key) + return subEditMode.Key; + } + return EditType.None; + } + + public static void ClearEditMode() + { + k_EditModes[editType].Reset(); + } + + public static void BeginTrim(ITimelineItem item, TrimEdge trimDirection) + { + var itemToTrim = item as ITrimmable; + if (itemToTrim == null) return; + + s_CurrentTrimItem = itemToTrim; + s_CurrentTrimDirection = trimDirection; + trimMode.OnBeforeTrim(itemToTrim, trimDirection); + TimelineUndo.PushUndo(itemToTrim.parentTrack, "Trim Clip"); + } + + public static void TrimStart(ITimelineItem item, double time) + { + var itemToTrim = item as ITrimmable; + if (itemToTrim == null) return; + + trimMode.TrimStart(itemToTrim, time); + } + + public static void TrimEnd(ITimelineItem item, double time, bool affectTimeScale) + { + var itemToTrim = item as ITrimmable; + if (itemToTrim == null) return; + + trimMode.TrimEnd(itemToTrim, time, affectTimeScale); + } + + public static void DrawTrimGUI(WindowState state, TimelineItemGUI item, TrimEdge edge) + { + trimDrawer.DrawGUI(state, item.rect, modeColor, edge); + } + + public static void FinishTrim() + { + s_CurrentTrimItem = null; + + TimelineCursors.ClearCursor(); + ClearEditMode(); + + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + + public static void BeginMove(MoveItemHandler moveItemHandler) + { + s_CurrentMoveItemHandler = moveItemHandler; + moveMode.BeginMove(s_CurrentMoveItemHandler.movingItems); + } + + public static void UpdateMove() + { + moveMode.UpdateMove(s_CurrentMoveItemHandler.movingItems); + } + + public static void OnTrackDetach(IEnumerable grabbedTrackItems) + { + moveMode.OnTrackDetach(grabbedTrackItems); + } + + public static void HandleTrackSwitch(IEnumerable grabbedTrackItems) + { + moveMode.HandleTrackSwitch(grabbedTrackItems); + } + + public static bool AllowTrackSwitch() + { + return moveMode.AllowTrackSwitch(); + } + + public static double AdjustStartTime(WindowState state, ItemsPerTrack itemsGroup, double time) + { + return moveMode.AdjustStartTime(state, itemsGroup, time); + } + + public static bool ValidateDrag(ItemsPerTrack itemsGroup) + { + return moveMode.ValidateMove(itemsGroup); + } + + public static void DrawMoveGUI(WindowState state, IEnumerable movingItems) + { + moveDrawer.DrawGUI(state, movingItems, modeColor); + } + + public static void FinishMove() + { + var manipulatedItemsList = s_CurrentMoveItemHandler.movingItems; + moveMode.FinishMove(manipulatedItemsList); + + foreach (var itemsGroup in manipulatedItemsList) + foreach (var item in itemsGroup.items) + item.parentTrack = itemsGroup.targetTrack; + + s_CurrentMoveItemHandler = null; + + TimelineCursors.ClearCursor(); + ClearEditMode(); + + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + + public static void FinalizeInsertItemsAtTime(IEnumerable newItems, double requestedTime) + { + addDeleteMode.InsertItemsAtTime(newItems, requestedTime); + } + + public static void PrepareItemsDelete(IEnumerable newItems) + { + addDeleteMode.RemoveItems(newItems); + } + + public static void HandleModeClutch() + { + if (Event.current.type == EventType.KeyDown && EditorGUI.IsEditingTextField()) + return; + + var prevType = editType; + + if (Event.current.type == EventType.KeyDown) + { + var clutchEditType = GetSubEditType(Event.current.keyCode); + if (clutchEditType != EditType.None) + { + s_OverrideEditType = clutchEditType; + Event.current.Use(); + } + } + else if (Event.current.type == EventType.KeyUp) + { + var clutchEditType = GetSubEditType(Event.current.keyCode); + if (clutchEditType == s_OverrideEditType) + { + s_OverrideEditType = EditType.None; + Event.current.Use(); + } + } + + if (prevType != editType) + { + if (s_CurrentTrimItem != null) + { + trimMode.OnBeforeTrim(s_CurrentTrimItem, s_CurrentTrimDirection); + } + else if (s_CurrentMoveItemHandler != null) + { + if (s_CurrentMoveItemHandler.movingItems == null) + { + s_CurrentMoveItemHandler = null; + return; + } + + foreach (var movingItems in s_CurrentMoveItemHandler.movingItems) + { + if (movingItems != null && movingItems.HasAnyDetachedParents()) + { + foreach (var items in movingItems.items) + { + items.parentTrack = movingItems.originalTrack; + } + } + } + + var movingSelection = s_CurrentMoveItemHandler.movingItems; + + // Handle clutch key transition if needed + GetSubEditMode(prevType).moveItemMode.OnModeClutchExit(movingSelection); + moveMode.OnModeClutchEnter(movingSelection); + + moveMode.BeginMove(movingSelection); + moveMode.HandleTrackSwitch(movingSelection); + + UpdateMove(); + s_CurrentMoveItemHandler.RefreshPreviewItems(); + + TimelineWindow.instance.state.rebuildGraph = true; // TODO Rebuild only if parent changed + } + + TimelineWindow.instance.Repaint(); // TODO Refresh the toolbar without doing a full repaint? + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditMode.cs.meta new file mode 100644 index 0000000..4ec42d4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dfd084fea478f3148b7de3d83bab1d8c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditModeInputHandler.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditModeInputHandler.cs new file mode 100644 index 0000000..6a204d9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditModeInputHandler.cs @@ -0,0 +1,199 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class EditModeInputHandler + { + readonly MoveInputHandler m_MoveHandler; + readonly TrimInputHandler m_TrimHandler; + + public EditModeInputHandler() + { + m_MoveHandler = new MoveInputHandler(); + m_TrimHandler = new TrimInputHandler(); + } + + public void ProcessMove(InputEvent action, double value) + { + if (TimelineWindow.instance != null && TimelineWindow.instance.state != null) + ProcessInputAction(m_MoveHandler, action, value, TimelineWindow.instance.state); + } + + public void ProcessTrim(InputEvent action, double value, bool stretch) + { + if (TimelineWindow.instance != null && TimelineWindow.instance.state != null) + { + m_TrimHandler.stretch = stretch; + ProcessInputAction(m_TrimHandler, action, value, TimelineWindow.instance.state); + } + } + + public void SetValueForEdge(IEnumerable items, AttractedEdge edge, double value) + { + if (TimelineWindow.instance != null && TimelineWindow.instance.state != null) + MoveInputHandler.SetValueForEdge(items, edge, value, TimelineWindow.instance.state); + } + + public void OnGUI(WindowState state, Event evt) + { + if (TimelineWindow.instance != null && TimelineWindow.instance.state != null) + { + m_MoveHandler.OnGUI(evt); + m_TrimHandler.OnGUI(state); + } + } + + static void ProcessInputAction(IInputHandler handler, InputEvent action, double value, WindowState state) + { + var items = SelectionManager.SelectedItems(); + switch (action) + { + case InputEvent.None: + return; + case InputEvent.DragEnter: + handler.OnEnterDrag(items, state); + break; + case InputEvent.Drag: + handler.OnDrag(value, state); + break; + case InputEvent.DragExit: + handler.OnExitDrag(); + break; + case InputEvent.KeyboardInput: + handler.OnSetValue(items, value, state); + break; + default: + return; + } + } + + interface IInputHandler + { + void OnEnterDrag(IEnumerable items, WindowState state); + void OnDrag(double value, WindowState state); + void OnExitDrag(); + void OnSetValue(IEnumerable items, double value, WindowState state); + } + + class TrimInputHandler : IInputHandler + { + bool isDragging { get; set; } + public bool stretch { get; set; } + + IEnumerable grabbedItems { get; set; } + + public void OnEnterDrag(IEnumerable items, WindowState state) + { + grabbedItems = items.OfType().ToArray(); + foreach (var item in grabbedItems) + { + EditMode.BeginTrim(item, TrimEdge.End); + } + + isDragging = true; + } + + public void OnDrag(double endValue, WindowState state) + { + var trimValue = endValue; + trimValue = TimelineWindow.instance.state.SnapToFrameIfRequired(trimValue); + + foreach (var item in grabbedItems) + { + EditMode.TrimEnd(item, trimValue, stretch); + } + state.UpdateRootPlayableDuration(state.editSequence.duration); + } + + public void OnExitDrag() + { + isDragging = false; + EditMode.FinishTrim(); + TimelineWindow.instance.Repaint(); + } + + public void OnSetValue(IEnumerable items, double endValue, WindowState state) + { + foreach (var item in items.OfType()) + { + EditMode.BeginTrim(item, TrimEdge.End); + EditMode.TrimEnd(item, endValue, stretch); + EditMode.FinishTrim(); + } + state.UpdateRootPlayableDuration(state.editSequence.duration); + } + + public void OnGUI(WindowState state) + { + if (!isDragging) return; + + foreach (var item in grabbedItems) + { + EditMode.DrawTrimGUI(state, item.gui, TrimEdge.End); + } + } + } + + class MoveInputHandler : IInputHandler + { + MoveItemHandler m_MoveItemHandler; + + public void OnEnterDrag(IEnumerable items, WindowState state) + { + if (items.Any()) + { + m_MoveItemHandler = new MoveItemHandler(state); + m_MoveItemHandler.Grab(items, items.First().parentTrack); + } + } + + public void OnDrag(double value, WindowState state) + { + if (m_MoveItemHandler == null) return; + + var startValue = value; + startValue = state.SnapToFrameIfRequired(startValue); + m_MoveItemHandler.OnAttractedEdge(null, ManipulateEdges.Both, AttractedEdge.None, startValue); + } + + public void OnExitDrag() + { + if (m_MoveItemHandler == null) return; + + m_MoveItemHandler.Drop(); + m_MoveItemHandler = null; + GUIUtility.ExitGUI(); + } + + public void OnSetValue(IEnumerable items, double value, WindowState state) + { + if (!items.Any()) return; + + m_MoveItemHandler = new MoveItemHandler(state); + m_MoveItemHandler.Grab(items, items.First().parentTrack); + m_MoveItemHandler.OnAttractedEdge(null, ManipulateEdges.Both, AttractedEdge.None, value); + m_MoveItemHandler.Drop(); + m_MoveItemHandler = null; + } + + public void OnGUI(Event evt) + { + if (m_MoveItemHandler != null) + m_MoveItemHandler.OnGUI(evt); + } + + public static void SetValueForEdge(IEnumerable items, AttractedEdge edge, double value, WindowState state) + { + var handler = new MoveItemHandler(state); + foreach (var item in items) + { + handler.Grab(new[] {item}, item.parentTrack); + handler.OnAttractedEdge(null, ManipulateEdges.Both, edge, value); + handler.Drop(); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditModeInputHandler.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditModeInputHandler.cs.meta new file mode 100644 index 0000000..7ea2d6d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/EditModeInputHandler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 459f6a07ee4a58b42ba2568b097c3ec4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move.meta new file mode 100644 index 0000000..b8648c3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bd3ffb9a97575a44a82f9ca086813154 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/IMoveItemMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/IMoveItemMode.cs new file mode 100644 index 0000000..ac459ca --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/IMoveItemMode.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + interface IMoveItemMode + { + void OnTrackDetach(IEnumerable itemsGroups); + void HandleTrackSwitch(IEnumerable itemsGroups); + bool AllowTrackSwitch(); + + double AdjustStartTime(WindowState state, ItemsPerTrack itemsGroup, double time); + + void OnModeClutchEnter(IEnumerable itemsGroups); + void OnModeClutchExit(IEnumerable itemsGroups); + + void BeginMove(IEnumerable itemsGroups); + void UpdateMove(IEnumerable itemsGroups); + void FinishMove(IEnumerable itemsGroups); + + bool ValidateMove(ItemsPerTrack itemsGroup); + } + + interface IMoveItemDrawer + { + void DrawGUI(WindowState state, IEnumerable movingItems, Color color); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/IMoveItemMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/IMoveItemMode.cs.meta new file mode 100644 index 0000000..619723e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/IMoveItemMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ff3d24ea34f9f74cb138e435f5f491e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemHandler.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemHandler.cs new file mode 100644 index 0000000..aac3e4d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemHandler.cs @@ -0,0 +1,312 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class MoveItemHandler : IAttractable, IAttractionHandler + { + bool m_Grabbing; + + MovingItems m_LeftMostMovingItems; + MovingItems m_RightMostMovingItems; + + HashSet m_ItemGUIs; + ItemsGroup m_ItemsGroup; + + public TrackAsset targetTrack { get; private set; } + + public bool allowTrackSwitch { get; private set; } + + int m_GrabbedModalUndoGroup = -1; + + readonly WindowState m_State; + + public MovingItems[] movingItems { get; private set; } + + public MoveItemHandler(WindowState state) + { + m_State = state; + } + + public void Grab(IEnumerable items, TrackAsset referenceTrack) + { + Grab(items, referenceTrack, Vector2.zero); + } + + public void Grab(IEnumerable items, TrackAsset referenceTrack, Vector2 mousePosition) + { + if (items == null) return; + + items = items.ToArray(); // Cache enumeration result + + if (!items.Any()) return; + + m_GrabbedModalUndoGroup = Undo.GetCurrentGroup(); + + var trackItems = items.GroupBy(c => c.parentTrack).ToArray(); + var trackItemsCount = trackItems.Length; + var tracks = items.Select(c => c.parentTrack).Where(x => x != null).Distinct(); + + movingItems = new MovingItems[trackItemsCount]; + + allowTrackSwitch = trackItemsCount == 1 && !trackItems.SelectMany(x => x).Any(x => x is MarkerItem); // For now, track switch is only supported when all items are on the same track and there are no items + foreach (var sourceTrack in tracks) + { + // one push per track handles all the clips on the track + TimelineUndo.PushUndo(sourceTrack, "Move Items"); + + // push all markers on the track because of ripple + foreach (var marker in sourceTrack.GetMarkers().OfType()) + TimelineUndo.PushUndo(marker, "Move Items"); + } + + for (var i = 0; i < trackItemsCount; ++i) + { + var track = trackItems[i].Key; + var grabbedItems = new MovingItems(m_State, track, trackItems[i].ToArray(), referenceTrack, mousePosition, allowTrackSwitch); + movingItems[i] = grabbedItems; + } + + m_LeftMostMovingItems = null; + m_RightMostMovingItems = null; + + foreach (var grabbedTrackItems in movingItems) + { + if (m_LeftMostMovingItems == null || m_LeftMostMovingItems.start > grabbedTrackItems.start) + m_LeftMostMovingItems = grabbedTrackItems; + + if (m_RightMostMovingItems == null || m_RightMostMovingItems.end < grabbedTrackItems.end) + m_RightMostMovingItems = grabbedTrackItems; + } + + m_ItemGUIs = new HashSet(); + m_ItemsGroup = new ItemsGroup(items); + + foreach (var item in items) + m_ItemGUIs.Add(item.gui); + + targetTrack = referenceTrack; + + EditMode.BeginMove(this); + m_Grabbing = true; + } + + public void Drop() + { + if (IsValidDrop()) + { + foreach (var grabbedItems in movingItems) + { + var track = grabbedItems.targetTrack; + TimelineUndo.PushUndo(track, "Move Items"); + + if (EditModeUtils.IsInfiniteTrack(track) && grabbedItems.clips.Any()) + ((AnimationTrack)track).ConvertToClipMode(); + } + + EditMode.FinishMove(); + + Done(); + } + else + { + Cancel(); + } + + EditMode.ClearEditMode(); + } + + bool IsValidDrop() + { + return movingItems.All(g => g.canDrop); + } + + void Cancel() + { + if (!m_Grabbing) + return; + + // TODO fix undo reselection persistency + // identify the clips by their playable asset, since that reference will survive the undo + // This is a workaround, until a more persistent fix for selection of clips across Undo can be found + var assets = movingItems.SelectMany(x => x.clips).Select(x => x.asset); + + Undo.RevertAllDownToGroup(m_GrabbedModalUndoGroup); + + // reselect the clips from the original clip + var clipsToSelect = movingItems.Select(x => x.originalTrack).SelectMany(x => x.GetClips()).Where(x => assets.Contains(x.asset)).ToArray(); + SelectionManager.RemoveTimelineSelection(); + + foreach (var c in clipsToSelect) + SelectionManager.Add(c); + + Done(); + } + + void Done() + { + foreach (var movingItem in movingItems) + { + foreach (var item in movingItem.items) + { + if (item.gui != null) + item.gui.isInvalid = false; + } + } + + movingItems = null; + m_LeftMostMovingItems = null; + m_RightMostMovingItems = null; + m_Grabbing = false; + + m_State.Refresh(); + } + + public double start { get { return m_ItemsGroup.start; } } + + public double end { get { return m_ItemsGroup.end; } } + + public bool ShouldSnapTo(ISnappable snappable) + { + var itemGUI = snappable as TimelineItemGUI; + return itemGUI != null && !m_ItemGUIs.Contains(itemGUI); + } + + public void UpdateTrackTarget(TrackAsset track) + { + if (!EditMode.AllowTrackSwitch()) + return; + + targetTrack = track; + + var targetTracksChanged = false; + + foreach (var grabbedItem in movingItems) + { + var prevTrackGUI = grabbedItem.targetTrack; + + grabbedItem.SetReferenceTrack(track); + + targetTracksChanged = grabbedItem.targetTrack != prevTrackGUI; + } + + if (targetTracksChanged) + EditMode.HandleTrackSwitch(movingItems); + + RefreshPreviewItems(); + + m_State.rebuildGraph |= targetTracksChanged; + } + + public void OnGUI(Event evt) + { + if (!m_Grabbing) + return; + + if (evt.type != EventType.Repaint) + return; + + var isValid = IsValidDrop(); + + using (new GUIViewportScope(m_State.GetWindow().sequenceContentRect)) + { + foreach (var grabbedClip in movingItems) + { + grabbedClip.RefreshBounds(m_State, evt.mousePosition); + + if (!grabbedClip.HasAnyDetachedParents()) + continue; + + grabbedClip.Draw(isValid); + } + + if (isValid) + { + EditMode.DrawMoveGUI(m_State, movingItems); + } + else + { + TimelineCursors.ClearCursor(); + } + } + } + + public void OnAttractedEdge(IAttractable attractable, ManipulateEdges manipulateEdges, AttractedEdge edge, double time) + { + double offset; + + if (edge == AttractedEdge.Right) + { + var duration = end - start; + var startTime = time - duration; + startTime = EditMode.AdjustStartTime(m_State, m_RightMostMovingItems, startTime); + + offset = startTime + duration - end; + } + else + { + if (edge == AttractedEdge.Left) + time = EditMode.AdjustStartTime(m_State, m_LeftMostMovingItems, time); + + offset = time - start; + } + + if (start + offset < 0.0) + offset = -start; + + if (!offset.Equals(0.0)) + { + foreach (var grabbedClips in movingItems) + grabbedClips.start += offset; + + EditMode.UpdateMove(); + + RefreshPreviewItems(); + } + } + + public void RefreshPreviewItems() + { + foreach (var movingItemsGroup in movingItems) + { + // Check validity + var valid = ValidateItemDrag(movingItemsGroup); + + foreach (var item in movingItemsGroup.items) + { + if (item.gui != null) + item.gui.isInvalid = !valid; + } + + movingItemsGroup.canDrop = valid; + } + } + + static bool ValidateItemDrag(ItemsPerTrack itemsGroup) + { + //TODO-marker: this is to prevent the drag operation from being canceled when moving only markers + if (itemsGroup.clips.Any()) + { + if (itemsGroup.targetTrack == null) + return false; + + if (itemsGroup.targetTrack.lockedInHierarchy) + return false; + + if (itemsGroup.items.Any(i => !i.IsCompatibleWithTrack(itemsGroup.targetTrack))) + return false; + + return EditMode.ValidateDrag(itemsGroup); + } + + return true; + } + + public void OnTrackDetach() + { + EditMode.OnTrackDetach(movingItems); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemHandler.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemHandler.cs.meta new file mode 100644 index 0000000..43dce6a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemHandler.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f6bd368ab00d75c459e2582e017191e6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeMix.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeMix.cs new file mode 100644 index 0000000..d4df368 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeMix.cs @@ -0,0 +1,138 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class MoveItemModeMix : IMoveItemMode, IMoveItemDrawer + { + public void OnTrackDetach(IEnumerable itemsGroups) + { + // Nothing + } + + public void HandleTrackSwitch(IEnumerable itemsGroups) + { + foreach (var itemsGroup in itemsGroups) + { + var targetTrack = itemsGroup.targetTrack; + if (targetTrack != null && itemsGroup.items.Any()) + { + var compatible = itemsGroup.items.First().IsCompatibleWithTrack(targetTrack) && + !EditModeUtils.IsInfiniteTrack(targetTrack); + var track = compatible ? targetTrack : null; + + if (track != null) + TimelineUndo.PushUndo(track, "Move Items"); + + EditModeUtils.SetParentTrack(itemsGroup.items, track); + } + else + { + EditModeUtils.SetParentTrack(itemsGroup.items, null); + } + } + } + + public bool AllowTrackSwitch() + { + return true; + } + + public double AdjustStartTime(WindowState state, ItemsPerTrack itemsGroup, double time) + { + return time; + } + + public void OnModeClutchEnter(IEnumerable itemsGroups) + { + // Nothing + } + + public void OnModeClutchExit(IEnumerable itemsGroups) + { + // Nothing + } + + public void BeginMove(IEnumerable itemsGroups) + { + // Nothing + } + + public void UpdateMove(IEnumerable itemsGroups) + { + // Nothing + } + + public void FinishMove(IEnumerable itemsGroups) + { + // Nothing + } + + public bool ValidateMove(ItemsPerTrack itemsGroup) + { + var track = itemsGroup.targetTrack; + var items = itemsGroup.items; + + if (EditModeUtils.IsInfiniteTrack(track)) + { + double startTime; + double stopTime; + EditModeUtils.GetInfiniteClipBoundaries(track, out startTime, out stopTime); + + return items.All(item => + !EditModeUtils.IsItemWithinRange(item, startTime, stopTime) && + !EditModeUtils.IsRangeWithinItem(startTime, stopTime, item)); + } + + var siblings = ItemsUtils.GetItemsExcept(itemsGroup.targetTrack, items); + return items.All(item => EditModeMixUtils.GetPlacementValidity(item, siblings) == PlacementValidity.Valid); + } + + public void DrawGUI(WindowState state, IEnumerable movingItems, Color color) + { + var selectionHasAnyBlendIn = false; + var selectionHasAnyBlendOut = false; + + foreach (var grabbedItems in movingItems) + { + var bounds = grabbedItems.onTrackItemsBounds; + + var counter = 0; + foreach (var item in grabbedItems.items.OfType()) + { + if (item.hasLeftBlend) + { + EditModeGUIUtils.DrawBoundsEdge(bounds[counter], color, TrimEdge.Start); + selectionHasAnyBlendIn = true; + } + + if (item.hasRightBlend) + { + EditModeGUIUtils.DrawBoundsEdge(bounds[counter], color, TrimEdge.End); + selectionHasAnyBlendOut = true; + } + counter++; + } + } + + if (selectionHasAnyBlendIn && selectionHasAnyBlendOut) + { + TimelineCursors.SetCursor(TimelineCursors.CursorType.MixBoth); + } + else if (selectionHasAnyBlendIn) + { + TimelineCursors.SetCursor(TimelineCursors.CursorType.MixLeft); + } + else if (selectionHasAnyBlendOut) + { + TimelineCursors.SetCursor(TimelineCursors.CursorType.MixRight); + } + else + { + TimelineCursors.ClearCursor(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeMix.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeMix.cs.meta new file mode 100644 index 0000000..966ebfa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeMix.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a2a8aecb05814e644abbb070fbd91156 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeReplace.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeReplace.cs new file mode 100644 index 0000000..4d55820 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeReplace.cs @@ -0,0 +1,99 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class MoveItemModeReplace : IMoveItemMode, IMoveItemDrawer + { + public void OnTrackDetach(IEnumerable itemsGroups) + { + // Nothing + } + + public void HandleTrackSwitch(IEnumerable itemsGroups) + { + // Nothing + } + + public bool AllowTrackSwitch() + { + return true; + } + + public double AdjustStartTime(WindowState state, ItemsPerTrack itemsGroup, double time) + { + return time; + } + + public void OnModeClutchEnter(IEnumerable itemsGroups) + { + // TODO + } + + public void OnModeClutchExit(IEnumerable itemsGroups) + { + // TODO + } + + public void BeginMove(IEnumerable itemsGroups) + { + foreach (var itemsGroup in itemsGroups) + { + EditModeUtils.SetParentTrack(itemsGroup.items, null); + } + } + + public void UpdateMove(IEnumerable itemsGroups) + { + // Nothing + } + + public void FinishMove(IEnumerable itemsGroups) + { + EditModeReplaceUtils.Insert(itemsGroups); + } + + public bool ValidateMove(ItemsPerTrack itemsGroup) + { + return true; + } + + public void DrawGUI(WindowState state, IEnumerable movingItems, Color color) + { + var operationWillReplace = false; + + foreach (var itemsPerTrack in movingItems) + { + var bounds = itemsPerTrack.onTrackItemsBounds; + + var counter = 0; + foreach (var item in itemsPerTrack.items) + { + if (EditModeUtils.GetFirstIntersectedItem(itemsPerTrack.items, item.start) != null) + { + EditModeGUIUtils.DrawBoundsEdge(bounds[counter], color, TrimEdge.Start); + operationWillReplace = true; + } + + if (EditModeUtils.GetFirstIntersectedItem(itemsPerTrack.items, item.end) != null) + { + EditModeGUIUtils.DrawBoundsEdge(bounds[counter], color, TrimEdge.End); + operationWillReplace = true; + } + + counter++; + // TODO Display swallowed clips? + } + } + + if (operationWillReplace) + { + TimelineCursors.SetCursor(TimelineCursors.CursorType.Replace); + } + else + { + TimelineCursors.ClearCursor(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeReplace.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeReplace.cs.meta new file mode 100644 index 0000000..abcc2f3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeReplace.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ea5e2240e8a7d9046a651557deec40b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeRipple.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeRipple.cs new file mode 100644 index 0000000..aadf5f7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeRipple.cs @@ -0,0 +1,271 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class MoveItemModeRipple : IMoveItemMode, IMoveItemDrawer + { + const float k_SnapToEdgeDistance = 30.0f; + + class PrevItemInfo + { + public ITimelineItem item; + public ITimelineItem firstSelectedItem; + public bool blending; + + public PrevItemInfo(ITimelineItem item, ITimelineItem firstSelectedItem) + { + this.item = item; + this.firstSelectedItem = firstSelectedItem; + blending = item != null && item.end > firstSelectedItem.start; + } + } + + readonly Dictionary> m_NextItems = new Dictionary>(); + readonly Dictionary m_PreviousItem = new Dictionary(); + double m_PreviousEnd; + + bool m_TrackLocked; + bool m_Detached; + + public void OnTrackDetach(IEnumerable itemsGroups) + { + if (m_TrackLocked) + return; + + if (m_Detached) + return; + + if (itemsGroups.Any(x => x.markers.Any())) + return; + + // Ripple can either remove or not clips when detaching them from their track. + // Keep it off for now. TODO: add clutch key to toggle this feature? + //EditModeRippleUtils.Remove(manipulatedClipsList); + + StartDetachMode(itemsGroups); + } + + public void HandleTrackSwitch(IEnumerable itemsGroups) + { + // Nothing + } + + public bool AllowTrackSwitch() + { + return !m_TrackLocked; + } + + public double AdjustStartTime(WindowState state, ItemsPerTrack itemsGroup, double time) + { + var track = itemsGroup.targetTrack; + if (track == null) + return time; + + double start; + double end; + + if (EditModeUtils.IsInfiniteTrack(track)) + { + EditModeUtils.GetInfiniteClipBoundaries(track, out start, out end); + } + else + { + var siblings = ItemsUtils.GetItemsExcept(track, itemsGroup.items); + var firstIntersectedItem = EditModeUtils.GetFirstIntersectedItem(siblings, time); + + if (firstIntersectedItem == null) + return time; + + start = firstIntersectedItem.start; + end = firstIntersectedItem.end; + } + + var closestTime = Math.Abs(time - start) < Math.Abs(time - end) ? start : end; + + var pixelTime = state.TimeToPixel(time); + var pixelClosestTime = state.TimeToPixel(closestTime); + + if (Math.Abs(pixelTime - pixelClosestTime) < k_SnapToEdgeDistance) + return closestTime; + + return time; + } + + void StartDetachMode(IEnumerable itemsGroups) + { + m_Detached = true; + + foreach (var itemsGroup in itemsGroups) + EditModeUtils.SetParentTrack(itemsGroup.items, null); + } + + public void OnModeClutchEnter(IEnumerable itemsGroups) + { + StartDetachMode(itemsGroups); + m_TrackLocked = false; + } + + public void OnModeClutchExit(IEnumerable itemsGroups) + { + m_Detached = false; + m_TrackLocked = false; + } + + public void BeginMove(IEnumerable itemsGroups) + { + m_NextItems.Clear(); + m_PreviousItem.Clear(); + var itemTypes = ItemsUtils.GetItemTypes(itemsGroups).ToList(); + + foreach (var itemsGroup in itemsGroups) + { + //can only ripple items of the same type as those selected + var sortedSelectedItems = itemsGroup.items.OrderBy(i => i.start).ToList(); + var siblings = itemsGroup.targetTrack.GetItemsExcept(itemsGroup.items); + var sortedSiblingsToRipple = siblings.Where(i => itemTypes.Contains(i.GetType())).OrderBy(i => i.start).ToList(); + var start = sortedSelectedItems.First().start; + + m_NextItems.Add(itemsGroup.targetTrack, sortedSiblingsToRipple.Where(i => i.start > start).ToList()); + m_PreviousItem.Add(itemsGroup.targetTrack, CalculatePrevItemInfo(sortedSelectedItems, sortedSiblingsToRipple, itemTypes)); + } + + m_PreviousEnd = itemsGroups.Max(m => m.items.Max(c => c.end)); + } + + public void UpdateMove(IEnumerable itemsGroups) + { + if (m_Detached) + return; + + m_TrackLocked = true; + + var overlap = 0.0; + foreach (var itemsGroup in itemsGroups) + { + var track = itemsGroup.targetTrack; + if (track == null) continue; + + var prevItemInfo = m_PreviousItem[track]; + if (prevItemInfo.item != null) + { + var prevItem = prevItemInfo.item; + var firstItem = prevItemInfo.firstSelectedItem; + + if (prevItemInfo.blending) + prevItemInfo.blending = prevItem.end > firstItem.start; + + if (prevItemInfo.blending) + { + var b = EditModeUtils.BlendDuration(firstItem, TrimEdge.End); + overlap = Math.Max(overlap, Math.Max(prevItem.start, prevItem.end - firstItem.end + firstItem.start + b) - firstItem.start); + } + else + { + overlap = Math.Max(overlap, prevItem.end - firstItem.start); + } + } + } + + if (overlap > 0) + { + foreach (var itemsGroup in itemsGroups) + { + foreach (var item in itemsGroup.items) + item.start += overlap; + } + } + + var newEnd = itemsGroups.Max(m => m.items.Max(c => c.end)); + + var offset = newEnd - m_PreviousEnd; + m_PreviousEnd = newEnd; + + foreach (var itemsGroup in itemsGroups) + { + foreach (var item in m_NextItems[itemsGroup.targetTrack]) + item.start += offset; + } + } + + static PrevItemInfo CalculatePrevItemInfo(List orderedSelection, List orderedSiblings, IEnumerable itemTypes) + { + ITimelineItem previousItem = null; + ITimelineItem firstSelectedItem = null; + var gap = double.PositiveInfinity; + + foreach (var type in itemTypes) + { + var firstSelectedItemOfType = orderedSelection.FirstOrDefault(i => i.GetType() == type); + if (firstSelectedItemOfType == null) continue; + + var previousItemOfType = orderedSiblings.LastOrDefault(i => i.GetType() == type && i.start < firstSelectedItemOfType.start); + if (previousItemOfType == null) continue; + + var currentGap = firstSelectedItemOfType.start - previousItemOfType.end; + if (currentGap < gap) + { + gap = currentGap; + firstSelectedItem = firstSelectedItemOfType; + previousItem = previousItemOfType; + } + } + + return new PrevItemInfo(previousItem, firstSelectedItem); + } + + public bool ValidateMove(ItemsPerTrack itemsGroup) + { + return true; + } + + public void FinishMove(IEnumerable itemsGroups) + { + if (m_Detached) + EditModeRippleUtils.Insert(itemsGroups); + + m_Detached = false; + m_TrackLocked = false; + } + + public void DrawGUI(WindowState state, IEnumerable movingItems, Color color) + { + if (m_Detached) + { + var xMin = float.MaxValue; + var xMax = float.MinValue; + + foreach (var grabbedItems in movingItems) + { + xMin = Math.Min(xMin, grabbedItems.onTrackItemsBounds.Min(b => b.xMin)); // TODO Cache this? + xMax = Math.Max(xMax, grabbedItems.onTrackItemsBounds.Max(b => b.xMax)); + } + + foreach (var grabbedItems in movingItems) + { + var bounds = Rect.MinMaxRect(xMin, grabbedItems.onTrackItemsBounds[0].yMin, + xMax, grabbedItems.onTrackItemsBounds[0].yMax); + + EditModeGUIUtils.DrawOverlayRect(bounds, new Color(1.0f, 1.0f, 1.0f, 0.5f)); + + EditModeGUIUtils.DrawBoundsEdge(bounds, color, TrimEdge.Start); + } + } + else + { + foreach (var grabbedItems in movingItems) + { + var bounds = Rect.MinMaxRect(grabbedItems.onTrackItemsBounds.Min(b => b.xMin), grabbedItems.onTrackItemsBounds[0].yMin, + grabbedItems.onTrackItemsBounds.Max(b => b.xMax), grabbedItems.onTrackItemsBounds[0].yMax); + + EditModeGUIUtils.DrawBoundsEdge(bounds, color, TrimEdge.Start); + } + } + + TimelineCursors.SetCursor(TimelineCursors.CursorType.Ripple); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeRipple.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeRipple.cs.meta new file mode 100644 index 0000000..890c3ed --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MoveItemModeRipple.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eebde5009793ce948bf5d4c4435b89b9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MovingItems.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MovingItems.cs new file mode 100644 index 0000000..1620269 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MovingItems.cs @@ -0,0 +1,137 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class MovingItems : ItemsPerTrack + { + TrackAsset m_ReferenceTrack; + readonly bool m_AllowTrackSwitch; + + readonly Rect[] m_ItemsBoundsOnTrack; + readonly Vector2[] m_ItemsMouseOffsets; + + static readonly Rect s_InvisibleBounds = new Rect(float.MaxValue, float.MaxValue, 0.0f, 0.0f); + + public TrackAsset originalTrack { get; } + + public override TrackAsset targetTrack + { + get + { + if (m_AllowTrackSwitch) + return m_ReferenceTrack; + + return originalTrack; + } + } + + public bool canDrop; + + public double start + { + get { return m_ItemsGroup.start; } + set { m_ItemsGroup.start = value; } + } + + public double end + { + get { return m_ItemsGroup.end; } + } + + public Rect[] onTrackItemsBounds + { + get { return m_ItemsBoundsOnTrack; } + } + + public MovingItems(WindowState state, TrackAsset parentTrack, ITimelineItem[] items, TrackAsset referenceTrack, Vector2 mousePosition, bool allowTrackSwitch) + : base(parentTrack, items) + { + originalTrack = parentTrack; + m_ReferenceTrack = referenceTrack; + m_AllowTrackSwitch = allowTrackSwitch; + + m_ItemsBoundsOnTrack = new Rect[items.Length]; + m_ItemsMouseOffsets = new Vector2[items.Length]; + + for (int i = 0; i < items.Length; ++i) + { + var itemGUi = items[i].gui; + + if (itemGUi != null) + { + m_ItemsBoundsOnTrack[i] = itemGUi.rect; + m_ItemsMouseOffsets[i] = mousePosition - m_ItemsBoundsOnTrack[i].position; + } + } + + canDrop = true; + } + + public void SetReferenceTrack(TrackAsset track) + { + m_ReferenceTrack = track; + } + + public bool HasAnyDetachedParents() + { + return m_ItemsGroup.items.Any(x => x.parentTrack == null); + } + + public void RefreshBounds(WindowState state, Vector2 mousePosition) + { + for (int i = 0; i < m_ItemsGroup.items.Length; ++i) + { + var item = m_ItemsGroup.items[i]; + var itemGUI = item.gui; + + if (item.parentTrack != null) + { + m_ItemsBoundsOnTrack[i] = itemGUI.visible ? itemGUI.rect : s_InvisibleBounds; + } + else + { + if (targetTrack != null) + { + var trackGUI = (TimelineTrackGUI)TimelineWindow.instance.allTracks.FirstOrDefault(t => t.track == targetTrack); + if (trackGUI == null) return; + var trackRect = trackGUI.boundingRect; + m_ItemsBoundsOnTrack[i] = itemGUI.RectToTimeline(trackRect, state); + } + else + { + m_ItemsBoundsOnTrack[i].position = mousePosition - m_ItemsMouseOffsets[i]; + } + } + } + } + + public void Draw(bool isValid) + { + for (int i = 0; i < m_ItemsBoundsOnTrack.Length; ++i) + { + var rect = m_ItemsBoundsOnTrack[i]; + DrawItemInternal(m_ItemsGroup.items[i], rect, isValid); + } + } + + static void DrawItemInternal(ITimelineItem item, Rect rect, bool isValid) + { + var clipGUI = item.gui as TimelineClipGUI; + + if (clipGUI != null) + { + if (isValid) + { + clipGUI.DrawGhostClip(rect); + } + else + { + clipGUI.DrawInvalidClip(rect); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MovingItems.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MovingItems.cs.meta new file mode 100644 index 0000000..f3c7fdb --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Move/MovingItems.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 81a142c61a4e14d46bb21b02548ad24d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence.meta new file mode 100644 index 0000000..64e65bc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dec586c160776104da4d9a4e472662bc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/EaseClip.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/EaseClip.cs new file mode 100644 index 0000000..7dddf3a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/EaseClip.cs @@ -0,0 +1,146 @@ +using System; +using System.Text; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class EaseClip : Manipulator + { + bool m_IsCaptured; + bool m_UndoSaved; + TimelineClipHandle m_EaseClipHandler; + ManipulateEdges m_Edges; + TimelineClip m_Clip; + StringBuilder m_OverlayText = new StringBuilder(""); + double m_OriginalValue; + + public static readonly string EaseInClipText = L10n.Tr("Ease In Clip"); + public static readonly string EaseOutClipText = L10n.Tr("Ease Out Clip"); + public static readonly string EaseInText = L10n.Tr("Ease In"); + public static readonly string EaseOutText = L10n.Tr("Ease Out"); + public static readonly string DurationFrameText = L10n.Tr(" Duration {0:0.00;-0.00} frames "); + public static readonly string DurationSecText = L10n.Tr(" Duration {0:0.00;-0.00} s "); + public static readonly string DeltaFrameText = L10n.Tr("({0:+0.00;-0.00} frames)"); + public static readonly string DeltaSecText = L10n.Tr("({0:+0.00;-0.00} s)"); + + protected override bool MouseDown(Event evt, WindowState state) + { + if (evt.modifiers != ManipulatorsUtils.actionModifier) + return false; + return MouseDownInternal(evt, state, PickerUtils.PickedLayerableOfType()); + } + + protected bool MouseDownInternal(Event evt, WindowState state, TimelineClipHandle handle) + { + if (handle == null) + return false; + + if (handle.clipGUI.clip != null && !handle.clipGUI.clip.clipCaps.HasAny(ClipCaps.Blending)) + return false; + + m_Edges = ManipulateEdges.Right; + if (handle.trimDirection == TrimEdge.Start) + m_Edges = ManipulateEdges.Left; + + if (m_Edges == ManipulateEdges.Left && handle.clipGUI.clip.hasBlendIn || m_Edges == ManipulateEdges.Right && handle.clipGUI.clip.hasBlendOut) + return false; + + m_IsCaptured = true; + m_UndoSaved = false; + + m_EaseClipHandler = handle; + m_Clip = handle.clipGUI.clip; + m_OriginalValue = m_Edges == ManipulateEdges.Left ? m_Clip.easeInDuration : m_Clip.easeOutDuration; + + + // Change cursor only when OnGUI Process (not in test) + if (GUIUtility.guiDepth > 0) + TimelineCursors.SetCursor(m_Edges == ManipulateEdges.Left ? TimelineCursors.CursorType.MixRight : TimelineCursors.CursorType.MixLeft); + + state.AddCaptured(this); + return true; + } + + protected override bool MouseUp(Event evt, WindowState state) + { + if (!m_IsCaptured) + return false; + m_IsCaptured = false; + m_UndoSaved = false; + state.captured.Clear(); + + // Clear cursor only when OnGUI Process (not in test) + if (GUIUtility.guiDepth > 0) + TimelineCursors.ClearCursor(); + + return true; + } + + protected override bool MouseDrag(Event evt, WindowState state) + { + if (!m_IsCaptured) + return false; + if (!m_UndoSaved) + { + var uiClip = m_EaseClipHandler.clipGUI; + string undoName = m_Edges == ManipulateEdges.Left ? EaseInClipText : EaseOutClipText; + TimelineUndo.PushUndo(uiClip.clip.parentTrack, undoName); + m_UndoSaved = true; + } + + double d = state.PixelDeltaToDeltaTime(evt.delta.x); + if (m_Edges == ManipulateEdges.Left) + { + m_Clip.easeInDuration = Math.Max(0, m_Clip.easeInDuration + d); + } + else if (m_Edges == ManipulateEdges.Right) + { + m_Clip.easeOutDuration = Math.Max(0, m_Clip.easeOutDuration - d); + } + RefreshOverlayStrings(m_EaseClipHandler, state); + return true; + } + + public override void Overlay(Event evt, WindowState state) + { + if (!m_IsCaptured) + return; + if (m_OverlayText.Length > 0) + { + int stringLength = m_OverlayText.Length; + var r = new Rect(evt.mousePosition.x - (stringLength / 2.0f), + m_EaseClipHandler.clipGUI.rect.yMax, + stringLength, 20); + GUI.Label(r, m_OverlayText.ToString(), TimelineWindow.styles.tinyFont); + } + } + + void RefreshOverlayStrings(TimelineClipHandle handle, WindowState state) + { + m_OverlayText.Length = 0; + m_OverlayText.Append(m_Edges == ManipulateEdges.Left ? EaseInText : EaseOutText); + double easeDuration = m_Edges == ManipulateEdges.Left ? m_Clip.easeInDuration : m_Clip.easeOutDuration; + double deltaDuration = easeDuration - m_OriginalValue; + bool hasDurationDelta = Math.Abs(deltaDuration) > double.Epsilon; + if (state.timeInFrames) + { + easeDuration *= state.editSequence.frameRate; + deltaDuration *= state.editSequence.frameRate; + m_OverlayText.AppendFormat(DurationFrameText, easeDuration); + if (hasDurationDelta) + { + m_OverlayText.AppendFormat(DeltaFrameText, deltaDuration); + } + } + else + { + m_OverlayText.AppendFormat(DurationSecText, easeDuration); + if (hasDurationDelta) + { + m_OverlayText.AppendFormat(DeltaSecText, deltaDuration); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/EaseClip.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/EaseClip.cs.meta new file mode 100644 index 0000000..a161d2f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/EaseClip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b7cabea05434bb9479aee1e121b0d103 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/Jog.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/Jog.cs new file mode 100644 index 0000000..b470b58 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/Jog.cs @@ -0,0 +1,61 @@ +using UnityEditor.ShortcutManagement; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class Jog : Manipulator + { + Vector2 m_MouseDownOrigin = Vector2.zero; + + [ClutchShortcut("Timeline/Jog", typeof(TimelineWindow), KeyCode.J)] + static void JogShortcut(ShortcutArguments args) + { + if (args.stage == ShortcutStage.Begin) + { + (args.context as TimelineWindow).state.isJogging = true; + } + else if (args.stage == ShortcutStage.End) + { + (args.context as TimelineWindow).state.isJogging = false; + } + } + + protected override bool MouseDown(Event evt, WindowState state) + { + if (!state.isJogging) + return false; + + m_MouseDownOrigin = evt.mousePosition; + state.playbackSpeed = 0.0f; + state.Play(); + + return true; + } + + protected override bool MouseUp(Event evt, WindowState state) + { + if (!state.isJogging) + { + return false; + } + + m_MouseDownOrigin = evt.mousePosition; + state.playbackSpeed = 0.0f; + state.Play(); + return false; + } + + protected override bool MouseDrag(Event evt, WindowState state) + { + if (!state.isJogging) + return false; + + var distance = evt.mousePosition - m_MouseDownOrigin; + + state.playbackSpeed = distance.x * 0.002f; + state.Play(); + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/Jog.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/Jog.cs.meta new file mode 100644 index 0000000..9f26650 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/Jog.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 949b7e126b3f27940885a6808a15458e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/MarkerHeaderContextMenu.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/MarkerHeaderContextMenu.cs new file mode 100644 index 0000000..a6b7c87 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/MarkerHeaderContextMenu.cs @@ -0,0 +1,24 @@ +using System; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class TimelineMarkerHeaderContextMenu : Manipulator + { + protected override bool ContextClick(Event evt, WindowState state) + { + if (!state.showMarkerHeader) + return false; + + if (!(state.GetWindow().markerHeaderRect.Contains(evt.mousePosition) + || state.GetWindow().markerContentRect.Contains(evt.mousePosition))) + return false; + + SequencerContextMenu.ShowMarkerHeaderContextMenu(evt.mousePosition, state); + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/MarkerHeaderContextMenu.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/MarkerHeaderContextMenu.cs.meta new file mode 100644 index 0000000..6f6012a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/MarkerHeaderContextMenu.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e74ddf4132f3401409c824bed60280ee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleSelect.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleSelect.cs new file mode 100644 index 0000000..17342ef --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleSelect.cs @@ -0,0 +1,36 @@ +using System.Linq; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class RectangleSelect : RectangleTool + { + protected override bool enableAutoPan { get { return false; } } + + protected override bool CanStartRectangle(Event evt, Vector2 mousePosition, WindowState state) + { + if (evt.button != 0 || evt.alt) + return false; + + return PickerUtils.pickedElements.All(e => e is IRowGUI); + } + + protected override bool OnFinish(Event evt, WindowState state, Rect rect) + { + var selectables = state.spacePartitioner.GetItemsInArea(rect).ToList(); + + if (!selectables.Any()) + return false; + + if (ItemSelection.CanClearSelection(evt)) + SelectionManager.Clear(); + + foreach (var selectable in selectables) + { + ItemSelection.HandleItemSelection(evt, selectable); + } + + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleSelect.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleSelect.cs.meta new file mode 100644 index 0000000..ddff16e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleSelect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: edd4f4b395430604d935bcf0b14c7d42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleTool.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleTool.cs new file mode 100644 index 0000000..5de1eb6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleTool.cs @@ -0,0 +1,169 @@ +using System; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + abstract class RectangleTool + { + struct TimelinePoint + { + readonly double m_Time; + readonly float m_YPos; + readonly float m_YScrollPos; + + readonly WindowState m_State; + readonly TimelineTreeViewGUI m_TreeViewGUI; + + public TimelinePoint(WindowState state, Vector2 mousePosition) + { + m_State = state; + m_TreeViewGUI = state.GetWindow().treeView; + + m_Time = m_State.PixelToTime(mousePosition.x); + m_YPos = mousePosition.y; + m_YScrollPos = m_TreeViewGUI.scrollPosition.y; + } + + public Vector2 ToPixel() + { + return new Vector2(m_State.TimeToPixel(m_Time), m_YPos - (m_TreeViewGUI.scrollPosition.y - m_YScrollPos)); + } + } + + TimeAreaAutoPanner m_TimeAreaAutoPanner; + + TimelinePoint m_StartPoint; + Vector2 m_EndPixel = Vector2.zero; + + Rect m_ActiveRect; + + protected abstract bool enableAutoPan { get; } + protected abstract bool CanStartRectangle(Event evt, Vector2 mousePosition, WindowState state); + protected abstract bool OnFinish(Event evt, WindowState state, Rect rect); + + int m_Id; + + public void OnGUI(WindowState state, EventType rawType, Vector2 mousePosition) + { + if (m_Id == 0) + m_Id = GUIUtility.GetPermanentControlID(); + + if (state == null || state.GetWindow().treeView == null) + return; + + var evt = Event.current; + + if (rawType == EventType.MouseDown || evt.type == EventType.MouseDown) + { + if (state.IsCurrentEditingASequencerTextField()) + return; + + m_ActiveRect = TimelineWindow.instance.sequenceContentRect; + + if (!m_ActiveRect.Contains(mousePosition)) + return; + + if (!CanStartRectangle(evt, mousePosition, state)) + return; + + if (enableAutoPan) + m_TimeAreaAutoPanner = new TimeAreaAutoPanner(state); + + m_StartPoint = new TimelinePoint(state, mousePosition); + m_EndPixel = mousePosition; + + GUIUtility.hotControl = m_Id; //HACK: Because the treeView eats all the events, steal the hotControl if necessary... + evt.Use(); + + return; + } + + switch (evt.GetTypeForControl(m_Id)) + { + case EventType.KeyDown: + { + if (GUIUtility.hotControl == m_Id) + { + if (evt.keyCode == KeyCode.Escape) + { + m_TimeAreaAutoPanner = null; + + GUIUtility.hotControl = 0; + evt.Use(); + } + } + + return; + } + + case EventType.MouseDrag: + { + if (GUIUtility.hotControl != m_Id) + return; + + m_EndPixel = mousePosition; + evt.Use(); + + return; + } + + case EventType.MouseUp: + { + if (GUIUtility.hotControl != m_Id) + return; + + m_TimeAreaAutoPanner = null; + + var rect = CurrentRectangle(); + + if (IsValidRect(rect)) + OnFinish(evt, state, rect); + + GUIUtility.hotControl = 0; + evt.Use(); + + return; + } + } + + if (GUIUtility.hotControl == m_Id) + { + if (evt.type == EventType.Repaint) + { + var r = CurrentRectangle(); + + if (IsValidRect(r)) + { + using (new GUIViewportScope(m_ActiveRect)) + { + DrawRectangle(r); + } + } + } + + if (m_TimeAreaAutoPanner != null) + m_TimeAreaAutoPanner.OnGUI(evt); + } + } + + protected virtual void DrawRectangle(Rect rect) + { + EditorStyles.selectionRect.Draw(rect, GUIContent.none, false, false, false, false); + } + + static bool IsValidRect(Rect rect) + { + return rect.width >= 1.0f && rect.height >= 1.0f; + } + + Rect CurrentRectangle() + { + var startPixel = m_StartPoint.ToPixel(); + return Rect.MinMaxRect( + Math.Min(startPixel.x, m_EndPixel.x), + Math.Min(startPixel.y, m_EndPixel.y), + Math.Max(startPixel.x, m_EndPixel.x), + Math.Max(startPixel.y, m_EndPixel.y)); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleTool.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleTool.cs.meta new file mode 100644 index 0000000..3a0d71a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleTool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 24a7ce8b48db53747a4e8abbda77eac4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleZoom.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleZoom.cs new file mode 100644 index 0000000..0a2d45f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleZoom.cs @@ -0,0 +1,23 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class RectangleZoom : RectangleTool + { + protected override bool enableAutoPan { get { return true; } } + + protected override bool CanStartRectangle(Event evt, Vector2 mousePosition, WindowState state) + { + return evt.button == 1 && evt.modifiers == (EventModifiers.Alt | EventModifiers.Shift); + } + + protected override bool OnFinish(Event evt, WindowState state, Rect rect) + { + var x = state.PixelToTime(rect.xMin); + var y = state.PixelToTime(rect.xMax); + state.SetTimeAreaShownRange(x, y); + + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleZoom.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleZoom.cs.meta new file mode 100644 index 0000000..e32aad5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/RectangleZoom.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5aa8f57287fc17149bcd798be813180b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/SelectAndMoveItem.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/SelectAndMoveItem.cs new file mode 100644 index 0000000..b8d9a77 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/SelectAndMoveItem.cs @@ -0,0 +1,297 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class ClearSelection : Manipulator + { + protected override bool MouseDown(Event evt, WindowState state) + { + // If we hit this point this means no one used the mouse down events. We can safely clear the selection if needed + if (evt.button != 0) + return false; + + var window = state.GetWindow(); + + if (!window.sequenceRect.Contains(evt.mousePosition)) + return false; + + if (ItemSelection.CanClearSelection(evt)) + { + SelectionManager.Clear(); + return true; + } + + return false; + } + } + + static class ItemSelection + { + public static bool CanClearSelection(Event evt) + { + return !evt.control && !evt.command && !evt.shift; + } + + public static void RangeSelectItems(ITimelineItem lastItemToSelect) + { + var selectSorted = SelectionManager.SelectedItems().ToList(); + var firstSelect = selectSorted.FirstOrDefault(); + if (firstSelect == null) + { + SelectionManager.Add(lastItemToSelect); + return; + } + + var allTracks = TimelineEditor.inspectedAsset.flattenedTracks; + var allItems = allTracks.SelectMany(ItemsUtils.GetItems).ToList(); + TimelineHelpers.RangeSelect(allItems, selectSorted, lastItemToSelect, SelectionManager.Add, SelectionManager.Remove); + } + + public static ISelectable HandleSingleSelection(Event evt) + { + var item = PickerUtils.PickedLayerableOfType(); + + if (item != null) + { + var selected = item.IsSelected(); + if (!selected && CanClearSelection(evt)) + SelectionManager.Clear(); + + if (evt.modifiers == EventModifiers.Shift) + { + if (!selected) + RangeSelectItems((item as TimelineItemGUI).item); + } + else + { + HandleItemSelection(evt, item); + } + } + + return item; + } + + public static void HandleItemSelection(Event evt, ISelectable item) + { + if (evt.modifiers == ManipulatorsUtils.actionModifier) + { + if (item.IsSelected()) + item.Deselect(); + else + item.Select(); + } + else + { + if (!item.IsSelected()) + item.Select(); + } + } + } + + class SelectAndMoveItem : Manipulator + { + bool m_Dragged; + SnapEngine m_SnapEngine; + TimeAreaAutoPanner m_TimeAreaAutoPanner; + Vector2 m_MouseDownPosition; + + bool m_HorizontalMovementDone; + bool m_VerticalMovementDone; + + MoveItemHandler m_MoveItemHandler; + bool m_CycleMarkersPending; + + protected override bool MouseDown(Event evt, WindowState state) + { + if (evt.alt || evt.button != 0) + return false; + + m_Dragged = false; + + // Cycling markers and selection are mutually exclusive operations + if (!HandleMarkerCycle() && !HandleSingleSelection(evt)) + return false; + + m_MouseDownPosition = evt.mousePosition; + m_VerticalMovementDone = false; + m_HorizontalMovementDone = false; + + return true; + } + + protected override bool MouseUp(Event evt, WindowState state) + { + if (!m_Dragged) + { + var item = PickerUtils.PickedLayerableOfType(); + + if (item == null) + return false; + + if (!item.IsSelected()) + return false; + + // Re-selecting an item part of a multi-selection should only keep this item selected. + if (SelectionManager.Count() > 1 && ItemSelection.CanClearSelection(evt)) + { + SelectionManager.Clear(); + item.Select(); + return true; + } + + if (m_CycleMarkersPending) + { + m_CycleMarkersPending = false; + TimelineMarkerClusterGUI.CycleMarkers(); + return true; + } + + return false; + } + + m_TimeAreaAutoPanner = null; + + DropItems(); + + m_SnapEngine = null; + m_MoveItemHandler = null; + + state.Evaluate(); + state.RemoveCaptured(this); + m_Dragged = false; + TimelineCursors.ClearCursor(); + + return true; + } + + protected override bool DoubleClick(Event evt, WindowState state) + { + return MouseDown(evt, state) && MouseUp(evt, state); + } + + protected override bool MouseDrag(Event evt, WindowState state) + { + if (state.editSequence.isReadOnly) + return false; + + // case 1099285 - ctrl-click can cause no clips to be selected + var selectedItemsGUI = SelectionManager.SelectedItems(); + if (!selectedItemsGUI.Any()) + { + m_Dragged = false; + return false; + } + + const float hDeadZone = 5.0f; + const float vDeadZone = 5.0f; + + bool vDone = m_VerticalMovementDone || Math.Abs(evt.mousePosition.y - m_MouseDownPosition.y) > vDeadZone; + bool hDone = m_HorizontalMovementDone || Math.Abs(evt.mousePosition.x - m_MouseDownPosition.x) > hDeadZone; + + m_CycleMarkersPending = false; + + if (!m_Dragged) + { + var canStartMove = vDone || hDone; + + if (canStartMove) + { + state.AddCaptured(this); + m_Dragged = true; + + var referenceTrack = GetTrackDropTargetAt(state, m_MouseDownPosition); + + foreach (var item in selectedItemsGUI) + item.gui.StartDrag(); + + m_MoveItemHandler = new MoveItemHandler(state); + + m_MoveItemHandler.Grab(selectedItemsGUI, referenceTrack, m_MouseDownPosition); + + m_SnapEngine = new SnapEngine(m_MoveItemHandler, m_MoveItemHandler, ManipulateEdges.Both, + state, m_MouseDownPosition); + + m_TimeAreaAutoPanner = new TimeAreaAutoPanner(state); + } + } + + if (!m_VerticalMovementDone) + { + m_VerticalMovementDone = vDone; + + if (m_VerticalMovementDone) + m_MoveItemHandler.OnTrackDetach(); + } + + if (!m_HorizontalMovementDone) + { + m_HorizontalMovementDone = hDone; + } + + if (m_Dragged) + { + if (m_HorizontalMovementDone) + m_SnapEngine.Snap(evt.mousePosition, evt.modifiers); + + if (m_VerticalMovementDone) + { + var track = GetTrackDropTargetAt(state, evt.mousePosition); + m_MoveItemHandler.UpdateTrackTarget(track); + } + + state.Evaluate(); + } + + return true; + } + + public override void Overlay(Event evt, WindowState state) + { + if (!m_Dragged) + return; + + if (m_TimeAreaAutoPanner != null) + m_TimeAreaAutoPanner.OnGUI(evt); + + m_MoveItemHandler.OnGUI(evt); + + if (!m_MoveItemHandler.allowTrackSwitch || m_MoveItemHandler.targetTrack != null) + { + TimeIndicator.Draw(state, m_MoveItemHandler.start, m_MoveItemHandler.end); + m_SnapEngine.OnGUI(); + } + } + + bool HandleMarkerCycle() + { + m_CycleMarkersPending = TimelineMarkerClusterGUI.CanCycleMarkers(); + return m_CycleMarkersPending; + } + + bool HandleSingleSelection(Event evt) + { + return ItemSelection.HandleSingleSelection(evt) != null; + } + + void DropItems() + { + // Order matters here: m_MoveItemHandler.movingItems is destroyed during call to Drop() + foreach (var movingItem in m_MoveItemHandler.movingItems) + { + foreach (var item in movingItem.items) + item.gui.StopDrag(); + } + + m_MoveItemHandler.Drop(); + } + + static TrackAsset GetTrackDropTargetAt(WindowState state, Vector2 point) + { + var track = state.spacePartitioner.GetItemsAtPosition(point).FirstOrDefault(); + return track != null ? track.asset : null; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/SelectAndMoveItem.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/SelectAndMoveItem.cs.meta new file mode 100644 index 0000000..16f0152 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/SelectAndMoveItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f4f988528bbbb0846a4cb50efb4587a5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrackZoom.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrackZoom.cs new file mode 100644 index 0000000..fc167f4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrackZoom.cs @@ -0,0 +1,20 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TrackZoom : Manipulator + { + // only handles 'vertical' zoom. horizontal is handled in timelineGUI + protected override bool MouseWheel(Event evt, WindowState state) + { + if (EditorGUI.actionKey) + { + state.trackScale = Mathf.Min(Mathf.Max(state.trackScale + (evt.delta.y * 0.1f), 1.0f), 100.0f); + return true; + } + + return false; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrackZoom.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrackZoom.cs.meta new file mode 100644 index 0000000..a13fea6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrackZoom.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6e7c80eefe2def5459e0b486b3ab96e2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrimClip.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrimClip.cs new file mode 100644 index 0000000..0918a17 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrimClip.cs @@ -0,0 +1,232 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TrimClip : Manipulator + { + class TrimClipAttractionHandler : IAttractionHandler + { + public void OnAttractedEdge(IAttractable attractable, ManipulateEdges manipulateEdges, AttractedEdge edge, double time) + { + var clipGUI = attractable as TimelineClipGUI; + if (clipGUI == null) + return; + + var clipItem = ItemsUtils.ToItem(clipGUI.clip); + if (manipulateEdges == ManipulateEdges.Right) + { + bool affectTimeScale = Event.current.modifiers == EventModifiers.Shift; // TODO Do not use Event.current from here. + EditMode.TrimEnd(clipItem, time, affectTimeScale); + } + else if (manipulateEdges == ManipulateEdges.Left) + { + EditMode.TrimStart(clipItem, time); + } + } + } + + bool m_IsCaptured; + TimelineClipHandle m_TrimClipHandler; + + double m_OriginalDuration; + double m_OriginalTimeScale; + bool m_UndoSaved; + SnapEngine m_SnapEngine; + + readonly StringBuilder m_OverlayText = new StringBuilder(); + readonly List m_OverlayStrings = new List(); + + static readonly double kEpsilon = 0.0000001; + + protected override bool MouseDown(Event evt, WindowState state) + { + var handle = PickerUtils.PickedLayerableOfType(); + if (handle == null) + return false; + + if (handle.clipGUI.clip.parentTrack != null && handle.clipGUI.clip.parentTrack.lockedInHierarchy) + return false; + + if (ItemSelection.CanClearSelection(evt)) + SelectionManager.Clear(); + + if (!SelectionManager.Contains(handle.clipGUI.clip)) + SelectionManager.Add(handle.clipGUI.clip); + + m_TrimClipHandler = handle; + + m_IsCaptured = true; + state.AddCaptured(this); + + m_UndoSaved = false; + + var clip = m_TrimClipHandler.clipGUI.clip; + + m_OriginalDuration = clip.duration; + m_OriginalTimeScale = clip.timeScale; + + RefreshOverlayStrings(m_TrimClipHandler, state); + + // in ripple trim, the right edge moves and needs to snap + var edges = ManipulateEdges.Right; + if (EditMode.editType != EditMode.EditType.Ripple && m_TrimClipHandler.trimDirection == TrimEdge.Start) + edges = ManipulateEdges.Left; + m_SnapEngine = new SnapEngine(m_TrimClipHandler.clipGUI, new TrimClipAttractionHandler(), edges, state, + evt.mousePosition); + + EditMode.BeginTrim(ItemsUtils.ToItem(clip), m_TrimClipHandler.trimDirection); + + return true; + } + + protected override bool MouseUp(Event evt, WindowState state) + { + if (!m_IsCaptured) + return false; + + m_IsCaptured = false; + m_TrimClipHandler = null; + m_UndoSaved = false; + m_SnapEngine = null; + EditMode.FinishTrim(); + + state.captured.Clear(); + + return true; + } + + protected override bool MouseDrag(Event evt, WindowState state) + { + if (state.editSequence.isReadOnly) + return false; + + if (!m_IsCaptured) + return false; + + if (!m_UndoSaved) + { + var uiClip = m_TrimClipHandler.clipGUI; + TimelineUndo.PushUndo(uiClip.clip.parentTrack, "Trim Clip"); + if (TimelineUtility.IsRecordableAnimationClip(uiClip.clip)) + { + TimelineUndo.PushUndo(uiClip.clip.animationClip, "Trim Clip"); + } + + m_UndoSaved = true; + } + + if (m_SnapEngine != null) + m_SnapEngine.Snap(evt.mousePosition, evt.modifiers); + + RefreshOverlayStrings(m_TrimClipHandler, state); + + if (Selection.activeObject != null) + EditorUtility.SetDirty(Selection.activeObject); + + // updates the duration of the graph without rebuilding + state.UpdateRootPlayableDuration(state.editSequence.duration); + + return true; + } + + public override void Overlay(Event evt, WindowState state) + { + if (!m_IsCaptured) + return; + + EditMode.DrawTrimGUI(state, m_TrimClipHandler.clipGUI, m_TrimClipHandler.trimDirection); + + bool trimStart = m_TrimClipHandler.trimDirection == TrimEdge.Start; + + TimeIndicator.Draw(state, trimStart ? m_TrimClipHandler.clipGUI.start : m_TrimClipHandler.clipGUI.end); + + if (m_SnapEngine != null) + m_SnapEngine.OnGUI(trimStart, !trimStart); + + if (m_OverlayStrings.Count > 0) + { + const float padding = 4.0f; + var labelStyle = TimelineWindow.styles.tinyFont; + var longestLine = labelStyle.CalcSize( + new GUIContent(m_OverlayStrings.Aggregate("", (max, cur) => max.Length > cur.Length ? max : cur))); + var stringLength = longestLine.x + padding; + var lineHeight = longestLine.y + padding; + + var r = new Rect(evt.mousePosition.x - (stringLength / 2.0f), + m_TrimClipHandler.clipGUI.rect.yMax, + stringLength, lineHeight); + + foreach (var s in m_OverlayStrings) + { + GUI.Label(r, s, labelStyle); + r.y += lineHeight; + } + } + } + + void RefreshOverlayStrings(TimelineClipHandle handle, WindowState state) + { + m_OverlayStrings.Clear(); + + m_OverlayText.Length = 0; + + var differenceDuration = handle.clipGUI.clip.duration - m_OriginalDuration; + bool hasDurationDelta = Math.Abs(differenceDuration) > kEpsilon; + + if (state.timeInFrames) + { + var durationInFrame = handle.clipGUI.clip.duration * state.referenceSequence.frameRate; + m_OverlayText.Append("duration: ").Append(durationInFrame.ToString("f2")).Append(" frames"); + + if (hasDurationDelta) + { + m_OverlayText.Append(" ("); + + if (differenceDuration > 0.0) + m_OverlayText.Append("+"); + + var valueInFrame = differenceDuration * state.referenceSequence.frameRate; + m_OverlayText.Append(valueInFrame.ToString("f2")).Append(" frames)"); + } + } + else + { + m_OverlayText.Append("duration: ").Append(handle.clipGUI.clip.duration.ToString("f2")).Append("s"); + + if (hasDurationDelta) + { + m_OverlayText.Append(" ("); + + if (differenceDuration > 0.0) + m_OverlayText.Append("+"); + + m_OverlayText.Append(differenceDuration.ToString("f2")).Append("s)"); + } + } + + m_OverlayStrings.Add(m_OverlayText.ToString()); + + m_OverlayText.Length = 0; + + var differenceSpeed = m_OriginalTimeScale - handle.clipGUI.clip.timeScale; + if (Math.Abs(differenceSpeed) > kEpsilon) + { + m_OverlayText.Append("speed: ").Append(handle.clipGUI.clip.timeScale.ToString("p2")); + + m_OverlayText.Append(" ("); + + if (differenceSpeed > 0.0) + m_OverlayText.Append("+"); + + m_OverlayText.Append(differenceSpeed.ToString("p2")).Append(")"); + + m_OverlayStrings.Add(m_OverlayText.ToString()); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrimClip.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrimClip.cs.meta new file mode 100644 index 0000000..063a1c6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Sequence/TrimClip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 511aa760b8728a940a41c29837945292 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeAreaAutoPanner.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeAreaAutoPanner.cs new file mode 100644 index 0000000..8052d65 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeAreaAutoPanner.cs @@ -0,0 +1,72 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class TimeAreaAutoPanner + { + readonly WindowState m_State; + readonly TimelineWindow m_Window; + readonly Rect m_ViewRect; + + const float k_PixelDistanceToMaxSpeed = 100.0f; + const float k_MaxPanSpeed = 30.0f; + + public TimeAreaAutoPanner(WindowState state) + { + m_State = state; + m_Window = m_State.GetWindow(); + + var shownRange = m_State.timeAreaShownRange; + var trackViewBounds = m_Window.sequenceRect; + m_ViewRect = Rect.MinMaxRect(m_State.TimeToPixel(shownRange.x), trackViewBounds.yMin, + m_State.TimeToPixel(shownRange.y), trackViewBounds.yMax); + } + + public void OnGUI(Event evt) + { + if (evt.type != EventType.Layout) + return; + + var hFactor = 0.0f; + var vFactor = 0.0f; + + bool horizontalPan = GetPanFactor(evt.mousePosition.x, m_ViewRect.xMin, m_ViewRect.xMax, out hFactor); + bool verticalPan = GetPanFactor(evt.mousePosition.y, m_ViewRect.yMin, m_ViewRect.yMax, out vFactor); + + if (horizontalPan) + { + var translation = m_State.timeAreaTranslation; + translation.x += hFactor * k_MaxPanSpeed; + + m_State.SetTimeAreaTransform(translation, m_State.timeAreaScale); + } + + if (verticalPan) + { + var translation = m_Window.treeView.scrollPosition; + translation.y -= vFactor * k_MaxPanSpeed; + + m_Window.treeView.scrollPosition = translation; + } + } + + static bool GetPanFactor(float v, float min, float max, out float factor) + { + factor = 0.0f; + + if (v < min) + { + factor = Mathf.Clamp01((min - v) / k_PixelDistanceToMaxSpeed); + return true; + } + + if (v > max) + { + factor = -Mathf.Clamp01((v - max) / k_PixelDistanceToMaxSpeed); + return true; + } + + return false; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeAreaAutoPanner.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeAreaAutoPanner.cs.meta new file mode 100644 index 0000000..00a9eaf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeAreaAutoPanner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 02e1fe0a338b35545a5fed1345848332 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeIndicator.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeIndicator.cs new file mode 100644 index 0000000..d896ae5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeIndicator.cs @@ -0,0 +1,47 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + static class TimeIndicator + { + static readonly Tooltip s_Tooltip = new Tooltip(DirectorStyles.Instance.displayBackground, DirectorStyles.Instance.tinyFont); + + public static void Draw(WindowState state, double time) + { + var bounds = state.timeAreaRect; + bounds.xMin = Mathf.Max(bounds.xMin, state.TimeToTimeAreaPixel(time)); + + using (new GUIViewportScope(state.timeAreaRect)) + { + s_Tooltip.text = TimeReferenceUtility.ToTimeString(time); + + var tooltipBounds = s_Tooltip.bounds; + tooltipBounds.xMin = bounds.xMin - (tooltipBounds.width / 2.0f); + tooltipBounds.y = bounds.y; + s_Tooltip.bounds = tooltipBounds; + + if (time >= 0) + s_Tooltip.Draw(); + } + + if (time >= 0) + { + Graphics.DrawLineAtTime(state, time, Color.black, true); + } + } + + public static void Draw(WindowState state, double start, double end) + { + var bounds = state.timeAreaRect; + bounds.xMin = Mathf.Max(bounds.xMin, state.TimeToTimeAreaPixel(start)); + bounds.xMax = Mathf.Min(bounds.xMax, state.TimeToTimeAreaPixel(end)); + + var color = DirectorStyles.Instance.selectedStyle.focused.textColor; + color.a = 0.12f; + EditorGUI.DrawRect(bounds, color); + + Draw(state, start); + Draw(state, end); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeIndicator.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeIndicator.cs.meta new file mode 100644 index 0000000..c8244f7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimeIndicator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1d446e57147ca9b4183edfbbfa9bf206 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimelineClipGroup.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimelineClipGroup.cs new file mode 100644 index 0000000..03f4d8d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimelineClipGroup.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TimelineClipGroup + { + readonly TimelineClip[] m_Clips; + readonly TimelineClip m_LeftMostClip; + readonly TimelineClip m_RightMostClip; + + public TimelineClip[] clips + { + get { return m_Clips; } + } + + public double start + { + get { return m_LeftMostClip.start; } + set + { + var offset = value - m_LeftMostClip.start; + + foreach (var clip in m_Clips) + clip.start += offset; + } + } + + public double end + { + get { return m_RightMostClip.end; } + } + + public TimelineClipGroup(IEnumerable clips) + { + Debug.Assert(clips != null && clips.Any()); + + m_Clips = clips.ToArray(); + m_LeftMostClip = null; + m_RightMostClip = null; + + foreach (var clip in m_Clips) + { + if (m_LeftMostClip == null || clip.start < m_LeftMostClip.start) + m_LeftMostClip = clip; + + if (m_RightMostClip == null || clip.end > m_RightMostClip.end) + m_RightMostClip = clip; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimelineClipGroup.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimelineClipGroup.cs.meta new file mode 100644 index 0000000..6106644 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/TimelineClipGroup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b8c3bda3a988b5f4c910a5c3f722d0be +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim.meta new file mode 100644 index 0000000..e40400f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f6d64d8648793944dbadfd71f0f4b0a1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/ITrimItemMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/ITrimItemMode.cs new file mode 100644 index 0000000..9286600 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/ITrimItemMode.cs @@ -0,0 +1,23 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + enum TrimEdge + { + Start, + End + } + + interface ITrimItemMode + { + void OnBeforeTrim(ITrimmable item, TrimEdge trimDirection); + + void TrimStart(ITrimmable item, double time); + void TrimEnd(ITrimmable item, double time, bool affectTimeScale); + } + + interface ITrimItemDrawer + { + void DrawGUI(WindowState state, Rect bounds, Color color, TrimEdge edge); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/ITrimItemMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/ITrimItemMode.cs.meta new file mode 100644 index 0000000..0dc6ddc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/ITrimItemMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b4a5ce78107bc38409a3bb5e8b3289ac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeMix.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeMix.cs new file mode 100644 index 0000000..7232c29 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeMix.cs @@ -0,0 +1,102 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TrimItemModeMix : ITrimItemMode, ITrimItemDrawer + { + ITrimmable m_Item; + + double m_Min; + double m_Max; + + public void OnBeforeTrim(ITrimmable item, TrimEdge trimDirection) + { + m_Item = item; + + var sortedItems = ItemsUtils.GetItemsExcept(item.parentTrack, new[] {item}) + .OfType() + .OrderBy(c => c.start); + + var itemStart = (DiscreteTime)item.start; + var itemEnd = (DiscreteTime)item.end; + + var overlapped = sortedItems.LastOrDefault(c => (DiscreteTime)c.start == itemStart && (DiscreteTime)c.end == itemEnd); + + ITrimmable nextItem; + ITrimmable prevItem; + + m_Min = 0.0; + m_Max = double.PositiveInfinity; + + var blendableItem = item as IBlendable; + if (blendableItem != null && blendableItem.supportsBlending) + { + if (trimDirection == TrimEdge.Start) + { + nextItem = sortedItems.FirstOrDefault(c => (DiscreteTime)c.start >= itemStart && (DiscreteTime)c.end > itemEnd); + prevItem = sortedItems.LastOrDefault(c => (DiscreteTime)c.start <= itemStart && (DiscreteTime)c.end < itemEnd); + + if (prevItem != null) + m_Min = prevItem.start + EditModeUtils.BlendDuration(prevItem, TrimEdge.Start); + + if (nextItem != null) + m_Max = nextItem.start; + } + else + { + nextItem = sortedItems.FirstOrDefault(c => c != overlapped && (DiscreteTime)c.start >= itemStart && (DiscreteTime)c.end >= itemEnd); + prevItem = sortedItems.LastOrDefault(c => c != overlapped && (DiscreteTime)c.start <= itemStart && (DiscreteTime)c.end <= itemEnd); + + if (prevItem != null) + m_Min = prevItem.end; + + if (nextItem != null) + m_Max = nextItem.end - EditModeUtils.BlendDuration(nextItem, TrimEdge.End); + } + } + else + { + nextItem = sortedItems.FirstOrDefault(c => (DiscreteTime)c.start > itemStart); + prevItem = sortedItems.LastOrDefault(c => (DiscreteTime)c.start < itemStart); + + if (prevItem != null) + m_Min = prevItem.end; + + if (nextItem != null) + m_Max = nextItem.start; + } + } + + public void TrimStart(ITrimmable item, double time) + { + time = Math.Min(Math.Max(time, m_Min), m_Max); + item.SetStart(time); + } + + public void TrimEnd(ITrimmable item, double time, bool affectTimeScale) + { + time = Math.Min(Math.Max(time, m_Min), m_Max); + item.SetEnd(time, affectTimeScale); + } + + public void DrawGUI(WindowState state, Rect bounds, Color color, TrimEdge edge) + { + if (EditModeUtils.HasBlends(m_Item, edge)) + { + EditModeGUIUtils.DrawBoundsEdge(bounds, color, edge); + var cursorType = (edge == TrimEdge.End) + ? TimelineCursors.CursorType.MixRight + : TimelineCursors.CursorType.MixLeft; + + TimelineCursors.SetCursor(cursorType); + } + else + { + TimelineCursors.ClearCursor(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeMix.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeMix.cs.meta new file mode 100644 index 0000000..cac1412 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeMix.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ddd9f7d3cce6724696a33752ab2f5a4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeReplace.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeReplace.cs new file mode 100644 index 0000000..4cc798c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeReplace.cs @@ -0,0 +1,139 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TrimItemModeReplace : ITrimItemMode, ITrimItemDrawer + { + ITrimmable m_Item; + + ITrimmable m_ItemToBeReplaced; + double m_ClipOriginalEdgeValue; + bool m_TrimReplace; + + double m_Min; + double m_Max; + + public void OnBeforeTrim(ITrimmable item, TrimEdge trimDirection) + { + m_Item = item; + + var sortedClips = ItemsUtils.GetItemsExcept(item.parentTrack, new[] { item }) + .OfType() + .OrderBy(c => c.start); + + var clipStart = (DiscreteTime)item.start; + var clipEnd = (DiscreteTime)item.end; + + var overlapped = sortedClips.LastOrDefault(c => (DiscreteTime)c.start == clipStart && (DiscreteTime)c.end == clipEnd); + + ITrimmable nextItem; + ITrimmable prevItem; + + m_Min = 0.0; + m_Max = double.PositiveInfinity; + + if (trimDirection == TrimEdge.Start) + { + nextItem = sortedClips.FirstOrDefault(c => (DiscreteTime)c.start >= clipStart && (DiscreteTime)c.end > clipEnd); + prevItem = sortedClips.LastOrDefault(c => (DiscreteTime)c.start <= clipStart && (DiscreteTime)c.end < clipEnd); + + if (prevItem != null) + m_Min = prevItem.start + EditModeUtils.BlendDuration(prevItem, TrimEdge.Start) + TimelineClip.kMinDuration; + + if (nextItem != null) + m_Max = nextItem.start; + + m_ItemToBeReplaced = prevItem; + + if (m_ItemToBeReplaced != null) + m_ClipOriginalEdgeValue = m_ItemToBeReplaced.end; + } + else + { + nextItem = sortedClips.FirstOrDefault(c => c != overlapped && (DiscreteTime)c.start >= clipStart && (DiscreteTime)c.end >= clipEnd); + prevItem = sortedClips.LastOrDefault(c => c != overlapped && (DiscreteTime)c.start <= clipStart && (DiscreteTime)c.end <= clipEnd); + + if (prevItem != null) + m_Min = prevItem.end; + + if (nextItem != null) + m_Max = nextItem.end - EditModeUtils.BlendDuration(nextItem, TrimEdge.End) - TimelineClip.kMinDuration; + + m_ItemToBeReplaced = nextItem; + + if (m_ItemToBeReplaced != null) + m_ClipOriginalEdgeValue = m_ItemToBeReplaced.start; + } + + m_TrimReplace = false; + } + + public void TrimStart(ITrimmable item, double time) + { + time = Math.Min(Math.Max(time, m_Min), m_Max); + + if (m_ItemToBeReplaced != null) + { + if (!m_TrimReplace) + m_TrimReplace = item.start >= m_ItemToBeReplaced.end; + } + + time = Math.Max(time, 0.0); + + item.SetStart(time); + + if (m_ItemToBeReplaced != null && m_TrimReplace) + { + var prevEnd = Math.Min(item.start, m_ClipOriginalEdgeValue); + m_ItemToBeReplaced.SetEnd(prevEnd, false); + } + } + + public void TrimEnd(ITrimmable item, double time, bool affectTimeScale) + { + time = Math.Min(Math.Max(time, m_Min), m_Max); + + if (m_ItemToBeReplaced != null) + { + if (!m_TrimReplace) + m_TrimReplace = item.end <= m_ItemToBeReplaced.start; + } + + item.SetEnd(time, affectTimeScale); + + if (m_ItemToBeReplaced != null && m_TrimReplace) + { + var nextStart = Math.Max(item.end, m_ClipOriginalEdgeValue); + m_ItemToBeReplaced.SetStart(nextStart); + } + } + + public void DrawGUI(WindowState state, Rect bounds, Color color, TrimEdge edge) + { + bool shouldDraw = m_ItemToBeReplaced != null && (edge == TrimEdge.End && m_Item.end > m_ClipOriginalEdgeValue) || + (edge == TrimEdge.Start && m_Item.start < m_ClipOriginalEdgeValue); + + if (shouldDraw) + { + var cursorType = TimelineCursors.CursorType.Replace; + if (EditModeUtils.HasBlends(m_Item, edge)) + { + color = DirectorStyles.kMixToolColor; + cursorType = (edge == TrimEdge.End) + ? TimelineCursors.CursorType.MixRight + : TimelineCursors.CursorType.MixLeft; + } + + EditModeGUIUtils.DrawBoundsEdge(bounds, color, edge); + TimelineCursors.SetCursor(cursorType); + } + else + { + TimelineCursors.ClearCursor(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeReplace.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeReplace.cs.meta new file mode 100644 index 0000000..a68744e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeReplace.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 769f6f5dd7c8f2d4c9ab1caba0bd2628 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeRipple.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeRipple.cs new file mode 100644 index 0000000..1cce7a6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeRipple.cs @@ -0,0 +1,97 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TrimItemModeRipple : ITrimItemMode, ITrimItemDrawer + { + double m_OriginalClipStart; + double m_OriginalClipEnd; + + ITrimmable[] m_NextItems; + + double m_BlendDuration; + + double m_TrimStartShift; + + public void OnBeforeTrim(ITrimmable item, TrimEdge trimDirection) + { + m_OriginalClipStart = item.start; + m_OriginalClipEnd = item.end; + m_TrimStartShift = 0.0; + + var sortedClips = ItemsUtils.GetItemsExcept(item.parentTrack, new[] { item }) + .OfType() + .OrderBy(c => c.start); + + var clipStart = (DiscreteTime)item.start; + var clipEnd = (DiscreteTime)item.end; + + m_NextItems = sortedClips.Where(c => (DiscreteTime)c.start >= clipStart && (DiscreteTime)c.end >= clipEnd).ToArray(); + + var overlapped = sortedClips.LastOrDefault(c => (DiscreteTime)c.start == clipStart && (DiscreteTime)c.end == clipEnd); + + if (overlapped != null) + { + m_BlendDuration = overlapped.end - overlapped.start; + } + else + { + m_BlendDuration = 0.0; + + var prevClip = sortedClips.LastOrDefault(c => (DiscreteTime)c.start <= clipStart && (DiscreteTime)c.end <= clipEnd); + if (prevClip != null) + m_BlendDuration += Math.Max(prevClip.end - item.start, 0.0); + + var nextClip = sortedClips.FirstOrDefault(c => (DiscreteTime)c.start >= clipStart && (DiscreteTime)c.end >= clipEnd); + if (nextClip != null) + m_BlendDuration += Math.Max(item.end - nextClip.start, 0.0); + } + } + + public void TrimStart(ITrimmable item, double time) + { + var prevEnd = item.end; + + // HACK If time is negative, make sure we shift the SetStart operation to a positive space. + if (time < 0.0) + m_TrimStartShift = Math.Max(-time, m_TrimStartShift); + + item.start = m_OriginalClipEnd - item.duration + m_TrimStartShift; + time += m_TrimStartShift; + + if (m_BlendDuration > 0.0) + time = Math.Min(time, item.end - m_BlendDuration); + + item.SetStart(time); + + item.start = m_OriginalClipStart; + + var offset = item.end - prevEnd; + foreach (var timelineClip in m_NextItems) + timelineClip.start += offset; + } + + public void TrimEnd(ITrimmable item, double time, bool affectTimeScale) + { + var prevEnd = item.end; + + if (m_BlendDuration > 0.0) + time = Math.Max(time, item.start + m_BlendDuration); + + item.SetEnd(time, affectTimeScale); + + var offset = item.end - prevEnd; + foreach (var timelineClip in m_NextItems) + timelineClip.start += offset; + } + + public void DrawGUI(WindowState state, Rect bounds, Color color, TrimEdge edge) + { + EditModeGUIUtils.DrawBoundsEdge(bounds, color, edge); + TimelineCursors.SetCursor(TimelineCursors.CursorType.Ripple); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeRipple.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeRipple.cs.meta new file mode 100644 index 0000000..0c58aff --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Trim/TrimItemModeRipple.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 20c8bb6b47a526c4c96ca73314fe2856 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils.meta new file mode 100644 index 0000000..b4af7ca --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 67e9c6cf60c57a54f9f4db1bc33fd2e3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeGUIUtils.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeGUIUtils.cs new file mode 100644 index 0000000..392709f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeGUIUtils.cs @@ -0,0 +1,27 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + static class EditModeGUIUtils + { + public static void DrawBoundsEdge(Rect bounds, Color color, TrimEdge edge, float width = 4.0f) + { + var r = bounds; + r.yMin += 2.0f; + r.yMax -= 2.0f; + r.width = width; + + r.x = edge == TrimEdge.End ? bounds.xMax : bounds.xMin - width; + + EditorGUI.DrawRect(r, color); + } + + public static void DrawOverlayRect(Rect bounds, Color overlayColor) + { + var c = overlayColor; + c.a = 0.2f; + EditorGUI.DrawRect(bounds, c); + EditorGUI.DrawOutline(bounds, 1.0f, new Color(1.0f, 1.0f, 1.0f, 0.5f)); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeGUIUtils.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeGUIUtils.cs.meta new file mode 100644 index 0000000..6fdf542 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeGUIUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8938e753b3f47374889d5cf3265b563c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeMixUtils.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeMixUtils.cs new file mode 100644 index 0000000..ca34f4b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeMixUtils.cs @@ -0,0 +1,137 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class EditModeMixUtils + { + static readonly List k_UnrecoverablePlacements = new List + { + PlacementValidity.InvalidIsWithin, + PlacementValidity.InvalidStartsInBlend, + PlacementValidity.InvalidContainsBlend + }; + + public static bool CanInsert(IEnumerable itemsGroups) + { + foreach (var itemsGroup in itemsGroups) + { + var siblings = ItemsUtils.GetItemsExcept(itemsGroup.targetTrack, itemsGroup.items); + foreach (var item in itemsGroup.items) + { + var placementValidity = GetPlacementValidity(item, siblings); + + if (k_UnrecoverablePlacements.Contains(placementValidity)) + { + return false; + } + } + } + + return true; + } + + //Corrects clips durations to fit at insertion point, if needed + public static void PrepareItemsForInsertion(IEnumerable itemsGroups) + { + foreach (var itemsGroup in itemsGroups) + { + var siblings = ItemsUtils.GetItemsExcept(itemsGroup.targetTrack, itemsGroup.items); + foreach (var item in itemsGroup.items.OfType()) + { + var eatenItems = siblings.Where(c => EditModeUtils.IsItemWithinRange(c, item.start, item.end)).ToList(); + + var intersectedItem = EditModeUtils.GetFirstIntersectedItem(siblings, item.end); + if (intersectedItem != null) + eatenItems.Add(intersectedItem); + + var blendableItems = eatenItems.OfType(); + if (blendableItems.Any()) + { + var minTime = blendableItems.Min(c => c.end - c.rightBlendDuration); + + if (item.end > minTime) + item.SetEnd(minTime, false); + } + } + } + } + + public static PlacementValidity GetPlacementValidity(ITimelineItem item, IEnumerable otherItems) + { + if (item.duration <= 0.0) + return PlacementValidity.Valid; //items without any duration can always be placed + + var sortedItems = otherItems.Where(i => i.duration > 0.0).OrderBy(c => c.start); + var candidates = new List(); + foreach (var sortedItem in sortedItems) + { + if ((DiscreteTime)sortedItem.start >= (DiscreteTime)item.end) + { + // No need to process further + break; + } + + if ((DiscreteTime)sortedItem.end <= (DiscreteTime)item.start) + { + // Skip + continue; + } + + candidates.Add(sortedItem); + } + + var discreteStart = (DiscreteTime)item.start; + var discreteEnd = (DiscreteTime)item.end; + + // Note: Order of tests matters + for (int i = 0, n = candidates.Count; i < n; i++) + { + var candidate = candidates[i]; + + var blendItem = item as IBlendable; + if (blendItem != null && blendItem.supportsBlending) + { + if (EditModeUtils.Contains(candidate.start, candidate.end, item)) + return PlacementValidity.InvalidIsWithin; + + if (i < n - 1) + { + var nextCandidate = candidates[i + 1]; + + var discreteNextCandidateStart = (DiscreteTime)nextCandidate.start; + var discreteCandidateEnd = (DiscreteTime)candidate.end; + + if (discreteCandidateEnd > discreteNextCandidateStart) + { + if (discreteStart >= discreteNextCandidateStart) + { + // Note: In case the placement is fully within a blend, + // InvalidStartsInBlend MUST have priority + return PlacementValidity.InvalidStartsInBlend; + } + + if (discreteEnd > discreteNextCandidateStart && discreteEnd <= discreteCandidateEnd) + return PlacementValidity.InvalidEndsInBlend; + + if (discreteStart < discreteNextCandidateStart && discreteEnd > discreteCandidateEnd) + return PlacementValidity.InvalidContainsBlend; + } + } + + if (EditModeUtils.Contains(item.start, item.end, candidate)) + return PlacementValidity.InvalidContains; + } + else + { + if (EditModeUtils.Overlaps(item, candidate.start, candidate.end) + || EditModeUtils.Overlaps(candidate, item.start, item.end)) + return PlacementValidity.InvalidOverlapWithNonBlendableClip; + } + } + + return PlacementValidity.Valid; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeMixUtils.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeMixUtils.cs.meta new file mode 100644 index 0000000..f36da89 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeMixUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 505965fb9ab352b4d88882d7c8d822bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeReplaceUtils.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeReplaceUtils.cs new file mode 100644 index 0000000..d004a5a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeReplaceUtils.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class EditModeReplaceUtils + { + public static void Insert(IEnumerable itemsGroups) + { + foreach (var itemsGroup in itemsGroups) + { + Insert(itemsGroup.targetTrack, itemsGroup.items); + } + } + + static void Insert(TrackAsset track, IEnumerable items) + { + if (track == null) return; + var orderedItems = ItemsUtils.GetItemsExcept(track, items) + .OfType() + .OrderBy(i => i.start).ToArray(); + + foreach (var item in items.OfType()) + { + var from = item.start; + var to = item.end; + + var overlappedItems = orderedItems.Where(i => EditModeUtils.Overlaps(i, from, to)); + + foreach (var overlappedItem in overlappedItems) + { + if (EditModeUtils.IsItemWithinRange(overlappedItem, from, to)) + { + overlappedItem.Delete(); + } + else + { + if (overlappedItem.start >= from) + overlappedItem.TrimStart(to); + else + overlappedItem.TrimEnd(from); + } + } + + var includingItems = orderedItems.Where(c => c.start to); + foreach (var includingItem in includingItems) + { + var newItem = includingItem.CloneTo(track, includingItem.start) as ITrimmable; + includingItem.TrimStart(to); + if (newItem != null) + newItem.SetEnd(from, false); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeReplaceUtils.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeReplaceUtils.cs.meta new file mode 100644 index 0000000..3184352 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeReplaceUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6ca745fb561cbf640b6e603f95662fa0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeRippleUtils.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeRippleUtils.cs new file mode 100644 index 0000000..a705fc6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeRippleUtils.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class EditModeRippleUtils + { + public static void Insert(IEnumerable itemsGroups) + { + var start = double.MaxValue; + var end = double.MinValue; + + foreach (var itemsGroup in itemsGroups) + { + start = Math.Min(start, itemsGroup.items.Min(c => c.start)); + end = Math.Max(end, itemsGroup.items.Max(c => c.end)); + } + + var offset = 0.0; + var discreteStart = (DiscreteTime)start; + var discreteEnd = (DiscreteTime)end; + var itemTypes = ItemsUtils.GetItemTypes(itemsGroups); + var siblingsToRipple = new List(); + + foreach (var itemsGroup in itemsGroups) + { + //can only ripple items of the same type as those selected + siblingsToRipple.AddRange(ItemsUtils.GetItemsExcept(itemsGroup.targetTrack, itemsGroup.items).Where(i => itemTypes.Contains(i.GetType()))); + foreach (var item in siblingsToRipple) + { + var discreteItemStart = (DiscreteTime)item.start; + var discreteItemEnd = (DiscreteTime)item.end; + + if ((discreteItemStart < discreteStart && discreteItemEnd > discreteStart) || (discreteItemStart >= discreteStart && discreteItemStart < discreteEnd)) + offset = Math.Max(offset, end - item.start); + } + } + + if (offset > 0.0) + { + foreach (var sibling in siblingsToRipple) + { + if ((DiscreteTime)sibling.end > (DiscreteTime)start) + sibling.start += offset; + } + } + } + + public static void Remove(IEnumerable itemsGroups) + { + foreach (var itemsGroup in itemsGroups) + Remove(itemsGroup.targetTrack, itemsGroup.items); + } + + static void Remove(TrackAsset track, IEnumerable items) + { + if (track == null) return; + + //can only ripple items of the same type as those selected + var itemTypes = ItemsUtils.GetItemTypes(items); + var siblingsToRipple = ItemsUtils.GetItemsExcept(track, items) + .Where(i => itemTypes.Contains(i.GetType())) + .OrderBy(c => c.start) + .ToArray(); + + var orderedItems = items + .OrderBy(c => c.start) + .ToArray(); + + var cumulativeOffset = 0.0; + + foreach (var item in orderedItems) + { + var offset = item.end - item.start; + var start = item.start - cumulativeOffset; + var end = item.end - cumulativeOffset; + + var nextItem = siblingsToRipple.FirstOrDefault(c => (DiscreteTime)c.start > (DiscreteTime)start && (DiscreteTime)c.start < (DiscreteTime)end); + if (nextItem != null) + { + offset -= end - nextItem.start; + } + + var prevItem = siblingsToRipple.FirstOrDefault(c => (DiscreteTime)c.end > (DiscreteTime)start && (DiscreteTime)c.end < (DiscreteTime)end); + if (prevItem != null) + { + offset -= prevItem.end - start; + } + + if (offset <= 0.0) + continue; + + cumulativeOffset += offset; + + for (int i = siblingsToRipple.Length - 1; i >= 0; --i) + { + var c = siblingsToRipple[i]; + if ((DiscreteTime)c.start < (DiscreteTime)start) + break; + + c.start = c.start - offset; + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeRippleUtils.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeRippleUtils.cs.meta new file mode 100644 index 0000000..1178683 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeRippleUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 495e2738ac7d88a41a158cd2e237d70b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeUtils.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeUtils.cs new file mode 100644 index 0000000..126f349 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeUtils.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class EditModeUtils + { + public static void Delete(IEnumerable items) + { + if (items == null) + return; + + foreach (var item in items) + item.Delete(); + } + + public static void SetStart(IEnumerable items, double time) + { + var offset = time - items.Min(c => c.start); + + foreach (var item in items) + item.start += offset; + } + + public static void SetParentTrack(IEnumerable items, TrackAsset parentTrack) + { + foreach (var item in items) + { + if (item.parentTrack == parentTrack) + continue; + + item.parentTrack = parentTrack; + + var clipGUI = item.gui as TimelineClipGUI; + if (clipGUI != null) + { + clipGUI.clipCurveEditor = null; + } + } + } + + public static ITimelineItem GetFirstIntersectedItem(IEnumerable items, double time) + { + return items.FirstOrDefault(c => Intersects(time, c.start, c.end)); + } + + static bool Intersects(double time, double start, double end) + { + var discreteTime = (DiscreteTime)time; + return discreteTime > (DiscreteTime)start && discreteTime < (DiscreteTime)end; + } + + public static bool Overlaps(ITimelineItem item, double from, double to) + { + var discreteFrom = (DiscreteTime)from; + var discreteTo = (DiscreteTime)to; + var discreteStart = (DiscreteTime)item.start; + + if (discreteStart >= discreteFrom && discreteStart < discreteTo) + return true; + + var discreteEnd = (DiscreteTime)item.end; + + if (discreteEnd > discreteFrom && discreteEnd <= discreteTo) + return true; + + return false; + } + + public static bool IsItemWithinRange(ITimelineItem item, double from, double to) + { + return (DiscreteTime)item.start >= (DiscreteTime)from && (DiscreteTime)item.end <= (DiscreteTime)to; + } + + public static bool IsRangeWithinItem(double from, double to, ITimelineItem item) + { + return (DiscreteTime)from >= (DiscreteTime)item.start && (DiscreteTime)to <= (DiscreteTime)item.end; + } + + public static bool Contains(double from, double to, ITimelineItem item) + { + return (DiscreteTime)from < (DiscreteTime)item.start && (DiscreteTime)to > (DiscreteTime)item.end; + } + + public static bool HasBlends(ITimelineItem item, TrimEdge edge) + { + var blendable = item as IBlendable; + if (blendable == null) return false; + + return edge == TrimEdge.Start && blendable.hasLeftBlend || edge == TrimEdge.End && blendable.hasRightBlend; + } + + public static double BlendDuration(ITimelineItem item, TrimEdge edge) + { + var blendable = item as IBlendable; + if (blendable == null) return 0.0; + + return edge == TrimEdge.Start ? blendable.leftBlendDuration : blendable.rightBlendDuration; + } + + public static bool IsInfiniteTrack(TrackAsset track) + { + var aTrack = track as AnimationTrack; + return aTrack != null && aTrack.CanConvertToClipMode(); + } + + public static void GetInfiniteClipBoundaries(TrackAsset track, out double start, out double end) + { + var info = AnimationClipCurveCache.Instance.GetCurveInfo(((AnimationTrack)track).infiniteClip); + if (info.keyTimes.Length > 0) + { + start = info.keyTimes.Min(); + end = info.keyTimes.Max(); + } + else + { + start = end = 0.0f; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeUtils.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeUtils.cs.meta new file mode 100644 index 0000000..cf5984a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/EditModeUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70eae1897c9d308448eb3bb0b5be9f58 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/ManipulatorsUtils.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/ManipulatorsUtils.cs new file mode 100644 index 0000000..c56aa1d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/ManipulatorsUtils.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + static class ManipulatorsUtils + { + public static EventModifiers actionModifier + { + get + { + if (Application.platform == RuntimePlatform.OSXEditor || + Application.platform == RuntimePlatform.OSXPlayer) + return EventModifiers.Command; + + return EventModifiers.Control; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/ManipulatorsUtils.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/ManipulatorsUtils.cs.meta new file mode 100644 index 0000000..3b611ea --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/ManipulatorsUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e177382a693dea644acd34e3e7a3feb3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/PlacementValidity.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/PlacementValidity.cs new file mode 100644 index 0000000..76c0ced --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/PlacementValidity.cs @@ -0,0 +1,13 @@ +namespace UnityEditor.Timeline +{ + enum PlacementValidity + { + Valid, + InvalidContains, + InvalidIsWithin, + InvalidStartsInBlend, + InvalidEndsInBlend, + InvalidContainsBlend, + InvalidOverlapWithNonBlendableClip + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/PlacementValidity.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/PlacementValidity.cs.meta new file mode 100644 index 0000000..571f365 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Manipulators/Utils/PlacementValidity.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 335020228a0fe124897f51f25f6350ee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/MenuOrder.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/MenuOrder.cs new file mode 100644 index 0000000..40913e7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/MenuOrder.cs @@ -0,0 +1,103 @@ +using System; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class MenuOrder + { + // by default, adds at the end, before 'add' + public const int DefaultPriority = 9000; + public const int SeparatorAt = 1000; + + public static class TimelineAction + { + public const int Start = 1000; + public const int Copy = Start + 100; + public const int Paste = Start + 200; + public const int Duplicate = Start + 300; + public const int Delete = Start + 400; + public const int MatchContent = Start + 500; + } + + public static class TrackAction + { + public const int Start = TimelineAction.Start + SeparatorAt; + + public const int LockTrack = Start + 100; + public const int LockSelected = Start + 150; + public const int MuteTrack = Start + 200; + public const int MuteSelected = Start + 250; + public const int ShowHideMarkers = Start + 300; + public const int RemoveInvalidMarkers = Start + 400; + public const int EditInAnimationWindow = Start + 800; + } + + public static class TrackAddMenu + { + public const int Start = TrackAction.Start + SeparatorAt; + public const int AddLayerTrack = Start; + } + + public static class ClipEditAction + { + public const int Start = TrackAddMenu.Start + SeparatorAt; + public const int EditInAnimationWindow = Start + 100; + public const int EditSubTimeline = Start + 200; + } + + public static class ClipAction + { + public const int Start = ClipEditAction.Start + SeparatorAt; + + public const int TrimStart = Start + 100; + public const int TrimEnd = Start + 110; + public const int Split = Start + 120; + public const int CompleteLastLoop = Start + SeparatorAt; + public const int TrimLastLoop = Start + SeparatorAt + 110; + public const int MatchDuration = Start + SeparatorAt + 120; + public const int DoubleSpeed = Start + 2 * SeparatorAt; + public const int HalfSpeed = Start + 2 * SeparatorAt + 110; + public const int ResetDuration = Start + 3 * SeparatorAt; + public const int ResetSpeed = Start + 3 * SeparatorAt + 110; + public const int ResetAll = Start + 3 * SeparatorAt + 120; + + public const int Tile = Start + 300; + public const int FindSourceAsset = Start + 400; + } + + public static class MarkerAction + { + public const int Start = ClipAction.Start + SeparatorAt; + } + + public static class CustomTrackAction + { + public const int Start = MarkerAction.Start + SeparatorAt; + + public const int AnimConvertToClipMode = Start + 100; + public const int AnimConvertFromClipMode = Start + 200; + public const int AnimApplyTrackOffset = Start + 300; + public const int AnimApplySceneOffset = Start + 310; + public const int AnimApplyAutoOffset = Start + 320; + public const int AnimAddOverrideTrack = Start + 500; + } + + public static class CustomClipAction + { + public const int Start = CustomTrackAction.Start + SeparatorAt; + public const int AnimClipMatchPrevious = Start + 100; + public const int AnimClipMatchNext = Start + 110; + public const int AnimClipResetOffset = Start + 120; + } + + + public const int AddGroupItemStart = DefaultPriority + SeparatorAt; + public const int AddTrackItemStart = AddGroupItemStart + SeparatorAt; + public const int AddCustomTrackItemStart = AddTrackItemStart + SeparatorAt; + public const int AddClipItemStart = AddCustomTrackItemStart + SeparatorAt; + public const int AddCustomClipItemStart = AddClipItemStart + SeparatorAt; + public const int AddMarkerItemStart = AddCustomClipItemStart + SeparatorAt; + public const int AddCustomMarkerItemStart = AddMarkerItemStart + SeparatorAt; + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/MenuOrder.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/MenuOrder.cs.meta new file mode 100644 index 0000000..5045520 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/MenuOrder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 78fd02709d00d8441bd53a889e83a8f5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables.meta new file mode 100644 index 0000000..c4523e1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9a6069768ff3d8043a79348813f86cba +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables/ControlPlayableInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables/ControlPlayableInspector.cs new file mode 100644 index 0000000..5e6f077 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables/ControlPlayableInspector.cs @@ -0,0 +1,212 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomEditor(typeof(ControlPlayableAsset)), CanEditMultipleObjects] + class ControlPlayableInspector : Editor + { + static class Styles + { + static string s_DisabledBecauseOfSelfControlTooltip = "Must be disabled when the Source Game Object references the same PlayableDirector component that is being controlled"; + public static readonly GUIContent activationContent = EditorGUIUtility.TrTextContent("Control Activation", "When checked the clip will control the active state of the source game object"); + public static readonly GUIContent activationDisabledContent = EditorGUIUtility.TextContent("Control Activation|" + s_DisabledBecauseOfSelfControlTooltip); + public static readonly GUIContent prefabContent = EditorGUIUtility.TrTextContent("Prefab", "A prefab to instantiate as a child object of the source game object"); + public static readonly GUIContent advancedContent = EditorGUIUtility.TrTextContent("Advanced"); + public static readonly GUIContent updateParticleSystemsContent = EditorGUIUtility.TrTextContent("Control Particle Systems", "Synchronize the time between the clip and any particle systems on the game object"); + public static readonly GUIContent updatePlayableDirectorContent = EditorGUIUtility.TrTextContent("Control Playable Directors", "Synchronize the time between the clip and any playable directors on the game object"); + public static readonly GUIContent updatePlayableDirectorDisabledContent = EditorGUIUtility.TextContent("Control Playable Directors|" + s_DisabledBecauseOfSelfControlTooltip); + public static readonly GUIContent updateITimeControlContent = EditorGUIUtility.TrTextContent("Control ITimeControl", "Synchronize the time between the clip and any Script that implements the ITimeControl interface on the game object"); + public static readonly GUIContent updateHierarchy = EditorGUIUtility.TrTextContent("Control Children", "Search child game objects for particle systems and playable directors"); + public static readonly GUIContent randomSeedContent = EditorGUIUtility.TrTextContent("Random Seed", "A random seed to provide the particle systems for consistent previews. This will only be used on particle systems where AutoRandomSeed is on."); + public static readonly GUIContent postPlayableContent = EditorGUIUtility.TrTextContent("Post Playback", "The active state to the leave the game object when the timeline is finished. \n\nRevert will leave the game object in the state it was prior to the timeline being run"); + } + + SerializedProperty m_SourceObject; + SerializedProperty m_PrefabObject; + SerializedProperty m_UpdateParticle; + SerializedProperty m_UpdateDirector; + SerializedProperty m_UpdateITimeControl; + SerializedProperty m_SearchHierarchy; + SerializedProperty m_UseActivation; + SerializedProperty m_PostPlayback; + SerializedProperty m_RandomSeed; + bool m_CycleReference; + + + GUIContent m_SourceObjectLabel = new GUIContent(); + + // the director that the selection was made with. Normally this matches the active director in timeline, + // but persists if the active timeline changes (case 962516) + private PlayableDirector contextDirector + { + get + { + if (serializedObject == null) + return null; + return serializedObject.context as PlayableDirector; + } + } + + public void OnEnable() + { + if (target == null) // case 946080 + return; + + m_SourceObject = serializedObject.FindProperty("sourceGameObject"); + m_PrefabObject = serializedObject.FindProperty("prefabGameObject"); + + m_UpdateParticle = serializedObject.FindProperty("updateParticle"); + m_UpdateDirector = serializedObject.FindProperty("updateDirector"); + m_UpdateITimeControl = serializedObject.FindProperty("updateITimeControl"); + m_SearchHierarchy = serializedObject.FindProperty("searchHierarchy"); + m_UseActivation = serializedObject.FindProperty("active"); + m_PostPlayback = serializedObject.FindProperty("postPlayback"); + m_RandomSeed = serializedObject.FindProperty("particleRandomSeed"); + CheckForCyclicReference(); + } + + public override void OnInspectorGUI() + { + if (target == null) + return; + + serializedObject.Update(); + + m_SourceObjectLabel.text = m_SourceObject.displayName; + + if (m_PrefabObject.objectReferenceValue != null) + m_SourceObjectLabel.text = "Parent Object"; + + bool selfControlled = false; + + + EditorGUI.BeginChangeCheck(); + + using (new GUIMixedValueScope(m_SourceObject.hasMultipleDifferentValues)) + EditorGUILayout.PropertyField(m_SourceObject, m_SourceObjectLabel); + + var sourceGameObject = m_SourceObject.exposedReferenceValue as GameObject; + selfControlled = m_PrefabObject.objectReferenceValue == null && TimelineWindow.instance != null && TimelineWindow.instance.state != null && + contextDirector != null && sourceGameObject == contextDirector.gameObject; + + if (EditorGUI.EndChangeCheck()) + { + CheckForCyclicReference(); + if (!selfControlled) + DisablePlayOnAwake(sourceGameObject); + } + + if (selfControlled) + { + EditorGUILayout.HelpBox("The assigned GameObject references the same PlayableDirector component being controlled.", MessageType.Warning); + } + else if (m_CycleReference) + { + EditorGUILayout.HelpBox("The assigned GameObject contains a PlayableDirector component that results in a circular reference.", MessageType.Warning); + } + + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(m_PrefabObject, Styles.prefabContent); + EditorGUI.indentLevel--; + + using (new EditorGUI.DisabledScope(selfControlled)) + { + EditorGUILayout.PropertyField(m_UseActivation, selfControlled ? Styles.activationDisabledContent : Styles.activationContent); + if (m_UseActivation.boolValue) + { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(m_PostPlayback, Styles.postPlayableContent); + EditorGUI.indentLevel--; + } + } + + m_SourceObject.isExpanded = EditorGUILayout.Foldout(m_SourceObject.isExpanded, Styles.advancedContent, true); + + if (m_SourceObject.isExpanded) + { + EditorGUI.indentLevel++; + + using (new EditorGUI.DisabledScope(selfControlled && !m_SearchHierarchy.boolValue)) + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_UpdateDirector, selfControlled ? Styles.updatePlayableDirectorDisabledContent : Styles.updatePlayableDirectorContent); + if (EditorGUI.EndChangeCheck()) + { + CheckForCyclicReference(); + } + } + + EditorGUILayout.PropertyField(m_UpdateParticle, Styles.updateParticleSystemsContent); + if (m_UpdateParticle.boolValue) + { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(m_RandomSeed, Styles.randomSeedContent); + EditorGUI.indentLevel--; + } + EditorGUILayout.PropertyField(m_UpdateITimeControl, Styles.updateITimeControlContent); + + EditorGUILayout.PropertyField(m_SearchHierarchy, Styles.updateHierarchy); + + EditorGUI.indentLevel--; + } + + serializedObject.ApplyModifiedProperties(); + } + + // + // Fix for a workflow issue where scene objects with directors have play on awake by default enabled. + // This causes confusion when the director is played within another director, so we disable it on assignment + // to avoid the issue, but not force the issue on the user + public void DisablePlayOnAwake(GameObject sourceObject) + { + if (sourceObject != null && m_UpdateDirector.boolValue) + { + if (m_SearchHierarchy.boolValue) + { + var directors = sourceObject.GetComponentsInChildren(); + foreach (var d in directors) + { + DisablePlayOnAwake(d); + } + } + else + { + DisablePlayOnAwake(sourceObject.GetComponent()); + } + } + } + + public void DisablePlayOnAwake(PlayableDirector director) + { + if (director == null) + return; + var obj = new SerializedObject(director); + var prop = obj.FindProperty("m_InitialState"); + prop.enumValueIndex = (int)PlayState.Paused; + obj.ApplyModifiedProperties(); + } + + void CheckForCyclicReference() + { + serializedObject.ApplyModifiedProperties(); + m_CycleReference = false; + + PlayableDirector director = contextDirector; + if (contextDirector == null) + return; + + foreach (var asset in targets.OfType()) + { + if (ControlPlayableUtility.DetectCycle(asset, director)) + { + m_CycleReference = true; + return; + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables/ControlPlayableInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables/ControlPlayableInspector.cs.meta new file mode 100644 index 0000000..a097e70 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Playables/ControlPlayableInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f65646ef159c91441bff704a5f7f419b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties.meta new file mode 100644 index 0000000..aeb1d28 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0f71aeefaa877ae4787e8356f25ad1e5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties/AssemblyInfo.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..31ab973 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties/AssemblyInfo.cs @@ -0,0 +1,24 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("UnityEditor.Timeline")] +[assembly: AssemblyDescription("Unity Timeline Editor")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Unity Technologies")] +[assembly: AssemblyProduct("UnityEditor.Timeline")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: ComVisible(false)] +[assembly: Guid("7668179E-DE52-4D63-96C8-B7D84461EA29")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")] +[assembly: InternalsVisibleTo("Unity.Timeline.EditorTests")] +[assembly: InternalsVisibleTo("Unity.Timeline.Tests")] +[assembly: InternalsVisibleTo("Unity.Timeline.Tests.Common")] +[assembly: InternalsVisibleTo("Unity.Timeline.Tests.Performance.Editor")] diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties/AssemblyInfo.cs.meta new file mode 100644 index 0000000..830ee0a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Properties/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d5718b3fe3a758b4a9ec29170290d4f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording.meta new file mode 100644 index 0000000..59cb660 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4584db2acba045742a16942983e7fb96 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/AnimationTrackRecorder.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/AnimationTrackRecorder.cs new file mode 100644 index 0000000..d09cc62 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/AnimationTrackRecorder.cs @@ -0,0 +1,306 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class AnimationTrackRecorder + { + public static readonly string kRecordClipDefaultName = L10n.Tr("Recorded"); + + AnimationClip m_TargetClip; + int m_CurveCount = 0; + + double m_ClipTime; + bool m_needRebuildRects; + + bool m_TrackHasPreviewComponents; + + public TimelineClip recordClip { get; private set; } + + public void PrepareForRecord(WindowState state) + { + m_CurveCount = 0; + m_TargetClip = null; + m_TrackHasPreviewComponents = false; + } + + public AnimationClip PrepareTrack(TrackAsset track, WindowState state, GameObject gameObject, out double startTime) + { + AnimationClip animationClip = null; + + // if we are not in clip mode, we simply use the track clip + var animationTrack = (AnimationTrack)track; + + // ignore recording if we are in Legacy auto mode + startTime = -1; + var parentTrack = TimelineUtility.GetSceneReferenceTrack(track) as AnimationTrack; + if (parentTrack != null && parentTrack.trackOffset == TrackOffset.Auto) + return null; + + if (!animationTrack.inClipMode) + { + var trackClip = animationTrack.GetOrCreateClip(); + startTime = trackClip.frameRate * state.editSequence.time; + + // Make the first key be at time 0 of the clip + if (trackClip.empty) + { + animationTrack.infiniteClipTimeOffset = 0; // state.time; + animationTrack.infiniteClipPreExtrapolation = TimelineClip.ClipExtrapolation.Hold; + animationTrack.infiniteClipPostExtrapolation = TimelineClip.ClipExtrapolation.Hold; + } + + animationClip = trackClip; + } + else + { + TimelineClip activeClip = null; + + // if it fails, but returns no clip, we can add one. + if (!track.FindRecordingClipAtTime(state.editSequence.time, out activeClip) && activeClip != null) + { + return null; + } + + if (activeClip == null) + { + activeClip = AddRecordableClip(track, state, state.editSequence.time); + } + + var clip = activeClip.animationClip; + + // flags this as the clip being recorded for the track + var clipTime = state.editSequence.time - activeClip.start; + + // if we are in the past + if (clipTime < 0) + { + Undo.RegisterCompleteObjectUndo(clip, "Record Key"); + TimelineUndo.PushUndo(track, "Prepend Key"); + ShiftAnimationClip(clip, (float)-clipTime); + activeClip.start = state.editSequence.time; + activeClip.duration += -clipTime; + clipTime = 0; + } + + m_ClipTime = clipTime; + recordClip = activeClip; + startTime = TimeUtility.ToFrames(recordClip.ToLocalTimeUnbound(state.editSequence.time), clip.frameRate); + m_needRebuildRects = clip.empty; + + animationClip = clip; + } + + m_TargetClip = animationClip; + m_CurveCount = GetCurveCount(animationClip); + m_TrackHasPreviewComponents = animationTrack.hasPreviewComponents; + + return animationClip; + } + + static int GetCurveCount(AnimationClip animationClip) + { + int count = 0; + if (animationClip != null) + { + var clipCache = AnimationClipCurveCache.Instance.GetCurveInfo(animationClip); + count = clipCache.curves.Length + clipCache.objectCurves.Count; + } + + return count; + } + + public void FinializeTrack(TrackAsset track, WindowState state) + { + // make sure we dirty the clip if we are in non clip mode + var animTrack = track as AnimationTrack; + if (!animTrack.inClipMode) + { + EditorUtility.SetDirty(animTrack.GetOrCreateClip()); + } + + // in clip mode we need to do some extra work + if (recordClip != null) + { + // stretch the clip out to meet the new recording time + if (m_ClipTime > recordClip.duration) + { + TimelineUndo.PushUndo(track, "Add Key"); + recordClip.duration = m_ClipTime; + } + + track.CalculateExtrapolationTimes(); + } + + recordClip = null; + m_ClipTime = 0; + if (m_needRebuildRects) + { + state.CalculateRowRects(); + m_needRebuildRects = false; + } + } + + public void FinalizeRecording(WindowState state) + { + // rebuild the graph if we add/remove a clip. Rebuild the graph with an evaluation immediately + // so previews and scene position is maintained. + if (m_CurveCount != GetCurveCount(m_TargetClip)) + { + state.rebuildGraph = true; + state.GetWindow().RebuildGraphIfNecessary(true); + } + else if (m_TrackHasPreviewComponents) + { + // Track with preview components potentially has modifications impacting other properties that need + // to be refreshed before inspector or scene view to not interfere with manipulation. + state.EvaluateImmediate(); + } + } + + // For a given track asset get a unique clip name + public static string GetUniqueRecordedClipName(Object owner, string name) + { + // first attempt -- uniquely named in file + var path = AssetDatabase.GetAssetPath(owner); + if (!string.IsNullOrEmpty(path)) + { + var names = AssetDatabase.LoadAllAssetsAtPath(path).Where(x => x != null).Select(x => x.name); + return ObjectNames.GetUniqueName(names.ToArray(), name); + } + + TrackAsset asset = owner as TrackAsset; + if (asset == null || asset.clips.Length == 0) + return name; + + // final attempt - uniquely named in track + return ObjectNames.GetUniqueName(asset.clips.Select(x => x.displayName).ToArray(), name); + } + + // Given an appropriate parent track, create a recordable clip + public static TimelineClip AddRecordableClip(TrackAsset parentTrack, WindowState state, double atTime) + { + var sequenceAsset = state.editSequence.asset; + if (sequenceAsset == null) + { + Debug.LogError("Parent Track needs to be bound to an asset to add a recordable"); + return null; + } + + var animTrack = parentTrack as AnimationTrack; + if (animTrack == null) + { + Debug.LogError("Recordable clips are only valid on Animation Tracks"); + return null; + } + + var newClip = animTrack.CreateRecordableClip(GetUniqueRecordedClipName(parentTrack, kRecordClipDefaultName)); + if (newClip == null) + { + Debug.LogError("Could not create a recordable clip"); + return null; + } + + newClip.mixInCurve = AnimationCurve.EaseInOut(0, 0, 1, 1); + newClip.mixOutCurve = AnimationCurve.EaseInOut(0, 1, 1, 0); + + newClip.preExtrapolationMode = TimelineClip.ClipExtrapolation.Hold; + newClip.postExtrapolationMode = TimelineClip.ClipExtrapolation.Hold; + + double startTime = 0; + double endTime = 0; + + GetAddedRecordingClipRange(animTrack, state, atTime, out startTime, out endTime); + + newClip.start = startTime; + newClip.duration = endTime - startTime; + + state.Refresh(); + + return newClip; + } + + // get the start and end times of what an added recording clip at a given time would be + internal static void GetAddedRecordingClipRange(TrackAsset track, WindowState state, double atTime, out double start, out double end) + { + // size to make the clip in pixels. Reasonably big so that both handles are easily manipulated, + // and the full title is normally visible + double defaultDuration = state.PixelDeltaToDeltaTime(100); + + start = atTime; + end = atTime + defaultDuration; + + double gapStart = 0; + double gapEnd = 0; + + // no gap, pick are reasonable amount + if (!track.GetGapAtTime(atTime, out gapStart, out gapEnd)) + { + start = atTime; + return; + } + + if (!double.IsInfinity(gapEnd)) + end = gapEnd; + + start = state.SnapToFrameIfRequired(start); + end = state.SnapToFrameIfRequired(end); + } + + // Given a clip, shifts the keys in that clip by the given amount. + internal static void ShiftAnimationClip(AnimationClip clip, float amount) + { + if (clip == null) + return; + + var curveBindings = AnimationUtility.GetCurveBindings(clip); + var objectCurveBindings = AnimationUtility.GetObjectReferenceCurveBindings(clip); + + foreach (var binding in curveBindings) + { + AnimationCurve curve = AnimationUtility.GetEditorCurve(clip, binding); + curve.keys = ShiftKeys(curve.keys, amount); + AnimationUtility.SetEditorCurve(clip, binding, curve); + } + + foreach (var binding in objectCurveBindings) + { + ObjectReferenceKeyframe[] keyframes = AnimationUtility.GetObjectReferenceCurve(clip, binding); + keyframes = ShiftObjectKeys(keyframes, amount); + AnimationUtility.SetObjectReferenceCurve(clip, binding, keyframes); + } + + EditorUtility.SetDirty(clip); + } + + // shift all the keys over by the given time, stretching the time 0 key + static Keyframe[] ShiftKeys(Keyframe[] keys, float time) + { + if (keys == null || keys.Length == 0 || time == 0) + return keys; + + for (int i = 0; i < keys.Length; i++) + { + keys[i].time += time; + } + + return keys; + } + + // Shift object keys over by the appropriate amount + static ObjectReferenceKeyframe[] ShiftObjectKeys(ObjectReferenceKeyframe[] keys, float time) + { + if (keys == null || keys.Length == 0 || time == 0) + return keys; + + for (int i = 0; i < keys.Length; i++) + { + keys[i].time += time; + } + + return keys; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/AnimationTrackRecorder.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/AnimationTrackRecorder.cs.meta new file mode 100644 index 0000000..e80ec10 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/AnimationTrackRecorder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a0a02e768c802b641b6793fa864f1c2c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording.cs new file mode 100644 index 0000000..e63ad6a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording.cs @@ -0,0 +1,497 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + // Handles Undo animated properties on Monobehaviours to create track clips + static partial class TimelineRecording + { + static readonly List s_TempPropertyModifications = new List(6); + + internal static UndoPropertyModification[] ProcessUndoModification(UndoPropertyModification[] modifications, WindowState state) + { + if (HasAnyPlayableAssetModifications(modifications)) + return ProcessPlayableAssetModification(modifications, state); + return ProcessMonoBehaviourModification(modifications, state); + } + + static UnityEngine.Object GetTarget(UndoPropertyModification undo) + { + if (undo.currentValue != null) + return undo.currentValue.target; + if (undo.previousValue != null) + return undo.previousValue.target; + return null; + } + + // Gets the appropriate track for a given game object + static TrackAsset GetTrackForGameObject(GameObject gameObject, WindowState state) + { + if (gameObject == null) + return null; + + var director = state.editSequence.director; + if (director == null) + return null; + + var level = int.MaxValue; + + TrackAsset result = null; + + // search the output tracks + var outputTracks = state.editSequence.asset.flattenedTracks; + foreach (var track in outputTracks) + { + if (track.GetType() != typeof(AnimationTrack)) + continue; + if (!state.IsTrackRecordable(track)) + continue; + + var obj = TimelineUtility.GetSceneGameObject(director, track); + if (obj != null) + { + // checks if the effected gameobject is our child + var childLevel = GetChildLevel(obj, gameObject); + if (childLevel != -1 && childLevel < level) + { + result = track; + level = childLevel; + } + } + } + + // the resulting track is not armed. checking here avoids accidentally recording objects with their own + // tracks + if (result && !state.IsTrackRecordable(result)) + { + result = null; + } + + return result; + } + + // Gets the track this property would record to. + // Returns null if there is a track, but it's not currently active for recording + public static TrackAsset GetRecordingTrack(SerializedProperty property, WindowState state) + { + var serializedObject = property.serializedObject; + var component = serializedObject.targetObject as Component; + if (component == null) + return null; + + var gameObject = component.gameObject; + return GetTrackForGameObject(gameObject, state); + } + + // Given a serialized property, gathers all animatable properties + static void GatherModifications(SerializedProperty property, List modifications) + { + // handles child properties (Vector3 is 3 recordable properties) + if (property.hasChildren) + { + var iter = property.Copy(); + var end = property.GetEndProperty(false); + + // recurse over all children properties + while (iter.Next(true) && !SerializedProperty.EqualContents(iter, end)) + { + GatherModifications(iter, modifications); + } + } + + var isObject = property.propertyType == SerializedPropertyType.ObjectReference; + var isFloat = property.propertyType == SerializedPropertyType.Float || + property.propertyType == SerializedPropertyType.Boolean || + property.propertyType == SerializedPropertyType.Integer; + + if (isObject || isFloat) + { + var serializedObject = property.serializedObject; + var modification = new PropertyModification(); + + modification.target = serializedObject.targetObject; + modification.propertyPath = property.propertyPath; + if (isObject) + { + modification.value = string.Empty; + modification.objectReference = property.objectReferenceValue; + } + else + { + modification.value = TimelineUtility.PropertyToString(property); + } + + // Path for monobehaviour based - better to grab the component to get the curvebinding to allow validation + if (serializedObject.targetObject is Component) + { + EditorCurveBinding temp; + var go = ((Component)serializedObject.targetObject).gameObject; + if (AnimationUtility.PropertyModificationToEditorCurveBinding(modification, go, out temp) != null) + { + modifications.Add(modification); + } + } + else + { + modifications.Add(modification); + } + } + } + + public static bool CanRecord(SerializedProperty property, WindowState state) + { + if (IsPlayableAssetProperty(property)) + return AnimatedParameterUtility.IsTypeAnimatable(property.propertyType); + + if (GetRecordingTrack(property, state) == null) + return false; + + s_TempPropertyModifications.Clear(); + GatherModifications(property, s_TempPropertyModifications); + return s_TempPropertyModifications.Any(); + } + + public static void AddKey(SerializedProperty prop, WindowState state) + { + s_TempPropertyModifications.Clear(); + GatherModifications(prop, s_TempPropertyModifications); + if (s_TempPropertyModifications.Any()) + { + AddKey(s_TempPropertyModifications, state); + } + } + + public static void AddKey(IEnumerable modifications, WindowState state) + { + var undos = modifications.Select(PropertyModificationToUndoPropertyModification).ToArray(); + ProcessUndoModification(undos, state); + } + + static UndoPropertyModification PropertyModificationToUndoPropertyModification(PropertyModification prop) + { + return new UndoPropertyModification + { + previousValue = prop, + currentValue = new PropertyModification + { + objectReference = prop.objectReference, + propertyPath = prop.propertyPath, + target = prop.target, + value = prop.value + }, + keepPrefabOverride = true + }; + } + + // Given an animation track, return the clip that we are currently recording to + static AnimationClip GetRecordingClip(TrackAsset asset, WindowState state, out double startTime, out double timeScale) + { + startTime = 0; + timeScale = 1; + + TimelineClip displayBackground = null; + asset.FindRecordingClipAtTime(state.editSequence.time, out displayBackground); + var animClip = asset.FindRecordingAnimationClipAtTime(state.editSequence.time); + + if (displayBackground != null) + { + startTime = displayBackground.start; + timeScale = displayBackground.timeScale; + } + + return animClip; + } + + // Helper that finds the animation clip we are recording and the relative time to that clip + static bool GetClipAndRelativeTime(UnityEngine.Object target, WindowState state, + out AnimationClip outClip, out double keyTime, out bool keyInRange) + { + const float floatToDoubleError = 0.00001f; + outClip = null; + keyTime = 0; + keyInRange = false; + + double startTime = 0; + double timeScale = 1; + AnimationClip clip = null; + + IPlayableAsset playableAsset = target as IPlayableAsset; + Component component = target as Component; + + // Handle recordable playable assets + if (playableAsset != null) + { + var curvesOwner = AnimatedParameterUtility.ToCurvesOwner(playableAsset, state.editSequence.asset); + if (curvesOwner != null && state.IsTrackRecordable(curvesOwner.targetTrack)) + { + if (curvesOwner.curves == null) + curvesOwner.CreateCurves(curvesOwner.GetUniqueRecordedClipName()); + + clip = curvesOwner.curves; + + var timelineClip = curvesOwner as TimelineClip; + if (timelineClip != null) + { + startTime = timelineClip.start; + timeScale = timelineClip.timeScale; + } + } + } + // Handle recording components, including infinite clip + else if (component != null) + { + var asset = GetTrackForGameObject(component.gameObject, state); + if (asset != null) + { + clip = GetRecordingClip(asset, state, out startTime, out timeScale); + } + } + + if (clip == null) + return false; + + keyTime = (state.editSequence.time - startTime) * timeScale; + outClip = clip; + keyInRange = keyTime >= 0 && keyTime <= (clip.length * timeScale + floatToDoubleError); + + return true; + } + + public static bool HasCurve(IEnumerable modifications, UnityEngine.Object target, + WindowState state) + { + return GetKeyTimes(target, modifications, state).Any(); + } + + public static bool HasKey(IEnumerable modifications, UnityEngine.Object target, + WindowState state) + { + AnimationClip clip; + double keyTime; + bool inRange; + if (!GetClipAndRelativeTime(target, state, out clip, out keyTime, out inRange)) + return false; + + return GetKeyTimes(target, modifications, state).Any(t => (CurveEditUtility.KeyCompare((float)state.editSequence.time, (float)t, clip.frameRate) == 0)); + } + + // Checks if a key already exists for this property + static bool HasBinding(UnityEngine.Object target, PropertyModification modification, AnimationClip clip, out EditorCurveBinding binding) + { + var component = target as Component; + var playableAsset = target as IPlayableAsset; + + if (component != null) + { + var type = AnimationUtility.PropertyModificationToEditorCurveBinding(modification, component.gameObject, out binding); + binding = RotationCurveInterpolation.RemapAnimationBindingForRotationCurves(binding, clip); + return type != null; + } + + if (playableAsset != null) + { + binding = EditorCurveBinding.FloatCurve(string.Empty, target.GetType(), + AnimatedParameterUtility.GetAnimatedParameterBindingName(target, modification.propertyPath)); + } + else + { + binding = new EditorCurveBinding(); + return false; + } + + return true; + } + + public static void RemoveKey(UnityEngine.Object target, IEnumerable modifications, + WindowState state) + { + AnimationClip clip; + double keyTime; + bool inRange; + if (!GetClipAndRelativeTime(target, state, out clip, out keyTime, out inRange) || !inRange) + return; + var refreshPreview = false; + TimelineUndo.PushUndo(clip, "Remove Key"); + foreach (var mod in modifications) + { + EditorCurveBinding temp; + if (HasBinding(target, mod, clip, out temp)) + { + if (temp.isPPtrCurve) + { + CurveEditUtility.RemoveObjectKey(clip, temp, keyTime); + if (CurveEditUtility.GetObjectKeyCount(clip, temp) == 0) + { + refreshPreview = true; + } + } + else + { + AnimationCurve curve = AnimationUtility.GetEditorCurve(clip, temp); + if (curve != null) + { + CurveEditUtility.RemoveKeyFrameFromCurve(curve, (float)keyTime, clip.frameRate); + AnimationUtility.SetEditorCurve(clip, temp, curve); + if (curve.length == 0) + { + AnimationUtility.SetEditorCurve(clip, temp, null); + refreshPreview = true; + } + } + } + } + } + + if (refreshPreview) + { + state.ResetPreviewMode(); + } + } + + static HashSet GetKeyTimes(UnityEngine.Object target, IEnumerable modifications, WindowState state) + { + var keyTimes = new HashSet(); + + AnimationClip animationClip; + double keyTime; + bool inRange; + GetClipAndRelativeTime(target, state, out animationClip, out keyTime, out inRange); + if (animationClip == null) + return keyTimes; + + var component = target as Component; + var playableAsset = target as IPlayableAsset; + var info = AnimationClipCurveCache.Instance.GetCurveInfo(animationClip); + + TimelineClip clip = null; + if (component != null) + { + GetTrackForGameObject(component.gameObject, state).FindRecordingClipAtTime(state.editSequence.time, out clip); + } + else if (playableAsset != null) + { + clip = FindClipWithAsset(state.editSequence.asset, playableAsset); + } + + foreach (var mod in modifications) + { + EditorCurveBinding temp; + if (HasBinding(target, mod, animationClip, out temp)) + { + IEnumerable keys = new HashSet(); + if (temp.isPPtrCurve) + { + var curve = info.GetObjectCurveForBinding(temp); + if (curve != null) + { + keys = curve.Select(x => (double)x.time); + } + } + else + { + var curve = info.GetCurveForBinding(temp); + if (curve != null) + { + keys = curve.keys.Select(x => (double)x.time); + } + } + + // Transform the times in to 'global' space using the clip + if (clip != null) + { + foreach (var k in keys) + { + var time = clip.FromLocalTimeUnbound(k); + const double eps = 1e-5; + if (time >= clip.start - eps && time <= clip.end + eps) + { + keyTimes.Add(time); + } + } + } + // infinite clip mode, global == local space + else + { + keyTimes.UnionWith(keys); + } + } + } + + return keyTimes; + } + + public static void NextKey(UnityEngine.Object target, IEnumerable modifications, WindowState state) + { + const double eps = 1e-5; + var keyTimes = GetKeyTimes(target, modifications, state); + if (keyTimes.Count == 0) + return; + var nextKeys = keyTimes.Where(x => x > state.editSequence.time + eps); + if (nextKeys.Any()) + { + state.editSequence.time = nextKeys.Min(); + } + } + + public static void PrevKey(UnityEngine.Object target, IEnumerable modifications, WindowState state) + { + const double eps = 1e-5; + var keyTimes = GetKeyTimes(target, modifications, state); + if (keyTimes.Count == 0) + return; + var prevKeys = keyTimes.Where(x => x < state.editSequence.time - eps); + if (prevKeys.Any()) + { + state.editSequence.time = prevKeys.Max(); + } + } + + public static void RemoveCurve(UnityEngine.Object target, IEnumerable modifications, WindowState state) + { + AnimationClip clip = null; + double keyTime = 0; + var inRange = false; // not used for curves + if (!GetClipAndRelativeTime(target, state, out clip, out keyTime, out inRange)) + return; + + TimelineUndo.PushUndo(clip, "Remove Curve"); + foreach (var mod in modifications) + { + EditorCurveBinding temp; + if (HasBinding(target, mod, clip, out temp)) + { + if (temp.isPPtrCurve) + AnimationUtility.SetObjectReferenceCurve(clip, temp, null); + else + AnimationUtility.SetEditorCurve(clip, temp, null); + } + } + + state.ResetPreviewMode(); + } + + public static IEnumerable GetRecordableGameObjects(WindowState state) + { + if (state == null || state.editSequence.asset == null || state.editSequence.director == null) + yield break; + + var outputTracks = state.editSequence.asset.GetOutputTracks(); + foreach (var track in outputTracks) + { + if (track.GetType() != typeof(AnimationTrack)) + continue; + if (!state.IsTrackRecordable(track) && !track.GetChildTracks().Any(state.IsTrackRecordable)) + continue; + + var obj = TimelineUtility.GetSceneGameObject(state.editSequence.director, track); + if (obj != null) + { + yield return obj; + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording.cs.meta new file mode 100644 index 0000000..d8bca18 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ef4c81c9368d5a340b14c2fec1cad345 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecordingContextualResponder.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecordingContextualResponder.cs new file mode 100644 index 0000000..e55ff56 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecordingContextualResponder.cs @@ -0,0 +1,134 @@ +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TimelineRecordingContextualResponder : IAnimationContextualResponder + { + public WindowState state { get; internal set; } + + public TimelineRecordingContextualResponder(WindowState _state) + { + state = _state; + } + + //Unsupported stuff + public bool HasAnyCandidates() { return false; } + public bool HasAnyCurves() {return false; } + public void AddCandidateKeys() {} + public void AddAnimatedKeys() {} + + public bool IsAnimatable(PropertyModification[] modifications) + { + // search playable assets + for (int i = 0; i < modifications.Length; i++) + { + var iAsset = modifications[i].target as IPlayableAsset; + if (iAsset != null) + { + var curvesOwner = AnimatedParameterUtility.ToCurvesOwner(iAsset, state.editSequence.asset); + if (curvesOwner != null && curvesOwner.HasAnyAnimatableParameters() && curvesOwner.IsParameterAnimatable(modifications[i].propertyPath)) + return true; + } + } + + // search recordable game objects + foreach (var gameObject in TimelineRecording.GetRecordableGameObjects(state)) + { + for (int i = 0; i < modifications.Length; ++i) + { + var modification = modifications[i]; + if (AnimationWindowUtility.PropertyIsAnimatable(modification.target, modification.propertyPath, gameObject)) + return true; + } + } + + return false; + } + + public bool IsEditable(Object targetObject) + { + return true; // i.e. all animatable properties are editable + } + + public bool KeyExists(PropertyModification[] modifications) + { + if (modifications.Length == 0 || modifications[0].target == null) + return false; + + return TimelineRecording.HasKey(modifications, modifications[0].target, state); + } + + public bool CandidateExists(PropertyModification[] modifications) + { + return true; + } + + public bool CurveExists(PropertyModification[] modifications) + { + if (modifications.Length == 0 || modifications[0].target == null) + return false; + + return TimelineRecording.HasCurve(modifications, modifications[0].target, state); + } + + public void AddKey(PropertyModification[] modifications) + { + TimelineRecording.AddKey(modifications, state); + state.Refresh(); + } + + public void RemoveKey(PropertyModification[] modifications) + { + if (modifications.Length == 0) + return; + + var target = modifications[0].target; + if (target == null) + return; + + TimelineRecording.RemoveKey(modifications[0].target, modifications, state); + + var curvesOwner = target as ICurvesOwner; + if (curvesOwner != null) + curvesOwner.SanitizeCurvesData(); + + state.Refresh(); + } + + public void RemoveCurve(PropertyModification[] modifications) + { + if (modifications.Length == 0) + return; + + var target = modifications[0].target; + if (target == null) + return; + + TimelineRecording.RemoveCurve(target, modifications, state); + + var curvesOwner = target as ICurvesOwner; + if (curvesOwner != null) + curvesOwner.SanitizeCurvesData(); + + state.Refresh(); + } + + public void GoToNextKeyframe(PropertyModification[] modifications) + { + if (modifications.Length == 0 || modifications[0].target == null) + return; + + TimelineRecording.NextKey(modifications[0].target, modifications, state); + state.Refresh(); + } + + public void GoToPreviousKeyframe(PropertyModification[] modifications) + { + TimelineRecording.PrevKey(modifications[0].target, modifications, state); + state.Refresh(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecordingContextualResponder.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecordingContextualResponder.cs.meta new file mode 100644 index 0000000..2e8e492 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecordingContextualResponder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a59c2e62fbd97f84f92c3b546e3903cb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_Monobehaviour.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_Monobehaviour.cs new file mode 100644 index 0000000..0d2da17 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_Monobehaviour.cs @@ -0,0 +1,709 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Timeline; +using System.Globalization; + +namespace UnityEditor.Timeline +{ + // Methods and data for handling recording to monobehaviours + static partial class TimelineRecording + { + internal class RecordingState : IAnimationRecordingState + { + public GameObject activeGameObject { get; set; } + public GameObject activeRootGameObject { get; set; } + public AnimationClip activeAnimationClip { get; set; } + + public void SaveCurve(AnimationWindowCurve curve) + { + Undo.RegisterCompleteObjectUndo(activeAnimationClip, "Edit Curve"); + AnimationWindowUtility.SaveCurve(activeAnimationClip, curve); + } + + public void AddPropertyModification(EditorCurveBinding binding, PropertyModification propertyModification, bool keepPrefabOverride) + { + AnimationMode.AddPropertyModification(binding, propertyModification, keepPrefabOverride); + } + + public bool addZeroFrame + { + get { return false; } + } + + public int currentFrame { get; set; } + + public bool DiscardModification(PropertyModification modification) + { + return false; + } + } + + static readonly RecordingState s_RecordState = new RecordingState(); + static readonly AnimationTrackRecorder s_TrackRecorder = new AnimationTrackRecorder(); + static readonly List s_UnprocessedMods = new List(); + static readonly List s_ModsToProcess = new List(); + static AnimationTrack s_LastTrackWarning; + + public const string kLocalPosition = "m_LocalPosition"; + public const string kLocalRotation = "m_LocalRotation"; + public const string kLocalEulerHint = "m_LocalEulerAnglesHint"; + const string kRotationWarning = "You are recording with an initial rotation offset. This may result in a misrepresentation of euler angles. When recording transform properties, it is recommended to reset rotation prior to recording"; + + + public static bool IsRecordingAnimationTrack { get; private set; } + + + internal static UndoPropertyModification[] ProcessMonoBehaviourModification(UndoPropertyModification[] modifications, WindowState state) + { + if (state == null || state.editSequence.director == null) + return modifications; + + s_UnprocessedMods.Clear(); + + s_TrackRecorder.PrepareForRecord(state); + + s_ModsToProcess.Clear(); + s_ModsToProcess.AddRange(modifications.Reverse()); + + while (s_ModsToProcess.Count > 0) + { + var modification = s_ModsToProcess[s_ModsToProcess.Count - 1]; + s_ModsToProcess.RemoveAt(s_ModsToProcess.Count - 1); + + // grab the clip we need to apply to + var modifiedGO = GetGameObjectFromModification(modification); + var track = GetTrackForGameObject(modifiedGO, state); + if (track != null) + { + IsRecordingAnimationTrack = true; + + double startTime = 0; + var clip = s_TrackRecorder.PrepareTrack(track, state, modifiedGO, out startTime); + if (clip == null) + { + s_ModsToProcess.Reverse(); + return s_ModsToProcess.ToArray(); + } + s_RecordState.activeAnimationClip = clip; + s_RecordState.activeRootGameObject = state.GetSceneReference(track); + s_RecordState.activeGameObject = modifiedGO; + s_RecordState.currentFrame = Mathf.RoundToInt((float)startTime); + + EditorUtility.SetDirty(clip); + var toProcess = GatherRelatedModifications(modification, s_ModsToProcess); + + var animator = s_RecordState.activeRootGameObject.GetComponent(); + var animTrack = track as AnimationTrack; + + // update preview mode before recording so the correct values get placed (in case we modify offsets) + // Case 900624 + UpdatePreviewMode(toProcess, modifiedGO); + + // if this is the first position/rotation recording, copy the current position / rotation to the track offset + AddTrackOffset(animTrack, toProcess, clip, animator); + + // same for clip mod clips being created + AddClipOffset(animTrack, toProcess, s_TrackRecorder.recordClip, animator); + + // Check if we need to handle position/rotation offsets + var handleOffsets = animator != null && modification.currentValue != null && + modification.currentValue.target == s_RecordState.activeRootGameObject.transform && + HasOffsets(animTrack, s_TrackRecorder.recordClip); + if (handleOffsets) + { + toProcess = HandleEulerModifications(animTrack, s_TrackRecorder.recordClip, clip, s_RecordState.currentFrame * clip.frameRate, toProcess); + RemoveOffsets(modification, animTrack, s_TrackRecorder.recordClip, toProcess); + } + + var remaining = AnimationRecording.Process(s_RecordState, toProcess); + if (remaining != null && remaining.Length != 0) + { + s_UnprocessedMods.AddRange(remaining); + } + + if (handleOffsets) + { + ReapplyOffsets(modification, animTrack, s_TrackRecorder.recordClip, toProcess); + } + + s_TrackRecorder.FinializeTrack(track, state); + + IsRecordingAnimationTrack = false; + } + else + { + s_UnprocessedMods.Add(modification); + } + } + + + s_TrackRecorder.FinalizeRecording(state); + + return s_UnprocessedMods.ToArray(); + } + + internal static bool IsPosition(UndoPropertyModification modification) + { + if (modification.currentValue != null) + return modification.currentValue.propertyPath.StartsWith(kLocalPosition); + else if (modification.previousValue != null) + return modification.previousValue.propertyPath.StartsWith(kLocalPosition); + return false; + } + + internal static bool IsRotation(UndoPropertyModification modification) + { + if (modification.currentValue != null) + return modification.currentValue.propertyPath.StartsWith(kLocalRotation) || + modification.currentValue.propertyPath.StartsWith(kLocalEulerHint); + if (modification.previousValue != null) + return modification.previousValue.propertyPath.StartsWith(kLocalRotation) || + modification.previousValue.propertyPath.StartsWith(kLocalEulerHint); + return false; + } + + // Test if this modification position or rotation + internal static bool IsPositionOrRotation(UndoPropertyModification modification) + { + return IsPosition(modification) || IsRotation(modification); + } + + internal static void UpdatePreviewMode(UndoPropertyModification[] mods, GameObject go) + { + if (mods.Any(x => IsPositionOrRotation(x) && IsRootModification(x))) + { + bool hasPosition = false; + bool hasRotation = false; + + foreach (var mod in mods) + { + EditorCurveBinding binding = new EditorCurveBinding(); + if (AnimationUtility.PropertyModificationToEditorCurveBinding(mod.previousValue, go, out binding) != null) + { + hasPosition |= IsPosition(mod); + hasRotation |= IsRotation(mod); + AnimationMode.AddPropertyModification(binding, mod.previousValue, true); + } + } + + // case 931859 - if we are only changing one field, all fields must be registered before + // any recording modifications + var driver = WindowState.previewDriver; + if (driver != null && AnimationMode.InAnimationMode(driver)) + { + if (hasPosition) + { + DrivenPropertyManager.RegisterProperty(driver, go.transform, kLocalPosition + ".x"); + DrivenPropertyManager.RegisterProperty(driver, go.transform, kLocalPosition + ".y"); + DrivenPropertyManager.RegisterProperty(driver, go.transform, kLocalPosition + ".z"); + } + else if (hasRotation) + { + DrivenPropertyManager.RegisterProperty(driver, go.transform, kLocalRotation + ".x"); + DrivenPropertyManager.RegisterProperty(driver, go.transform, kLocalRotation + ".y"); + DrivenPropertyManager.RegisterProperty(driver, go.transform, kLocalRotation + ".z"); + DrivenPropertyManager.RegisterProperty(driver, go.transform, kLocalRotation + ".w"); + } + } + } + } + + internal static bool IsRootModification(UndoPropertyModification modification) + { + string path = string.Empty; + if (modification.currentValue != null) + path = modification.currentValue.propertyPath; + else if (modification.previousValue != null) + path = modification.previousValue.propertyPath; + + return !path.Contains('/') && !path.Contains('\\'); + } + + // test if the clip has any position or rotation bindings + internal static bool ClipHasPositionOrRotation(AnimationClip clip) + { + if (clip == null || clip.empty) + return false; + + var info = AnimationClipCurveCache.Instance.GetCurveInfo(clip); + for (var i = 0; i < info.bindings.Length; i++) + { + bool isPositionOrRotation = + info.bindings[i].type != null && + typeof(Transform).IsAssignableFrom(info.bindings[i].type) && + ( + info.bindings[i].propertyName.StartsWith(kLocalPosition) || + info.bindings[i].propertyName.StartsWith(kLocalRotation) || + info.bindings[i].propertyName.StartsWith("localEuler") + ); + + if (isPositionOrRotation) + return true; + } + + return false; + } + + internal static TimelineAnimationUtilities.RigidTransform ComputeInitialClipOffsets(AnimationTrack track, UndoPropertyModification[] mods, Animator animator) + { + // take into account the track transform + var target = GetInitialTransform(mods, animator); + var trackToClip = TimelineAnimationUtilities.RigidTransform.identity; + if (track.trackOffset == TrackOffset.ApplyTransformOffsets) + trackToClip = TimelineAnimationUtilities.RigidTransform.Compose(track.position, track.rotation); + else if (track.trackOffset == TrackOffset.ApplySceneOffsets) + trackToClip = TimelineAnimationUtilities.RigidTransform.Compose(track.sceneOffsetPosition, Quaternion.Euler(track.sceneOffsetRotation)); + + target = TimelineAnimationUtilities.RigidTransform.Mul(TimelineAnimationUtilities.RigidTransform.Inverse(trackToClip), target); + + // set the previous position in case the animation system adds a default key + SetPreviousPositionAndRotation(mods, animator, trackToClip.position, trackToClip.rotation); + return target; + } + + internal static TimelineAnimationUtilities.RigidTransform GetInitialTransform(UndoPropertyModification[] mods, Animator animator) + { + var pos = Vector3.zero; + var rot = Quaternion.identity; + + // if we are operating on the root, grab the transform from the undo + if (mods[0].previousValue.target == animator.transform) + { + GetPreviousPositionAndRotation(mods, ref pos, ref rot); + } + // otherwise we need to grab it from the root object, which is the one with the actual animator + else + { + pos = animator.transform.localPosition; + rot = animator.transform.localRotation; + } + + // take into account the track transform + return TimelineAnimationUtilities.RigidTransform.Compose(pos, rot); + } + + internal static void SetPreviousPositionAndRotation(UndoPropertyModification[] mods, Animator animator, Vector3 pos, Quaternion rot) + { + if (mods[0].previousValue.target == animator.transform) + { + SetPreviousPositionAndRotation(mods, pos, rot); + } + } + + // If we are adding to an infinite clip, strip the objects position and rotation and set it as the clip offset + internal static void AddTrackOffset(AnimationTrack track, UndoPropertyModification[] mods, AnimationClip clip, Animator animator) + { + var copyTrackOffset = !track.inClipMode && + !ClipHasPositionOrRotation(clip) && + mods.Any(x => IsPositionOrRotation(x) && IsRootModification(x)) && + animator != null; + if (copyTrackOffset) + { + // in scene offset mode, makes sure we have the correct initial transform set + if (track.trackOffset == TrackOffset.ApplySceneOffsets) + { + var rigidTransform = GetInitialTransform(mods, animator); + track.sceneOffsetPosition = rigidTransform.position; + track.sceneOffsetRotation = rigidTransform.rotation.eulerAngles; + SetPreviousPositionAndRotation(mods, animator, rigidTransform.position, rigidTransform.rotation); + } + else + { + var rigidTransform = ComputeInitialClipOffsets(track, mods, animator); + track.infiniteClipOffsetPosition = rigidTransform.position; + track.infiniteClipOffsetEulerAngles = rigidTransform.rotation.eulerAngles; + } + } + } + + internal static void AddClipOffset(AnimationTrack track, UndoPropertyModification[] mods, TimelineClip clip, Animator animator) + { + if (clip == null || clip.asset == null) + return; + + var clipAsset = clip.asset as AnimationPlayableAsset; + var copyClipOffset = track.inClipMode && + clipAsset != null && !ClipHasPositionOrRotation(clipAsset.clip) && + mods.Any(x => IsPositionOrRotation(x) && IsRootModification(x)) && + animator != null; + if (copyClipOffset) + { + var rigidTransform = ComputeInitialClipOffsets(track, mods, animator); + + clipAsset.position = rigidTransform.position; + clipAsset.rotation = rigidTransform.rotation; + } + } + + internal static TimelineAnimationUtilities.RigidTransform GetLocalToTrack(AnimationTrack track, TimelineClip clip) + { + if (track == null) + return TimelineAnimationUtilities.RigidTransform.Compose(Vector3.zero, Quaternion.identity); + + var trackPos = track.position; + var trackRot = track.rotation; + + if (track.trackOffset == TrackOffset.ApplySceneOffsets) + { + trackPos = track.sceneOffsetPosition; + trackRot = Quaternion.Euler(track.sceneOffsetRotation); + } + + var clipWrapper = clip == null ? null : clip.asset as AnimationPlayableAsset; + var clipTransform = TimelineAnimationUtilities.RigidTransform.Compose(Vector3.zero, Quaternion.identity); + if (clipWrapper != null) + { + clipTransform = TimelineAnimationUtilities.RigidTransform.Compose(clipWrapper.position, clipWrapper.rotation); + } + else + { + clipTransform = TimelineAnimationUtilities.RigidTransform.Compose(track.infiniteClipOffsetPosition, track.infiniteClipOffsetRotation); + } + + var trackTransform = TimelineAnimationUtilities.RigidTransform.Compose(trackPos, trackRot); + + return TimelineAnimationUtilities.RigidTransform.Mul(trackTransform, clipTransform); + } + + // Checks whether there are any offsets applied to a clip + internal static bool HasOffsets(AnimationTrack track, TimelineClip clip) + { + if (track == null) + return false; + + bool hasClipOffsets = false; + bool hasTrackOffsets = false; + + var clipWrapper = clip == null ? null : clip.asset as AnimationPlayableAsset; + if (clipWrapper != null) + hasClipOffsets |= clipWrapper.position != Vector3.zero || clipWrapper.rotation != Quaternion.identity; + + if (track.trackOffset == TrackOffset.ApplySceneOffsets) + { + hasTrackOffsets = track.sceneOffsetPosition != Vector3.zero || track.sceneOffsetRotation != Vector3.zero; + } + else + { + hasTrackOffsets = (track.position != Vector3.zero || track.rotation != Quaternion.identity); + if (!track.inClipMode) + hasClipOffsets |= track.infiniteClipOffsetPosition != Vector3.zero || track.infiniteClipOffsetRotation != Quaternion.identity; + } + + return hasTrackOffsets || hasClipOffsets; + } + + internal static void RemoveOffsets(UndoPropertyModification modification, AnimationTrack track, TimelineClip clip, UndoPropertyModification[] mods) + { + if (IsPositionOrRotation(modification)) + { + var modifiedGO = GetGameObjectFromModification(modification); + var target = TimelineAnimationUtilities.RigidTransform.Compose(modifiedGO.transform.localPosition, modifiedGO.transform.localRotation); + var localToTrack = GetLocalToTrack(track, clip); + var trackToLocal = TimelineAnimationUtilities.RigidTransform.Inverse(localToTrack); + var localSpace = TimelineAnimationUtilities.RigidTransform.Mul(trackToLocal, target); + + // Update the undo call values + var prevPos = modifiedGO.transform.localPosition; + var prevRot = modifiedGO.transform.localRotation; + GetPreviousPositionAndRotation(mods, ref prevPos, ref prevRot); + var previousRigidTransform = TimelineAnimationUtilities.RigidTransform.Mul(trackToLocal, TimelineAnimationUtilities.RigidTransform.Compose(prevPos, prevRot)); + SetPreviousPositionAndRotation(mods, previousRigidTransform.position, previousRigidTransform.rotation); + + var currentPos = modifiedGO.transform.localPosition; + var currentRot = modifiedGO.transform.localRotation; + GetCurrentPositionAndRotation(mods, ref currentPos, ref currentRot); + var currentRigidTransform = TimelineAnimationUtilities.RigidTransform.Mul(trackToLocal, TimelineAnimationUtilities.RigidTransform.Compose(currentPos, currentRot)); + SetCurrentPositionAndRotation(mods, currentRigidTransform.position, currentRigidTransform.rotation); + + modifiedGO.transform.localPosition = localSpace.position; + modifiedGO.transform.localRotation = localSpace.rotation; + } + } + + internal static void ReapplyOffsets(UndoPropertyModification modification, AnimationTrack track, TimelineClip clip, UndoPropertyModification[] mods) + { + if (IsPositionOrRotation(modification)) + { + var modifiedGO = GetGameObjectFromModification(modification); + var target = TimelineAnimationUtilities.RigidTransform.Compose(modifiedGO.transform.localPosition, modifiedGO.transform.localRotation); + var localToTrack = GetLocalToTrack(track, clip); + var trackSpace = TimelineAnimationUtilities.RigidTransform.Mul(localToTrack, target); + + // Update the undo call values + var prevPos = modifiedGO.transform.localPosition; + var prevRot = modifiedGO.transform.localRotation; + GetPreviousPositionAndRotation(mods, ref prevPos, ref prevRot); + var previousRigidTransform = TimelineAnimationUtilities.RigidTransform.Mul(localToTrack, TimelineAnimationUtilities.RigidTransform.Compose(prevPos, prevRot)); + SetPreviousPositionAndRotation(mods, previousRigidTransform.position, previousRigidTransform.rotation); + + var currentPos = modifiedGO.transform.localPosition; + var currentRot = modifiedGO.transform.localRotation; + GetCurrentPositionAndRotation(mods, ref currentPos, ref currentRot); + var currentRigidTransform = TimelineAnimationUtilities.RigidTransform.Mul(localToTrack, TimelineAnimationUtilities.RigidTransform.Compose(currentPos, currentRot)); + SetCurrentPositionAndRotation(mods, currentRigidTransform.position, currentRigidTransform.rotation); + + modifiedGO.transform.localPosition = trackSpace.position; + modifiedGO.transform.localRotation = trackSpace.rotation; + } + } + + // This will gather the modifications that modify the same property on the same object (rgba of a color, xyzw of a vector) + // Note: This will modify the list, removing any elements that match + static UndoPropertyModification[] GatherRelatedModifications(UndoPropertyModification toMatch, List list) + { + var matching = new List {toMatch}; + + for (var i = list.Count - 1; i >= 0; i--) + { + var undo = list[i]; + if (undo.previousValue.target == toMatch.previousValue.target && + DoesPropertyPathMatch(undo.previousValue.propertyPath, toMatch.previousValue.propertyPath)) + { + matching.Add(undo); + list.RemoveAt(i); + } + } + + return matching.ToArray(); + } + + // Grab the game object out of the modification object + static GameObject GetGameObjectFromModification(UndoPropertyModification mod) + { + // grab the GO this is modifying + GameObject modifiedGO = null; + if (mod.previousValue.target is GameObject) + modifiedGO = mod.previousValue.target as GameObject; + else if (mod.previousValue.target is Component) + modifiedGO = (mod.previousValue.target as Component).gameObject; + + return modifiedGO; + } + + // returns the level of the child in the hierarchy relative to the parent, + // or -1 if the child is not the parent or a descendent of it + static int GetChildLevel(GameObject parent, GameObject child) + { + var level = 0; + while (child != null) + { + if (parent == child) + break; + if (child.transform.parent == null) + return -1; + child = child.transform.parent.gameObject; + level++; + } + + if (child != null) + return level; + return -1; + } + + static bool DoesPropertyPathMatch(string a, string b) + { + return AnimationWindowUtility.GetPropertyGroupName(a).Equals(AnimationWindowUtility.GetPropertyGroupName(a)); + } + + internal static void GetPreviousPositionAndRotation(UndoPropertyModification[] mods, ref Vector3 position, ref Quaternion rotation) + { + var t = mods[0].previousValue.target as Transform; + if (t == null) + t = (Transform)mods[0].currentValue.target; + + position = t.localPosition; + rotation = t.localRotation; + + foreach (var mod in mods) + { + switch (mod.previousValue.propertyPath) + { + case kLocalPosition + ".x": + position.x = ParseFloat(mod.previousValue.value, position.x); + break; + case kLocalPosition + ".y": + position.y = ParseFloat(mod.previousValue.value, position.y); + break; + case kLocalPosition + ".z": + position.z = ParseFloat(mod.previousValue.value, position.z); + break; + case kLocalRotation + ".x": + rotation.x = ParseFloat(mod.previousValue.value, rotation.x); + break; + case kLocalRotation + ".y": + rotation.y = ParseFloat(mod.previousValue.value, rotation.y); + break; + case kLocalRotation + ".z": + rotation.z = ParseFloat(mod.previousValue.value, rotation.z); + break; + case kLocalRotation + ".w": + rotation.w = ParseFloat(mod.previousValue.value, rotation.w); + break; + } + } + } + + internal static void GetCurrentPositionAndRotation(UndoPropertyModification[] mods, ref Vector3 position, ref Quaternion rotation) + { + var t = (Transform)mods[0].currentValue.target; + position = t.localPosition; + rotation = t.localRotation; + + foreach (var mod in mods) + { + switch (mod.currentValue.propertyPath) + { + case kLocalPosition + ".x": + position.x = ParseFloat(mod.currentValue.value, position.x); + break; + case kLocalPosition + ".y": + position.y = ParseFloat(mod.currentValue.value, position.y); + break; + case kLocalPosition + ".z": + position.z = ParseFloat(mod.currentValue.value, position.z); + break; + case kLocalRotation + ".x": + rotation.x = ParseFloat(mod.currentValue.value, rotation.x); + break; + case kLocalRotation + ".y": + rotation.y = ParseFloat(mod.currentValue.value, rotation.y); + break; + case kLocalRotation + ".z": + rotation.z = ParseFloat(mod.currentValue.value, rotation.z); + break; + case kLocalRotation + ".w": + rotation.w = ParseFloat(mod.currentValue.value, rotation.w); + break; + } + } + } + + // when making the previous position and rotation + internal static void SetPreviousPositionAndRotation(UndoPropertyModification[] mods, Vector3 pos, Quaternion rot) + { + foreach (var mod in mods) + { + switch (mod.previousValue.propertyPath) + { + case kLocalPosition + ".x": + mod.previousValue.value = pos.x.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalPosition + ".y": + mod.previousValue.value = pos.y.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalPosition + ".z": + mod.previousValue.value = pos.z.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalRotation + ".x": + mod.previousValue.value = rot.x.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalRotation + ".y": + mod.previousValue.value = rot.y.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalRotation + ".z": + mod.previousValue.value = rot.z.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalRotation + ".w": + mod.previousValue.value = rot.w.ToString(EditorGUI.kFloatFieldFormatString); + break; + } + } + } + + internal static void SetCurrentPositionAndRotation(UndoPropertyModification[] mods, Vector3 pos, Quaternion rot) + { + foreach (var mod in mods) + { + switch (mod.previousValue.propertyPath) + { + case kLocalPosition + ".x": + mod.currentValue.value = pos.x.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalPosition + ".y": + mod.currentValue.value = pos.y.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalPosition + ".z": + mod.currentValue.value = pos.z.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalRotation + ".x": + mod.currentValue.value = rot.x.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalRotation + ".y": + mod.currentValue.value = rot.y.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalRotation + ".z": + mod.currentValue.value = rot.z.ToString(EditorGUI.kFloatFieldFormatString); + break; + case kLocalRotation + ".w": + mod.currentValue.value = rot.w.ToString(EditorGUI.kFloatFieldFormatString); + break; + } + } + } + + internal static float ParseFloat(string str, float defaultVal) + { + float temp = 0.0f; + if (float.TryParse(str, NumberStyles.Float, CultureInfo.InvariantCulture.NumberFormat, out temp)) + return temp; + return defaultVal; + } + + internal static UndoPropertyModification[] HandleEulerModifications(AnimationTrack track, TimelineClip clip, AnimationClip animClip, float time, UndoPropertyModification[] mods) + { + if (mods.Any(x => x.currentValue.propertyPath.StartsWith(kLocalEulerHint) || x.currentValue.propertyPath.StartsWith(kLocalRotation))) + { + // if there is a rotational offsets, we need to strip the euler hints, since they are used by the animation recording system + // over the quaternion. + var localToTrack = GetLocalToTrack(track, clip); + if (localToTrack.rotation != Quaternion.identity) + { + if (s_LastTrackWarning != track) + { + s_LastTrackWarning = track; + Debug.LogWarning(kRotationWarning); + } + + Transform transform = mods[0].currentValue.target as Transform; + if (transform != null) + { + var trackToLocal = TimelineAnimationUtilities.RigidTransform.Inverse(localToTrack); + // since the euler angles are going to be transformed, we do a best guess at a euler that gives the shortest path + var quatMods = mods.Where(x => !x.currentValue.propertyPath.StartsWith(kLocalEulerHint)); + var eulerMods = FindBestEulerHint(trackToLocal.rotation * transform.localRotation, animClip, time, transform); + return quatMods.Union(eulerMods).ToArray(); + } + return mods.Where(x => !x.currentValue.propertyPath.StartsWith(kLocalEulerHint)).ToArray(); + } + } + return mods; + } + + internal static IEnumerable FindBestEulerHint(Quaternion rotation, AnimationClip clip, float time, Transform transform) + { + Vector3 euler = rotation.eulerAngles; + + var xCurve = AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(string.Empty, typeof(Transform), "localEulerAnglesRaw.x")); + var yCurve = AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(string.Empty, typeof(Transform), "localEulerAnglesRaw.y")); + var zCurve = AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(string.Empty, typeof(Transform), "localEulerAnglesRaw.z")); + + if (xCurve != null) + euler.x = xCurve.Evaluate(time); + if (yCurve != null) + euler.y = yCurve.Evaluate(time); + if (zCurve != null) + euler.z = zCurve.Evaluate(time); + + euler = QuaternionCurveTangentCalculation.GetEulerFromQuaternion(rotation, euler); + + return new[] + { + PropertyModificationToUndoPropertyModification(new PropertyModification {target = transform, propertyPath = kLocalEulerHint + ".x", value = euler.x.ToString() }), + PropertyModificationToUndoPropertyModification(new PropertyModification {target = transform, propertyPath = kLocalEulerHint + ".y", value = euler.y.ToString() }), + PropertyModificationToUndoPropertyModification(new PropertyModification {target = transform, propertyPath = kLocalEulerHint + ".z", value = euler.z.ToString() }) + }; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_Monobehaviour.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_Monobehaviour.cs.meta new file mode 100644 index 0000000..346e5bd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_Monobehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9805855c8e379ed4cad77f639aaddb73 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_PlayableAsset.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_PlayableAsset.cs new file mode 100644 index 0000000..940854e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_PlayableAsset.cs @@ -0,0 +1,115 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + // Handles Undo animated properties on PlayableAssets from clips to create parameter animation + + static partial class TimelineRecording + { + internal static bool HasAnyPlayableAssetModifications(UndoPropertyModification[] modifications) + { + return modifications.Any(x => GetTarget(x) as IPlayableAsset != null); + } + + internal static UndoPropertyModification[] ProcessPlayableAssetModification(UndoPropertyModification[] modifications, WindowState state) + { + // can't record without a director since the asset being modified might be a scene instance + if (state == null || state.editSequence.director == null) + return modifications; + + var remaining = new List(); + foreach (UndoPropertyModification mod in modifications) + { + if (!ProcessPlayableAssetModification(mod, state)) + remaining.Add(mod); + } + + if (remaining.Count != modifications.Length) + { + state.rebuildGraph = true; + state.GetWindow().Repaint(); + } + + return remaining.ToArray(); + } + + static bool ProcessPlayableAssetModification(UndoPropertyModification mod, WindowState state) + { + var target = GetTarget(mod) as IPlayableAsset; + if (target == null) + return false; + + var curvesOwner = AnimatedParameterUtility.ToCurvesOwner(target, state.editSequence.asset); + if (curvesOwner == null || !curvesOwner.HasAnyAnimatableParameters()) + return false; + + return ProcessPlayableAssetRecording(mod, state, curvesOwner); + } + + internal static TimelineClip FindClipWithAsset(TimelineAsset asset, IPlayableAsset target) + { + if (target == null || asset == null) + return null; + + var clips = asset.flattenedTracks.SelectMany(x => x.clips); + return clips.FirstOrDefault(x => x != null && x.asset != null && target == x.asset as IPlayableAsset); + } + + static bool ProcessPlayableAssetRecording(UndoPropertyModification mod, WindowState state, ICurvesOwner curvesOwner) + { + if (mod.currentValue == null) + return false; + + if (!curvesOwner.IsParameterAnimatable(mod.currentValue.propertyPath)) + return false; + + var localTime = state.editSequence.time; + var timelineClip = curvesOwner as TimelineClip; + if (timelineClip != null) + { + // don't use time global to local since it will possibly loop. + localTime = timelineClip.ToLocalTimeUnbound(state.editSequence.time); + } + + if (localTime < 0) + return false; + + // grab the value from the current modification + float fValue = 0; + if (!float.TryParse(mod.currentValue.value, out fValue)) + { + // case 916913 -- 'Add Key' menu item will passes 'True' or 'False' (instead of 1, 0) + // so we need a special case to parse the boolean string + bool bValue; + if (!bool.TryParse(mod.currentValue.value, out bValue)) + { + Debug.Assert(false, "Invalid type in PlayableAsset recording"); + return false; + } + + fValue = bValue ? 1 : 0; + } + + var added = curvesOwner.AddAnimatedParameterValueAt(mod.currentValue.propertyPath, fValue, (float)localTime); + if (added && AnimationMode.InAnimationMode()) + { + EditorCurveBinding binding = curvesOwner.GetCurveBinding(mod.previousValue.propertyPath); + AnimationMode.AddPropertyModification(binding, mod.previousValue, true); + curvesOwner.targetTrack.SetShowInlineCurves(true); + if (state.GetWindow() != null && state.GetWindow().treeView != null) + state.GetWindow().treeView.CalculateRowRects(); + } + + return added; + } + + static bool IsPlayableAssetProperty(SerializedProperty property) + { + return property.serializedObject.targetObject is IPlayableAsset; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_PlayableAsset.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_PlayableAsset.cs.meta new file mode 100644 index 0000000..e78220d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TimelineRecording_PlayableAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7341c0cd0aad4994e8fa461cb443aa7d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TrackAssetRecordingExtensions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TrackAssetRecordingExtensions.cs new file mode 100644 index 0000000..f44b82b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TrackAssetRecordingExtensions.cs @@ -0,0 +1,191 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class TrackAssetRecordingExtensions + { + static readonly Dictionary s_ActiveClips = new Dictionary(); + + internal static void OnRecordingArmed(this TrackAsset track, PlayableDirector director) + { + if (track == null) + return; + + var animClip = track.FindRecordingAnimationClipAtTime(director.time); + if (animClip == null) + return; + + s_ActiveClips[track] = animClip; + } + + internal static void OnRecordingTimeChanged(this TrackAsset track, PlayableDirector director) + { + if (track == null) + return; + + var animClip = track.FindRecordingAnimationClipAtTime(director.time); + AnimationClip prevClip = track.GetActiveRecordingAnimationClip(); + if (prevClip != animClip) + { + s_ActiveClips[track] = animClip; + } + } + + internal static void OnRecordingUnarmed(this TrackAsset track, PlayableDirector director) + { + s_ActiveClips.Remove(track); + } + + internal static bool CanRecordAtTime(this TrackAsset track, double time) + { + // Animation Track + var animTrack = track as AnimationTrack; + if (animTrack != null) + { + if (!animTrack.inClipMode) + return true; + + TimelineClip clip = null; + return FindRecordingClipAtTime(track, time, out clip); + } + + // Custom track + return track.clips.Any(x => x.start < time + TimeUtility.kTimeEpsilon && x.HasAnyAnimatableParameters()); + } + + internal static AnimationClip GetActiveRecordingAnimationClip(this TrackAsset track) + { + AnimationClip clip = null; + s_ActiveClips.TryGetValue(track, out clip); + return clip; + } + + internal static bool IsRecordingToClip(this TrackAsset track, TimelineClip clip) + { + if (track == null || clip == null) + return false; + var animClip = track.GetActiveRecordingAnimationClip(); + if (animClip == null) + return false; + if (animClip == clip.curves) + return true; + + var animAsset = clip.asset as AnimationPlayableAsset; + return animAsset != null && animClip == animAsset.clip; + } + + // Finds the clip at the given time that recording should use + // returns whether recording at this particular point is valid + // The target clip will be returned, even if recording at that time is invalid + // in case of recording in a blend OR recording to a non-timeline clip + internal static bool FindRecordingClipAtTime(this TrackAsset track, double time, out TimelineClip target) + { + target = null; + if (track == null) + { + return false; + } + + var discreteTime = new DiscreteTime(time); + + // only animation tracks require the recordable flag as they are recording + // to an animation clip + bool requiresRecordable = (track as AnimationTrack) != null; + if (requiresRecordable) + { + track.SortClips(); + var sortedByStartTime = track.clips; + int i = 0; + for (i = 0; i < sortedByStartTime.Length; i++) + { + var clip = sortedByStartTime[i]; + if (new DiscreteTime(clip.start) <= discreteTime && new DiscreteTime(clip.end) > discreteTime) + { + target = clip; + // not recordable + if (!clip.recordable) + return false; + + // in a blend + if (!Mathf.Approximately(1.0f, clip.EvaluateMixIn(time) * clip.EvaluateMixOut(time))) + return false; + + return true; + } + + if (new DiscreteTime(clip.start) > discreteTime) + { + break; + } + } + + return false; + } + + + // Recordable playable assets -- takes the last clip that matches + track.SortClips(); + for (int i = 0; i < track.clips.Length; i++) + { + var clip = track.clips[i]; + if (clip.start <= time && clip.end >= time && clip.HasAnyAnimatableParameters()) + target = clip; + + if (clip.start > time) + break; + } + + return target != null; + } + + // Given a track, return the animation clip + internal static AnimationClip FindRecordingAnimationClipAtTime(this TrackAsset trackAsset, double time) + { + if (trackAsset == null) + return null; + + AnimationTrack animTrack = trackAsset as AnimationTrack; + if (animTrack != null && !animTrack.inClipMode) + { + return animTrack.infiniteClip; + } + + TimelineClip displayBackground; + trackAsset.FindRecordingClipAtTime(time, out displayBackground); + if (displayBackground != null) + { + if (displayBackground.recordable) + { + AnimationPlayableAsset asset = displayBackground.asset as AnimationPlayableAsset; + if (asset != null) + return asset.clip; + } + else if (animTrack == null) + { + if (displayBackground.curves == null) + displayBackground.CreateCurves(AnimationTrackRecorder.GetUniqueRecordedClipName(displayBackground.parentTrack, TimelineClip.kDefaultCurvesName)); + + return displayBackground.curves; + } + } + else if (trackAsset.HasAnyAnimatableParameters()) + { + if (trackAsset.curves == null) + trackAsset.CreateCurves(AnimationTrackRecorder.GetUniqueRecordedClipName(trackAsset.timelineAsset, TrackAsset.kDefaultCurvesName)); + + return trackAsset.curves; + } + + return null; + } + + internal static void ClearRecordingState() + { + s_ActiveClips.Clear(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TrackAssetRecordingExtensions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TrackAssetRecordingExtensions.cs.meta new file mode 100644 index 0000000..edbe4da --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Recording/TrackAssetRecordingExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 49f1d2c7420db4444b011955726d0046 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Shortcuts.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Shortcuts.cs new file mode 100644 index 0000000..5d992cd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Shortcuts.cs @@ -0,0 +1,266 @@ +using System; +using JetBrains.Annotations; +using UnityEditor.ShortcutManagement; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + static class Shortcuts + { + public static class Clip + { + public const string split = "Timeline/Editing/Split"; + public const string trimStart = "Timeline/Editing/TrimStart"; + public const string trimEnd = "Timeline/Editing/TrimEnd"; + + [UsedImplicitly, ShortcutManagement.Shortcut(split, typeof(TimelineWindow), KeyCode.S)] + static void Split(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(split, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(trimStart, typeof(TimelineWindow), KeyCode.I)] + static void TrimStart(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(trimStart, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(trimEnd, typeof(TimelineWindow), KeyCode.O)] + static void TrimEnd(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(trimEnd, args.context); + } + } + + public static class Timeline + { + public const string play = "Timeline/Play"; + public const string previousFrame = "Timeline/PrevFrame"; + public const string nextFrame = "Timeline/NextFrame"; + public const string frameAll = "Timeline/FrameAll"; + public const string previousKey = "Timeline/PrevKey"; + public const string nextKey = "Timeline/NextKey"; + public const string goToStart = "Timeline/GotoStart"; + public const string goToEnd = "Timeline/GotoEnd"; + public const string zoomIn = "Timeline/ZoomIn"; + public const string zoomOut = "Timeline/ZoomOut"; + public const string collapseGroup = "Timeline/CollapseGroup"; + public const string unCollapseGroup = "Timeline/UnCollapseGroup"; + public const string selectLeftItem = "Timeline/SelectLeftItem"; + public const string selectRightItem = "Timeline/SelectRightItem"; + public const string selectUpItem = "Timeline/SelectUpItem"; + public const string selectUpTrack = "Timeline/SelectUpTrack"; + public const string selectDownItem = "Timeline/SelectDownItem"; + public const string selectDownTrack = "Timeline/SelectDownTrack"; + public const string multiSelectLeft = "Timeline/SelectLeft"; + public const string multiSelectRight = "Timeline/SelectRight"; + public const string multiSelectUp = "Timeline/SelectUp"; + public const string multiSelectDown = "Timeline/SelectDown"; + public const string toggleClipTrackArea = "Timeline/ToggleClipTrackArea"; + public const string matchContent = "Timeline/MatchContent"; + public const string toggleLock = "Timeline/ToggleLock"; + public const string toggleMute = "Timeline/ToggleMute"; + + public const string moveLeft = "Timeline/MoveLeft"; + public const string moveRight = "Timeline/MoveRight"; + public const string moveUp = "Timeline/MoveUp"; + public const string moveDown = "Timeline/MoveDown"; + + [UsedImplicitly, ShortcutManagement.Shortcut(play, typeof(TimelineWindow), KeyCode.Space)] + static void Play(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(play, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(previousFrame, typeof(TimelineWindow), KeyCode.Comma)] + static void PreviousFrame(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(previousFrame, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(nextFrame, typeof(TimelineWindow), KeyCode.Period)] + static void NextFrame(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(nextFrame, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(frameAll, typeof(TimelineWindow), KeyCode.A)] + static void FrameAll(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(frameAll, args.context); + } + + #if UNITY_EDITOR_OSX + [UsedImplicitly, ShortcutManagement.Shortcut(previousKey, typeof(TimelineWindow), KeyCode.Comma, ShortcutModifiers.Action | ShortcutModifiers.Shift)] + #else + [UsedImplicitly, ShortcutManagement.Shortcut(previousKey, typeof(TimelineWindow), KeyCode.Comma, ShortcutModifiers.Action)] + #endif + static void PrevKey(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(previousKey, args.context); + } + + #if UNITY_EDITOR_OSX + [UsedImplicitly, ShortcutManagement.Shortcut(nextKey, typeof(TimelineWindow), KeyCode.Period, ShortcutModifiers.Action | ShortcutModifiers.Shift)] + #else + [UsedImplicitly, ShortcutManagement.Shortcut(nextKey, typeof(TimelineWindow), KeyCode.Period, ShortcutModifiers.Action)] + #endif + static void NextKey(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(nextKey, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(goToStart, typeof(TimelineWindow), KeyCode.Comma, ShortcutModifiers.Shift)] + static void GoToStart(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(goToStart, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(goToEnd, typeof(TimelineWindow), KeyCode.Period, ShortcutModifiers.Shift)] + static void GoToEnd(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(goToEnd, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(zoomIn, typeof(TimelineWindow), KeyCode.Equals)] + static void ZoomIn(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(zoomIn, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(zoomOut, typeof(TimelineWindow), KeyCode.Minus)] + static void ZoomOut(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(zoomOut, args.context); + } + + [UsedImplicitly] + [ShortcutManagement.Shortcut(moveLeft, typeof(TimelineWindow), KeyCode.LeftArrow)] + static void SelectLeft(ShortcutManagement.ShortcutArguments args) + { + if (KeyboardNavigation.ClipAreaActive()) + { + SendEventToInvokeShortcut(selectLeftItem, args.context); + } + else if (KeyboardNavigation.TrackHeadActive()) + { + SendEventToInvokeShortcut(collapseGroup, args.context); + } + } + + [UsedImplicitly] + [ShortcutManagement.Shortcut(moveRight, typeof(TimelineWindow), KeyCode.RightArrow)] + static void SelectRight(ShortcutManagement.ShortcutArguments args) + { + if (KeyboardNavigation.ClipAreaActive()) + { + SendEventToInvokeShortcut(selectRightItem, args.context); + } + else if (KeyboardNavigation.TrackHeadActive()) + { + SendEventToInvokeShortcut(unCollapseGroup, args.context); + } + } + + [UsedImplicitly] + [ShortcutManagement.Shortcut(moveUp, typeof(TimelineWindow), KeyCode.UpArrow)] + static void SelectUp(ShortcutManagement.ShortcutArguments args) + { + if (KeyboardNavigation.ClipAreaActive()) + { + SendEventToInvokeShortcut(selectUpItem, args.context); + } + else if (KeyboardNavigation.TrackHeadActive()) + { + SendEventToInvokeShortcut(selectUpTrack, args.context); + } + else + { + KeyboardNavigation.FocusFirstVisibleItem(GetState(args)); + } + } + + [UsedImplicitly] + [ShortcutManagement.Shortcut(moveDown, typeof(TimelineWindow), KeyCode.DownArrow)] + static void SelectDown(ShortcutManagement.ShortcutArguments args) + { + if (KeyboardNavigation.ClipAreaActive()) + { + SendEventToInvokeShortcut(selectDownItem, args.context); + } + else if (KeyboardNavigation.TrackHeadActive()) + { + SendEventToInvokeShortcut(selectDownTrack, args.context); + } + else + { + KeyboardNavigation.FocusFirstVisibleItem(GetState(args)); + } + } + + [UsedImplicitly, ShortcutManagement.Shortcut(multiSelectLeft, typeof(TimelineWindow), KeyCode.LeftArrow, ShortcutModifiers.Shift)] + static void MultiSelectLeft(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(multiSelectLeft, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(multiSelectRight, typeof(TimelineWindow), KeyCode.RightArrow, ShortcutModifiers.Shift)] + static void MultiSelectRight(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(multiSelectRight, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(multiSelectUp , typeof(TimelineWindow), KeyCode.UpArrow, ShortcutModifiers.Shift)] + static void MultiSelectUp(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(multiSelectUp, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(multiSelectDown, typeof(TimelineWindow), KeyCode.DownArrow, ShortcutModifiers.Shift)] + static void MultiSelectDown(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(multiSelectDown, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(toggleClipTrackArea, typeof(TimelineWindow), KeyCode.Tab)] + static void ToggleClipTrackArea(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(toggleClipTrackArea, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(matchContent, typeof(TimelineWindow), KeyCode.C)] + static void Shortcut(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(matchContent, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(toggleLock, typeof(TimelineWindow), KeyCode.L)] + static void Lock(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(toggleLock, args.context); + } + + [UsedImplicitly, ShortcutManagement.Shortcut(toggleMute, typeof(TimelineWindow), KeyCode.M)] + static void Mute(ShortcutManagement.ShortcutArguments args) + { + SendEventToInvokeShortcut(toggleMute, args.context); + } + } + + static WindowState GetState(ShortcutManagement.ShortcutArguments args) + { + return ((TimelineWindow)args.context).state; + } + + static void SendEventToInvokeShortcut(string timelineShortcutId, object context) + { + var e = new Event + { + type = EventType.ExecuteCommand, + commandName = timelineShortcutId + }; + + (context as EditorWindow).SendEvent(e); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Shortcuts.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Shortcuts.cs.meta new file mode 100644 index 0000000..d9932c1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Shortcuts.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c35a186b967e6a24d9d844d412fe08a3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals.meta new file mode 100644 index 0000000..5820d30 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cce613d1538e76a4785658931c7db093 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalAssetInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalAssetInspector.cs new file mode 100644 index 0000000..1c8c6f9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalAssetInspector.cs @@ -0,0 +1,28 @@ +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline.Signals +{ + [CustomEditor(typeof(SignalAsset))] + class SignalAssetInspector : Editor + { + [MenuItem("Assets/Create/Signal", false, 451)] + [UsedImplicitly] + public static void CreateNewSignal() + { + var icon = EditorGUIUtility.IconContent("SignalAsset Icon").image as Texture2D; + ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, CreateInstance(), "New Signal.signal", icon, null); + } + + class DoCreateSignalAsset : ProjectWindowCallback.EndNameEditAction + { + public override void Action(int instanceId, string pathName, string resourceFile) + { + var signalAsset = CreateInstance(); + AssetDatabase.CreateAsset(signalAsset, pathName); + ProjectWindowUtil.ShowCreatedAsset(signalAsset); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalAssetInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalAssetInspector.cs.meta new file mode 100644 index 0000000..a135f38 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalAssetInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 58004290eb3aab44e9823d1f25c4ed73 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterEditor.cs new file mode 100644 index 0000000..48c5690 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterEditor.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline.Signals +{ + [CustomTimelineEditor(typeof(SignalEmitter))] + class SignalEmitterEditor : MarkerEditor + { + static readonly string MissingAssetError = LocalizationDatabase.GetLocalizedString("No signal assigned"); + + public override MarkerDrawOptions GetMarkerOptions(IMarker marker) + { + var options = base.GetMarkerOptions(marker); + SignalEmitter emitter = (SignalEmitter)marker; + if (emitter.asset != null) + options.tooltip = emitter.asset.name; + else + options.errorText = MissingAssetError; + + return options; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterEditor.cs.meta new file mode 100644 index 0000000..4f40bf0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 51a7878f6c989394782db73339e90e46 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterInspector.cs new file mode 100644 index 0000000..bea45ad --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterInspector.cs @@ -0,0 +1,377 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor.Timeline.Signals +{ + [CustomEditor(typeof(SignalEmitter), true)] + [CanEditMultipleObjects] + class SignalEmitterInspector : MarkerInspector, ISignalAssetProvider + { + SerializedProperty m_RetroactiveProperty; + SerializedProperty m_EmitOnceProperty; + + SignalEmitter m_Signal; + GameObject m_BoundGameObject; + PlayableDirector m_AssociatedDirector; + bool m_TargetsHaveTheSameBinding; + + readonly Dictionary m_Editors = new Dictionary(); + readonly Dictionary m_Foldouts = new Dictionary(); + List m_Receivers = new List(); + + static GUIStyle s_FoldoutStyle; + internal static GUIStyle foldoutStyle + { + get + { + if (s_FoldoutStyle == null) + { + s_FoldoutStyle = new GUIStyle(EditorStyles.foldout) {fontStyle = FontStyle.Bold}; + } + + return s_FoldoutStyle; + } + } + + public SignalAsset signalAsset + { + get + { + var emitter = target as SignalEmitter; + return signalAssetSameValue ? emitter.asset : null; + } + set + { + AssignSignalAsset(value); + } + } + + bool signalAssetSameValue + { + get + { + var emitters = targets.Cast().ToList(); + return emitters.Select(x => x.asset).Distinct().Count() == 1; + } + } + + void OnEnable() + { + Undo.undoRedoPerformed += OnUndoRedo; // subscribe to the event + m_Signal = target as SignalEmitter; + m_RetroactiveProperty = serializedObject.FindProperty("m_Retroactive"); + m_EmitOnceProperty = serializedObject.FindProperty("m_EmitOnce"); + // In a vast majority of the cases, when this becomes enabled, + // the timeline window will be focused on the correct timeline + // in which case TimelineEditor.inspectedDirector is safe to use + m_AssociatedDirector = TimelineEditor.inspectedDirector; + UpdateState(); + } + + internal override bool IsEnabled() + { + return TimelineUtility.IsCurrentSequenceValid() && !IsCurrentSequenceReadOnly() && base.IsEnabled(); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + using (var changeScope = new EditorGUI.ChangeCheckScope()) + { + var property = serializedObject.GetIterator(); + var expanded = true; + while (property.NextVisible(expanded)) + { + expanded = false; + if (SkipField(property.propertyPath)) + continue; + EditorGUILayout.PropertyField(property, true); + } + + DrawSignalFlags(); + UpdateState(); + DrawNameSelectorAndSignalList(); + + if (changeScope.changed) + { + serializedObject.ApplyModifiedProperties(); + TimelineEditor.Refresh(RefreshReason.ContentsModified | RefreshReason.WindowNeedsRedraw); + } + } + } + + internal override void OnHeaderIconGUI(Rect iconRect) + { + using (new EditorGUI.DisabledScope(!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly())) + { + GUI.Label(iconRect, Styles.SignalEmitterIcon); + } + } + + internal override Rect DrawHeaderHelpAndSettingsGUI(Rect r) + { + using (new EditorGUI.DisabledScope(!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly())) + { + var helpSize = EditorStyles.iconButton.CalcSize(EditorGUI.GUIContents.helpIcon); + const int kTopMargin = 5; + return EditorGUIUtility.DrawEditorHeaderItems(new Rect(r.xMax - helpSize.x, r.y + kTopMargin, helpSize.x, helpSize.y), targets); + } + } + + IEnumerable ISignalAssetProvider.AvailableSignalAssets() + { + return SignalManager.assets; + } + + void ISignalAssetProvider.CreateNewSignalAsset(string path) + { + var newSignalAsset = SignalManager.CreateSignalAssetInstance(path); + AssignSignalAsset(newSignalAsset); + var receivers = m_Receivers.OfType().ToList(); + if (signalAsset != null && receivers.Count == 1 && !receivers.Any(r => r.IsSignalAssetHandled(newSignalAsset))) // Only when one receiver is present + { + receivers[0].AddNewReaction(newSignalAsset); // Add reaction on the first receiver from the list + ApplyChangesAndRefreshReceivers(); + } + } + + void UpdateState() + { + m_BoundGameObject = GetBoundGameObject(m_Signal.parent, m_AssociatedDirector); + m_Receivers = m_BoundGameObject == null || m_BoundGameObject.Equals(null) + ? new List() + : m_BoundGameObject.GetComponents().Where(t => t is INotificationReceiver).ToList(); + + m_TargetsHaveTheSameBinding = targets.Cast() + .Select(x => GetBoundGameObject(x.parent, m_AssociatedDirector)) + .Distinct().Count() == 1; + } + + Editor GetOrCreateReceiverEditor(Component c) + { + Editor ret; + if (m_Editors.TryGetValue(c, out ret)) + { + return ret; + } + + ret = CreateEditorWithContext(new Object[] {c}, target); + m_Editors[c] = ret; + if (!m_Foldouts.ContainsKey(c)) + { + m_Foldouts[c] = true; + } + + return ret; + } + + void OnDisable() + { + Undo.undoRedoPerformed -= OnUndoRedo; + } + + void OnDestroy() + { + foreach (var editor in m_Editors) + { + DestroyImmediate(editor.Value); + } + m_Editors.Clear(); + } + + void OnUndoRedo() + { + ApplyChangesAndRefreshReceivers(); + } + + void ApplyChangesAndRefreshReceivers() + { + foreach (var receiverInspector in m_Editors.Values.OfType()) + { + receiverInspector.SetAssetContext(signalAsset); + } + } + + void DrawNameSelectorAndSignalList() + { + using (var change = new EditorGUI.ChangeCheckScope()) + { + DrawSignal(); + DrawReceivers(); + + if (change.changed) + { + ApplyChangesAndRefreshReceivers(); + } + } + } + + void DrawReceivers() + { + if (!m_TargetsHaveTheSameBinding) + { + EditorGUILayout.HelpBox(Styles.MultiEditNotSupportedOnDifferentBindings, MessageType.None); + return; + } + + if (targets.OfType().Select(x => x.asset).Distinct().Count() > 1) + { + EditorGUILayout.HelpBox(Styles.MultiEditNotSupportedOnDifferentSignals, MessageType.None); + return; + } + + //do not display the receiver if the current timeline is not the same as the emitter's timeline + //can happen if the inspector is locked + if (m_Signal.parent != null && m_Signal.parent.timelineAsset != TimelineEditor.inspectedAsset) + return; + + if (m_BoundGameObject != null) + { + if (!m_Receivers.Any(x => x is SignalReceiver)) + { + EditorGUILayout.Separator(); + var message = string.Format(Styles.NoSignalReceiverComponent, m_BoundGameObject.name); + SignalUtility.DrawCenteredMessage(message); + if (SignalUtility.DrawCenteredButton(Styles.AddSignalReceiverComponent)) + AddReceiverComponent(); + } + + foreach (var receiver in m_Receivers) + { + var editor = GetOrCreateReceiverEditor(receiver); + if (DrawReceiverHeader(receiver)) + { + editor.OnInspectorGUI(); + } + } + } + else if (m_AssociatedDirector != null) //not in asset mode + { + EditorGUILayout.HelpBox(Styles.NoBoundGO, MessageType.None); + } + } + + void DrawSignalFlags() + { + EditorGUILayout.PropertyField(m_RetroactiveProperty, Styles.RetroactiveLabel); + EditorGUILayout.PropertyField(m_EmitOnceProperty, Styles.EmitOnceLabel); + } + + void DrawSignal() + { + //should show button to create new signal if there are no signals asset in the project + if (!SignalManager.assets.Any()) + { + using (new EditorGUI.DisabledScope(true)) + { + DrawNameSelector(); + } + + EditorGUILayout.Separator(); + SignalUtility.DrawCenteredMessage(Styles.ProjectHasNoSignalAsset); + if (SignalUtility.DrawCenteredButton(Styles.CreateNewSignal)) + CreateNewSignalAsset(SignalUtility.GetNewSignalPath()); + EditorGUILayout.Separator(); + } + else + { + DrawNameSelector(); + } + } + + internal void CreateNewSignalAsset(string path) + { + if (!string.IsNullOrEmpty(path)) + ((ISignalAssetProvider)this).CreateNewSignalAsset(path); + GUIUtility.ExitGUI(); + } + + void AssignSignalAsset(SignalAsset newAsset) + { + foreach (var o in targets) + { + var signalEmitter = (SignalEmitter)o; + TimelineUndo.PushUndo(signalEmitter, Styles.UndoCreateSignalAsset); + signalEmitter.asset = newAsset; + } + } + + void DrawNameSelector() + { + SignalUtility.DrawSignalNames(this, EditorGUILayout.GetControlRect(), Styles.EmitSignalLabel, !signalAssetSameValue); + } + + bool DrawReceiverHeader(Component receiver) + { + EditorGUILayout.Space(); + var lineRect = GUILayoutUtility.GetRect(10, 4, EditorStyles.inspectorTitlebar); + DrawSplitLine(lineRect.y); + + var style = EditorGUIUtility.TrTextContentWithIcon( + ObjectNames.NicifyVariableName(receiver.GetType().Name), + AssetPreview.GetMiniThumbnail(receiver)); + + m_Foldouts[receiver] = + EditorGUILayout.Foldout(m_Foldouts[receiver], style, true, foldoutStyle); + if (m_Foldouts[receiver]) + { + DrawReceiverObjectField(); + } + + return m_Foldouts[receiver]; + } + + void DrawReceiverObjectField() + { + EditorGUI.BeginDisabledGroup(true); + EditorGUILayout.ObjectField(Styles.ObjectLabel, m_BoundGameObject, typeof(GameObject), false); + EditorGUI.EndDisabledGroup(); + } + + void AddReceiverComponent() + { + var receiver = Undo.AddComponent(m_BoundGameObject); + receiver.AddNewReaction(signalAsset); + } + + static bool SkipField(string fieldName) + { + return fieldName == "m_Script" || fieldName == "m_Asset" || fieldName == "m_Retroactive" || fieldName == "m_EmitOnce"; + } + + static void DrawSplitLine(float y) + { + if (Event.current.type != EventType.Repaint) return; + + var width = EditorGUIUtility.currentViewWidth; + var position = new Rect(0, y, width + 1, 1); + + if (EditorStyles.inspectorTitlebar != null) + EditorStyles.inspectorTitlebar.Draw(position, false, false, false, false); + } + + static GameObject GetBoundGameObject(TrackAsset track, PlayableDirector associatedDirector) + { + if (associatedDirector == null || track == null) //if in asset mode, no bound object for you + return null; + + var boundObj = TimelineUtility.GetSceneGameObject(associatedDirector, track); + + //if the signal is on the timeline marker track and user did not set a binding, assume it's bound to PlayableDirector + if (boundObj == null && track.timelineAsset.markerTrack == track) + boundObj = associatedDirector.gameObject; + + return boundObj; + } + + static bool IsCurrentSequenceReadOnly() + { + return TimelineWindow.instance.state.editSequence.isReadOnly; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterInspector.cs.meta new file mode 100644 index 0000000..d89a36c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEmitterInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 970e7735a0864fd40842a36d053d08fe +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEventDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEventDrawer.cs new file mode 100644 index 0000000..021c6c7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEventDrawer.cs @@ -0,0 +1,39 @@ +using System; +using JetBrains.Annotations; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline.Signals +{ + [CustomPropertyDrawer(typeof(CustomSignalEventDrawer))] + [UsedImplicitly] + class SignalEventDrawer : UnityEventDrawer + { + static GameObject FindBoundObject(SerializedProperty property) + { + var component = property.serializedObject.targetObject as Component; + return component != null ? component.gameObject : null; + } + + protected override void OnAddEvent(ReorderableList list) + { + base.OnAddEvent(list); + var listProperty = list.serializedProperty; + if (listProperty.arraySize > 0) + { + var lastCall = list.serializedProperty.GetArrayElementAtIndex(listProperty.arraySize - 1); + var targetProperty = lastCall.FindPropertyRelative(kInstancePath); + targetProperty.objectReferenceValue = FindBoundObject(listProperty); + } + } + + protected override void DrawEventHeader(Rect headerRect) {} + + protected override void SetupReorderableList(ReorderableList list) + { + base.SetupReorderableList(list); + list.headerHeight = 4; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEventDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEventDrawer.cs.meta new file mode 100644 index 0000000..26afa8d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalEventDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6ba7805325c426c43b8e85b5be4eae36 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalManager.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalManager.cs new file mode 100644 index 0000000..4beec0c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalManager.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.IO; +using UnityEngine; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline.Signals +{ + class SignalManager : IDisposable + { + static SignalManager m_Instance; + readonly List m_assets = new List(); + + internal static SignalManager instance + { + get + { + if (m_Instance == null) + { + m_Instance = new SignalManager(); + m_Instance.Refresh(); + } + + return m_Instance; + } + + set { m_Instance = value; } + } + + internal SignalManager() + { + SignalAsset.OnEnableCallback += Register; + } + + public static IEnumerable assets + { + get + { + foreach (var asset in instance.m_assets) + { + if (asset != null) + yield return asset; + } + } + } + + public static SignalAsset CreateSignalAssetInstance(string path) + { + var newSignal = ScriptableObject.CreateInstance(); + newSignal.name = Path.GetFileNameWithoutExtension(path); + + var asset = AssetDatabase.LoadMainAssetAtPath(path) as SignalAsset; + if (asset != null) + { + TimelineUndo.PushUndo(asset, Styles.UndoCreateSignalAsset); + EditorUtility.CopySerialized(newSignal, asset); + Object.DestroyImmediate(newSignal); + return asset; + } + + AssetDatabase.CreateAsset(newSignal, path); + return newSignal; + } + + public void Dispose() + { + SignalAsset.OnEnableCallback -= Register; + } + + void Register(SignalAsset a) + { + m_assets.Add(a); + } + + void Refresh() + { + var guids = AssetDatabase.FindAssets("t:SignalAsset"); + foreach (var g in guids) + { + var path = AssetDatabase.GUIDToAssetPath(g); + var asset = AssetDatabase.LoadAssetAtPath(path); + m_assets.Add(asset); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalManager.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalManager.cs.meta new file mode 100644 index 0000000..528ec1d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 255b0c6d400fd964dab3029c8abc53f4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverHeader.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverHeader.cs new file mode 100644 index 0000000..55e8d27 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverHeader.cs @@ -0,0 +1,15 @@ +using UnityEditor.IMGUI.Controls; +using UnityEngine; + +namespace UnityEditor.Timeline.Signals +{ + class SignalReceiverHeader : MultiColumnHeader + { + public SignalReceiverHeader(MultiColumnHeaderState state) : base(state) {} + + protected override void AddColumnHeaderContextMenuItems(GenericMenu menu) + { + menu.AddItem(EditorGUIUtility.TrTextContent("Resize to Fit"), false, ResizeToFit); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverHeader.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverHeader.cs.meta new file mode 100644 index 0000000..211c810 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverHeader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 423cd382a7804414d9bfdb2e7fb7bb62 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverInspector.cs new file mode 100644 index 0000000..52211e1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverInspector.cs @@ -0,0 +1,116 @@ +using UnityEngine; +using UnityObject = UnityEngine.Object; +using UnityEditor.IMGUI.Controls; +using UnityEngine.Events; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline.Signals +{ + [CustomEditor(typeof(SignalReceiver))] + class SignalReceiverInspector : Editor + { + SignalReceiver m_Target; + + [SerializeField] TreeViewState m_TreeState; + [SerializeField] MultiColumnHeaderState m_MultiColumnHeaderState; + internal SignalReceiverTreeView m_TreeView; + + SignalEmitter signalEmitterContext + { + get { return m_Context as SignalEmitter;} + } + + void OnEnable() + { + m_Target = target as SignalReceiver; + InitTreeView(serializedObject); + + Undo.undoRedoPerformed += OnUndoRedo; + } + + void OnDisable() + { + Undo.undoRedoPerformed -= OnUndoRedo; + } + + void OnUndoRedo() + { + m_TreeView.dirty = true; + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + using (var changeCheck = new EditorGUI.ChangeCheckScope()) + { + m_TreeView.RefreshIfDirty(); + DrawEmitterControls(); // Draws buttons coming from the Context (SignalEmitter) + + EditorGUILayout.Space(); + m_TreeView.Draw(); + + if (signalEmitterContext == null) + DrawAddRemoveButtons(); + + if (changeCheck.changed) + { + serializedObject.ApplyModifiedProperties(); + m_TreeView.dirty = true; + } + } + } + + void DrawEmitterControls() + { + var context = signalEmitterContext; + if (context != null) + { + var currentSignal = context.asset; + if (currentSignal != null && !m_Target.IsSignalAssetHandled(currentSignal)) + { + EditorGUILayout.Separator(); + var message = string.Format(Styles.NoReaction, currentSignal.name); + SignalUtility.DrawCenteredMessage(message); + if (SignalUtility.DrawCenteredButton(Styles.AddReactionButton)) + m_Target.AddNewReaction(currentSignal); // Add reaction on the first + EditorGUILayout.Separator(); + } + } + } + + internal void SetAssetContext(SignalAsset asset) + { + m_TreeView.SetSignalContext(asset); + } + + void DrawAddRemoveButtons() + { + using (new GUILayout.HorizontalScope()) + { + GUILayout.FlexibleSpace(); + if (GUILayout.Button(Styles.AddReactionButton)) + { + Undo.RecordObject(m_Target, Styles.UndoAddReaction); + m_Target.AddEmptyReaction(new UnityEvent()); + PrefabUtility.RecordPrefabInstancePropertyModifications(m_Target); + } + GUILayout.Space(18.0f); + } + } + + void InitTreeView(SerializedObject so) + { + m_TreeState = SignalListFactory.CreateViewState(); + m_MultiColumnHeaderState = SignalListFactory.CreateHeaderState(); + var header = SignalListFactory.CreateHeader(m_MultiColumnHeaderState, SignalReceiverUtility.headerHeight); + + var context = signalEmitterContext; + m_TreeView = SignalListFactory.CreateSignalInspectorList(m_TreeState, header, m_Target, so); + m_TreeView.readonlySignals = context != null; + + if (context != null) + m_TreeView.SetSignalContext(context.asset); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverInspector.cs.meta new file mode 100644 index 0000000..a764c95 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalReceiverInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70b265ed18dc14041bedc0263d4578ef +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalUtility.cs new file mode 100644 index 0000000..663e341 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalUtility.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline.Signals +{ + interface ISignalAssetProvider + { + SignalAsset signalAsset { get; set; } + IEnumerable AvailableSignalAssets(); + void CreateNewSignalAsset(string path); + } + + static class SignalUtility + { + const string k_SignalExtension = "signal"; + + public static void DrawSignalNames(ISignalAssetProvider assetProvider, Rect position, GUIContent label, bool multipleValues) + { + var assets = assetProvider.AvailableSignalAssets().ToList(); + var index = assets.IndexOf(assetProvider.signalAsset); + + var availableNames = new List(); + using (new GUIMixedValueScope(multipleValues)) + { + availableNames.Add(Styles.EmptySignalList.text); + + availableNames.AddRange(assets.Select(x => x.name)); + availableNames.Add(Styles.CreateNewSignal.text); + + var curValue = index + 1; + var selected = EditorGUI.Popup(position, label, curValue, availableNames.ToArray()); + + if (selected != curValue) + { + var noneEntryIdx = 0; + if (selected == noneEntryIdx) // None + assetProvider.signalAsset = null; + else if (selected == availableNames.Count - 1) // "Create New Asset" + { + var path = GetNewSignalPath(); + if (!string.IsNullOrEmpty(path)) + assetProvider.CreateNewSignalAsset(path); + GUIUtility.ExitGUI(); + } + else + assetProvider.signalAsset = assets[selected - 1]; + } + } + } + + public static string GetNewSignalPath() + { + return EditorUtility.SaveFilePanelInProject( + Styles.NewSignalWindowTitle.text, + Styles.NewSignalDefaultName.text, + k_SignalExtension, + Styles.NewSignalWindowMessage.text); + } + + public static bool IsSignalAssetHandled(this SignalReceiver receiver, SignalAsset asset) + { + return receiver != null && asset != null && receiver.GetRegisteredSignals().Contains(asset); + } + + public static void AddNewReaction(this SignalReceiver receiver, SignalAsset signalAsset) + { + if (signalAsset != null && receiver != null) + { + Undo.RecordObject(receiver, Styles.UndoAddReaction); + var newEvent = new UnityEvent(); + newEvent.AddPersistentListener(); + var evtIndex = newEvent.GetPersistentEventCount() - 1; + newEvent.RegisterVoidPersistentListenerWithoutValidation(evtIndex, receiver.gameObject, string.Empty); + receiver.AddReaction(signalAsset, newEvent); + PrefabUtility.RecordPrefabInstancePropertyModifications(receiver); + } + } + + public static void DrawCenteredMessage(string message) + { + using (new GUILayout.HorizontalScope()) + { + GUILayout.FlexibleSpace(); + GUILayout.Label(message); + GUILayout.FlexibleSpace(); + } + } + + public static bool DrawCenteredButton(GUIContent buttonLabel) + { + bool buttonClicked; + using (new GUILayout.HorizontalScope()) + { + GUILayout.FlexibleSpace(); + buttonClicked = GUILayout.Button(buttonLabel); + GUILayout.FlexibleSpace(); + } + return buttonClicked; + } + } + + static class SignalReceiverUtility + { + const int k_DefaultTreeviewHeaderHeight = 20; + + public static int headerHeight + { + get { return k_DefaultTreeviewHeaderHeight; } + } + + public static SerializedProperty FindSignalsProperty(SerializedObject obj) + { + return obj.FindProperty("m_Events.m_Signals"); + } + + public static SerializedProperty FindEventsProperty(SerializedObject obj) + { + return obj.FindProperty("m_Events.m_Events"); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalUtility.cs.meta new file mode 100644 index 0000000..f29c92c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/SignalUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b33687803b08daf418e5315de17658b8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/Styles.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/Styles.cs new file mode 100644 index 0000000..6842081 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/Styles.cs @@ -0,0 +1,39 @@ +using UnityEngine; + +namespace UnityEditor.Timeline.Signals +{ + static class Styles + { + public static readonly GUIContent RetroactiveLabel = EditorGUIUtility.TrTextContent("Retroactive", "Use retroactive to emit this signal even if playback starts afterwards."); + public static readonly GUIContent EmitOnceLabel = EditorGUIUtility.TrTextContent("Emit Once", "Emit the signal once during loops."); + public static readonly GUIContent EmitSignalLabel = EditorGUIUtility.TrTextContent("Emit Signal", "Select which Signal Asset to emit."); + public static readonly GUIContent ObjectLabel = EditorGUIUtility.TrTextContent("Receiver Component on", "The Signal Receiver Component on the bound GameObject."); + + public static readonly GUIContent CreateNewSignal = EditorGUIUtility.TrTextContent("Create Signal…"); + public static readonly GUIContent AddSignalReceiverComponent = EditorGUIUtility.TrTextContent("Add Signal Receiver", "Creates a Signal Receiver component on the track binding and the reaction for the current signal."); + public static readonly GUIContent EmptySignalList = EditorGUIUtility.TrTextContent("None"); + public static readonly GUIContent AddReactionButton = EditorGUIUtility.TrTextContent("Add Reaction"); + + public static readonly GUIContent NewSignalWindowTitle = EditorGUIUtility.TrTextContent("Create Signal Key"); + public static readonly GUIContent NewSignalDefaultName = EditorGUIUtility.TrTextContent("New Signal"); + public static readonly GUIContent NewSignalWindowMessage = EditorGUIUtility.TrTextContent("Create Signal Key"); + + public static readonly string SignalListDuplicateOption = L10n.Tr("Duplicate"); + public static readonly string SignalListDeleteOption = L10n.Tr("Delete"); + public static readonly string NoBoundGO = L10n.Tr("Track has no bound GameObject."); + public static readonly string MultiEditNotSupportedOnDifferentBindings = L10n.Tr("Multi-edit not supported for SignalReceivers on tracks bound to different GameObjects."); + public static readonly string MultiEditNotSupportedOnDifferentSignals = L10n.Tr("Multi-edit not supported for SignalReceivers when SignalEmitters use different Signals."); + + public static readonly string UndoCreateSignalAsset = L10n.Tr("Create New Signal Asset"); + public static readonly string UndoDuplicateRow = L10n.Tr("Duplicate Row"); + public static readonly string UndoDeleteRow = L10n.Tr("Delete Row"); + public static readonly string UndoAddReaction = L10n.Tr("Add Signal Receiver Reaction"); + public static readonly string NoReaction = L10n.Tr("No reaction for {0} has been defined in this receiver"); + public static readonly string NoSignalReceiverComponent = L10n.Tr("There is no Signal Receiver component on {0}"); + public static readonly string ProjectHasNoSignalAsset = L10n.Tr("Your project contains no Signal assets"); + + //Icons + public static readonly GUIStyle OptionsStyle = DirectorStyles.GetGUIStyle("Icon.Options"); + public static readonly GUIContent SignalEmitterIcon = EditorGUIUtility.IconContent("SignalEmitter Icon"); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/Styles.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/Styles.cs.meta new file mode 100644 index 0000000..da7c028 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/Styles.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 685f63932bebd0c4db02ee14845191e2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView.meta new file mode 100644 index 0000000..d8cac35 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5ba130fc1db953547a50bcf5c162a3e8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalListFactory.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalListFactory.cs new file mode 100644 index 0000000..1b59ec6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalListFactory.cs @@ -0,0 +1,31 @@ +using System; +using UnityEditor.IMGUI.Controls; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline.Signals +{ + static class SignalListFactory + { + public static SignalReceiverTreeView CreateSignalInspectorList(TreeViewState state, SignalReceiverHeader header, SignalReceiver target, SerializedObject so) + { + return new SignalReceiverTreeView(state, header, target, so); + } + + public static SignalReceiverHeader CreateHeader(MultiColumnHeaderState state, int columnHeight) + { + var header = new SignalReceiverHeader(state) { height = columnHeight }; + header.ResizeToFit(); + return header; + } + + public static MultiColumnHeaderState CreateHeaderState() + { + return new MultiColumnHeaderState(SignalReceiverTreeView.GetColumns()); + } + + public static TreeViewState CreateViewState() + { + return new TreeViewState(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalListFactory.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalListFactory.cs.meta new file mode 100644 index 0000000..fcc2a87 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalListFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01cd96d8687272f4898cfd1562079dd7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverItem.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverItem.cs new file mode 100644 index 0000000..a58b2fe --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverItem.cs @@ -0,0 +1,180 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline.Signals +{ + class SignalReceiverItem : TreeViewItem, ISignalAssetProvider + { + static readonly SignalEventDrawer k_EvtDrawer = new SignalEventDrawer(); + + readonly SerializedProperty m_Asset; + readonly SerializedProperty m_Evt; + readonly SignalReceiverTreeView m_TreeView; + + int m_CurrentRowIdx; + SignalReceiver m_CurrentReceiver; + + internal readonly bool enabled; + internal readonly bool readonlySignal; + + internal const string SignalName = "SignalName"; + internal const string SignalNameReadOnly = "SignalNameReadOnly"; + internal const string SignalOptions = "SignalOptions"; + + public SignalReceiverItem(SerializedProperty signalAsset, SerializedProperty eventListEntry, int id, bool readonlySignal, bool enabled, SignalReceiverTreeView treeView) + : base(id, 0) + { + m_Asset = signalAsset; + m_Evt = eventListEntry; + this.enabled = enabled; + this.readonlySignal = readonlySignal; + m_TreeView = treeView; + } + + public SignalAsset signalAsset + { + get { return m_CurrentReceiver.GetSignalAssetAtIndex(m_CurrentRowIdx); } + set + { + Undo.RecordObject(m_CurrentReceiver, Styles.UndoCreateSignalAsset); + m_CurrentReceiver.ChangeSignalAtIndex(m_CurrentRowIdx, value); + PrefabUtility.RecordPrefabInstancePropertyModifications(m_CurrentReceiver); + } + } + + public float GetHeight() + { + return k_EvtDrawer.GetPropertyHeight(m_Evt, GUIContent.none); + } + + public void Draw(Rect rect, int colIdx, int rowIdx, float padding, SignalReceiver target) + { + switch (colIdx) + { + case 0: + DrawSignalNameColumn(rect, padding, target, rowIdx); + break; + case 1: + DrawReactionColumn(rect, rowIdx); + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + + void DrawSignalNameColumn(Rect rect, float padding, SignalReceiver target, int rowIdx) + { + using (new EditorGUI.DisabledScope(!enabled)) + { + if (!readonlySignal) + { + m_CurrentRowIdx = rowIdx; + m_CurrentReceiver = target; + + rect.x += padding; + rect.width -= padding; + rect.height = EditorGUIUtility.singleLineHeight; + GUI.SetNextControlName(SignalName); + SignalUtility.DrawSignalNames(this, rect, GUIContent.none, false); + } + else + { + GUI.SetNextControlName(SignalNameReadOnly); + var signalAsset = m_Asset.objectReferenceValue; + GUI.Label(rect, + signalAsset != null + ? EditorGUIUtility.TempContent(signalAsset.name) + : Styles.EmptySignalList); + } + } + } + + void DrawReactionColumn(Rect rect, int rowIdx) + { + if (!readonlySignal) + { + var optionButtonSize = GetOptionButtonSize(); + rect.width -= optionButtonSize.x; + + var optionButtonRect = new Rect + { + x = rect.xMax, + y = rect.y, + width = optionButtonSize.x, + height = optionButtonSize.y + }; + DrawOptionsButton(optionButtonRect, rowIdx, m_CurrentReceiver); + } + + using (new EditorGUI.DisabledScope(!enabled)) + { + var nameAsString = m_Asset.objectReferenceValue == null ? "Null" : m_Asset.objectReferenceValue.name; + using (var change = new EditorGUI.ChangeCheckScope()) + { + EditorGUI.PropertyField(rect, m_Evt, EditorGUIUtility.TempContent(nameAsString)); + if (change.changed) + m_TreeView.dirty = true; + } + } + } + + static Vector2 GetOptionButtonSize() + { + EditorGUIUtility.SetIconSize(Vector2.zero); + return EditorStyles.iconButton.CalcSize(EditorGUI.GUIContents.titleSettingsIcon); + } + + void DrawOptionsButton(Rect rect, int rowIdx, SignalReceiver target) + { + GUI.SetNextControlName(SignalOptions); + if (EditorGUI.DropdownButton(rect, EditorGUI.GUIContents.titleSettingsIcon, FocusType.Passive, EditorStyles.iconButton)) + { + var menu = new GenericMenu(); + menu.AddItem(new GUIContent(Styles.SignalListDuplicateOption), false, () => + { + Undo.RecordObject(target, Styles.UndoDuplicateRow); + var evtCloner = ScriptableObject.CreateInstance(); + evtCloner.evt = target.GetReactionAtIndex(rowIdx); + var clone = Object.Instantiate(evtCloner); + target.AddEmptyReaction(clone.evt); + m_TreeView.dirty = true; + PrefabUtility.RecordPrefabInstancePropertyModifications(target); + + }); + menu.AddItem(new GUIContent(Styles.SignalListDeleteOption), false, () => + { + Undo.RecordObject(target, Styles.UndoDeleteRow); + target.RemoveAtIndex(rowIdx); + m_TreeView.dirty = true; + PrefabUtility.RecordPrefabInstancePropertyModifications(target); + }); + menu.ShowAsContext(); + } + } + + IEnumerable ISignalAssetProvider.AvailableSignalAssets() + { + var ret = SignalManager.assets.Except(m_CurrentReceiver.GetRegisteredSignals()); + return signalAsset == null ? ret : ret.Union(new List {signalAsset}).ToList(); + } + + void ISignalAssetProvider.CreateNewSignalAsset(string path) + { + var newSignalAsset = SignalManager.CreateSignalAssetInstance(path); + Undo.RecordObject(m_CurrentReceiver, Styles.UndoCreateSignalAsset); + m_CurrentReceiver.ChangeSignalAtIndex(m_CurrentRowIdx, newSignalAsset); + PrefabUtility.RecordPrefabInstancePropertyModifications(m_CurrentReceiver); + } + + class UnityEventCloner : ScriptableObject + { + public UnityEvent evt; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverItem.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverItem.cs.meta new file mode 100644 index 0000000..826e615 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9bc2b69915879416f8df18971dc98e2e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverTreeView.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverTreeView.cs new file mode 100644 index 0000000..abacd72 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverTreeView.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using UnityEditor.IMGUI.Controls; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline.Signals +{ + class SignalReceiverTreeView : TreeView + { + public bool dirty { private get; set; } + + SerializedProperty signals { get; set; } + SerializedProperty events { get; set; } + + readonly SignalReceiver m_Target; + + const float k_VerticalPadding = 5; + const float k_HorizontalPadding = 5; + + public SignalReceiverTreeView(TreeViewState state, MultiColumnHeader multiColumnHeader, SignalReceiver receiver, SerializedObject serializedObject) + : base(state, multiColumnHeader) + { + m_Target = receiver; + useScrollView = true; + SetSerializedProperties(serializedObject); + getNewSelectionOverride = (item, selection, shift) => new List(); // Disable Selection + } + + SignalAsset signalAssetContext { get; set; } + public bool readonlySignals { get; set; } + + public void SetSignalContext(SignalAsset assetContext = null) + { + signalAssetContext = assetContext; + dirty = true; + } + + void SetSerializedProperties(SerializedObject serializedObject) + { + signals = SignalReceiverUtility.FindSignalsProperty(serializedObject); + events = SignalReceiverUtility.FindEventsProperty(serializedObject); + Reload(); + } + + public void Draw() + { + var rect = EditorGUILayout.GetControlRect(true, GetTotalHeight()); + OnGUI(rect); + } + + public void RefreshIfDirty() + { + var signalsListSizeHasChanged = signals.arraySize != GetRows().Count; + if (dirty || signalsListSizeHasChanged) + Reload(); + dirty = false; + } + + public static MultiColumnHeaderState.Column[] GetColumns() + { + return new[] + { + new MultiColumnHeaderState.Column + { + headerContent = EditorGUIUtility.TrTextContent("Signal"), + contextMenuText = "", + headerTextAlignment = TextAlignment.Center, + width = 50, minWidth = 50, + autoResize = true, + allowToggleVisibility = false, + canSort = false + }, + new MultiColumnHeaderState.Column + { + headerContent = EditorGUIUtility.TrTextContent("Reaction"), + contextMenuText = "", + headerTextAlignment = TextAlignment.Center, + width = 120, minWidth = 120, + autoResize = true, + allowToggleVisibility = false, + canSort = false + } + }; + } + + protected override TreeViewItem BuildRoot() + { + var root = new TreeViewItem(-1, -1) { children = new List() }; + + var matchingId = signalAssetContext != null && readonlySignals ? FindIdForSignal(signals, signalAssetContext) : -1; + if (matchingId >= 0) + AddItem(root, matchingId); + + for (var i = 0; i < signals.arraySize; ++i) + { + if (i == matchingId) continue; + AddItem(root, i, !readonlySignals); + } + + return root; + } + + protected override void RowGUI(RowGUIArgs args) + { + var item = (SignalReceiverItem)args.item; + for (var i = 0; i < args.GetNumVisibleColumns(); ++i) + { + var rect = args.GetCellRect(i); + rect.y += k_VerticalPadding; + item.Draw(rect, args.GetColumn(i), args.row, k_HorizontalPadding, m_Target); + } + } + + protected override float GetCustomRowHeight(int row, TreeViewItem treeItem) + { + var item = treeItem as SignalReceiverItem; + return item.GetHeight() + k_VerticalPadding; + } + + void AddItem(TreeViewItem root, int id, bool enabled = true) + { + var signal = signals.GetArrayElementAtIndex(id); + var evt = events.GetArrayElementAtIndex(id); + root.children.Add(new SignalReceiverItem(signal, evt, id, readonlySignals, enabled, this)); + } + + float GetTotalHeight() + { + var height = 0.0f; + foreach (var item in GetRows()) + { + var signalListItem = item as SignalReceiverItem; + height += signalListItem.GetHeight() + k_VerticalPadding; + } + + var scrollbarPadding = showingHorizontalScrollBar ? GUI.skin.horizontalScrollbar.fixedHeight : k_VerticalPadding; + return height + multiColumnHeader.height + scrollbarPadding; + } + + static int FindIdForSignal(SerializedProperty signals, SignalAsset signalToFind) + { + for (var i = 0; i < signals.arraySize; ++i) + { + //signal in the receiver that matches the current signal asset will be displayed first + var serializedProperty = signals.GetArrayElementAtIndex(i); + var signalReferenceValue = serializedProperty.objectReferenceValue; + var signalToFindRefValue = signalToFind; + if (signalReferenceValue != null && signalReferenceValue == signalToFindRefValue) + return i; + } + return -1; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverTreeView.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverTreeView.cs.meta new file mode 100644 index 0000000..7c121bf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Signals/TreeView/SignalReceiverTreeView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 698b660e9477f4f16abad03ec00ce38c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State.meta new file mode 100644 index 0000000..fd28faa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5673d7b11cb9ad04eb2368068b720c17 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/ISequenceState.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/ISequenceState.cs new file mode 100644 index 0000000..5d32884 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/ISequenceState.cs @@ -0,0 +1,106 @@ +using System; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + interface ISequenceState : IDisposable + { + TimelineAsset asset { get; } + PlayableDirector director { get; } + TimelineClip hostClip { get; } + double start { get; } + double timeScale { get; } + double duration { get; } + bool isReadOnly { get; } + TimelineAssetViewModel viewModel { get; } + double time { get; set; } + int frame { get; set; } + float frameRate { get; set; } + + Range GetEvaluableRange(); + string TimeAsString(double timeValue, string format = "F2"); + double ToGlobalTime(double t); + double ToLocalTime(double t); + void ResetIsReadOnly(); + } + + /** + * This class is used to hold default values for an implementation of ISequenceState. + * It could be removed in a phase 2, but it is currently used to limit the scope of + * this refactoring: it allows client code to access sequence info without having to + * worry about `currentSequence` being null. + * In the future this should be removed and we should pass around the correct data + * structure (i.e. SequenceState OR WindowState) based on the situation. + */ + class NullSequenceState : ISequenceState + { + public TimelineAsset asset { get { return null; } } + public PlayableDirector director { get { return null; } } + public TimelineClip hostClip { get { return null; } } + public double start { get { return 0.0; } } + public double timeScale { get { return 1.0; } } + public double duration { get { return 0.0; } } + public bool isReadOnly { get { return false; } } + + TimelineAssetViewModel m_ViewModel; + + public TimelineAssetViewModel viewModel + { + get + { + if (m_ViewModel == null) + m_ViewModel = TimelineWindowViewPrefs.CreateUnassociatedViewModel(); + return m_ViewModel; + } + } + + public double time + { + get { return 0.0; } + set { /* NO-OP*/ } + } + + public int frame + { + get { return 0; } + set { /* NO-OP*/ } + } + + public float frameRate + { + get { return TimelineAsset.EditorSettings.kDefaultFps; } + set { /* NO-OP*/ } + } + + public Range GetEvaluableRange() + { + return new Range(); + } + + public string TimeAsString(double timeValue, string format = "F2") + { + return TimeUtility.TimeAsTimeCode(timeValue, frameRate, format); + } + + public double ToGlobalTime(double t) + { + return t; + } + + public double ToLocalTime(double t) + { + return t; + } + + public void ResetIsReadOnly() + { + // NO-OP + } + + public void Dispose() + { + // NO-OP + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/ISequenceState.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/ISequenceState.cs.meta new file mode 100644 index 0000000..5b37827 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/ISequenceState.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 167329c8289a3a14a9e342df49fc4104 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceHierarchy.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceHierarchy.cs new file mode 100644 index 0000000..08a73e6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceHierarchy.cs @@ -0,0 +1,298 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class SequenceHierarchy : ScriptableObject + { + readonly List m_Sequences = new List(); + + WindowState m_WindowState; + + [SerializeField] + SequencePath m_SerializedPath; + + public ISequenceState masterSequence + { + get { return m_Sequences.FirstOrDefault(); } + } + + public ISequenceState editSequence + { + get { return m_Sequences.LastOrDefault(); } + } + + public int count + { + get { return m_Sequences.Count; } + } + + public IEnumerable allSequences + { + get { return m_Sequences; } + } + + public static SequenceHierarchy CreateInstance() + { + var hierarchy = ScriptableObject.CreateInstance(); + hierarchy.hideFlags = HideFlags.HideAndDontSave; + return hierarchy; + } + + public void Init(WindowState owner) + { + m_WindowState = owner; + } + + // This is called when performing Undo operations. + // It needs to be called here since some operations are not + // allowed (EditorUtility.InstanceIDToObject, for example) + // during the ISerializationCallbackReceiver methods. + void OnValidate() + { + if (m_SerializedPath == null || m_WindowState == null || m_WindowState.GetWindow() == null) + return; + + m_WindowState.SetCurrentSequencePath(m_SerializedPath, true); + } + + public void Add(TimelineAsset asset, PlayableDirector director, TimelineClip hostClip) + { + if (hostClip == null) + AddToCurrentUndoGroup(this); // Merge with selection undo + else + TimelineUndo.PushUndo(this, "Edit Sub-Timeline"); + + Add_Internal(asset, director, hostClip); + + UpdateSerializedPath(); + } + + public void Remove() + { + if (m_Sequences.Count == 0) return; + + TimelineUndo.PushUndo(this, "Go to Sub-Timeline"); + + Remove_Internal(); + + UpdateSerializedPath(); + } + + public ISequenceState GetStateAtIndex(int index) + { + return m_Sequences[index]; + } + + public void RemoveUntilCount(int expectedCount) + { + if (expectedCount < 0 || m_Sequences.Count <= expectedCount) return; + + TimelineUndo.PushUndo(this, "Go to Sub-Timeline"); + + RemoveUntilCount_Internal(expectedCount); + + UpdateSerializedPath(); + } + + public void Clear() + { + if (m_Sequences.Count == 0) return; + + AddToCurrentUndoGroup(this); + Clear_Internal(); + UpdateSerializedPath(); + } + + public SequencePath ToSequencePath() + { + var path = new SequencePath(); + + if (m_Sequences.Count == 0) + return path; + + var rootSequence = m_Sequences[0]; + var root = 0; + if (rootSequence.director != null && rootSequence.director.gameObject != null) + root = rootSequence.director.gameObject.GetInstanceID(); + else if (rootSequence.asset != null) + root = rootSequence.asset.GetInstanceID(); + + path.SetSelectionRoot(root); + + var resolver = rootSequence.director; + + if (m_Sequences.Count > 1) + { + for (int i = 1, n = m_Sequences.Count; i < n; ++i) + { + path.AddSubSequence(m_Sequences[i], resolver); + resolver = m_Sequences[i].director; + } + } + + return path; + } + + public bool NeedsUpdate(SequencePath path, bool forceRebuild) + { + return forceRebuild || !SequencePath.AreEqual(m_SerializedPath, path); + } + + public void FromSequencePath(SequencePath path, bool forceRebuild) + { + if (!NeedsUpdate(path, forceRebuild)) + return; + + Clear_Internal(); + + var rootObject = EditorUtility.InstanceIDToObject(path.selectionRoot); + if (rootObject == null) + { + UpdateSerializedPath(); + return; + } + + var candidateAsset = rootObject as TimelineAsset; + if (candidateAsset != null) + { + Add_Internal(candidateAsset, null, null); + UpdateSerializedPath(); + return; + } + + var candidateGameObject = rootObject as GameObject; + if (candidateGameObject == null) + { + UpdateSerializedPath(); + return; + } + + var director = TimelineUtility.GetDirectorComponentForGameObject(candidateGameObject); + var asset = TimelineUtility.GetTimelineAssetForDirectorComponent(director); + Add_Internal(asset, director, null); + + if (!path.subElements.Any()) + { + UpdateSerializedPath(); + return; + } + + List buildingBlocks; + if (ValidateSubElements(path.subElements, director, out buildingBlocks)) + { + foreach (var buildingBlock in buildingBlocks) + Add_Internal(buildingBlock.asset, buildingBlock.director, buildingBlock.hostClip); + } + + UpdateSerializedPath(); + } + + void Add_Internal(TimelineAsset asset, PlayableDirector director, TimelineClip hostClip) + { + if (hostClip == null) + Clear_Internal(); + + var parent = m_Sequences.Count > 0 ? editSequence : null; + m_Sequences.Add(new SequenceState(m_WindowState, asset, director, hostClip, (SequenceState)parent)); + } + + void Remove_Internal() + { + m_Sequences.Last().Dispose(); + m_Sequences.RemoveAt(m_Sequences.Count - 1); + } + + void RemoveUntilCount_Internal(int expectedCount) + { + while (m_Sequences.Count > expectedCount) + { + Remove_Internal(); + } + } + + void Clear_Internal() + { + RemoveUntilCount_Internal(0); + } + + void UpdateSerializedPath() + { + m_SerializedPath = ToSequencePath(); + } + + static bool ValidateSubElements(List subElements, PlayableDirector director, out List buildingBlocks) + { + buildingBlocks = new List(subElements.Count); + var currentDirector = director; + + foreach (var element in subElements) + { + var timeline = currentDirector.playableAsset as TimelineAsset; + if (timeline == null) + return false; + if (timeline.trackObjects == null) + return false; + + var track = timeline.GetOutputTracks().FirstOrDefault(t => t.GetInstanceID() == element.trackInstanceID); + if (track == null) + return false; + if (track.Hash() != element.trackHash) + return false; + if (track.clips == null) + return false; + if (track.clips.Length <= element.clipIndex) + return false; + + var clip = track.clips[element.clipIndex]; + if (clip == null) + return false; + if (clip.Hash() != element.clipHash) + return false; + + var candidateDirectors = TimelineUtility.GetSubTimelines(clip, director); + + if (element.subDirectorIndex < 0 || element.subDirectorIndex >= candidateDirectors.Count) + return false; + + var candidateDirector = candidateDirectors[element.subDirectorIndex]; + + if (candidateDirector == null || !(candidateDirector.playableAsset is TimelineAsset)) + return false; + + currentDirector = candidateDirector; + + buildingBlocks.Add( + new SequenceBuildingBlock + { + asset = currentDirector.playableAsset as TimelineAsset, + director = currentDirector, + hostClip = clip + }); + } + + return true; + } + + struct SequenceBuildingBlock + { + public TimelineAsset asset; + public PlayableDirector director; + public TimelineClip hostClip; + } + + static void AddToCurrentUndoGroup(Object target) + { + if (target == null) return; + + var group = Undo.GetCurrentGroup(); + var groupName = Undo.GetCurrentGroupName(); + EditorUtility.SetDirty(target); + Undo.RegisterCompleteObjectUndo(target, groupName); + Undo.CollapseUndoOperations(group); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceHierarchy.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceHierarchy.cs.meta new file mode 100644 index 0000000..1e9c089 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceHierarchy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6901fab4d5157ac48b9f263730387c03 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequencePath.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequencePath.cs new file mode 100644 index 0000000..d727041 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequencePath.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +using System.Text; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [Serializable] + class SequencePath + { + [SerializeField] int m_SelectionRoot; + + public int selectionRoot + { + get { return m_SelectionRoot; } + } + + [SerializeField] List m_SubElements; + + public List subElements + { + get { return m_SubElements ?? (m_SubElements = new List()); } + } + + public void SetSelectionRoot(int instanceID) + { + m_SelectionRoot = instanceID; + subElements.Clear(); + } + + public void AddSubSequence(ISequenceState state, IExposedPropertyTable resolver) + { + subElements.Add(SequencePathSubElement.Create(state, resolver)); + } + + public void Clear() + { + m_SelectionRoot = 0; + subElements.Clear(); + } + + public static bool AreEqual(SequencePath lhs, SequencePath rhs) + { + if (ReferenceEquals(lhs, null) && ReferenceEquals(rhs, null)) return true; + if (ReferenceEquals(lhs, null) || ReferenceEquals(rhs, null)) return false; + if (ReferenceEquals(lhs, rhs)) return true; + + var result = lhs.selectionRoot == rhs.selectionRoot && + lhs.subElements.Count == rhs.subElements.Count; + + if (!result) + return false; + + for (int i = 0, n = lhs.subElements.Count; i < n; ++i) + result = result && SequencePathSubElement.AreEqual(lhs.subElements[i], rhs.subElements[i]); + + return result; + } + + public override string ToString() + { + var sb = new StringBuilder(); + + sb.AppendFormat("[{0}]", m_SelectionRoot.ToString()); + + if (m_SubElements != null && m_SubElements.Count > 0) + { + foreach (var element in m_SubElements) + { + sb.Append(" > "); + sb.Append(element.ToString()); + } + } + + return sb.ToString(); + } + } + + [Serializable] + class SequencePathSubElement + { + public int trackInstanceID; + public int trackHash; + public int clipIndex; + public int clipHash; + public int subDirectorIndex; + + public static SequencePathSubElement Create(ISequenceState state, IExposedPropertyTable resolver) + { + var clip = state.hostClip; + Debug.Assert(clip != null); + var track = clip.parentTrack; + Debug.Assert(track != null); + var asset = track.timelineAsset; + Debug.Assert(asset != null); + var directors = TimelineUtility.GetSubTimelines(clip, resolver as PlayableDirector); + + return new SequencePathSubElement + { + trackInstanceID = track.GetInstanceID(), + trackHash = track.Hash(), + clipIndex = Array.IndexOf(track.clips, clip), + clipHash = clip.Hash(), + subDirectorIndex = directors.IndexOf(state.director) + }; + } + + public static bool AreEqual(SequencePathSubElement lhs, SequencePathSubElement rhs) + { + if (ReferenceEquals(lhs, null) && ReferenceEquals(rhs, null)) return true; + if (ReferenceEquals(lhs, null) || ReferenceEquals(rhs, null)) return false; + if (ReferenceEquals(lhs, rhs)) return true; + + return lhs.trackInstanceID == rhs.trackInstanceID && + lhs.trackHash == rhs.trackHash && + lhs.clipIndex == rhs.clipIndex && + lhs.clipHash == rhs.clipHash && + lhs.subDirectorIndex == rhs.subDirectorIndex; + } + + public override string ToString() + { + return string.Format( + "[track[{0}] ({1}) > clip[{2}] ({3})]", + trackInstanceID.ToString(), trackHash.ToString(), + clipIndex.ToString(), clipHash.ToString()); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequencePath.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequencePath.cs.meta new file mode 100644 index 0000000..9d76ca5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequencePath.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d1207768d96c479488b6b81f3483e0c1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceState.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceState.cs new file mode 100644 index 0000000..d7430bf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceState.cs @@ -0,0 +1,212 @@ +using System; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class SequenceState : ISequenceState + { + readonly WindowState m_WindowState; + readonly SequenceState m_ParentSequence; + + double m_Time; + Range? m_CachedEvaluableRange; + + public TimelineAsset asset { get; } + public PlayableDirector director { get; } + public TimelineClip hostClip { get; } + public double start { get; } + public double timeScale { get; } + + public double duration + { + get + { + if (asset == null) + return 0.0; + + var assetDuration = asset.durationMode == TimelineAsset.DurationMode.FixedLength ? asset.fixedDuration : asset.duration; + return hostClip == null ? assetDuration : Math.Min(hostClip.duration, assetDuration); + } + } + + bool? m_IsReadOnly; + public bool isReadOnly + { + get + { + if (!m_IsReadOnly.HasValue) + m_IsReadOnly = FileUtil.IsReadOnly(asset); + return m_IsReadOnly.Value; + } + } + + public void ResetIsReadOnly() + { + m_IsReadOnly = null; + } + + public TimelineAssetViewModel viewModel + { + get + { + return TimelineWindowViewPrefs.GetOrCreateViewModel(asset); + } + } + + public double time + { + get + { + if (m_ParentSequence != null) + return hostClip.ToLocalTimeUnbound(m_ParentSequence.time); + + return GetLocalTime(); + } + set + { + var correctedValue = Math.Min(value, TimeUtility.k_MaxTimelineDurationInSeconds); + viewModel.windowTime = correctedValue; + + if (m_ParentSequence != null) + m_ParentSequence.time = hostClip.FromLocalTimeUnbound(correctedValue); + else + SetLocalTime(correctedValue); + } + } + + public int frame + { + get { return TimeUtility.ToFrames(time, frameRate); } + set { time = TimeUtility.FromFrames(Mathf.Max(0, value), frameRate); } + } + + public float frameRate + { + get + { + if (asset != null) + return asset.editorSettings.fps; + + return TimelineAsset.EditorSettings.kDefaultFps; + } + set + { + TimelineAsset.EditorSettings settings = asset.editorSettings; + if (Math.Abs(settings.fps - value) > TimeUtility.kFrameRateEpsilon) + { + settings.fps = Mathf.Max(value, (float)TimeUtility.kFrameRateEpsilon); + EditorUtility.SetDirty(asset); + } + } + } + + public SequenceState(WindowState windowState, TimelineAsset asset, PlayableDirector director, TimelineClip hostClip, SequenceState parentSequence) + { + m_WindowState = windowState; + m_ParentSequence = parentSequence; + + this.asset = asset; + this.director = director; + this.hostClip = hostClip; + + start = hostClip == null ? 0.0 : hostClip.start; + timeScale = hostClip == null ? 1.0 : hostClip.timeScale * parentSequence.timeScale; + } + + public Range GetEvaluableRange() + { + if (hostClip == null) + return new Range + { + start = 0.0, + end = duration + }; + + if (!m_CachedEvaluableRange.HasValue) + { + var globalRange = GetGlobalEvaluableRange(); + m_CachedEvaluableRange = new Range + { + start = ToLocalTime(globalRange.start), + end = ToLocalTime(globalRange.end) + }; + } + + return m_CachedEvaluableRange.Value; + } + + public string TimeAsString(double timeValue, string format = "F2") + { + if (viewModel.timeInFrames) + return TimeUtility.TimeAsFrames(timeValue, frameRate, format); + + return TimeUtility.TimeAsTimeCode(timeValue, frameRate, format); + } + + public double ToGlobalTime(double t) + { + if (hostClip == null) + return t; + + return m_ParentSequence.ToGlobalTime(hostClip.FromLocalTimeUnbound(t)); + } + + public double ToLocalTime(double t) + { + if (hostClip == null) + return t; + + return hostClip.ToLocalTimeUnbound(m_ParentSequence.ToLocalTime(t)); + } + + double GetLocalTime() + { + if (!m_WindowState.previewMode && !Application.isPlaying) + return viewModel.windowTime; + + // the time needs to always be synchronized with the director + if (director != null) + m_Time = director.time; + + return m_Time; + } + + void SetLocalTime(double newTime) + { + // do this prior to the calback, because the callback pulls from the get + if (director != null) + director.time = newTime; + + if (Math.Abs(m_Time - newTime) > TimeUtility.kTimeEpsilon) + { + m_Time = newTime; + m_WindowState.InvokeTimeChangeCallback(); + } + } + + Range GetGlobalEvaluableRange() + { + if (hostClip == null) + return new Range + { + start = 0.0, + end = duration + }; + + var currentRange = new Range + { + start = hostClip.ToLocalTimeUnbound(ToGlobalTime(hostClip.start)), + end = hostClip.ToLocalTimeUnbound(ToGlobalTime(hostClip.end)) + }; + + return Range.Intersection(currentRange, m_ParentSequence.GetGlobalEvaluableRange()); + } + + public void Dispose() + { + TimelineWindowViewPrefs.SaveViewModel(asset); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceState.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceState.cs.meta new file mode 100644 index 0000000..8e8e6cc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/SequenceState.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 09f4db536a377bc40a9ac110af702bfa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/WindowState.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/WindowState.cs new file mode 100644 index 0000000..0ad374a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/WindowState.cs @@ -0,0 +1,1131 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.Experimental.SceneManagement; +using UnityEngine.Experimental.Animations; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using UnityEngine.Animations; + +namespace UnityEditor.Timeline +{ + delegate bool PendingUpdateDelegate(WindowState state, Event currentEvent); + + class WindowState + { + const int k_TimeCodeTextFieldId = 3790; + + readonly TimelineWindow m_Window; + bool m_Recording; + readonly SpacePartitioner m_SpacePartitioner = new SpacePartitioner(); + readonly List m_CaptureSession = new List(); + int m_DirtyStamp; + float m_SequencerHeaderWidth = WindowConstants.defaultHeaderWidth; + float m_BindingAreaWidth = WindowConstants.defaultBindingAreaWidth; + + bool m_MustRebuildGraph; + + float m_LastTime; + + readonly PropertyCollector m_PropertyCollector = new PropertyCollector(); + + static AnimationModeDriver s_PreviewDriver; + List m_PreviewedAnimators; + List m_PreviewedComponents; + + public static double kTimeEpsilon { get { return TimeUtility.kTimeEpsilon; } } + public static readonly float kMaxShownTime = (float)TimeUtility.k_MaxTimelineDurationInSeconds; + + static readonly ISequenceState k_NullSequenceState = new NullSequenceState(); + + // which tracks are armed for record - only one allowed per 'actor' + Dictionary m_ArmedTracks = new Dictionary(); + + TimelineWindow.TimelineWindowPreferences m_Preferences; + + List m_OnStartFrameUpdates; + List m_OnEndFrameUpdates; + + readonly SequenceHierarchy m_SequenceHierarchy; + + public event Action windowOnGuiStarted; + public event Action windowOnGuiFinished; + + public event Action OnPlayStateChange; + public event Action OnDirtyStampChange; + public event Action OnRebuildGraphChange; + public event Action OnTimeChange; + public event Action OnRecordingChange; + + public event Action OnBeforeSequenceChange; + public event Action OnAfterSequenceChange; + + public WindowState(TimelineWindow w, SequenceHierarchy hierarchy) + { + m_Window = w; + m_Preferences = w.preferences; + hierarchy.Init(this); + m_SequenceHierarchy = hierarchy; + TimelinePlayable.muteAudioScrubbing = muteAudioScrubbing; + } + + public static AnimationModeDriver previewDriver + { + get + { + if (s_PreviewDriver == null) + s_PreviewDriver = ScriptableObject.CreateInstance(); + return s_PreviewDriver; + } + } + + public EditorWindow editorWindow + { + get { return m_Window; } + } + + public ISequenceState editSequence + { + get + { + // Using "null" ISequenceState to avoid checking against null all the time. + // This *should* be removed in a phase 2 of refactoring, where we make sure + // to pass around the correct state object instead of letting clients dig + // into the WindowState for whatever they want. + return m_SequenceHierarchy.editSequence ?? k_NullSequenceState; + } + } + + public ISequenceState masterSequence + { + get { return m_SequenceHierarchy.masterSequence ?? k_NullSequenceState; } + } + + public ISequenceState referenceSequence + { + get { return timeReferenceMode == TimeReferenceMode.Local ? editSequence : masterSequence; } + } + + public bool rebuildGraph + { + get { return m_MustRebuildGraph; } + set { SyncNotifyValue(ref m_MustRebuildGraph, value, OnRebuildGraphChange); } + } + + public float mouseDragLag { get; set; } + + public SpacePartitioner spacePartitioner + { + get { return m_SpacePartitioner; } + } + + public List captured + { + get { return m_CaptureSession; } + } + + public void AddCaptured(Manipulator manipulator) + { + if (!m_CaptureSession.Contains(manipulator)) + m_CaptureSession.Add(manipulator); + } + + public void RemoveCaptured(Manipulator manipulator) + { + m_CaptureSession.Remove(manipulator); + } + + public bool isJogging { get; set; } + + public int viewStateHash { get; private set; } + + public float bindingAreaWidth + { + get { return m_BindingAreaWidth; } + set { m_BindingAreaWidth = value; } + } + + public float sequencerHeaderWidth + { + get { return m_SequencerHeaderWidth; } + set + { + m_SequencerHeaderWidth = Mathf.Clamp(value, WindowConstants.minHeaderWidth, WindowConstants.maxHeaderWidth); + } + } + + public float mainAreaWidth { get; set; } + + public float trackScale + { + get { return editSequence.viewModel.trackScale; } + set + { + editSequence.viewModel.trackScale = value; + m_Window.treeView.CalculateRowRects(); + } + } + + public int dirtyStamp + { + get { return m_DirtyStamp; } + private set { SyncNotifyValue(ref m_DirtyStamp, value, OnDirtyStampChange); } + } + + public bool showQuadTree { get; set; } + + public bool canRecord + { + get { return AnimationMode.InAnimationMode(previewDriver) || !AnimationMode.InAnimationMode(); } + } + + public bool recording + { + get + { + if (!previewMode) + m_Recording = false; + return m_Recording; + } + // set can only be used to disable recording + set + { + // force preview mode on + if (value) + previewMode = true; + + bool newValue = value; + if (!previewMode) + newValue = false; + + if (newValue && m_ArmedTracks.Count == 0) + { + Debug.LogError("Cannot enable recording without an armed track"); + newValue = false; + } + + if (!newValue) + m_ArmedTracks.Clear(); + + if (newValue != m_Recording) + { + if (newValue) + AnimationMode.StartAnimationRecording(); + else + AnimationMode.StopAnimationRecording(); + + InspectorWindow.RepaintAllInspectors(); + } + + SyncNotifyValue(ref m_Recording, newValue, OnRecordingChange); + } + } + + public bool previewMode + { + get { return Application.isPlaying || AnimationMode.InAnimationMode(previewDriver); } + set + { + if (Application.isPlaying) + return; + bool inAnimationMode = AnimationMode.InAnimationMode(previewDriver); + if (!value) + { + if (inAnimationMode) + { + Stop(); + + OnStopPreview(); + + AnimationMode.StopAnimationMode(previewDriver); + + AnimationPropertyContextualMenu.Instance.SetResponder(null); + previewedDirectors = null; + } + } + else if (!inAnimationMode) + { + editSequence.time = editSequence.viewModel.windowTime; + EvaluateImmediate(); // does appropriate caching prior to enabling + } + } + } + + public bool playing + { + get + { + return masterSequence.director != null && masterSequence.director.state == PlayState.Playing; + } + } + + public float playbackSpeed { get; set; } + + public bool frameSnap + { + get { return m_Preferences.frameSnap; } + set { m_Preferences.frameSnap = value; } + } + + public bool edgeSnaps + { + get { return m_Preferences.edgeSnaps; } + set { m_Preferences.edgeSnaps = value; } + } + + public bool muteAudioScrubbing + { + get { return m_Preferences.muteAudioScrub; } + set + { + m_Preferences.muteAudioScrub = value; + TimelinePlayable.muteAudioScrubbing = value; + RebuildPlayableGraph(); + } + } + + public bool playRangeLoopMode + { + get { return m_Preferences.playRangeLoopMode; } + set { m_Preferences.playRangeLoopMode = value; } + } + + public TimeReferenceMode timeReferenceMode + { + get { return m_Preferences.timeReferenceMode; } + set { m_Preferences.timeReferenceMode = value; } + } + + public bool timeInFrames + { + get { return editSequence.viewModel.timeInFrames; } + set { editSequence.viewModel.timeInFrames = value; } + } + + public bool showAudioWaveform + { + get { return editSequence.viewModel.showAudioWaveform; } + set { editSequence.viewModel.showAudioWaveform = value; } + } + + public Vector2 playRange + { + get { return masterSequence.viewModel.timeAreaPlayRange; } + set { masterSequence.viewModel.timeAreaPlayRange = ValidatePlayRange(value); } + } + + public bool showMarkerHeader + { + get { return editSequence.viewModel.showMarkerHeader; } + set { editSequence.viewModel.showMarkerHeader = value; } + } + + void UnSelectMarkerOnHeaderTrack() + { + //Where(m => editSequence.asset.markerTrack == m.parent) + foreach (IMarker marker in SelectionManager.SelectedMarkers()) + { + if (marker.parent == editSequence.asset.markerTrack) + SelectionManager.Remove(marker); + } + } + + public EditMode.EditType editType + { + get { return m_Preferences.editType; } + set { m_Preferences.editType = value; } + } + + public PlaybackScrollMode autoScrollMode + { + get { return m_Preferences.autoScrollMode; } + set { m_Preferences.autoScrollMode = value; } + } + + public bool isClipSnapping { get; set; } + + public List previewedDirectors { get; private set; } + + public void OnDestroy() + { + if (!Application.isPlaying) + Stop(); + + if (m_OnStartFrameUpdates != null) + m_OnStartFrameUpdates.Clear(); + + if (m_OnEndFrameUpdates != null) + m_OnEndFrameUpdates.Clear(); + + m_SequenceHierarchy.Clear(); + windowOnGuiStarted = null; + windowOnGuiFinished = null; + } + + public void OnSceneSaved() + { + // the director will reset it's time when the scene is saved. + EnsureWindowTimeConsistency(); + } + + public void SetCurrentSequence(TimelineAsset timelineAsset, PlayableDirector director, TimelineClip hostClip) + { + if (OnBeforeSequenceChange != null) + OnBeforeSequenceChange.Invoke(); + + OnCurrentDirectorWillChange(); + + if (hostClip == null || timelineAsset == null) + { + m_PropertyCollector.Clear(); + m_SequenceHierarchy.Clear(); + } + + if (timelineAsset != null) + m_SequenceHierarchy.Add(timelineAsset, director, hostClip); + + if (OnAfterSequenceChange != null) + OnAfterSequenceChange.Invoke(); + } + + public void PopSequencesUntilCount(int count) + { + if (count >= m_SequenceHierarchy.count) return; + if (count < 1) return; + + if (OnBeforeSequenceChange != null) + OnBeforeSequenceChange.Invoke(); + + var nextDirector = m_SequenceHierarchy.GetStateAtIndex(count - 1).director; + OnCurrentDirectorWillChange(); + + m_SequenceHierarchy.RemoveUntilCount(count); + + EnsureWindowTimeConsistency(); + + if (OnAfterSequenceChange != null) + OnAfterSequenceChange.Invoke(); + } + + public SequencePath GetCurrentSequencePath() + { + return m_SequenceHierarchy.ToSequencePath(); + } + + public void SetCurrentSequencePath(SequencePath path, bool forceRebuild) + { + if (!m_SequenceHierarchy.NeedsUpdate(path, forceRebuild)) + return; + + if (OnBeforeSequenceChange != null) + OnBeforeSequenceChange.Invoke(); + + m_SequenceHierarchy.FromSequencePath(path, forceRebuild); + + if (OnAfterSequenceChange != null) + OnAfterSequenceChange.Invoke(); + } + + public IEnumerable GetAllSequences() + { + return m_SequenceHierarchy.allSequences; + } + + public double SnapToFrameIfRequired(double currentTime) + { + return frameSnap ? TimeReferenceUtility.SnapToFrame(currentTime) : currentTime; + } + + public void Reset() + { + recording = false; + previewMode = false; + } + + public double GetSnappedTimeAtMousePosition(Vector2 mousePos) + { + return SnapToFrameIfRequired(ScreenSpacePixelToTimeAreaTime(mousePos.x)); + } + + static void SyncNotifyValue(ref T oldValue, T newValue, Action changeStateCallback) + { + var stateChanged = false; + + if (oldValue == null) + { + oldValue = newValue; + stateChanged = true; + } + else + { + if (!oldValue.Equals(newValue)) + { + oldValue = newValue; + stateChanged = true; + } + } + + if (stateChanged && changeStateCallback != null) + { + changeStateCallback.Invoke(); + } + } + + public void SetTimeAreaTransform(Vector2 newTranslation, Vector2 newScale) + { + m_Window.timeArea.SetTransform(newTranslation, newScale); + TimeAreaChanged(); + } + + public void SetTimeAreaShownRange(float min, float max) + { + m_Window.timeArea.SetShownHRange(min, max); + TimeAreaChanged(); + } + + internal void TimeAreaChanged() + { + if (editSequence.asset != null) + { + Vector2 newShownRange = new Vector2(m_Window.timeArea.shownArea.x, m_Window.timeArea.shownArea.xMax); + if (editSequence.viewModel.timeAreaShownRange != newShownRange) + { + editSequence.viewModel.timeAreaShownRange = newShownRange; + if (!FileUtil.IsReadOnly(editSequence.asset)) + EditorUtility.SetDirty(editSequence.asset); + } + } + } + + public void ResetPreviewMode() + { + var mode = previewMode; + previewMode = false; + previewMode = mode; + } + + public bool TimeIsInRange(float value) + { + Rect shownArea = m_Window.timeArea.shownArea; + return value >= shownArea.x && value <= shownArea.xMax; + } + + public bool RangeIsVisible(Range range) + { + var shownArea = m_Window.timeArea.shownArea; + return range.start < shownArea.xMax && range.end > shownArea.xMin; + } + + public void EnsurePlayHeadIsVisible() + { + double minDisplayedTime = PixelToTime(timeAreaRect.xMin); + double maxDisplayedTime = PixelToTime(timeAreaRect.xMax); + + double currentTime = editSequence.time; + if (currentTime >= minDisplayedTime && currentTime <= maxDisplayedTime) + return; + + float displayedTimeRange = (float)(maxDisplayedTime - minDisplayedTime); + float minimumTimeToDisplay = (float)currentTime - displayedTimeRange / 2.0f; + float maximumTimeToDisplay = (float)currentTime + displayedTimeRange / 2.0f; + SetTimeAreaShownRange(minimumTimeToDisplay, maximumTimeToDisplay); + } + + public void SetPlayHeadToMiddle() + { + double minDisplayedTime = PixelToTime(timeAreaRect.xMin); + double maxDisplayedTime = PixelToTime(timeAreaRect.xMax); + + double currentTime = editSequence.time; + float displayedTimeRange = (float)(maxDisplayedTime - minDisplayedTime); + + if (currentTime >= minDisplayedTime && currentTime <= maxDisplayedTime) + { + if (currentTime < minDisplayedTime + displayedTimeRange / 2) + return; + } + + const float kCatchUpSpeed = 3f; + float realDelta = Mathf.Clamp(Time.realtimeSinceStartup - m_LastTime, 0f, 1f) * kCatchUpSpeed; + float scrollCatchupAmount = kCatchUpSpeed * realDelta * displayedTimeRange / 2; + + if (currentTime < minDisplayedTime) + { + SetTimeAreaShownRange((float)currentTime, (float)currentTime + displayedTimeRange); + } + else if (currentTime > maxDisplayedTime) + { + SetTimeAreaShownRange((float)currentTime - displayedTimeRange + scrollCatchupAmount, (float)currentTime + scrollCatchupAmount); + } + else if (currentTime > minDisplayedTime + displayedTimeRange / 2) + { + float targetMinDisplayedTime = Mathf.Min((float)minDisplayedTime + scrollCatchupAmount, + (float)(currentTime - displayedTimeRange / 2)); + SetTimeAreaShownRange(targetMinDisplayedTime, targetMinDisplayedTime + displayedTimeRange); + } + } + + internal void UpdateLastFrameTime() + { + m_LastTime = Time.realtimeSinceStartup; + } + + public Vector2 timeAreaShownRange + { + get + { + if (m_Window.state.editSequence.asset != null) + return editSequence.viewModel.timeAreaShownRange; + + return TimelineAssetViewModel.TimeAreaDefaultRange; + } + } + + public Vector2 timeAreaTranslation + { + get { return m_Window.timeArea.translation; } + } + + public Vector2 timeAreaScale + { + get { return m_Window.timeArea.scale; } + } + + public Rect timeAreaRect + { + get + { + var sequenceContentRect = m_Window.sequenceContentRect; + return new Rect( + sequenceContentRect.x, + WindowConstants.timeAreaYPosition, + Mathf.Max(sequenceContentRect.width, WindowConstants.timeAreaMinWidth), + WindowConstants.timeAreaHeight + ); + } + } + + public float windowHeight + { + get { return m_Window.position.height; } + } + + public bool playRangeEnabled + { + get { return !EditorApplication.isPlaying && masterSequence.viewModel.playRangeEnabled && !IsEditingASubTimeline(); } + set + { + if (EditorApplication.isPlaying) + return; + + masterSequence.viewModel.playRangeEnabled = value; + } + } + + public TimelineWindow GetWindow() + { + return m_Window; + } + + public void Play() + { + if (masterSequence.director == null) + return; + + if (!previewMode) + previewMode = true; + + if (previewMode) + { + if (masterSequence.time > masterSequence.duration) + masterSequence.time = 0; + + masterSequence.director.Play(); + masterSequence.director.ProcessPendingGraphChanges(); + PlayableDirector.ResetFrameTiming(); + InvokePlayStateChangeCallback(true); + } + } + + public void Pause() + { + if (masterSequence.director != null) + { + masterSequence.director.Pause(); + masterSequence.director.ProcessPendingGraphChanges(); + SynchronizeSequencesAfterPlayback(); + InvokePlayStateChangeCallback(false); + } + } + + public void SetPlaying(bool start) + { + if (start && !playing) + { + Play(); + } + + if (!start && playing) + { + Pause(); + } + } + + public void Stop() + { + if (masterSequence.director != null) + { + masterSequence.director.Stop(); + masterSequence.director.ProcessPendingGraphChanges(); + InvokePlayStateChangeCallback(false); + } + } + + void InvokePlayStateChangeCallback(bool isPlaying) + { + if (OnPlayStateChange != null) + OnPlayStateChange.Invoke(isPlaying); + } + + public void RebuildPlayableGraph() + { + if (masterSequence.director != null) + { + masterSequence.director.RebuildGraph(); + // rebuild both the parent and the edit sequences. control tracks don't necessary + // rebuild the subdirector on recreation + if (editSequence.director != null && editSequence.director != masterSequence.director) + { + editSequence.director.RebuildGraph(); + } + } + } + + public void Evaluate() + { + if (masterSequence.director != null) + { + if (!EditorApplication.isPlaying && !previewMode) + GatherProperties(masterSequence.director); + + ForceTimeOnDirector(masterSequence.director); + masterSequence.director.DeferredEvaluate(); + + if (EditorApplication.isPlaying == false) + { + PlayModeView.RepaintAll(); + SceneView.RepaintAll(); + AudioMixerWindow.RepaintAudioMixerWindow(); + } + } + } + + public void EvaluateImmediate() + { + if (masterSequence.director != null) + { + if (!EditorApplication.isPlaying && !previewMode) + GatherProperties(masterSequence.director); + + if (previewMode) + { + ForceTimeOnDirector(masterSequence.director); + masterSequence.director.ProcessPendingGraphChanges(); + masterSequence.director.Evaluate(); + } + } + } + + public void Refresh() + { + CheckRecordingState(); + dirtyStamp = dirtyStamp + 1; + + rebuildGraph = true; + } + + public void UpdateViewStateHash() + { + viewStateHash = timeAreaTranslation.GetHashCode() + .CombineHash(timeAreaScale.GetHashCode()) + .CombineHash(trackScale.GetHashCode()); + } + + public bool IsEditingASubItem() + { + return IsCurrentEditingASequencerTextField() || !SelectionManager.IsCurveEditorFocused(null); + } + + public bool IsEditingASubTimeline() + { + return editSequence != masterSequence; + } + + public bool IsEditingAnEmptyTimeline() + { + return editSequence.asset == null; + } + + public bool IsEditingAPrefabAsset() + { + var stage = PrefabStageUtility.GetCurrentPrefabStage(); + return stage != null && editSequence.director != null && stage.IsPartOfPrefabContents(editSequence.director.gameObject); + } + + public bool IsCurrentEditingASequencerTextField() + { + if (editSequence.asset == null) + return false; + + if (k_TimeCodeTextFieldId == GUIUtility.keyboardControl) + return true; + + return editSequence.asset.flattenedTracks.Count(t => t.GetInstanceID() == GUIUtility.keyboardControl) != 0; + } + + public float TimeToTimeAreaPixel(double t) // TimeToTimeAreaPixel + { + float pixelX = (float)t; + pixelX *= timeAreaScale.x; + pixelX += timeAreaTranslation.x + sequencerHeaderWidth; + return pixelX; + } + + public float TimeToScreenSpacePixel(double time) + { + float pixelX = (float)time; + pixelX *= timeAreaScale.x; + pixelX += timeAreaTranslation.x; + return pixelX; + } + + public float TimeToPixel(double time) + { + return m_Window.timeArea.TimeToPixel((float)time, timeAreaRect); + } + + public float PixelToTime(float pixel) + { + return m_Window.timeArea.PixelToTime(pixel, timeAreaRect); + } + + public float PixelDeltaToDeltaTime(float p) + { + return PixelToTime(p) - PixelToTime(0); + } + + public float TimeAreaPixelToTime(float pixel) + { + return PixelToTime(pixel); + } + + public float ScreenSpacePixelToTimeAreaTime(float p) + { + // transform into track space by offsetting the pixel by the screen-space offset of the time area + p -= timeAreaRect.x; + return TrackSpacePixelToTimeAreaTime(p); + } + + public float TrackSpacePixelToTimeAreaTime(float p) + { + p -= timeAreaTranslation.x; + + if (timeAreaScale.x > 0.0f) + return p / timeAreaScale.x; + + return p; + } + + public void OffsetTimeArea(int pixels) + { + Vector3 tx = timeAreaTranslation; + tx.x += pixels; + SetTimeAreaTransform(tx, timeAreaScale); + } + + public GameObject GetSceneReference(TrackAsset asset) + { + if (editSequence.director == null) + return null; // no player bound + + return TimelineUtility.GetSceneGameObject(editSequence.director, asset); + } + + public void CalculateRowRects() + { + // arming a track might add inline curve tracks, recalc track heights + if (m_Window != null && m_Window.treeView != null) + m_Window.treeView.CalculateRowRects(); + } + + // Only one track within a 'track' hierarchy can be armed + public void ArmForRecord(TrackAsset track) + { + m_ArmedTracks[TimelineUtility.GetSceneReferenceTrack(track)] = track; + if (track != null && !recording) + recording = true; + if (!recording) + return; + + track.OnRecordingArmed(editSequence.director); + CalculateRowRects(); + } + + public void UnarmForRecord(TrackAsset track) + { + m_ArmedTracks.Remove(TimelineUtility.GetSceneReferenceTrack(track)); + if (m_ArmedTracks.Count == 0) + recording = false; + track.OnRecordingUnarmed(editSequence.director); + } + + public void UpdateRecordingState() + { + if (recording) + { + foreach (var track in m_ArmedTracks.Values) + { + if (track != null) + track.OnRecordingTimeChanged(editSequence.director); + } + } + } + + public bool IsTrackRecordable(TrackAsset track) + { + // A track with animated parameters can always be recorded to + return IsArmedForRecord(track) || track.HasAnyAnimatableParameters(); + } + + public bool IsArmedForRecord(TrackAsset track) + { + return track == GetArmedTrack(track); + } + + public TrackAsset GetArmedTrack(TrackAsset track) + { + TrackAsset outTrack; + m_ArmedTracks.TryGetValue(TimelineUtility.GetSceneReferenceTrack(track), out outTrack); + return outTrack; + } + + void CheckRecordingState() + { + // checks for deleted tracks, and makes sure the recording state matches + if (m_ArmedTracks.Any(t => t.Value == null)) + { + m_ArmedTracks = m_ArmedTracks.Where(t => t.Value != null).ToDictionary(t => t.Key, t => t.Value); + if (m_ArmedTracks.Count == 0) + recording = false; + } + } + + void OnCurrentDirectorWillChange() + { + SynchronizeViewModelTime(editSequence); + + if (!Application.isPlaying) + Stop(); + + rebuildGraph = true; // needed for asset previews + } + + public void GatherProperties(PlayableDirector director) + { + if (director == null || Application.isPlaying) + return; + + var asset = director.playableAsset as TimelineAsset; + + if (!previewMode) + { + AnimationMode.StartAnimationMode(previewDriver); + + OnStartPreview(director); + + AnimationPropertyContextualMenu.Instance.SetResponder(new TimelineRecordingContextualResponder(this)); + if (!previewMode) + return; + EnsureWindowTimeConsistency(); + } + + if (asset != null) + { + m_PropertyCollector.Reset(); + m_PropertyCollector.PushActiveGameObject(null); // avoid overflow on unbound tracks + asset.GatherProperties(director, m_PropertyCollector); + } + } + + void OnStartPreview(PlayableDirector director) + { + previewedDirectors = TimelineUtility.GetAllDirectorsInHierarchy(director).ToList(); + + if (previewedDirectors == null) + return; + + m_PreviewedAnimators = TimelineUtility.GetBindingsFromDirectors(previewedDirectors).ToList(); + + m_PreviewedComponents = new List(); + foreach (var animator in m_PreviewedAnimators) + { + m_PreviewedComponents.AddRange(animator.GetComponents()); + } + foreach (var previewedComponent in m_PreviewedComponents) + { + previewedComponent.StartPreview(); + } + } + + void OnStopPreview() + { + if (m_PreviewedComponents != null) + { + foreach (var previewComponent in m_PreviewedComponents) + { + if (previewComponent != null) + { + previewComponent.StopPreview(); + } + } + m_PreviewedComponents = null; + } + + if (m_PreviewedAnimators != null) + { + foreach (var previewAnimator in m_PreviewedAnimators) + { + if (previewAnimator != null) + { + previewAnimator.UnbindAllHandles(); + } + } + m_PreviewedAnimators = null; + } + } + + internal void ProcessStartFramePendingUpdates() + { + if (m_OnStartFrameUpdates != null) + m_OnStartFrameUpdates.RemoveAll(callback => callback.Invoke(this, Event.current)); + } + + internal void ProcessEndFramePendingUpdates() + { + if (m_OnEndFrameUpdates != null) + m_OnEndFrameUpdates.RemoveAll(callback => callback.Invoke(this, Event.current)); + } + + public void AddStartFrameDelegate(PendingUpdateDelegate updateDelegate) + { + if (m_OnStartFrameUpdates == null) + m_OnStartFrameUpdates = new List(); + if (m_OnStartFrameUpdates.Contains(updateDelegate)) + return; + m_OnStartFrameUpdates.Add(updateDelegate); + } + + public void AddEndFrameDelegate(PendingUpdateDelegate updateDelegate) + { + if (m_OnEndFrameUpdates == null) + m_OnEndFrameUpdates = new List(); + if (m_OnEndFrameUpdates.Contains(updateDelegate)) + return; + m_OnEndFrameUpdates.Add(updateDelegate); + } + + internal void InvokeWindowOnGuiStarted(Event evt) + { + if (windowOnGuiStarted != null) + windowOnGuiStarted.Invoke(this, evt); + } + + internal void InvokeWindowOnGuiFinished(Event evt) + { + if (windowOnGuiFinished != null) + windowOnGuiFinished.Invoke(this, evt); + } + + public void UpdateRootPlayableDuration(double duration) + { + if (editSequence.director != null) + { + if (editSequence.director.playableGraph.IsValid()) + { + if (editSequence.director.playableGraph.GetRootPlayableCount() > 0) + { + var rootPlayable = editSequence.director.playableGraph.GetRootPlayable(0); + if (rootPlayable.IsValid()) + rootPlayable.SetDuration(duration); + } + } + } + } + + public void InvokeTimeChangeCallback() + { + if (OnTimeChange != null) + OnTimeChange.Invoke(); + } + + Vector2 ValidatePlayRange(Vector2 range) + { + if (range == TimelineAssetViewModel.NoPlayRangeSet) + return range; + + float minimumPlayRangeTime = 0.01f / Mathf.Max(1.0f, referenceSequence.frameRate); + + // Validate min + if (range.y - range.x < minimumPlayRangeTime) + range.x = range.y - minimumPlayRangeTime; + + if (range.x < 0.0f) + range.x = 0.0f; + + // Validate max + if (range.y > editSequence.duration) + range.y = (float)editSequence.duration; + + if (range.y - range.x < minimumPlayRangeTime) + range.y = Mathf.Min(range.x + minimumPlayRangeTime, (float)editSequence.duration); + + return range; + } + + void EnsureWindowTimeConsistency() + { + if (Application.isPlaying || masterSequence.director == null || masterSequence.viewModel == null) + return; + + masterSequence.time = masterSequence.viewModel.windowTime; + } + + void SynchronizeSequencesAfterPlayback() + { + // Synchronizing editSequence will synchronize all view models up to the master + SynchronizeViewModelTime(editSequence); + } + + static void SynchronizeViewModelTime(ISequenceState state) + { + if (state.director == null || state.viewModel == null) + return; + + var t = state.time; + state.time = t; + } + + // because we may be evaluating outside the duration of the root playable + // we explicitly set the time - this causes the graph to not 'advance' the time + // because advancing it can force it to change due to wrapping to the duration + // This can happen if the graph is force evaluated outside it's duration + // case 910114, 936844 and 943377 + static void ForceTimeOnDirector(PlayableDirector director) + { + var directorTime = director.time; + director.time = directorTime; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/WindowState.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/WindowState.cs.meta new file mode 100644 index 0000000..37183a9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/State/WindowState.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: df8df80bb65e9ec4280229a9921c4f3c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets.meta new file mode 100644 index 0000000..17fb152 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ece36bb2bc4128d42911bbc757a56860 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions.meta new file mode 100644 index 0000000..0082666 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fa68ac03b8845a142974ec6497cb4acc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/common.uss b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/common.uss new file mode 100644 index 0000000..dd302f4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/common.uss @@ -0,0 +1,1153 @@ +.Color-Selected { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 20; + + /* GUIStyle.fixedWidth */ + width: 6; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.name */ + -unity-name: "Color.Selected"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.textColor */ + color: rgb(12, 180, 204); +} + +/* GUIStyle.active */ +.Color-Selected:hover:active { + /* GUIState.textColor */ + color: rgb(12, 180, 204); +} + +/* GUIStyle.focused */ +.Color-Selected:focus { + /* GUIState.textColor */ + color: rgb(255, 255, 255); +} + +.Font-Clip { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size-small; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.name */ + -unity-name: "Font.Clip"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.groupBackground { + + -unity-slice-left: 5; + -unity-slice-top: 5; + -unity-slice-bottom: 5; + + -unity-clipping: clip; + -unity-image-position: text-only; + + padding-top: 2; + padding-bottom: 2; + + -unity-stretch-height: true; + color: rgb(115, 151, 236); + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Shared/TimelineGroupBackground.png"); +} + +/* GUIStyle.active */ +.groupBackground:hover:active { + /* GUIState.textColor */ + color: rgb(137, 196, 255); +} + +.Icon-Activation { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fixedHeight */ + height: 15; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.Activation"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.textColor */ + color: rgba(0, 0, 0, 0.75); +} + +.Icon-AutoKey { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fixedHeight */ + height: 15; + + /* GUIStyle.fixedWidth */ + width: 15; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.AutoKey"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-AvatarMaskOff { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fixedHeight */ + height: 15; + + /* GUIStyle.fixedWidth */ + width: 15; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.AvatarMaskOff"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-AvatarMaskOn { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fixedHeight */ + height: 15; + + /* GUIStyle.fixedWidth */ + width: 15; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.AvatarMaskOn"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-ClipIn { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 8; + + /* GUIStyle.fixedWidth */ + width: 4; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.name */ + -unity-name: "Icon.ClipIn"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-ClipOut { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 8; + + /* GUIStyle.fixedWidth */ + width: 4; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.name */ + -unity-name: "Icon.ClipOut"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-Connector { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 5; + + /* GUIStyle.fixedWidth */ + width: 7; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.name */ + -unity-name: "Icon.Connector"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Shared/TimelineConnector.png"); +} + +.Icon-Curves { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 15; + + /* GUIStyle.fixedWidth */ + width: 15; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.name */ + -unity-name: "Icon.Curves"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-Endmarker { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.fixedHeight */ + height: 14; + + /* GUIStyle.fixedWidth */ + width: 5; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.margin */ + margin-left: 4; + margin-right: 4; + margin-top: 4; + margin-bottom: 4; + + /* GUIStyle.name */ + -unity-name: "Icon.Endmarker"; + + /* GUIStyle.padding */ + padding-left: 4; + padding-right: 4; + padding-top: 4; + padding-bottom: 4; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Shared/TimelineSeqEnd.png"); +} + +.MarkerItem { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.fixedHeight */ + height: 16; + + /* GUIStyle.fixedWidth */ + width: 9; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + +} + +.SignalEmitter { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.fixedHeight */ + height: 16; + + /* GUIStyle.fixedWidth */ + width: 9; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; +} + +.TrackCollapseMarkerButton { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.fixedHeight */ + height: 16; + + /* GUIStyle.fixedWidth */ + width: 16; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; +} + +.MarkerMultiOverlay { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.fixedHeight */ + height: 16; + + /* GUIStyle.fixedWidth */ + width: 9; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Shared/Timeline-Marker-Multi-Overlay.png"); +} + +.Icon-ExtrapolationContinue { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 11; + + /* GUIStyle.fixedWidth */ + width: 14; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.ExtrapolationContinue"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-ExtrapolationHold { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 11; + + /* GUIStyle.fixedWidth */ + width: 14; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.ExtrapolationHold"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-ExtrapolationLoop { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 11; + + /* GUIStyle.fixedWidth */ + width: 14; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.ExtrapolationLoop"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-ExtrapolationPingPong { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 11; + + /* GUIStyle.fixedWidth */ + width: 14; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.ExtrapolationPingPong"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-Foldout { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fixedWidth */ + width: 13; + + /* GUIStyle.fixedWidth */ + height: 13; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.Foldout"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-InfiniteTrack { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + -unity-slice-top: 5; + -unity-slice-bottom: 5; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-above; + + /* GUIStyle.name */ + -unity-name: "Icon.InfiniteTrack"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIStyle.wordWrap */ + -unity-word-wrap: true; +} + +/* GUIStyle.active */ +.Icon-InfiniteTrack:hover:active { + /* GUIState.textColor */ + color: rgba(0, 0, 0, 0.96); +} + +.Icon-Keyframe { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 8; + + /* GUIStyle.fixedWidth */ + width: 9; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.Keyframe"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-Locked { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fixedHeight */ + height: 16; + + /* GUIStyle.fixedWidth */ + width: 16; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.Locked"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-LockedBG { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.name */ + -unity-name: "Icon.LockedBG"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.textColor */ + color: rgb(37, 45, 50); +} + +.Icon-Mute { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fixedHeight */ + height: 16; + + /* GUIStyle.fixedWidth */ + width: 16; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.Mute"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-Options { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 14; + + /* GUIStyle.fixedWidth */ + width: 14; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.margin */ + margin-left: 10; + margin-right: 5; + + /* GUIStyle.name */ + -unity-name: "Icon.Options"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.textColor */ + color: rgb(37, 45, 50); +} + +.Icon-OutlineBorder { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.border */ + -unity-slice-left: 5; + -unity-slice-right: 5; + -unity-slice-top: 5; + -unity-slice-bottom: 5; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-above; + + /* GUIStyle.name */ + -unity-name: "Icon.OutlineBorder"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIStyle.wordWrap */ + -unity-word-wrap: true; + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Shared/TimelineOutline.png"); +} + +/* GUIStyle.active */ +.Icon-OutlineBorder:hover:active { + /* GUIState.textColor */ + color: rgba(0, 0, 0, 0.96); +} + +.Icon-PlayAreaEnd { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 20; + + /* GUIStyle.fixedWidth */ + width: 6; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.name */ + -unity-name: "Icon.PlayAreaEnd"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-PlayAreaStart { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 20; + + /* GUIStyle.fixedWidth */ + width: 6; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.name */ + -unity-name: "Icon.PlayAreaStart"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-Playrange { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 25; + + /* GUIStyle.fixedWidth */ + width: 6; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.Playrange"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.Icon-Shadow { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.Shadow"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Shared/TimelineBottomShadow.png"); +} + +.Icon-TimeCursor { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fixedHeight */ + height: 20; + + /* GUIStyle.fixedWidth */ + width: 11; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.margin */ + margin-left: 4; + margin-right: 4; + margin-top: 4; + margin-bottom: 4; + + /* GUIStyle.name */ + -unity-name: "Icon.TimeCursor"; + + /* GUIStyle.padding */ + padding-left: 4; + padding-right: 4; + padding-top: 4; + padding-bottom: 4; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.textColor */ + color: rgb(255, 255, 255); +} + +.Icon-TrackHeaderSwatch { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + -unity-slice-top: 4; + -unity-slice-bottom: 4; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedWidth */ + width: 4; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.name */ + -unity-name: "Icon.TrackHeaderSwatch"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Shared/TimelineSwatch.png"); +} + +/* GUIStyle.active */ +.Icon-TrackHeaderSwatch:hover:active { + /* GUIState.textColor */ + color: rgb(137, 196, 255); +} + +.Icon-TrackOptions { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fixedHeight */ + height: 16; + + /* GUIStyle.fixedWidth */ + width: 16; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.name */ + -unity-name: "Icon.TrackOptions"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIStyle.wordWrap */ + -unity-word-wrap: true; +} + +/* GUIStyle.active */ +.Icon-TrackOptions:hover:active { + /* GUIState.textColor */ + color: rgba(0, 0, 0, 0.96); +} + +.Icon-Warning { + /* GUIStyle.alignment */ + -unity-text-align: middle-center; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fontSize */ + font-size: 72; + + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIStyle.name */ + -unity-name: "Icon.Warning"; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Shared/TimelineWarning.png"); +} + +.sequenceClip { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.border */ + -unity-slice-left: 5; + -unity-slice-right: 5; + -unity-slice-top: 5; + -unity-slice-bottom: 5; + + /* GUIStyle.clipping */ + -unity-clipping: clip; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size-tiny; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + padding-top: 2; + padding-bottom: 2; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchHeight */ + -unity-stretch-height: true; + + /* GUIState.textColor */ + color: rgb(115, 151, 236); + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Shared/TimelineDisplay.png"); +} + +/* GUIStyle.active */ +.sequenceClip:hover:active { + /* GUIState.textColor */ + color: rgb(137, 196, 255); +} + +.sequenceGroupFont { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; +} + +.sequenceTrackHeaderFont { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.padding */ + padding-left: 5; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.textColor */ + color: rgb(153, 153, 153); +} + +.tinyFont { + /* GUIStyle.alignment */ + -unity-text-align: middle-left; + + /* GUIStyle.fontSize */ + font-size: --unity-font-size-tiny; + + /* GUIStyle.imagePosition */ + -unity-image-position: text-only; + + /* GUIStyle.richText */ + -unity-rich-text: false; + + /* GUIStyle.stretchWidth */ + -unity-stretch-width: false; + + /* GUIState.textColor */ + color: rgba(255, 255, 255, 0.75); +} + +.editModeBtn { + padding-left: 8px; + padding-right: 8px; + padding-top: 4px; + padding-bottom: 3px; + -unity-extend: ".ToolbarPopup"; + background-image: resource(""); +} + +.showMarkerBtn{ + margin: 0px 0px 6px 6px; + padding-left: 12px; + padding-right: 12px; + padding-top: 4px; + padding-bottom: 3px; + -unity-extend: ".ToolbarPopup"; + background-image: resource(""); +} + +.sequenceSwitcher{ + margin: 0px 5px 0px 0px; + padding-left: 0px; + padding-right: 0px; + padding-top: 0px; + padding-bottom: 0px; + -unity-extend: ".ToolbarPopup"; + background-image: resource(""); + -unity-text-align: middle-center; +} + +.markerWarningOverlay{ + height: 13px; + width: 14px; + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Icons/Timeline-Marker-Warning-Overlay.png"); +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/common.uss.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/common.uss.meta new file mode 100644 index 0000000..5f90bc8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/common.uss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ada555936059fa149bb48537842ee230 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 1 diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/dark.uss b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/dark.uss new file mode 100644 index 0000000..cf11991 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/dark.uss @@ -0,0 +1,286 @@ +.Font-Clip { + /* GUIState.textColor */ + color: rgb(255, 255, 255); +} + +.Icon-Activation { + /* GUIStyle.fixedWidth */ + width: 12; + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineActivation.png"); +} + +.Icon-AutoKey { + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey@2x.png"); +} + +.Icon-AutoKey:active { + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active@2x.png"); +} + +.Icon-AvatarMaskOff { + /* GUIState.background */ + background-image: resource("Builtin Skins/DarkSkin/Images/AvatarMaskDisabled.png"); +} + +.Icon-AvatarMaskOn { + /* GUIState.background */ + background-image: resource("Builtin Skins/DarkSkin/Images/AvatarMaskEnabled.png"); +} + +.Icon-ClipIn { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipIn.png"); +} + +.Icon-ClipOut { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipOut.png"); +} + +.Icon-ClipSelected { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineClipGradientSelected.png"); +} + +.Icon-Curves { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOff.png"); +} + +/* GUIStyle.active */ +.Icon-Curves:hover:active { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png"); +} + +/* GUIStyle.onActive */ +.Icon-Curves:hover:active:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png"); +} + +/* GUIStyle.onNormal */ +.Icon-Curves:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png"); +} + +.Icon-Endmarker { + /* GUIState.textColor */ + color: rgb(61, 94, 152); +} + +.MarkerItem { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemCollapsed.png"); +} + +.MarkerItem:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItem.png"); +} + +.MarkerItem:hover:focus:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemSelected.png"); +} + +.SignalEmitter { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineSignalCollapsed.png"); +} + +.SignalEmitter:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Icons/d_TimelineSignal.png"); +} + +.SignalEmitter:hover:focus:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineSignalSelected.png"); +} + +.TrackCollapseMarkerButton { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonDisabled.png"); +} + +.TrackCollapseMarkerButton:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonEnabled.png"); +} + +.Icon-ExtrapolationContinue { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineContinue.png"); + + /* GUIStyle.contentOffset */ + -unity-content-offset: -5 0; +} + +.Icon-ExtrapolationHold { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineHold.png"); +} + +.Icon-ExtrapolationLoop { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLoop.png"); +} + +.Icon-ExtrapolationPingPong { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelinePingPong.png"); +} + +.Icon-Foldout { + /* GUIState.background */ + background-image: resource("Builtin Skins/DarkSkin/Images/IN foldout.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/DarkSkin/Images/IN foldout@2x.png"); +} + +/* GUIStyle.active */ +.Icon-Foldout:hover:active { + /* GUIState.background */ + background-image: resource("Builtin Skins/DarkSkin/Images/IN foldout on.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/DarkSkin/Images/IN foldout on@2x.png"); +} + +/* GUIStyle.onActive */ +.Icon-Foldout:hover:active:checked { + /* GUIState.background */ + background-image: resource("Builtin Skins/DarkSkin/Images/IN foldout on.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/DarkSkin/Images/IN foldout on@2x.png"); +} + +/* GUIStyle.onNormal */ +.Icon-Foldout:checked { + /* GUIState.background */ + background-image: resource("Builtin Skins/DarkSkin/Images/IN foldout on.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/DarkSkin/Images/IN foldout on@2x.png"); +} + +.Icon-InfiniteTrack { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineInfiniteTrackNoShadow.png"); +} + +.Icon-Keyframe { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineKeyframe.png"); +} + +.Icon-Locked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.active */ +.Icon-Locked:hover:active { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.focused */ +.Icon-Locked:focus { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.hover */ +.Icon-Locked:hover { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.onActive */ +.Icon-Locked:hover:active:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.onNormal */ +.Icon-Locked:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png"); +} + +.Icon-LockedBG { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineDisabledBackground.png"); +} + +.Icon-Mute { + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineEye.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineEye@2x.png"); +} + +.Icon-Options { + /* GUIState.background */ + background-image: resource("Icons/d__Popup.png"); +} + +.Icon-PlayAreaEnd { + /* GUIState.textColor */ + color: rgb(187, 189, 191); + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineEndPlayback.png"); +} + +.Icon-PlayAreaStart { + /* GUIState.textColor */ + color: rgb(187, 189, 191); + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineStartPlayback.png"); +} + +.Icon-Playrange { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelinePlayRange.png"); +} + +.Icon-TimeCursor { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/DarkSkin/TimelineTimeCursor.png"); +} + +.Icon-TrackOptions { + /* GUIStyle.imagePosition */ + -unity-image-position: image-only; + + /* GUIState.background */ + background-image: resource("Builtin Skins/DarkSkin/Images/pane options.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/DarkSkin/Images/pane options@2x.png"); +} + +.sequenceGroupFont { + /* GUIState.textColor */ + color: rgb(204, 204, 204); +} + + +.sequenceSwitcher{ + background-color: rgb(51, 51, 51); +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/dark.uss.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/dark.uss.meta new file mode 100644 index 0000000..a6c0372 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/dark.uss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5393cdb70614ab24f94f78bfcf5d1455 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 1 diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/light.uss b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/light.uss new file mode 100644 index 0000000..f809be7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/light.uss @@ -0,0 +1,282 @@ +.Icon-Activation { + /* GUIStyle.fixedWidth */ + width: 10; + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineActivation.png"); +} + +.Icon-AutoKey { + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineAutokey.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineAutokey@2x.png"); +} + +.Icon-AutoKey:active { + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active@2x.png"); +} + +.Icon-AvatarMaskOff { + /* GUIState.background */ + background-image: resource("Builtin Skins/LightSkin/Images/AvatarMaskDisabled.png"); +} + +.Icon-AvatarMaskOn { + /* GUIState.background */ + background-image: resource("Builtin Skins/LightSkin/Images/AvatarMaskEnabled.png"); +} + +.Icon-ClipIn { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineIconClipIn.png"); +} + +.Icon-ClipOut { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineIconClipOut.png"); +} + +.Icon-ClipSelected { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineClipGradientSelected.png"); +} + +.Icon-Curves { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOff.png"); +} + +/* GUIStyle.active */ +.Icon-Curves:hover:active { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png"); +} + +/* GUIStyle.onActive */ +.Icon-Curves:hover:active:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png"); +} + +/* GUIStyle.onNormal */ +.Icon-Curves:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png"); +} + +.Icon-Endmarker { + /* GUIState.textColor */ + color: rgb(57, 122, 234); +} + +.MarkerItem { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemCollapsed.png"); +} + +.MarkerItem:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItem.png"); +} + +.MarkerItem:hover:focus:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemSelected.png"); +} + +.SignalEmitter { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineSignalCollapsed.png"); +} + +.SignalEmitter:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/Icons/TimelineSignal.png"); +} + +.SignalEmitter:hover:focus:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineSignalSelected.png"); +} + +.TrackCollapseMarkerButton { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonDisabled.png"); +} + +.TrackCollapseMarkerButton:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonEnabled.png"); +} + +.Icon-ExtrapolationContinue { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineContinue.png"); +} + +.Icon-ExtrapolationHold { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineHold.png"); +} + +.Icon-ExtrapolationLoop { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLoop.png"); +} + +.Icon-ExtrapolationPingPong { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelinePingPong.png"); +} + +.Icon-Foldout { + /* GUIState.background */ + background-image: resource("Builtin Skins/LightSkin/Images/IN foldout.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/LightSkin/Images/IN foldout@2x.png"); +} + +/* GUIStyle.active */ +.Icon-Foldout:hover:active { + /* GUIState.background */ + background-image: resource("Builtin Skins/LightSkin/Images/IN foldout on.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/LightSkin/Images/IN foldout on@2x.png"); +} + +/* GUIStyle.onActive */ +.Icon-Foldout:hover:active:checked { + /* GUIState.background */ + background-image: resource("Builtin Skins/LightSkin/Images/IN foldout on.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/LightSkin/Images/IN foldout on@2x.png"); +} + +/* GUIStyle.onNormal */ +.Icon-Foldout:checked { + /* GUIState.background */ + background-image: resource("Builtin Skins/LightSkin/Images/IN foldout on.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/LightSkin/Images/IN foldout on@2x.png"); +} + +.Icon-InfiniteTrack { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineInfiniteTrackNoShadow.png"); +} + +.Icon-Keyframe { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineKeyframe.png"); +} + +.Icon-Locked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.active */ +.Icon-Locked:hover:active { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.focused */ +.Icon-Locked:focus { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.hover */ +.Icon-Locked:hover { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.onActive */ +.Icon-Locked:hover:active:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png"); +} + +/* GUIStyle.onNormal */ +.Icon-Locked:checked { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png"); +} + +.Icon-LockedBG { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineDisabledBackground.png"); +} + +.Icon-Mute { + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineEye.png"); + -unity-scaled-backgrounds: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineEye@2x.png"); +} + +.Icon-Options { + /* GUIState.background */ + background-image: resource("Icons/_Popup.png"); +} + +.Icon-PlayAreaEnd { + /* GUIState.textColor */ + color: rgba(255, 255, 255, 0.2); + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineEndPlayback.png"); +} + +.Icon-PlayAreaStart { + /* GUIState.textColor */ + color: rgba(255, 255, 255, 0.21); + + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineStartPlayback.png"); +} + +.Icon-Playrange { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelinePlayRange.png"); +} + +.Icon-TimeCursor { + /* GUIState.background */ + background-image: resource("Packages/com.unity.timeline/Editor/StyleSheets/Images/LightSkin/TimelineTimeCursor.png"); +} + +.Icon-TrackOptions { + /* GUIStyle.imagePosition */ + -unity-image-position: image-above; + + /* GUIState.background */ + background-image: resource("Builtin Skins/LightSkin/Images/pane options.png"); + + /* GUIState.scaledBackgrounds */ + -unity-scaled-backgrounds: resource("Builtin Skins/LightSkin/Images/pane options@2x.png"); +} + +.sequenceGroupFont { + /* GUIState.textColor */ + color: rgb(255, 255, 255); +} + +.Font-Clip { + /* GUIStyleState.textColor */ + color: rgb(0, 0, 0); +} + +.sequenceSwitcher{ + background-color: rgb(208, 208, 208); +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/light.uss.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/light.uss.meta new file mode 100644 index 0000000..8076cfc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Extensions/light.uss.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e98085123be873947970c4f10099a39a +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} + disableValidation: 1 diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images.meta new file mode 100644 index 0000000..2988bc9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f603f10b9ec26841b2ecb6003dc1d0e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin.meta new file mode 100644 index 0000000..ba1aac1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21b6b069ae021364ab45e1094807ec98 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineActivation.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineActivation.png new file mode 100644 index 0000000..0fb6650 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineActivation.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineActivation.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineActivation.png.meta new file mode 100644 index 0000000..6b62a6b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineActivation.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 359cf58d5969d1a4aad29b095c7fc338 +timeCreated: 1484166676 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey.png new file mode 100644 index 0000000..7c08088 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey.png.meta new file mode 100644 index 0000000..e154a51 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 92b5e4310629b264dad0fb2cc196d818 +timeCreated: 1460382690 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey@2x.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey@2x.png new file mode 100644 index 0000000..855b486 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey@2x.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey@2x.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey@2x.png.meta new file mode 100644 index 0000000..43f7f10 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey@2x.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: af24c542434a025448222d576f61a956 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active.png new file mode 100644 index 0000000..060daf7 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active.png.meta new file mode 100644 index 0000000..7b0ee04 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: e17ee60887efdd04389991a15ee0c578 +timeCreated: 1465396246 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 64 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active@2x.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active@2x.png new file mode 100644 index 0000000..419fa1a Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active@2x.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active@2x.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active@2x.png.meta new file mode 100644 index 0000000..3587ec0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineAutokey_active@2x.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: 183f7b7549219ab47becb461a16df882 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonDisabled.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonDisabled.png new file mode 100644 index 0000000..d7787f6 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonDisabled.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonDisabled.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonDisabled.png.meta new file mode 100644 index 0000000..71bc08c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonDisabled.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: ab4a984ceda5ef4438b4dd7d0c8325db +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonEnabled.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonEnabled.png new file mode 100644 index 0000000..3222ad1 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonEnabled.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonEnabled.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonEnabled.png.meta new file mode 100644 index 0000000..8afc17f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCollapseMarkerButtonEnabled.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: b2d973d22210e734f91a7633b8f101f9 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineContinue.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineContinue.png new file mode 100644 index 0000000..d469bfe Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineContinue.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineContinue.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineContinue.png.meta new file mode 100644 index 0000000..0fc876e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineContinue.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: f747f9cdf03f2ff418fe728a77e8cbef +timeCreated: 1481652765 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOff.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOff.png new file mode 100644 index 0000000..f93a5b2 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOff.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOff.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOff.png.meta new file mode 100644 index 0000000..b5996df --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOff.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 9dfea116cd2bd974e80173bcf8db4331 +timeCreated: 1481580515 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png new file mode 100644 index 0000000..8985961 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png.meta new file mode 100644 index 0000000..82c6cb3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineCurvesOn.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 88e563d69bc649c4dbf8ffbe396fbcbe +timeCreated: 1481580525 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineDisabledBackground.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineDisabledBackground.png new file mode 100644 index 0000000..72cc79c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineDisabledBackground.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineDisabledBackground.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineDisabledBackground.png.meta new file mode 100644 index 0000000..35c87a0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineDisabledBackground.png.meta @@ -0,0 +1,119 @@ +fileFormatVersion: 2 +guid: 412f73153f3a3c549b67b2a847741145 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 1 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEndPlayback.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEndPlayback.png new file mode 100644 index 0000000..98b2644 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEndPlayback.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEndPlayback.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEndPlayback.png.meta new file mode 100644 index 0000000..7a16452 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEndPlayback.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: c285802d9d414814fad592b90b223f15 +timeCreated: 1454598165 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye.png new file mode 100644 index 0000000..3f6ff61 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye.png.meta new file mode 100644 index 0000000..cada224 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: b93a8712e80177f46b3cff1a274b2dce +timeCreated: 1449255153 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye@2x.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye@2x.png new file mode 100644 index 0000000..092031d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye@2x.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye@2x.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye@2x.png.meta new file mode 100644 index 0000000..782df18 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineEye@2x.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: 631aaf57db9353344b41fe203d0a8b62 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineHold.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineHold.png new file mode 100644 index 0000000..0d395b5 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineHold.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineHold.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineHold.png.meta new file mode 100644 index 0000000..020bbf7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineHold.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: ddbd45249a133a846b2f20e39b537565 +timeCreated: 1481653109 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipIn.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipIn.png new file mode 100644 index 0000000..1698c0a Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipIn.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipIn.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipIn.png.meta new file mode 100644 index 0000000..10b7769 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipIn.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: ab1e2f0dfb0df5e40bb95359b3d8ed3a +timeCreated: 1480536694 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipOut.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipOut.png new file mode 100644 index 0000000..fed0515 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipOut.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipOut.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipOut.png.meta new file mode 100644 index 0000000..171dbff --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineIconClipOut.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 32f7e3598d6414c489127629e29af3f6 +timeCreated: 1480535436 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineInfiniteTrackNoShadow.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineInfiniteTrackNoShadow.png new file mode 100644 index 0000000..03f3a2d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineInfiniteTrackNoShadow.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineInfiniteTrackNoShadow.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineInfiniteTrackNoShadow.png.meta new file mode 100644 index 0000000..f0afba3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineInfiniteTrackNoShadow.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: eae63adb172f1164db61a7f4bdfc3637 +timeCreated: 1484150287 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineKeyframe.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineKeyframe.png new file mode 100644 index 0000000..091b9e5 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineKeyframe.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineKeyframe.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineKeyframe.png.meta new file mode 100644 index 0000000..f1c44aa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineKeyframe.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 8eba099eb091faf419fecdcd5cdabfd7 +timeCreated: 1484066929 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png new file mode 100644 index 0000000..b5c9702 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png.meta new file mode 100644 index 0000000..74ce3e7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: f41d3194e87f6df4eb328916fd91d20c +timeCreated: 1449255153 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 1 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 64 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 64 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png new file mode 100644 index 0000000..50cfa80 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png.meta new file mode 100644 index 0000000..7ca8bde --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLockButton@2x.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: d51d89aa019127a4e9c5bec4e423a4d6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLoop.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLoop.png new file mode 100644 index 0000000..0402691 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLoop.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLoop.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLoop.png.meta new file mode 100644 index 0000000..8ef0117 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineLoop.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 360dded8761e81d4d98c10f469d55492 +timeCreated: 1481653109 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItem.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItem.png new file mode 100644 index 0000000..c73ae32 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItem.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItem.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItem.png.meta new file mode 100644 index 0000000..ce24d1e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItem.png.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: c133595e3c100774496e03e66fa69259 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 8 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemCollapsed.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemCollapsed.png new file mode 100644 index 0000000..e86ef74 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemCollapsed.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemCollapsed.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemCollapsed.png.meta new file mode 100644 index 0000000..4b33778 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemCollapsed.png.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: f179d9a3cccffb04ba2e27f681e9b147 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 8 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemSelected.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemSelected.png new file mode 100644 index 0000000..91f5af4 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemSelected.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemSelected.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemSelected.png.meta new file mode 100644 index 0000000..dd4b4fd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineMarkerItemSelected.png.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: 3dd65256ca8837544b3e738c0d3ee0e2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 8 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePingPong.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePingPong.png new file mode 100644 index 0000000..17aa182 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePingPong.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePingPong.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePingPong.png.meta new file mode 100644 index 0000000..5dc471d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePingPong.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: d3b5c4f7d6b94f64085b3713bffa680e +timeCreated: 1481580507 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePlayRange.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePlayRange.png new file mode 100644 index 0000000..8908b07 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePlayRange.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePlayRange.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePlayRange.png.meta new file mode 100644 index 0000000..8ace41d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelinePlayRange.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 43eeff8a446b32242a4fb1a5c1bd7b8e +timeCreated: 1481916753 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalCollapsed.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalCollapsed.png new file mode 100644 index 0000000..4501cbe Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalCollapsed.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalCollapsed.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalCollapsed.png.meta new file mode 100644 index 0000000..38f8402 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalCollapsed.png.meta @@ -0,0 +1,83 @@ +fileFormatVersion: 2 +guid: d91793cd853a258448e4d5545bb38e45 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalSelected.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalSelected.png new file mode 100644 index 0000000..2f1b08f Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalSelected.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalSelected.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalSelected.png.meta new file mode 100644 index 0000000..c8250dc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineSignalSelected.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: a5e21f4e466690645980dd0cf0b664bc +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineStartPlayback.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineStartPlayback.png new file mode 100644 index 0000000..8c15153 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineStartPlayback.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineStartPlayback.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineStartPlayback.png.meta new file mode 100644 index 0000000..2f8fc73 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineStartPlayback.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 5060c9f9eb2f7ee4695b638a21d8fe01 +timeCreated: 1454598165 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineTimeCursor.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineTimeCursor.png new file mode 100644 index 0000000..1e4ea64 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineTimeCursor.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineTimeCursor.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineTimeCursor.png.meta new file mode 100644 index 0000000..0c8ec5e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/DarkSkin/TimelineTimeCursor.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 3b9e9b3d9ade166499e7a17109ca73bf +timeCreated: 1454538902 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons.meta new file mode 100644 index 0000000..3c0bfbd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a90603761ea3d8449a60aebebd202228 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/Timeline-Marker-Warning-Overlay.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/Timeline-Marker-Warning-Overlay.png new file mode 100644 index 0000000..9f798bc Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/Timeline-Marker-Warning-Overlay.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/Timeline-Marker-Warning-Overlay.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/Timeline-Marker-Warning-Overlay.png.meta new file mode 100644 index 0000000..1852412 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/Timeline-Marker-Warning-Overlay.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 945f4ecec6df62244b9ebcc363833642 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipBG.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipBG.png new file mode 100644 index 0000000..4d481fb Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipBG.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipBG.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipBG.png.meta new file mode 100644 index 0000000..18a0bb3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipBG.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: d44fc8b11425e0043aa7c20a301ce707 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipFG.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipFG.png new file mode 100644 index 0000000..5783c91 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipFG.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipFG.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipFG.png.meta new file mode 100644 index 0000000..3e9cce0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineClipFG.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 33b1871a2d09cfa459a93f4e8feb5c41 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineDigIn.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineDigIn.png new file mode 100644 index 0000000..826230d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineDigIn.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineDigIn.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineDigIn.png.meta new file mode 100644 index 0000000..21f3433 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineDigIn.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: b1d064d6d80829f4eb370f679384ea1f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: -100 + wrapU: 0 + wrapV: 0 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixOFF.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixOFF.png new file mode 100644 index 0000000..0f16bf7 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixOFF.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixOFF.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixOFF.png.meta new file mode 100644 index 0000000..5c66a0e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixOFF.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 8fca5ed160cdc5440a4c7561db4082b2 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixON.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixON.png new file mode 100644 index 0000000..49e8fd7 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixON.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixON.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixON.png.meta new file mode 100644 index 0000000..37bf9e1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeMixON.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: a82846d41464fcf4b962ebdc815963f5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceOFF.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceOFF.png new file mode 100644 index 0000000..a05c0f7 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceOFF.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceOFF.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceOFF.png.meta new file mode 100644 index 0000000..33ca3ae --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceOFF.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 09ae14686a02d484ab41e76fd1efba14 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceON.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceON.png new file mode 100644 index 0000000..ee6b23d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceON.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceON.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceON.png.meta new file mode 100644 index 0000000..a896acc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeReplaceON.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 6d41c3e8796a4fd4e80840354039e4ac +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleOFF.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleOFF.png new file mode 100644 index 0000000..fb51a58 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleOFF.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleOFF.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleOFF.png.meta new file mode 100644 index 0000000..8f4958c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleOFF.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: bd7b7cac6eb0c3f469781d9a729a1c94 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleON.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleON.png new file mode 100644 index 0000000..9e98892 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleON.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleON.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleON.png.meta new file mode 100644 index 0000000..514ab7a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineEditModeRippleON.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: c5c1f094d9a9b3f4c9cc6c3a87af871c +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineHeaderMarkerIcon.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineHeaderMarkerIcon.png new file mode 100644 index 0000000..e58abc2 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineHeaderMarkerIcon.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineHeaderMarkerIcon.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineHeaderMarkerIcon.png.meta new file mode 100644 index 0000000..0d07924 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineHeaderMarkerIcon.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: bf1debab21103154b99778ba6e074175 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonDisabled.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonDisabled.png new file mode 100644 index 0000000..3243e0a Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonDisabled.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonDisabled.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonDisabled.png.meta new file mode 100644 index 0000000..e5147f2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonDisabled.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 33a52b41b4de5874ca7da1da32067e39 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonEnabled.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonEnabled.png new file mode 100644 index 0000000..683d1aa Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonEnabled.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonEnabled.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonEnabled.png.meta new file mode 100644 index 0000000..db526e1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineMarkerAreaButtonEnabled.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: d1eccbb425fdacc4ba53ce4223f4ea30 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSelector.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSelector.png new file mode 100644 index 0000000..da927b8 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSelector.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSelector.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSelector.png.meta new file mode 100644 index 0000000..469f273 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSelector.png.meta @@ -0,0 +1,139 @@ +fileFormatVersion: 2 +guid: 73f5ebb64da7b2a40ab6bffac80f1a61 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSignal.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSignal.png new file mode 100644 index 0000000..2afc29a Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSignal.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSignal.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSignal.png.meta new file mode 100644 index 0000000..bc8bc1b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/TimelineSignal.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 15845fb26c2846947b4dedb9fb348cc1 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineDigIn.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineDigIn.png new file mode 100644 index 0000000..826230d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineDigIn.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineDigIn.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineDigIn.png.meta new file mode 100644 index 0000000..fb86cad --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineDigIn.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 22c3c381bd3cd4a40a8541103023e1ef +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixOFF.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixOFF.png new file mode 100644 index 0000000..3e0009a Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixOFF.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixOFF.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixOFF.png.meta new file mode 100644 index 0000000..66cb896 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixOFF.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 39d9575ed0465354cb02b69ea18526de +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixON.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixON.png new file mode 100644 index 0000000..896adfe Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixON.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixON.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixON.png.meta new file mode 100644 index 0000000..b42e367 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeMixON.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 7c681ffb5a436684fa3e98a9b66775c0 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceOFF.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceOFF.png new file mode 100644 index 0000000..e9a2af1 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceOFF.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceOFF.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceOFF.png.meta new file mode 100644 index 0000000..287012e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceOFF.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 912fd71cbf4cbe140b4f240bedbc1f3e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceON.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceON.png new file mode 100644 index 0000000..c26a611 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceON.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceON.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceON.png.meta new file mode 100644 index 0000000..1bced03 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeReplaceON.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 7b4b3cedf598c954cb2f38d6e2e34c0d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleOFF.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleOFF.png new file mode 100644 index 0000000..490fe0f Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleOFF.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleOFF.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleOFF.png.meta new file mode 100644 index 0000000..d350e3a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleOFF.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 411e6f19c19fa0546af83aeb59c2ed4b +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleON.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleON.png new file mode 100644 index 0000000..bda372e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleON.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleON.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleON.png.meta new file mode 100644 index 0000000..ec7afb8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineEditModeRippleON.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 67a774c4384aa6c488128e2851b18ced +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineHeaderMarkerIcon.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineHeaderMarkerIcon.png new file mode 100644 index 0000000..c1703aa Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineHeaderMarkerIcon.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineHeaderMarkerIcon.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineHeaderMarkerIcon.png.meta new file mode 100644 index 0000000..d947cf0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineHeaderMarkerIcon.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 4f8d98ef7dbbe3d469e14c04722cbeed +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonDisabled.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonDisabled.png new file mode 100644 index 0000000..16ff9ea Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonDisabled.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonDisabled.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonDisabled.png.meta new file mode 100644 index 0000000..9266b15 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonDisabled.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: b3644a971cca0bd4eb357cb9aca4dde1 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonEnabled.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonEnabled.png new file mode 100644 index 0000000..014414d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonEnabled.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonEnabled.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonEnabled.png.meta new file mode 100644 index 0000000..bdf29b9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineMarkerAreaButtonEnabled.png.meta @@ -0,0 +1,115 @@ +fileFormatVersion: 2 +guid: 8cde79655a957734b8c20c92c6d3132d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSelector.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSelector.png new file mode 100644 index 0000000..19776d6 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSelector.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSelector.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSelector.png.meta new file mode 100644 index 0000000..64a463b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSelector.png.meta @@ -0,0 +1,139 @@ +fileFormatVersion: 2 +guid: 06bf6150656339941aa98e175a995445 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSignal.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSignal.png new file mode 100644 index 0000000..9f421fd Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSignal.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSignal.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSignal.png.meta new file mode 100644 index 0000000..6069c30 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Icons/d_TimelineSignal.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: ad2e3e92b00839c4e991ca602ef19822 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin.meta new file mode 100644 index 0000000..e08f364 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8ad9b938ad733e94ca95fe5a5c19a5b8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineActivation.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineActivation.png new file mode 100644 index 0000000..e18f78a Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineActivation.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineActivation.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineActivation.png.meta new file mode 100644 index 0000000..a136318 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineActivation.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 2887294cc7f1fe840bff6e349409648d +timeCreated: 1484165733 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey.png new file mode 100644 index 0000000..9bccd33 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey.png.meta new file mode 100644 index 0000000..6063498 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: af3aec622aef40c45813b39e405966a3 +timeCreated: 1463497119 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey@2x.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey@2x.png new file mode 100644 index 0000000..6a3e01f Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey@2x.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey@2x.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey@2x.png.meta new file mode 100644 index 0000000..7049d7d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey@2x.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: cf3fbf98d5c3f1941bd9c0256918a4c8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active.png new file mode 100644 index 0000000..6eeb0e1 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active.png.meta new file mode 100644 index 0000000..42bf09b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 0a5e3e063c4e1ab45999cf6e40c13c07 +timeCreated: 1463497122 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active@2x.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active@2x.png new file mode 100644 index 0000000..6fe2a5b Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active@2x.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active@2x.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active@2x.png.meta new file mode 100644 index 0000000..41ace44 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineAutokey_active@2x.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: f6717d61970edba4686c297677881a77 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonDisabled.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonDisabled.png new file mode 100644 index 0000000..e6dbdac Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonDisabled.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonDisabled.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonDisabled.png.meta new file mode 100644 index 0000000..637f97a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonDisabled.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 14793e8174fe3b04ea5907898393d93c +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonEnabled.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonEnabled.png new file mode 100644 index 0000000..bb352e5 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonEnabled.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonEnabled.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonEnabled.png.meta new file mode 100644 index 0000000..20c22fa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCollapseMarkerButtonEnabled.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 1500816bcf9112a45bb071c4cc6b0e46 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineContinue.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineContinue.png new file mode 100644 index 0000000..4d57ebc Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineContinue.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineContinue.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineContinue.png.meta new file mode 100644 index 0000000..ee71da0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineContinue.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 61c21f74972ba8246b3ea400a9231841 +timeCreated: 1481657337 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOff.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOff.png new file mode 100644 index 0000000..d743183 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOff.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOff.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOff.png.meta new file mode 100644 index 0000000..a6d9092 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOff.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: fe163a92c54d2a1469c204b541041f09 +timeCreated: 1484065716 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png new file mode 100644 index 0000000..62a2423 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png.meta new file mode 100644 index 0000000..0a9ce54 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineCurvesOn.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 0ab0f1666e707204dbd25d05500361cf +timeCreated: 1481580517 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineDisabledBackground.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineDisabledBackground.png new file mode 100644 index 0000000..281198e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineDisabledBackground.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineDisabledBackground.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineDisabledBackground.png.meta new file mode 100644 index 0000000..555c102 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineDisabledBackground.png.meta @@ -0,0 +1,119 @@ +fileFormatVersion: 2 +guid: 0304baf8d224f3e47b22d872c8dcd412 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEndPlayback.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEndPlayback.png new file mode 100644 index 0000000..9590560 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEndPlayback.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEndPlayback.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEndPlayback.png.meta new file mode 100644 index 0000000..c6b3b5c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEndPlayback.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 6952cd3b0f88917449a8fa4d19fc5009 +timeCreated: 1463497108 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye.png new file mode 100644 index 0000000..d690621 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye.png.meta new file mode 100644 index 0000000..b61f495 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 3e39a4369cb0730479607382c383f786 +timeCreated: 1463497108 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye@2x.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye@2x.png new file mode 100644 index 0000000..d14d600 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye@2x.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye@2x.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye@2x.png.meta new file mode 100644 index 0000000..442dc4d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineEye@2x.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: 2dc127b7c30543c428127a6ddd0ee98f +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineHold.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineHold.png new file mode 100644 index 0000000..706f084 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineHold.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineHold.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineHold.png.meta new file mode 100644 index 0000000..8a5eafe --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineHold.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: a09fd8b5d9396c24a96a6de50cddc3b9 +timeCreated: 1481652201 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipIn.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipIn.png new file mode 100644 index 0000000..f6a552e Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipIn.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipIn.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipIn.png.meta new file mode 100644 index 0000000..47909c6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipIn.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 4171b549947246b4f9579419d5698a7e +timeCreated: 1481402454 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipOut.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipOut.png new file mode 100644 index 0000000..b79b816 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipOut.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipOut.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipOut.png.meta new file mode 100644 index 0000000..925d98f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineIconClipOut.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: a7a968b204ed77c4ba90be3ef3ee8551 +timeCreated: 1481569020 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineInfiniteTrackNoShadow.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineInfiniteTrackNoShadow.png new file mode 100644 index 0000000..0f6a992 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineInfiniteTrackNoShadow.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineInfiniteTrackNoShadow.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineInfiniteTrackNoShadow.png.meta new file mode 100644 index 0000000..fb8bb82 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineInfiniteTrackNoShadow.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 69ff79f863a32ad44a9497d4896d9d1c +timeCreated: 1484066142 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineKeyframe.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineKeyframe.png new file mode 100644 index 0000000..ad0b8aa Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineKeyframe.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineKeyframe.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineKeyframe.png.meta new file mode 100644 index 0000000..d8f5c94 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineKeyframe.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: f9fd2f335364cda41937eab39bf20049 +timeCreated: 1484152109 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png new file mode 100644 index 0000000..a96b419 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png.meta new file mode 100644 index 0000000..dc18ccc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: a3a859cdc4dd70d40b0d0bcb44047de8 +timeCreated: 1463497122 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png new file mode 100644 index 0000000..8695d92 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png.meta new file mode 100644 index 0000000..dcbb72a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLockButton@2x.png.meta @@ -0,0 +1,91 @@ +fileFormatVersion: 2 +guid: 9c0c310590aeee542a7a4ca704b0660a +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLoop.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLoop.png new file mode 100644 index 0000000..9530573 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLoop.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLoop.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLoop.png.meta new file mode 100644 index 0000000..0881676 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineLoop.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: c7df1e797b21c774f9b859d17f674737 +timeCreated: 1481580507 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItem.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItem.png new file mode 100644 index 0000000..e753c56 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItem.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItem.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItem.png.meta new file mode 100644 index 0000000..148ffa6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItem.png.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: 24b97c67b63a23b48bea4036d28a5818 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 8 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemCollapsed.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemCollapsed.png new file mode 100644 index 0000000..17cf682 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemCollapsed.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemCollapsed.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemCollapsed.png.meta new file mode 100644 index 0000000..cb71cdc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemCollapsed.png.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: 7d4691eba7565c34ab785c00fbc27ff8 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 8 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemSelected.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemSelected.png new file mode 100644 index 0000000..cdb9ca7 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemSelected.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemSelected.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemSelected.png.meta new file mode 100644 index 0000000..041863e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineMarkerItemSelected.png.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: b6e9dc9aad5843748a0124b8925c3743 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 8 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePingPong.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePingPong.png new file mode 100644 index 0000000..1223cdc Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePingPong.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePingPong.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePingPong.png.meta new file mode 100644 index 0000000..35ec478 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePingPong.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 88d697f38121de443ba144702e5122d9 +timeCreated: 1481580508 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePlayRange.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePlayRange.png new file mode 100644 index 0000000..f850f5c Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePlayRange.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePlayRange.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePlayRange.png.meta new file mode 100644 index 0000000..b54c1d3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelinePlayRange.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 70e3f118652b9094885689730ad3a47b +timeCreated: 1481916753 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalCollapsed.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalCollapsed.png new file mode 100644 index 0000000..6e2cdc5 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalCollapsed.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalCollapsed.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalCollapsed.png.meta new file mode 100644 index 0000000..76f21aa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalCollapsed.png.meta @@ -0,0 +1,86 @@ +fileFormatVersion: 2 +guid: a88fa20ed164bbe4da6bf533f94a3113 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 6 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalSelected.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalSelected.png new file mode 100644 index 0000000..004130d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalSelected.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalSelected.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalSelected.png.meta new file mode 100644 index 0000000..4a943b6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineSignalSelected.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 1a7852b1b33b816498b6af1e739f5995 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 7 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineStartPlayback.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineStartPlayback.png new file mode 100644 index 0000000..c9f0cae Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineStartPlayback.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineStartPlayback.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineStartPlayback.png.meta new file mode 100644 index 0000000..fb58b3f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineStartPlayback.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 824c4beb0ca6c934bbc7a26919302236 +timeCreated: 1463497128 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineTimeCursor.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineTimeCursor.png new file mode 100644 index 0000000..c425aff Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineTimeCursor.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineTimeCursor.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineTimeCursor.png.meta new file mode 100644 index 0000000..f37e360 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/LightSkin/TimelineTimeCursor.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: ed665472b4fee2043a5c1cc802beaa8e +timeCreated: 1463497119 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared.meta new file mode 100644 index 0000000..d15a175 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 456d458547ae36d44a13d4a4682f0441 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/Timeline-Marker-Multi-Overlay.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/Timeline-Marker-Multi-Overlay.png new file mode 100644 index 0000000..7d4f00d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/Timeline-Marker-Multi-Overlay.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/Timeline-Marker-Multi-Overlay.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/Timeline-Marker-Multi-Overlay.png.meta new file mode 100644 index 0000000..50d7910 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/Timeline-Marker-Multi-Overlay.png.meta @@ -0,0 +1,108 @@ +fileFormatVersion: 2 +guid: 75f26f1c549568c4e9950a368bd08cb8 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 6 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineBottomShadow.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineBottomShadow.png new file mode 100644 index 0000000..db2a796 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineBottomShadow.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineBottomShadow.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineBottomShadow.png.meta new file mode 100644 index 0000000..20be770 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineBottomShadow.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: db66ea47c76423f4a881937d34495801 +timeCreated: 1479917874 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineConnector.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineConnector.png new file mode 100644 index 0000000..99acdf8 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineConnector.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineConnector.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineConnector.png.meta new file mode 100644 index 0000000..44f822b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineConnector.png.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: a04f1625bf500f64e97445265dfbcc93 +timeCreated: 1481569141 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineDisplay.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineDisplay.png new file mode 100644 index 0000000..6951080 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineDisplay.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineDisplay.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineDisplay.png.meta new file mode 100644 index 0000000..943c1c5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineDisplay.png.meta @@ -0,0 +1,104 @@ +fileFormatVersion: 2 +guid: 03ae22b9de3989144a9bebf8972b4fad +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 10 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineGroupBackground.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineGroupBackground.png new file mode 100644 index 0000000..7a62bfd Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineGroupBackground.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineGroupBackground.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineGroupBackground.png.meta new file mode 100644 index 0000000..63f28fc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineGroupBackground.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 6ca5daa3415451940921fa7e2c3db9e8 +timeCreated: 1434467611 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: -1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineOutline.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineOutline.png new file mode 100644 index 0000000..19dc98d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineOutline.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineOutline.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineOutline.png.meta new file mode 100644 index 0000000..2c8f4d0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineOutline.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 829511f8e35bf3a40be037a1050f801c +timeCreated: 1461591699 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSeqEnd.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSeqEnd.png new file mode 100644 index 0000000..538b94d Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSeqEnd.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSeqEnd.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSeqEnd.png.meta new file mode 100644 index 0000000..512379f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSeqEnd.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 5dfe66e61e0d270468ae75349ff3a3eb +timeCreated: 1455898819 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSwatch.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSwatch.png new file mode 100644 index 0000000..a7127ef Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSwatch.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSwatch.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSwatch.png.meta new file mode 100644 index 0000000..a350aa4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineSwatch.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: e50018fd67fc156459e4014bdad3f5f6 +timeCreated: 1476817131 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: tvOS + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Windows Store Apps + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineWarning.png b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineWarning.png new file mode 100644 index 0000000..d9d4ee4 Binary files /dev/null and b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineWarning.png differ diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineWarning.png.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineWarning.png.meta new file mode 100644 index 0000000..5b266db --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/Images/Shared/TimelineWarning.png.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 1732e542f535d374bbfa7565fc78414e +timeCreated: 1455644730 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 5 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res.meta new file mode 100644 index 0000000..1ef39f8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 12a2d6aa8a743f04aa760f8c675c97e6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/HumanoidDefault.anim b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/HumanoidDefault.anim new file mode 100644 index 0000000..ba787eb --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/HumanoidDefault.anim @@ -0,0 +1,6683 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: HumanoidDefault + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 0 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0023206125 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0023206125 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.9978025 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.9978025 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0036914505 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0036914505 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0009904206 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0009904206 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.000000029802322 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.000000029802322 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.000000029802322 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.000000029802322 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.9999995 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.9999995 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.09074765 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.09074765 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.99597967 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.99597967 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.032569747 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.032569747 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.4995045 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.4995045 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.49950463 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.49950463 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.08610656 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.08610656 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.99597967 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.99597967 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.03256977 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.03256977 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.49950442 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.49950442 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.4995047 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.4995047 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.6962602 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.6962602 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.39508566 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.39508566 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.029317556 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.029317556 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0011194708 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0011194708 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.028612569 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.028612569 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.99959004 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.99959004 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.000031995765 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.000031995765 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6916188 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6916188 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.39508596 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.39508596 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.029317655 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.029317655 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.02861254 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.02861254 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0011195474 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0011195474 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.000032021475 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.000032021475 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.99959004 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.99959004 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Spine Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Spine Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Spine Twist Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Chest Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Chest Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Chest Twist Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1.6044449e-22 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 1.6044449e-22 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: UpperChest Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 2.0281193e-14 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 2.0281193e-14 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: UpperChest Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 3.1805545e-15 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 3.1805545e-15 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: UpperChest Twist Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.21768919 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.21768919 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Neck Nod Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0000005364417 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0000005364417 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Neck Tilt Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -2.5518072e-15 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -2.5518072e-15 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Neck Turn Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.1385466 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.1385466 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Head Nod Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0000005064527 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0000005064527 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Head Tilt Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0000002003913 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0000002003913 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Head Turn Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Eye Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Eye In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Eye Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Eye In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1.0285543 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 1.0285543 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Jaw Close + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0000021457988 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0000021457988 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Jaw Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5288592 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.5288592 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Upper Leg Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.00000017935282 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.00000017935282 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Upper Leg In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.000000071362784 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.000000071362784 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Upper Leg Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.93421274 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.93421274 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Lower Leg Stretch + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00000023841858 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00000023841858 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Lower Leg Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.03387608 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.03387608 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Foot Up-Down + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00000055896726 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00000055896726 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Foot Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1.4463487e-29 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -1.4463487e-29 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Toes Up-Down + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5288592 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.5288592 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Upper Leg Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.000000049938695 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.000000049938695 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Upper Leg In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00000008376336 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00000008376336 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Upper Leg Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.93421274 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.93421274 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Lower Leg Stretch + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Lower Leg Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.03387639 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.03387639 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Foot Up-Down + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00000034893546 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00000034893546 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Foot Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Toes Up-Down + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.6577008 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.6577008 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Shoulder Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.026656672 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.026656672 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Shoulder Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5008309 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.5008309 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Arm Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.2945701 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.2945701 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Arm Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00094974384 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00094974384 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Arm Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.89037263 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.89037263 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Forearm Stretch + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0039196364 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0039196364 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Forearm Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00038705475 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00038705475 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Hand Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.24678716 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.24678716 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Hand In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.65770036 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.65770036 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Shoulder Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.026655924 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.026655924 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Shoulder Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5008307 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.5008307 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Arm Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.29456997 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.29456997 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Arm Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00094974646 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00094974646 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Arm Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8903728 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8903728 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Forearm Stretch + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0039196513 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0039196513 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Forearm Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00038712102 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00038712102 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Hand Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.24678724 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.24678724 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Hand In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.7149313 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.7149313 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Thumb.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.37668565 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.37668565 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Thumb.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.64628243 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.64628243 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Thumb.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.64628184 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.64628184 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Thumb.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Index.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.45739162 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.45739162 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Index.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Index.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Index.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Middle.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.61083114 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.61083114 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Middle.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Middle.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Middle.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.66797 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.66797 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Ring.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.6108282 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.6108282 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Ring.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Ring.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Ring.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Little.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.45739284 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.45739284 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Little.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Little.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Little.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.71493024 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.71493024 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Thumb.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.37669381 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.37669381 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Thumb.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6462818 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6462818 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Thumb.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.64628184 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.64628184 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Thumb.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Index.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.45739165 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.45739165 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Index.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Index.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Index.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Middle.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.6108283 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.6108283 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Middle.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Middle.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Middle.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Ring.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.61083126 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.61083126 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Ring.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Ring.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Ring.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Little.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.45739275 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.45739275 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Little.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116837 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116837 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Little.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Little.3 Stretched + path: + classID: 95 + script: {fileID: 0} + m_PPtrCurves: [] + m_SampleRate: 30 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 7 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 8 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 9 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 10 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 11 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 12 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 13 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 14 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 15 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 16 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 17 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 18 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 19 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 20 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 21 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 22 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 23 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 24 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 25 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 26 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 27 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 28 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 29 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 30 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 31 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 32 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 33 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 34 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 35 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 36 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 37 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 38 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 39 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 40 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 41 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 42 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 43 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 44 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 45 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 46 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 47 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 48 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 49 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 50 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 51 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 52 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 53 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 54 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 55 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 56 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 57 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 58 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 59 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 60 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 61 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 62 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 63 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 64 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 65 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 66 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 67 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 68 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 69 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 70 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 71 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 72 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 73 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 74 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 75 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 76 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 77 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 78 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 79 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 80 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 81 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 82 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 83 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 84 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 85 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 86 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 87 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 88 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 89 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 90 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 91 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 92 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 93 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 94 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 95 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 96 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 97 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 98 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 99 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 100 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 101 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 102 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 103 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 104 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 105 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 106 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 107 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 108 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 109 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 110 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 111 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 112 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 113 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 114 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 115 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 116 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 117 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 118 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 119 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 120 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 121 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 122 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 123 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 124 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 125 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 126 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 127 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 128 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 129 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 130 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 131 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 132 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 133 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 134 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 135 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + - serializedVersion: 2 + path: 0 + attribute: 136 + script: {fileID: 0} + typeID: 95 + customType: 8 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.033333335 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0023206125 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0023206125 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.9978025 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.9978025 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0036914505 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0036914505 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0009904206 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0009904206 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.000000029802322 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.000000029802322 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.000000029802322 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.000000029802322 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.9999995 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.9999995 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RootQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.09074765 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.09074765 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.99597967 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.99597967 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.032569747 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.032569747 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.4995045 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.4995045 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.49950463 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.49950463 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftFootQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.08610656 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.08610656 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.99597967 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.99597967 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.03256977 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.03256977 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.49950442 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.49950442 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.50049496 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.4995047 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.4995047 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightFootQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.6962602 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.6962602 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.39508566 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.39508566 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.029317556 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.029317556 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0011194708 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0011194708 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.028612569 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.028612569 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.99959004 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.99959004 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.000031995765 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.000031995765 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHandQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6916188 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6916188 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandT.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.39508596 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.39508596 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandT.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.029317655 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.029317655 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandT.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.02861254 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.02861254 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandQ.x + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0011195474 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0011195474 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandQ.y + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.000032021475 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.000032021475 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandQ.z + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.99959004 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.99959004 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHandQ.w + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Spine Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Spine Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Spine Twist Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Chest Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Chest Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Chest Twist Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1.6044449e-22 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 1.6044449e-22 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: UpperChest Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 2.0281193e-14 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 2.0281193e-14 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: UpperChest Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 3.1805545e-15 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 3.1805545e-15 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: UpperChest Twist Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.21768919 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.21768919 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Neck Nod Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0000005364417 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0000005364417 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Neck Tilt Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -2.5518072e-15 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -2.5518072e-15 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Neck Turn Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.1385466 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.1385466 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Head Nod Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0000005064527 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0000005064527 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Head Tilt Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.0000002003913 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.0000002003913 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Head Turn Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Eye Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Eye In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Eye Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Eye In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1.0285543 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 1.0285543 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Jaw Close + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0000021457988 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0000021457988 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Jaw Left-Right + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5288592 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.5288592 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Upper Leg Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.00000017935282 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.00000017935282 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Upper Leg In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.000000071362784 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.000000071362784 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Upper Leg Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.93421274 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.93421274 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Lower Leg Stretch + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00000023841858 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00000023841858 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Lower Leg Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.03387608 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.03387608 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Foot Up-Down + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00000055896726 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00000055896726 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Foot Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -1.4463487e-29 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -1.4463487e-29 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Toes Up-Down + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5288592 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.5288592 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Upper Leg Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.000000049938695 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.000000049938695 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Upper Leg In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00000008376336 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00000008376336 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Upper Leg Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.93421274 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.93421274 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Lower Leg Stretch + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Lower Leg Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.03387639 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.03387639 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Foot Up-Down + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00000034893546 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00000034893546 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Foot Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Toes Up-Down + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.6577008 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.6577008 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Shoulder Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.026656672 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.026656672 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Shoulder Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5008309 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.5008309 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Arm Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.2945701 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.2945701 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Arm Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00094974384 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00094974384 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Arm Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.89037263 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.89037263 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Forearm Stretch + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0039196364 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0039196364 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Forearm Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00038705475 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00038705475 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Hand Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.24678716 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.24678716 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Left Hand In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.65770036 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.65770036 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Shoulder Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.026655924 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.026655924 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Shoulder Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.5008307 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.5008307 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Arm Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.29456997 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.29456997 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Arm Front-Back + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00094974646 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00094974646 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Arm Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8903728 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8903728 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Forearm Stretch + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.0039196513 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.0039196513 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Forearm Twist In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.00038712102 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.00038712102 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Hand Down-Up + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.24678724 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.24678724 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: Right Hand In-Out + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.7149313 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.7149313 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Thumb.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.37668565 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.37668565 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Thumb.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.64628243 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.64628243 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Thumb.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.64628184 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.64628184 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Thumb.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Index.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.45739162 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.45739162 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Index.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Index.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Index.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Middle.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.61083114 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.61083114 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Middle.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Middle.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Middle.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.66797 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.66797 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Ring.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.6108282 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.6108282 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Ring.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Ring.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Ring.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Little.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.45739284 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.45739284 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Little.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Little.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116842 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: LeftHand.Little.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.71493024 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.71493024 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Thumb.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.37669381 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.37669381 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Thumb.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6462818 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6462818 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Thumb.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.64628184 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.64628184 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Thumb.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Index.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.45739165 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.45739165 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Index.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Index.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Index.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Middle.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.6108283 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.6108283 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Middle.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Middle.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116838 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Middle.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Ring.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.61083126 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.61083126 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Ring.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Ring.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Ring.3 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.6679698 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Little.1 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: -0.45739275 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: -0.45739275 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Little.Spread + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116837 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116837 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Little.2 Stretched + path: + classID: 95 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 0.033333335 + value: 0.8116841 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: RightHand.Little.3 Stretched + path: + classID: 95 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_GenerateMotionCurves: 0 + m_Events: [] diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/HumanoidDefault.anim.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/HumanoidDefault.anim.meta new file mode 100644 index 0000000..0b38f70 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/HumanoidDefault.anim.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c91389c39d842cc4190ea8be0836798a +timeCreated: 1500990629 +licenseType: Pro +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_DarkSkin.txt b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_DarkSkin.txt new file mode 100644 index 0000000..14d0e57 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_DarkSkin.txt @@ -0,0 +1,52 @@ +colorPlayhead,RGBA(1.000, 1.000, 1.000, 1.000) +colorSelection,RGBA(0.239, 0.369, 0.596, 1.000) +colorEndmarker,RGBA(0.239, 0.369, 0.596, 1.000) +colorGroup,RGBA(0.153, 0.216, 0.224, 1.000) +colorGroupTrackBackground,RGBA(0.080, 0.305, 0.328, 0.178) +colorAnimation,RGBA(0.141, 0.333, 0.537, 1.000) +colorAnimationRecorded,RGBA(0.248, 0.463, 0.691, 1.000) +colorAudio,RGBA(1.000, 0.635, 0.000, 1.000) +colorAudioWaveform,RGBA(0.129, 0.164, 0.254, 1.000) +colorActivation,RGBA(0.000, 0.597, 0.128, 1.000) +colorDropTarget,RGBA(0.514, 0.627, 0.827, 1.000) +colorClipFont,RGBA(0.569, 0.580, 0.588, 1.000) +colorInvalidClipOverlay,RGBA(1.000, 0.000, 0.000, 0.502) +colorTrackBackground,RGBA(0.216, 0.216, 0.216, 0.628) +colorTrackHeaderBackground,RGBA(0.255, 0.255, 0.255, 1.000) +colorTrackDarken,RGBA(0.059, 0.059, 0.059, 0.672) +colorTrackBackgroundRecording,RGBA(0.622, 0.085, 0.085, 0.347) +colorInfiniteTrackBackgroundRecording,RGBA(0.391, 0.000, 0.000, 0.721) +colorTrackBackgroundSelected,RGBA(0.260, 0.339, 0.477, 0.516) +colorTrackFont,RGBA(0.718, 0.718, 0.718, 1.000) +colorClipUnion,RGBA(0.229, 0.280, 0.316, 0.709) +colorTopOutline3,RGBA(0.274, 0.274, 0.274, 1.000) +colorDurationLine,RGBA(0.153, 0.231, 0.376, 0.709) +colorRange,RGBA(0.733, 0.733, 0.733, 0.166) +colorSequenceBackground,RGBA(0.161, 0.161, 0.161, 1.000) +colorTooltipBackground,RGBA(0.114, 0.125, 0.129, 1.000) +colorInfiniteClipLine,RGBA(0.322, 0.322, 0.322, 1.000) +colorDefaultTrackDrawer,RGBA(0.855, 0.863, 0.871, 1.000) +colorDuration,RGBA(0.660, 0.660, 0.660, 1.000) +colorRecordingClipOutline,RGBA(1.000, 0.000, 0.000, 0.900) +colorAnimEditorBinding,RGBA(0.212, 0.212, 0.212, 1.000) +colorTimelineBackground,RGBA(0.216, 0.216, 0.216, 1.000) +colorLockTextBG,RGBA(0.601, 0.601, 0.601, 0.709) +colorInlineCurveVerticalLines,RGBA(1.000, 1.000, 1.000, 0.200) +colorInlineCurveOutOfRangeOverlay,RGBA(0.000, 0.000, 0.000, 0.500) +colorInlineCurvesBackground,RGBA(0.000, 0.000, 0.000, 0.000) +markerDrawerBackgroundColor,RGBA(0.180, 0.180, 0.180, 1.000) +markerHeaderDrawerBackgroundColor,RGBA(0.190, 0.190, 0.190, 1.000) +colorControl,RGBA(0.231, 0.635, 0.584, 1.000) +colorSubSequenceBackground,RGBA(0.218, 0.218, 0.218, 1.000) +colorTrackSubSequenceBackground,RGBA(0.153, 0.180, 0.180, 0.792) +colorTrackSubSequenceBackgroundSelected,RGBA(0.056, 0.189, 0.189, 1.000) +colorSubSequenceOverlay,RGBA(0.009, 0.080, 0.080, 0.286) +colorSubSequenceDurationLine,RGBA(0.000, 1.000, 0.880, 0.460) +clipBckg,RGBA(0.251, 0.267, 0.290, 1.000) +clipSelectedBckg,RGBA(0.408, 0.427, 0.478, 1.000) +clipBorderColor,RGBA(0.196, 0.196, 0.196, 1.000) +clipEaseBckgColor,RGBA(0.153, 0.153, 0.153, 1.000) +clipBlendIn,RGBA(0.286, 0.306, 0.329, 1.000) +clipBlendInSelected,RGBA(0.408, 0.427, 0.478, 1.000) +clipBlendOut,RGBA(0.286, 0.306, 0.329, 1.000) +clipBlendOutSelected,RGBA(0.408, 0.427, 0.478, 1.000) diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_DarkSkin.txt.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_DarkSkin.txt.meta new file mode 100644 index 0000000..33aa8d2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_DarkSkin.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 54905d77593e9eb44a7c25d704bb4163 +timeCreated: 1471357208 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_LightSkin.txt b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_LightSkin.txt new file mode 100644 index 0000000..5495a19 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_LightSkin.txt @@ -0,0 +1,52 @@ +colorPlayhead,RGBA(1.000, 1.000, 1.000, 1.000) +colorSelection,RGBA(0.290, 0.494, 0.878, 1.000) +colorEndmarker,RGBA(0.368, 0.599, 1.000, 1.000) +colorGroup,RGBA(0.518, 0.569, 0.576, 1.000) +colorGroupTrackBackground,RGBA(0.023, 0.235, 0.258, 0.157) +colorAnimation,RGBA(0.090, 0.388, 0.627, 1.000) +colorAnimationRecorded,RGBA(0.084, 0.450, 0.588, 1.000) +colorAudio,RGBA(1.000, 0.678, 0.000, 1.000) +colorAudioWaveform,RGBA(0.333, 0.388, 0.466, 1.000) +colorActivation,RGBA(0.000, 0.684, 0.148, 1.000) +colorDropTarget,RGBA(0.667, 0.788, 0.918, 1.000) +colorClipFont,RGBA(0.000, 0.000, 0.000, 0.804) +colorInvalidClipOverlay,RGBA(0.981, 0.000, 0.000, 0.502) +colorTrackBackground,RGBA(0.550, 0.550, 0.550, 0.561) +colorTrackHeaderBackground,RGBA(0.824, 0.824, 0.824, 1.000) +colorTrackDarken,RGBA(0.290, 0.290, 0.290, 0.591) +colorTrackBackgroundRecording,RGBA(0.422, 0.000, 0.000, 0.529) +colorInfiniteTrackBackgroundRecording,RGBA(0.410, 0.000, 0.000, 0.941) +colorTrackBackgroundSelected,RGBA(0.274, 0.466, 0.828, 0.459) +colorTrackFont,RGBA(0.000, 0.000, 0.000, 1.000) +colorClipUnion,RGBA(0.702, 0.741, 0.772, 0.472) +colorTopOutline3,RGBA(0.274, 0.274, 0.274, 1.000) +colorDurationLine,RGBA(0.467, 0.635, 0.925, 0.697) +colorRange,RGBA(1.000, 1.000, 1.000, 0.172) +colorSequenceBackground,RGBA(0.665, 0.665, 0.665, 1.000) +colorTooltipBackground,RGBA(0.266, 0.266, 0.266, 1.000) +colorInfiniteClipLine,RGBA(0.804, 0.804, 0.804, 1.000) +colorDefaultTrackDrawer,RGBA(0.855, 0.863, 0.871, 1.000) +colorDuration,RGBA(0.660, 0.660, 0.660, 1.000) +colorRecordingClipOutline,RGBA(1.000, 0.083, 0.083, 0.900) +colorAnimEditorBinding,RGBA(0.815, 0.815, 0.815, 1.000) +colorTimelineBackground,RGBA(0.855, 0.855, 0.855, 1.000) +colorLockTextBG,RGBA(0.341, 0.341, 0.341, 0.866) +colorInlineCurveVerticalLines,RGBA(1.000, 1.000, 1.000, 0.200) +colorInlineCurveOutOfRangeOverlay,RGBA(0.915, 0.915, 0.915, 0.569) +colorInlineCurvesBackground,RGBA(0.245, 0.245, 0.245, 0.471) +markerDrawerBackgroundColor,RGBA(0.517, 0.517, 0.517, 1.000) +markerHeaderDrawerBackgroundColor,RGBA(0.762, 0.762, 0.762, 1.000) +colorControl,RGBA(0.192, 0.693, 0.629, 1.000) +colorSubSequenceBackground,RGBA(0.695, 0.695, 0.695, 1.000) +colorTrackSubSequenceBackground,RGBA(0.280, 0.405, 0.389, 0.329) +colorTrackSubSequenceBackgroundSelected,RGBA(0.073, 0.252, 0.252, 1.000) +colorSubSequenceOverlay,RGBA(0.053, 0.118, 0.118, 0.300) +colorSubSequenceDurationLine,RGBA(0.200, 0.723, 0.654, 1.000) +clipBckg,RGBA(0.534, 0.551, 0.580, 1.000) +clipSelectedBckg,RGBA(0.690, 0.714, 0.753, 1.000) +clipBorderColor,RGBA(0.459, 0.476, 0.500, 1.000) +clipEaseBckgColor,RGBA(0.651, 0.651, 0.651, 1.000) +clipBlendIn,RGBA(0.533, 0.553, 0.580, 1.000) +clipBlendInSelected,RGBA(0.690, 0.714, 0.753, 1.000) +clipBlendOut,RGBA(0.533, 0.553, 0.580, 1.000) +clipBlendOutSelected,RGBA(0.690, 0.714, 0.753, 1.000) diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_LightSkin.txt.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_LightSkin.txt.meta new file mode 100644 index 0000000..b1927d6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/StyleSheets/res/Timeline_LightSkin.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3235ecefad2a6a645aa0222aca200aeb +timeCreated: 1471352677 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineEditor.cs new file mode 100644 index 0000000..198273f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineEditor.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + /// + /// Information currently being edited in the Timeline Editor Window. + /// + public static class TimelineEditor + { + /// + /// The PlayableDirector associated with the timeline currently being shown in the Timeline window. + /// + public static PlayableDirector inspectedDirector { get { return state == null ? null : state.editSequence.director; } } + + /// + /// The PlayableDirector responsible for the playback of the timeline currently being shown in the Timeline window. + /// + public static PlayableDirector masterDirector { get { return state == null ? null : state.masterSequence.director; } } + + /// + /// The TimelineAsset currently being shown in the Timeline window. + /// + public static TimelineAsset inspectedAsset { get { return state == null ? null : state.editSequence.asset; } } + + /// + /// The TimelineAsset at the root of the hierarchy currently being shown in the Timeline window. + /// + public static TimelineAsset masterAsset { get { return state == null ? null : state.masterSequence.asset; } } + + /// + /// The PlayableDirector currently being shown in the Timeline Editor Window. + /// + [Obsolete("playableDirector is ambiguous. Please select either inspectedDirector or masterDirector instead.", false)] + public static PlayableDirector playableDirector { get { return inspectedDirector; } } + + /// + /// The TimelineAsset currently being shown in the Timeline Editor Window. + /// + [Obsolete("timelineAsset is ambiguous. Please select either inspectedAsset or masterAsset instead.", false)] + public static TimelineAsset timelineAsset { get { return inspectedAsset; } } + + + /// + /// + /// Refreshes the different components affected by the currently inspected + /// , based on the provided. + /// + /// + /// For better performance, it is recommended that you invoke this method once, after you modify the + /// . You should also combine reasons using the | operator. + /// + /// + /// + /// Note: This operation is not synchronous. It is performed during the next GUI loop. + /// + /// The reason why a refresh should be performed. + public static void Refresh(RefreshReason reason) + { + if (state == null) + return; + + if ((reason & RefreshReason.ContentsAddedOrRemoved) != 0) + { + state.Refresh(); + } + else if ((reason & RefreshReason.ContentsModified) != 0) + { + state.rebuildGraph = true; + } + else if ((reason & RefreshReason.SceneNeedsUpdate) != 0) + { + state.Evaluate(); + } + + window.Repaint(); + } + + static TimelineWindow window { get { return TimelineWindow.instance; } } + static WindowState state { get { return window == null ? null : window.state; } } + + internal static readonly Clipboard clipboard = new Clipboard(); + + /// + /// The list of clips selected in the TimelineEditor. + /// + public static TimelineClip[] selectedClips + { + get { return Selection.GetFiltered(SelectionMode.Unfiltered).Select(e => e.clip).Where(x => x != null).ToArray(); } + set + { + if (value == null || value.Length == 0) + { + Selection.objects = null; + } + else + { + var objects = new List(); + foreach (var clip in value) + { + if (clip == null) + continue; + + var editorClip = EditorClipFactory.GetEditorClip(clip); + if (editorClip != null) + objects.Add(editorClip); + } + + Selection.objects = objects.ToArray(); + } + } + } + + /// + /// The clip selected in the TimelineEditor. + /// + /// + /// If there are multiple clips selected, this property returns the first clip. + /// + public static TimelineClip selectedClip + { + get + { + var editorClip = Selection.activeObject as EditorClip; + if (editorClip != null) + return editorClip.clip; + return null; + } + set + { + var editorClip = (value != null) ? EditorClipFactory.GetEditorClip(value) : null; + Selection.activeObject = editorClip; + } + } + } + + + /// + /// uses these flags to determine what needs to be refreshed or updated. + /// + /// + /// Use the | operator to combine flags. + /// + /// TimelineEditor.Refresh(RefreshReason.ContentsModified | RefreshReason.SceneNeedsUpdate); + /// + /// + [Flags] + public enum RefreshReason + { + /// + /// Use this flag when a change to the Timeline requires that the Timeline window be redrawn. + /// + WindowNeedsRedraw = 1 << 0, + + /// + /// Use this flag when a change to the Timeline requires that the Scene be updated. + /// + SceneNeedsUpdate = 1 << 1, + + /// + /// Use this flag when a Timeline element was modified. + /// + ContentsModified = 1 << 2, + + /// + /// Use this flag when an element was added to or removed from the Timeline. + /// + ContentsAddedOrRemoved = 1 << 3 + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineEditor.cs.meta new file mode 100644 index 0000000..eeac1a3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c072e5b741a87974385c270827879cbf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineHelpers.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineHelpers.cs new file mode 100644 index 0000000..11b86f7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineHelpers.cs @@ -0,0 +1,929 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor.MemoryProfiler; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + static class TimelineHelpers + { + static List s_SubClassesOfTrackDrawer; + + // check whether the exposed reference is explicitly named + static bool IsExposedReferenceExplicitlyNamed(string name) + { + if (string.IsNullOrEmpty(name)) + return false; + + GUID guid; + return !GUID.TryParse(name, out guid); + } + + static string GenerateExposedReferenceName() + { + return UnityEditor.GUID.Generate().ToString(); + } + + public static void CloneExposedReferences(ScriptableObject clone, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable) + { + var cloneObject = new SerializedObject(clone); + SerializedProperty prop = cloneObject.GetIterator(); + while (prop.Next(true)) + { + if (prop.propertyType == SerializedPropertyType.ExposedReference) + { + var exposedNameProp = prop.FindPropertyRelative("exposedName"); + var sourceKey = exposedNameProp.stringValue; + var destKey = sourceKey; + + if (!IsExposedReferenceExplicitlyNamed(sourceKey)) + destKey = GenerateExposedReferenceName(); + + exposedNameProp.stringValue = destKey; + + var requiresCopy = sourceTable != destTable || sourceKey != destKey; + if (requiresCopy && sourceTable != null && destTable != null) + { + var valid = false; + var target = sourceTable.GetReferenceValue(sourceKey, out valid); + if (valid && target != null) + { + var existing = destTable.GetReferenceValue(destKey, out valid); + if (!valid || existing != target) + { + var destTableObj = destTable as UnityEngine.Object; + if (destTableObj != null) + TimelineUndo.PushUndo(destTableObj, "Create Clip"); + destTable.SetReferenceValue(destKey, target); + } + } + } + } + } + cloneObject.ApplyModifiedPropertiesWithoutUndo(); + } + + public static ScriptableObject CloneReferencedPlayableAsset(ScriptableObject original, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, Object newOwner) + { + var clone = Object.Instantiate(original); + SaveCloneToAsset(clone, newOwner); + if (clone == null || (clone as IPlayableAsset) == null) + { + throw new InvalidCastException("could not cast instantiated object into IPlayableAsset"); + } + CloneExposedReferences(clone, sourceTable, destTable); + TimelineUndo.RegisterCreatedObjectUndo(clone, "Create clip"); + + return clone; + } + + static void SaveCloneToAsset(Object clone, Object newOwner) + { + if (newOwner == null) + return; + + var containerPath = AssetDatabase.GetAssetPath(newOwner); + var containerAsset = AssetDatabase.LoadAssetAtPath(containerPath); + if (containerAsset != null) + { + TimelineCreateUtilities.SaveAssetIntoObject(clone, containerAsset); + EditorUtility.SetDirty(containerAsset); + } + } + + static AnimationClip CloneAnimationClip(AnimationClip clip, Object owner) + { + if (clip == null) + return null; + + var newClip = Object.Instantiate(clip); + newClip.name = AnimationTrackRecorder.GetUniqueRecordedClipName(owner, clip.name); + + SaveAnimClipIntoObject(newClip, owner); + TimelineUndo.RegisterCreatedObjectUndo(newClip, "Create clip"); + + return newClip; + } + + public static TimelineClip Clone(TimelineClip clip, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, double time, PlayableAsset newOwner = null) + { + if (newOwner == null) + newOwner = clip.parentTrack; + + TimelineClip newClip = DuplicateClip(clip, sourceTable, destTable, newOwner); + newClip.start = time; + var track = newClip.parentTrack; + track.SortClips(); + TrackExtensions.ComputeBlendsFromOverlaps(track.clips); + return newClip; + } + + // Creates a complete clone of a track and returns it. + // Does not parent, or add the track to the sequence + public static TrackAsset Clone(PlayableAsset parent, TrackAsset trackAsset, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, PlayableAsset assetOwner = null) + { + if (trackAsset == null) + return null; + + var timelineAsset = trackAsset.timelineAsset; + if (timelineAsset == null) + return null; + + if (assetOwner == null) + assetOwner = parent; + + // create a duplicate, then clear the clips and subtracks + var newTrack = Object.Instantiate(trackAsset); + newTrack.name = trackAsset.name; + newTrack.ClearClipsInternal(); + newTrack.parent = parent; + newTrack.ClearSubTracksInternal(); + + if (trackAsset.hasCurves) + newTrack.curves = CloneAnimationClip(trackAsset.curves, assetOwner); + + var animTrack = trackAsset as AnimationTrack; + if (animTrack != null && animTrack.infiniteClip != null) + ((AnimationTrack)newTrack).infiniteClip = CloneAnimationClip(animTrack.infiniteClip, assetOwner); + + foreach (var clip in trackAsset.clips) + { + var newClip = DuplicateClip(clip, sourceTable, destTable, assetOwner); + newClip.parentTrack = newTrack; + } + + newTrack.ClearMarkers(); + foreach (var e in trackAsset.GetMarkersRaw()) + { + var newMarker = Object.Instantiate(e); + newTrack.AddMarker(newMarker); + SaveCloneToAsset(newMarker, assetOwner); + if (newMarker is IMarker) + { + (newMarker as IMarker).Initialize(newTrack); + } + } + + newTrack.SetCollapsed(trackAsset.GetCollapsed()); + + // calling code is responsible for adding to asset, adding to sequence, and parenting, + // and duplicating subtracks + return newTrack; + } + + public static IEnumerable DuplicateItemsUsingCurrentEditMode(WindowState state, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, ItemsPerTrack items, TrackAsset targetParent, double candidateTime, string undoOperation) + { + if (targetParent != null) + { + var aTrack = targetParent as AnimationTrack; + if (aTrack != null) + aTrack.ConvertToClipMode(); + + var duplicatedItems = DuplicateItems(items, targetParent, sourceTable, destTable, undoOperation); + FinalizeInsertItemsUsingCurrentEditMode(state, new[] {duplicatedItems}, candidateTime); + return duplicatedItems.items; + } + + return Enumerable.Empty(); + } + + public static IEnumerable DuplicateItemsUsingCurrentEditMode(WindowState state, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, IEnumerable items, double candidateTime, string undoOperation) + { + var duplicatedItemsGroups = new List(); + foreach (var i in items) + duplicatedItemsGroups.Add(DuplicateItems(i, i.targetTrack, sourceTable, destTable, undoOperation)); + + FinalizeInsertItemsUsingCurrentEditMode(state, duplicatedItemsGroups, candidateTime); + return duplicatedItemsGroups.SelectMany(i => i.items); + } + + internal static ItemsPerTrack DuplicateItems(ItemsPerTrack items, TrackAsset target, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, string undoOperation) + { + var duplicatedItems = new List(); + var clips = items.clips.ToList(); + if (clips.Any()) + { + TimelineUndo.PushUndo(target, undoOperation); + duplicatedItems.AddRange(DuplicateClips(clips, sourceTable, destTable, target).ToItems()); + TimelineUndo.PushUndo(target, undoOperation); // second undo causes reference fixups on redo (case 1063868) + } + + var markers = items.markers.ToList(); + if (markers.Any()) + { + duplicatedItems.AddRange(MarkerModifier.CloneMarkersToParent(markers, target).ToItems()); + } + + return new ItemsPerTrack(target, duplicatedItems.ToArray()); + } + + static void FinalizeInsertItemsUsingCurrentEditMode(WindowState state, IList itemsGroups, double candidateTime) + { + EditMode.FinalizeInsertItemsAtTime(itemsGroups, candidateTime); + + SelectionManager.Clear(); + foreach (var itemsGroup in itemsGroups) + { + var track = itemsGroup.targetTrack; + var items = itemsGroup.items; + + EditModeUtils.SetParentTrack(items, track); + + track.SortClips(); + + TrackExtensions.ComputeBlendsFromOverlaps(track.clips); + track.CalculateExtrapolationTimes(); + + foreach (var item in items) + if (item.gui != null) item.gui.Select(); + } + + var allItems = itemsGroups.SelectMany(x => x.items).ToList(); + foreach (var item in allItems) + { + SelectionManager.Add(item); + } + + FrameItems(state, allItems); + } + + internal static TimelineClip Clone(TimelineClip clip, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, PlayableAsset newOwner) + { + var editorClip = EditorClipFactory.GetEditorClip(clip); + // Workaround for Clips not being unity object, assign it to a editor clip wrapper, clone it, and pull the clip back out + var newClip = Object.Instantiate(editorClip).clip; + + // perform fix ups for what Instantiate cannot properly detect + SelectionManager.Remove(newClip); + newClip.parentTrack = null; + newClip.curves = null; // instantiate might copy the reference, we need to clear it + + // curves are explicitly owned by the clip + if (clip.curves != null) + { + newClip.CreateCurves(AnimationTrackRecorder.GetUniqueRecordedClipName(newOwner, clip.curves.name)); + EditorUtility.CopySerialized(clip.curves, newClip.curves); + TimelineCreateUtilities.SaveAssetIntoObject(newClip.curves, newOwner); + } + + ScriptableObject playableAsset = newClip.asset as ScriptableObject; + if (playableAsset != null && newClip.asset is IPlayableAsset) + { + var clone = CloneReferencedPlayableAsset(playableAsset, sourceTable, destTable, newOwner); + newClip.asset = clone; + + // special case to make the name match the recordable clips, but only if they match on the original clip + var originalRecordedAsset = clip.asset as AnimationPlayableAsset; + if (clip.recordable && originalRecordedAsset != null && originalRecordedAsset.clip != null) + { + AnimationPlayableAsset clonedAnimationAsset = clone as AnimationPlayableAsset; + if (clonedAnimationAsset != null && clonedAnimationAsset.clip != null) + { + clonedAnimationAsset.clip = CloneAnimationClip(originalRecordedAsset.clip, newOwner); + if (clip.displayName == originalRecordedAsset.clip.name && newClip.recordable) + { + clonedAnimationAsset.name = clonedAnimationAsset.clip.name; + newClip.displayName = clonedAnimationAsset.name; + } + } + } + } + + return newClip; + } + + static TimelineClip[] DuplicateClips(IEnumerable clips, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, PlayableAsset newOwner) + { + var newClips = new TimelineClip[clips.Count()]; + + int i = 0; + + foreach (var clip in clips) + { + var newParent = newOwner == null ? clip.parentTrack : newOwner; + var newClip = DuplicateClip(clip, sourceTable, destTable, newParent); + newClip.parentTrack = null; + newClips[i++] = newClip; + } + + return newClips; + } + + static TimelineClip DuplicateClip(TimelineClip clip, IExposedPropertyTable sourceTable, IExposedPropertyTable destTable, PlayableAsset newOwner) + { + var newClip = Clone(clip, sourceTable, destTable, newOwner); + + var track = clip.parentTrack; + if (track != null) + { + newClip.parentTrack = track; + track.AddClip(newClip); + } + + var editor = CustomTimelineEditorCache.GetClipEditor(clip); + try + { + editor.OnCreate(newClip, track, clip); + } + catch (Exception e) + { + Debug.LogException(e); + } + + return newClip; + } + + // Given a track type, return all the playable asset types that should be + // visible to the user via menus + + // Given a track type, return all the playable asset types + + + public static Type GetCustomDrawer(Type trackType) + { + if (s_SubClassesOfTrackDrawer == null) + { + s_SubClassesOfTrackDrawer = TypeCache.GetTypesDerivedFrom().ToList(); + } + + foreach (var drawer in s_SubClassesOfTrackDrawer) + { + var attr = Attribute.GetCustomAttribute(drawer, typeof(CustomTrackDrawerAttribute), false) as CustomTrackDrawerAttribute; + if (attr != null && attr.assetType.IsAssignableFrom(trackType)) + return drawer; + } + + return typeof(TrackDrawer); + } + + public static bool HaveSameContainerAsset(Object assetA, Object assetB) + { + if (assetA == null || assetB == null) + return false; + + if ((assetA.hideFlags & HideFlags.DontSave) != 0 && (assetB.hideFlags & HideFlags.DontSave) != 0) + return true; + + return AssetDatabase.GetAssetPath(assetA) == AssetDatabase.GetAssetPath(assetB); + } + + public static void SaveAnimClipIntoObject(AnimationClip clip, Object asset) + { + if (asset != null) + { + clip.hideFlags = asset.hideFlags & ~HideFlags.HideInHierarchy; // show animation clips, even if the parent track isn't + if ((clip.hideFlags & HideFlags.DontSave) == 0) + { + AssetDatabase.AddObjectToAsset(clip, asset); + } + } + } + + // Make sure a gameobject has all the required component for the given TrackAsset + public static Component AddRequiredComponent(GameObject go, TrackAsset asset) + { + if (go == null || asset == null) + return null; + + var bindings = asset.outputs; + if (!bindings.Any()) + return null; + + var binding = bindings.First(); + if (binding.outputTargetType == null || !typeof(Component).IsAssignableFrom(binding.outputTargetType)) + return null; + + var component = go.GetComponent(binding.outputTargetType); + if (component == null) + { + component = Undo.AddComponent(go, binding.outputTargetType); + } + return component; + } + + public static string GetTrackCategoryName(System.Type trackType) + { + if (trackType == null) + return string.Empty; + + string s = GetItemCategoryName(trackType); + if (!String.IsNullOrEmpty(s)) + return s; + + if (trackType.Namespace == null || trackType.Namespace.Contains("UnityEngine")) + return string.Empty; + + return trackType.Namespace + "/"; + } + + public static string GetItemCategoryName(System.Type itemType) + { + if (itemType == null) + return string.Empty; + + var attribute = itemType.GetCustomAttribute(typeof(MenuCategoryAttribute)) as MenuCategoryAttribute; + if (attribute != null) + { + var s = attribute.category; + if (!s.EndsWith("/")) + s += "/"; + return s; + } + + return string.Empty; + } + + public static string GetTrackMenuName(System.Type trackType) + { + return ObjectNames.NicifyVariableName(trackType.Name); + } + + // retrieve the duration of a single loop, taking into account speed + public static double GetLoopDuration(TimelineClip clip) + { + double length = clip.clipAssetDuration; + if (double.IsNegativeInfinity(length) || double.IsNaN(length)) + return TimelineClip.kMinDuration; + + if (length == double.MaxValue || double.IsInfinity(length)) + { + return double.MaxValue; + } + + return Math.Max(TimelineClip.kMinDuration, length / clip.timeScale); + } + + public static double GetClipAssetEndTime(TimelineClip clip) + { + var d = GetLoopDuration(clip); + if (d < double.MaxValue) + d = clip.FromLocalTimeUnbound(d); + + return d; + } + + // Checks if the underlying asset duration is usable. This means the clip + // can loop or hold + public static bool HasUsableAssetDuration(TimelineClip clip) + { + double length = clip.clipAssetDuration; + return (length < TimelineClip.kMaxTimeValue) && !double.IsInfinity(length) && !double.IsNaN(length); + } + + // Retrieves the starting point of each loop of a clip, relative to the start of the clip + // Note that if clip-in is bigger than the loopDuration, negative times will be added + public static double[] GetLoopTimes(TimelineClip clip) + { + if (!HasUsableAssetDuration(clip)) + return new[] {-clip.clipIn / clip.timeScale}; + + var times = new List(); + double loopDuration = GetLoopDuration(clip); + + if (loopDuration <= TimeUtility.kTimeEpsilon) + return new double[] {}; + + + double start = -clip.clipIn / clip.timeScale; + double end = start + loopDuration; + + times.Add(start); + while (end < clip.duration - WindowState.kTimeEpsilon) + { + times.Add(end); + end += loopDuration; + } + + return times.ToArray(); + } + + public static double GetCandidateTime(WindowState state, Vector2? mousePosition, params TrackAsset[] trackAssets) + { + // Right-Click + if (mousePosition != null) + return state.GetSnappedTimeAtMousePosition(mousePosition.Value); + + // Playhead + if (state != null && state.editSequence.director != null) + return state.SnapToFrameIfRequired(state.editSequence.time); + + // Specific tracks end + if (trackAssets != null && trackAssets.Any()) + { + var items = trackAssets.SelectMany(t => t.GetItems()).ToList(); + return items.Any() ? items.Max(i => i.end) : 0; + } + + // Timeline tracks end + if (state != null && state.editSequence.asset != null) + return state.editSequence.asset.flattenedTracks.Any() ? state.editSequence.asset.flattenedTracks.Max(t => t.end) : 0; + + return 0.0; + } + + public static TimelineClip CreateClipOnTrack(Object asset, TrackAsset parentTrack, WindowState state) + { + return CreateClipOnTrack(asset, parentTrack, GetCandidateTime(state, null, parentTrack), state); + } + + public static TimelineClip CreateClipOnTrack(Object asset, TrackAsset parentTrack, double candidateTime) + { + WindowState state = null; + if (TimelineWindow.instance != null) + state = TimelineWindow.instance.state; + + return CreateClipOnTrack(asset, parentTrack, candidateTime, state); + } + + public static TimelineClip CreateClipOnTrack(Type playableAssetType, TrackAsset parentTrack, WindowState state) + { + return CreateClipOnTrack(playableAssetType, null, parentTrack, GetCandidateTime(state, null, parentTrack), state); + } + + public static TimelineClip CreateClipOnTrack(Type playableAssetType, TrackAsset parentTrack, double candidateTime) + { + return CreateClipOnTrack(playableAssetType, null, parentTrack, candidateTime); + } + + public static TimelineClip CreateClipOnTrack(Object asset, TrackAsset parentTrack, double candidateTime, WindowState state) + { + if (parentTrack == null) + return null; + + // pick the first clip type available, unless there is one that matches the asset + var clipType = TypeUtility.GetPlayableAssetsHandledByTrack(parentTrack.GetType()).FirstOrDefault(); + if (asset != null) + clipType = TypeUtility.GetAssetTypesForObject(parentTrack.GetType(), asset).FirstOrDefault(); + + if (clipType == null) + return null; + + return CreateClipOnTrack(clipType, asset, parentTrack, candidateTime, state); + } + + public static TimelineClip CreateClipOnTrack(Type playableAssetType, Object assignableObject, TrackAsset parentTrack, double candidateTime) + { + WindowState state = null; + if (TimelineWindow.instance != null) + state = TimelineWindow.instance.state; + + return CreateClipOnTrack(playableAssetType, assignableObject, parentTrack, candidateTime, state); + } + + public static TimelineClip CreateClipOnTrack(Type playableAssetType, Object assignableObject, TrackAsset parentTrack, double candidateTime, WindowState state) + { + if (parentTrack == null) + return null; + + bool revertClipMode = false; + + // Ideally this is done automatically by the animation track, + // but it's editor only because it does animation clip manipulation + var animTrack = parentTrack as AnimationTrack; + if (animTrack != null && animTrack.CanConvertToClipMode()) + { + animTrack.ConvertToClipMode(); + revertClipMode = true; + } + + TimelineClip newClip = null; + if (TypeUtility.IsConcretePlayableAsset(playableAssetType)) + { + try + { + newClip = parentTrack.CreateClipOfType(playableAssetType); + } + catch (InvalidOperationException) {} // expected on a mismatch + } + + if (newClip == null) + { + if (revertClipMode) + animTrack.ConvertFromClipMode(animTrack.timelineAsset); + + Debug.LogWarningFormat("Cannot create a clip of type {0} on a track of type {1}", playableAssetType.Name, parentTrack.GetType().Name); + return null; + } + + AddClipOnTrack(newClip, parentTrack, candidateTime, assignableObject, state); + + return newClip; + } + + /// + /// Create a clip on track from an existing PlayableAsset + /// + public static TimelineClip CreateClipOnTrackFromPlayableAsset(IPlayableAsset asset, TrackAsset parentTrack, double candidateTime) + { + if (parentTrack == null || asset == null || !TypeUtility.IsConcretePlayableAsset(asset.GetType())) + return null; + + TimelineClip newClip = null; + try + { + newClip = parentTrack.CreateClipFromPlayableAsset(asset); + } + catch + { + return null; + } + + WindowState state = null; + if (TimelineWindow.instance != null) + state = TimelineWindow.instance.state; + + AddClipOnTrack(newClip, parentTrack, candidateTime, null, state); + + return newClip; + } + + public static void CreateClipsFromObjects(Type assetType, TrackAsset targetTrack, double candidateTime, IEnumerable objects) + { + foreach (var obj in objects) + { + if (ObjectReferenceField.FindObjectReferences(assetType).Any(f => f.IsAssignable(obj))) + { + var clip = CreateClipOnTrack(assetType, obj, targetTrack, candidateTime); + candidateTime += clip.duration; + } + } + } + + public static void CreateMarkersFromObjects(Type assetType, TrackAsset targetTrack, double candidateTime, IEnumerable objects) + { + var mList = new List(); + foreach (var obj in objects) + { + if (ObjectReferenceField.FindObjectReferences(assetType).Any(f => f.IsAssignable(obj))) + { + var marker = CreateMarkerOnTrack(assetType, obj, targetTrack, candidateTime); + mList.Add(marker.ToItem()); + } + } + + var state = TimelineWindow.instance.state; + for (var i = 1; i < mList.Count; ++i) + { + var delta = ItemsUtils.TimeGapBetweenItems(mList[i - 1], mList[i], state); + mList[i].start += delta; + } + + FinalizeInsertItemsUsingCurrentEditMode(state, new[] {new ItemsPerTrack(targetTrack, mList)}, candidateTime); + state.Refresh(); + } + + public static IMarker CreateMarkerOnTrack(Type markerType, Object assignableObject, TrackAsset parentTrack, double candidateTime) + { + WindowState state = null; + if (TimelineWindow.instance != null) + state = TimelineWindow.instance.state; + + var newMarker = parentTrack.CreateMarker(markerType, candidateTime); //Throws if marker is not an object + var obj = newMarker as ScriptableObject; + if (obj != null) + obj.name = TypeUtility.GetDisplayName(markerType); + + if (assignableObject != null) + { + var director = state != null ? state.editSequence.director : null; + foreach (var field in ObjectReferenceField.FindObjectReferences(markerType)) + { + if (field.IsAssignable(assignableObject)) + { + field.Assign(newMarker as ScriptableObject, assignableObject, director); + break; + } + } + } + + try + { + CustomTimelineEditorCache.GetMarkerEditor(newMarker).OnCreate(newMarker, null); + } + catch (Exception e) + { + Debug.LogException(e); + } + + return newMarker; + } + + public static void CreateClipsFromTypes(IEnumerable assetTypes, TrackAsset targetTrack, double candidateTime) + { + foreach (var assetType in assetTypes) + { + var clip = CreateClipOnTrack(assetType, targetTrack, candidateTime); + candidateTime += clip.duration; + } + } + + public static void FrameItems(WindowState state, IEnumerable items) + { + if (items == null || !items.Any() || state == null) + return; + + // if this is called before a repaint, the timeArea can be null + var window = state.editorWindow as TimelineWindow; + if (window == null || window.timeArea == null) + return; + + var start = (float)items.Min(x => x.start); + var end = (float)items.Max(x => x.end); + var timeRange = state.timeAreaShownRange; + + // nothing to do + if (timeRange.x <= start && timeRange.y >= end) + return; + + var ds = start - timeRange.x; + var de = end - timeRange.y; + + var padding = state.PixelDeltaToDeltaTime(15); + var d = Math.Abs(ds) < Math.Abs(de) ? ds - padding : de + padding; + + state.SetTimeAreaShownRange(timeRange.x + d, timeRange.y + d); + } + + public static void Frame(WindowState state, double start, double end) + { + var timeRange = state.timeAreaShownRange; + + // nothing to do + if (timeRange.x <= start && timeRange.y >= end) + return; + + var ds = (float)start - timeRange.x; + var de = (float)end - timeRange.y; + + var padding = state.PixelDeltaToDeltaTime(15); + var d = Math.Abs(ds) < Math.Abs(de) ? ds - padding : de + padding; + + state.SetTimeAreaShownRange(timeRange.x + d, timeRange.y + d); + } + + public static void RangeSelect(IList totalCollection, IList currentSelection, T clickedItem, Action selector, Action remover) where T : class + { + var firstSelect = currentSelection.FirstOrDefault(); + if (firstSelect == null) + { + selector(clickedItem); + return; + } + + var idxFirstSelect = totalCollection.IndexOf(firstSelect); + var idxLastSelect = totalCollection.IndexOf(currentSelection.Last()); + var idxClicked = totalCollection.IndexOf(clickedItem); + + //case 927807: selection is invalid + if (idxFirstSelect < 0) + { + SelectionManager.Clear(); + selector(clickedItem); + return; + } + + // Expand the selection between the first selected clip and clicked clip (insertion order is important) + if (idxFirstSelect < idxClicked) + for (var i = idxFirstSelect; i <= idxClicked; ++i) + selector(totalCollection[i]); + else + for (var i = idxFirstSelect; i >= idxClicked; --i) + selector(totalCollection[i]); + + // If clicked inside the selected range, shrink the selection between the the click and last selected clip + if (Math.Min(idxFirstSelect, idxLastSelect) < idxClicked && idxClicked < Math.Max(idxFirstSelect, idxLastSelect)) + for (var i = Math.Min(idxLastSelect, idxClicked); i <= Math.Max(idxLastSelect, idxClicked); ++i) + remover(totalCollection[i]); + + // Ensure clicked clip is selected + selector(clickedItem); + } + + public static void Bind(TrackAsset track, Object obj, PlayableDirector director) + { + if (director != null && track != null) + { + var bindType = TypeUtility.GetTrackBindingAttribute(track.GetType()); + if (bindType == null || bindType.type == null) + return; + + if (obj == null || bindType.type.IsInstanceOfType(obj)) + { + TimelineUndo.PushUndo(director, "Bind Track"); + director.SetGenericBinding(track, obj); + } + else if (obj is GameObject && typeof(Component).IsAssignableFrom(bindType.type)) + { + var component = (obj as GameObject).GetComponent(bindType.type); + if (component == null) + component = Undo.AddComponent(obj as GameObject, bindType.type); + + TimelineUndo.PushUndo(director, "Bind Track"); + director.SetGenericBinding(track, component); + } + } + } + + /// + /// Shared code for adding a clip to a track + /// + static void AddClipOnTrack(TimelineClip newClip, TrackAsset parentTrack, double candidateTime, Object assignableObject, WindowState state) + { + var playableAsset = newClip.asset as IPlayableAsset; + + newClip.parentTrack = null; + newClip.timeScale = 1.0; + newClip.mixInCurve = AnimationCurve.EaseInOut(0, 0, 1, 1); + newClip.mixOutCurve = AnimationCurve.EaseInOut(0, 1, 1, 0); + + var playableDirector = state != null ? state.editSequence.director : null; + + if (assignableObject != null) + { + foreach (var field in ObjectReferenceField.FindObjectReferences(playableAsset.GetType())) + { + if (field.IsAssignable(assignableObject)) + { + newClip.displayName = assignableObject.name; + field.Assign(newClip.asset as PlayableAsset, assignableObject, playableDirector); + break; + } + } + } + + // get the clip editor + try + { + CustomTimelineEditorCache.GetClipEditor(newClip).OnCreate(newClip, parentTrack, null); + } + catch (Exception e) + { + Debug.LogException(e); + } + + + // reset the duration as the newly assigned values may have changed the default + if (playableAsset != null) + { + var candidateDuration = playableAsset.duration; + + if (!double.IsInfinity(candidateDuration) && candidateDuration > 0) + newClip.duration = Math.Min(Math.Max(candidateDuration, TimelineClip.kMinDuration), TimelineClip.kMaxTimeValue); + } + + var newClipsByTracks = new[] { new ItemsPerTrack(parentTrack, new[] {newClip.ToItem()}) }; + + FinalizeInsertItemsUsingCurrentEditMode(state, newClipsByTracks, candidateTime); + + if (state != null) + state.Refresh(); + } + + public static TrackAsset CreateTrack(TimelineAsset asset, Type type, TrackAsset parent = null, string name = null) + { + if (asset == null) + return null; + + var track = asset.CreateTrack(type, parent, name); + if (track != null) + { + if (parent != null) + parent.SetCollapsed(false); + + var editor = CustomTimelineEditorCache.GetTrackEditor(track); + try + { + editor.OnCreate(track, null); + } + catch (Exception e) + { + Debug.LogException(e); + } + TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved); + } + + return track; + } + + public static TrackAsset CreateTrack(Type type, TrackAsset parent = null, string name = null) + { + return CreateTrack(TimelineEditor.inspectedAsset, type, parent, name); + } + + public static T CreateTrack(TimelineAsset asset, TrackAsset parent = null, string name = null) where T : TrackAsset + { + return (T)CreateTrack(asset, typeof(T), parent, name); + } + + public static T CreateTrack(TrackAsset parent = null, string name = null) where T : TrackAsset + { + return (T)CreateTrack(TimelineEditor.inspectedAsset, typeof(T), parent, name); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineHelpers.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineHelpers.cs.meta new file mode 100644 index 0000000..cd30309 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineHelpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5a7f0d89a47f18c41b6ddf60dfae1bde +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineSelection.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineSelection.cs new file mode 100644 index 0000000..2efe58d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineSelection.cs @@ -0,0 +1,331 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class SelectionManager + { + static IClipCurveEditorOwner currentInlineEditorCurve; + + public static void AddObject(Object obj) + { + if (obj == null) + return; + + currentInlineEditorCurve = null; + if (Selection.Contains(obj)) + return; + + Selection.Add(obj); + } + + public static void Add(TrackAsset obj) + { + // this can indicate a deleted track (Unity 'null') + if (obj == null) + return; + + currentInlineEditorCurve = null; + if (!Selection.Contains(obj)) + { + WindowState state = null; + if (TimelineWindow.instance != null) + state = TimelineWindow.instance.state; + + if (!Selection.instanceIDs.Any() && state != null && state.editSequence.director != null) + Selection.SetActiveObjectWithContext(obj, TimelineWindow.instance.state.editSequence.director); + else + Selection.Add(obj); + } + } + + public static void Add(TimelineClip item) + { + AddObject(EditorClipFactory.GetEditorClip(item)); + } + + public static void Add(IMarker marker) + { + var markerAsObject = marker as Object; + if (markerAsObject != null) + { + if (!Selection.Contains(markerAsObject)) + { + currentInlineEditorCurve = null; + WindowState state = null; + if (TimelineWindow.instance != null) + state = TimelineWindow.instance.state; + + if (!Selection.instanceIDs.Any() && state != null && state.editSequence.director != null) + Selection.SetActiveObjectWithContext(markerAsObject, TimelineWindow.instance.state.editSequence.director); + else + Selection.Add(markerAsObject); + } + } + } + + public static void Add(ITimelineItem item) + { + var clipItem = item as ClipItem; + if (clipItem != null) + { + Add(clipItem.clip); + } + else + { + var markerItem = item as MarkerItem; + if (markerItem != null) + { + Add(markerItem.marker); + } + } + } + + public static void SelectOnly(TrackAsset track) + { + RemoveTimelineSelection(); + Add(track); + } + + public static void SelectOnly(TimelineClip clip) + { + RemoveTimelineSelection(); + Add(clip); + } + + public static void SelectOnly(IMarker item) + { + RemoveTimelineSelection(); + Add(item); + } + + public static void SelectOnly(ITimelineItem item) + { + var clipItem = item as ClipItem; + if (clipItem != null) + { + SelectOnly(clipItem.clip); + } + else + { + var markerItem = item as MarkerItem; + if (markerItem != null) + { + SelectOnly(markerItem.marker); + } + } + } + + public static void SelectInlineCurveEditor(IClipCurveEditorOwner selection) + { + // case 1030681 - selecting an inline curve should remove clips and + // tracks to prevent shortcuts being forwarded incorrectly + if (selection != null && selection != currentInlineEditorCurve) + { + var track = selection.owner; + var selectedTracks = SelectedTracks().ToArray(); + var selectedClips = SelectedClips().ToArray(); + + foreach (var t in selectedTracks) + { + if (t != track) + Remove(t); + } + + foreach (var c in selectedClips) + { + if (c.parentTrack != track) + Remove(c); + } + } + + + currentInlineEditorCurve = selection; + } + + public static IClipCurveEditorOwner GetCurrentInlineEditorCurve() + { + return currentInlineEditorCurve; + } + + public static bool IsCurveEditorFocused(IClipCurveEditorOwner selection) + { + return selection == currentInlineEditorCurve; + } + + public static bool Contains(TrackAsset item) + { + if (item == null) + return false; + + return Selection.Contains(item); + } + + public static bool Contains(TimelineClip item) + { + if (item == null) + return false; + return Selection.Contains(EditorClipFactory.GetEditorClip(item)); + } + + public static bool Contains(Object obj) + { + return Selection.Contains(obj); + } + + public static bool Contains(IMarker marker) + { + var markerAsObject = marker as Object; + return Selection.Contains(markerAsObject); + } + + public static bool Contains(ITimelineItem item) + { + var clipItem = item as ClipItem; + if (clipItem != null) + { + return Contains(clipItem.clip); + } + + var markerItem = item as MarkerItem; + return markerItem != null && Contains(markerItem.marker); + } + + public static void Clear() + { + currentInlineEditorCurve = null; + Selection.activeObject = null; + } + + public static void UnSelectTracks() + { + var newSelection = Selection.objects.Where(x => !(x is TrackAsset)); + Selection.objects = newSelection.ToArray(); + } + + public static void Remove(TimelineClip item) + { + Remove(EditorClipFactory.GetEditorClip(item)); + } + + public static void Remove(IMarker marker) + { + var o = marker as Object; + if (o != null) + { + Remove(o); + } + } + + static void Remove(Object item) + { + Selection.Remove(item); + } + + public static void Remove(TrackAsset item) + { + Selection.Remove(item); + } + + public static void Remove(ITimelineItem item) + { + var clipItem = item as ClipItem; + if (clipItem != null) + { + Remove(clipItem.clip); + } + else + { + var markerItem = item as MarkerItem; + if (markerItem != null) + { + Remove(markerItem.marker); + } + } + } + + public static void RemoveTimelineSelection() + { + Selection.objects = Selection.objects.Where(s => !IsTimelineType(s)).ToArray(); + } + + public static void RemoveAllClips() + { + Selection.objects = Selection.objects.Where(s => !(s is EditorClip)).ToArray(); + } + + public static int Count() + { + return Selection.objects.Count(IsTimelineType); + } + + public static IEnumerable SelectedClipGUI() + { + foreach (var clip in SelectedClips()) + { + var gui = ItemToItemGui.GetGuiForClip(clip); + if (gui != null) + yield return gui; + } + } + + public static IEnumerable SelectedClips() + { + return Selection.objects.OfType().Select(x => x.clip); + } + + public static IEnumerable SelectedMarkers() + { + return Selection.objects.OfType(); + } + + public static IEnumerable SelectedTracks() + { + return Selection.objects.OfType(); + } + + public static IEnumerable SelectedItemOfType() + { + if (typeof(T) == typeof(TimelineClip)) + return SelectedClips().Cast(); + if (typeof(T).IsAssignableFrom(typeof(IMarker))) + return SelectedMarkers().Cast(); + return Enumerable.Empty(); + } + + public static IEnumerable SelectedTrackGUI() + { + var tracks = SelectedTracks(); + return TimelineWindow.instance.allTracks.Where(x => tracks.Contains(x.track)); + } + + static bool IsTimelineType(Object o) + { + return o is TrackAsset || o is EditorClip || o is IMarker; + } + + public static IEnumerable SelectedItems() + { + var list = new List(); + foreach (var obj in Selection.objects) + { + var editorClip = obj as EditorClip; + if (editorClip != null) + { + list.Add(new ClipItem(editorClip.clip)); + continue; + } + + var marker = obj as IMarker; + if (marker != null) + { + list.Add(new MarkerItem(marker)); + } + } + + return list; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineSelection.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineSelection.cs.meta new file mode 100644 index 0000000..2a42098 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineSelection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 65b045927b3948f43afb31234936c6aa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineUtility.cs new file mode 100644 index 0000000..5dc90f7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineUtility.cs @@ -0,0 +1,315 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; +using Object = UnityEngine.Object; +using UnityEditor.Experimental.SceneManagement; + +namespace UnityEditor.Timeline +{ + static class TimelineUtility + { + public static void ReorderTracks(List allTracks, List tracks, ScriptableObject insertAfterAsset, bool up) + { + foreach (var i in tracks) + allTracks.Remove(i); + + int index = allTracks.IndexOf(insertAfterAsset); + + index = up ? Math.Max(index, 0) : index + 1; + + allTracks.InsertRange(index, tracks.OfType()); + } + + // Gets the track that holds the game object reference for this track. + public static TrackAsset GetSceneReferenceTrack(TrackAsset asset) + { + if (asset == null) + return null; + if (asset.isSubTrack) + return GetSceneReferenceTrack(asset.parent as TrackAsset); + return asset; + } + + public static bool TrackHasAnimationCurves(TrackAsset track) + { + if (track.hasCurves) + return true; + + var animTrack = track as AnimationTrack; + if (animTrack != null && animTrack.infiniteClip != null) + return true; + + for (int i = 0; i < track.clips.Length; i++) + { + var curveClip = track.clips[i].curves; + var animationClip = track.clips[i].animationClip; + + // prune out clip with zero curves + if (curveClip != null && curveClip.empty) + curveClip = null; + + if (animationClip != null && animationClip.empty) + animationClip = null; + + // prune out clips coming from FBX + if (animationClip != null && ((animationClip.hideFlags & HideFlags.NotEditable) != 0)) + animationClip = null; + + if (!track.clips[i].recordable) + animationClip = null; + + if ((curveClip != null) || (animationClip != null)) + return true; + } + + return false; + } + + // get the game object reference associated with this + public static GameObject GetSceneGameObject(PlayableDirector director, TrackAsset asset) + { + if (director == null || asset == null) + return null; + + asset = GetSceneReferenceTrack(asset); + + var gameObject = director.GetGenericBinding(asset) as GameObject; + var component = director.GetGenericBinding(asset) as Component; + if (component != null) + gameObject = component.gameObject; + return gameObject; + } + + public static void SetSceneGameObject(PlayableDirector director, TrackAsset asset, GameObject go) + { + if (director == null || asset == null) + return; + + asset = GetSceneReferenceTrack(asset); + var bindings = asset.outputs; + if (bindings.Count() == 0) + return; + + var binding = bindings.First(); + if (binding.outputTargetType == typeof(GameObject)) + { + BindingUtility.Bind(director, asset, go); + } + else + { + BindingUtility.Bind(director, asset, TimelineHelpers.AddRequiredComponent(go, asset)); + } + } + + public static PlayableDirector[] GetDirectorsInSceneUsingAsset(PlayableAsset asset) + { + const HideFlags hideFlags = + HideFlags.HideInHierarchy | HideFlags.HideInInspector | + HideFlags.DontSaveInEditor | HideFlags.NotEditable; + + var prefabMode = PrefabStageUtility.GetCurrentPrefabStage(); + + var inScene = new List(); + var allDirectors = Resources.FindObjectsOfTypeAll(typeof(PlayableDirector)) as PlayableDirector[]; + foreach (var director in allDirectors) + { + if ((director.hideFlags & hideFlags) != 0) + continue; + + string assetPath = AssetDatabase.GetAssetPath(director.transform.root.gameObject); + if (!String.IsNullOrEmpty(assetPath)) + continue; + + if (prefabMode != null && !prefabMode.IsPartOfPrefabContents(director.gameObject)) + continue; + + if (asset == null || (asset != null && director.playableAsset == asset)) + { + inScene.Add(director); + } + } + return inScene.ToArray(); + } + + public static PlayableDirector GetDirectorComponentForGameObject(GameObject gameObject) + { + return gameObject != null ? gameObject.GetComponent() : null; + } + + public static TimelineAsset GetTimelineAssetForDirectorComponent(PlayableDirector director) + { + return director != null ? director.playableAsset as TimelineAsset : null; + } + + public static bool IsPrefabOrAsset(Object obj) + { + return EditorUtility.IsPersistent(obj) || (obj.hideFlags & HideFlags.NotEditable) != 0; + } + + // TODO -- Need to add this to SerializedProperty so we can get replicate the accuracy that exists + // in the undo system + internal static string PropertyToString(SerializedProperty property) + { + switch (property.propertyType) + { + case SerializedPropertyType.Integer: + return property.intValue.ToString(); + case SerializedPropertyType.Float: + return property.floatValue.ToString(); + case SerializedPropertyType.String: + return property.stringValue; + case SerializedPropertyType.Boolean: + return property.boolValue ? "1" : "0"; + case SerializedPropertyType.Color: + return property.colorValue.ToString(); + case SerializedPropertyType.ArraySize: + return property.intValue.ToString(); + case SerializedPropertyType.Enum: + return property.intValue.ToString(); + case SerializedPropertyType.ObjectReference: + return string.Empty; + case SerializedPropertyType.LayerMask: + return property.intValue.ToString(); + case SerializedPropertyType.Character: + return property.intValue.ToString(); + case SerializedPropertyType.AnimationCurve: + return property.animationCurveValue.ToString(); + case SerializedPropertyType.Gradient: + return property.gradientValue.ToString(); + case SerializedPropertyType.Vector3: + return property.vector3Value.ToString(); + case SerializedPropertyType.Vector4: + return property.vector4Value.ToString(); + case SerializedPropertyType.Vector2: + return property.vector2Value.ToString(); + case SerializedPropertyType.Rect: + return property.rectValue.ToString(); + case SerializedPropertyType.Bounds: + return property.boundsValue.ToString(); + case SerializedPropertyType.Quaternion: + return property.quaternionValue.ToString(); + case SerializedPropertyType.Generic: + return string.Empty; + default: + Debug.LogWarning("Unknown Property Type: " + property.propertyType); + return string.Empty; + } + } + + // Is this a recordable clip on an animation track. + internal static bool IsRecordableAnimationClip(TimelineClip clip) + { + if (!clip.recordable) + return false; + + AnimationPlayableAsset asset = clip.asset as AnimationPlayableAsset; + if (asset == null) + return false; + + return true; + } + + public static IList GetSubTimelines(TimelineClip clip, IExposedPropertyTable director) + { + var editor = CustomTimelineEditorCache.GetClipEditor(clip); + List directors = new List(); + try + { + editor.GetSubTimelines(clip, director as PlayableDirector, directors); + } + catch (Exception e) + { + Debug.LogException(e); + } + + return directors; + } + + public static bool IsAllSubTrackMuted(TrackAsset asset) + { + if (asset is GroupTrack) + return asset.mutedInHierarchy; + + foreach (TrackAsset t in asset.GetChildTracks()) + { + if (!t.muted) + return false; + + var childMuted = IsAllSubTrackMuted(t); + + if (!childMuted) + return false; + } + return true; + } + + public static bool IsParentMuted(TrackAsset asset) + { + TrackAsset p = asset.parent as TrackAsset; + if (p == null) return false; + return p is GroupTrack ? p.mutedInHierarchy : IsParentMuted(p); + } + + public static IEnumerable GetAllDirectorsInHierarchy(PlayableDirector mainDirector) + { + var directors = new HashSet { mainDirector }; + GetAllDirectorsInHierarchy(mainDirector, directors); + return directors; + } + + static void GetAllDirectorsInHierarchy(PlayableDirector director, ISet directors) + { + var timelineAsset = director.playableAsset as TimelineAsset; + if (timelineAsset == null) + return; + + foreach (var track in timelineAsset.GetOutputTracks()) + { + foreach (var clip in track.clips) + { + foreach (var subDirector in GetSubTimelines(clip, director)) + { + if (!directors.Contains(subDirector)) + { + directors.Add(subDirector); + GetAllDirectorsInHierarchy(subDirector, directors); + } + } + } + } + } + + public static IEnumerable GetBindingsFromDirectors(IEnumerable directors) where T : Object + { + var bindings = new HashSet(); + foreach (var director in directors) + { + if (director.playableAsset == null) continue; + foreach (var output in director.playableAsset.outputs) + { + var binding = director.GetGenericBinding(output.sourceObject) as T; + if (binding != null) + bindings.Add(binding); + } + } + return bindings; + } + + public static bool IsLockedFromGroup(TrackAsset asset) + { + TrackAsset p = asset.parent as TrackAsset; + if (p == null) return false; + return p is GroupTrack ? p.lockedInHierarchy : IsLockedFromGroup(p); + } + + internal static bool IsCurrentSequenceValid() + { + return TimelineWindow.instance != null + && TimelineWindow.instance.state != null + && TimelineWindow.instance.state.editSequence != null; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineUtility.cs.meta new file mode 100644 index 0000000..b854453 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/TimelineUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a3949cc8bd731bb47bedf6589367d0c9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs new file mode 100644 index 0000000..d88567c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs @@ -0,0 +1,110 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class Tooltip + { + public GUIStyle style { get; set; } + + public string text { get; set; } + + GUIStyle m_Font; + + public GUIStyle font + { + get + { + if (m_Font != null) + return m_Font; + + if (style != null) + return style; + + // Default Font. + m_Font = new GUIStyle(); + m_Font.font = EditorStyles.label.font; + + return m_Font; + } + set { m_Font = value; } + } + + float m_Pad = 4.0f; + + public float pad + { + get { return m_Pad; } + set { m_Pad = value; } + } + + GUIContent m_TextContent; + + GUIContent textContent + { + get + { + if (m_TextContent == null) + m_TextContent = new GUIContent(); + + m_TextContent.text = text; + + return m_TextContent; + } + } + + Color m_ForeColor = Color.white; + + public Color foreColor + { + get { return m_ForeColor; } + set { m_ForeColor = value; } + } + + Rect m_Bounds; + + public Rect bounds + { + get + { + var size = font.CalcSize(textContent); + m_Bounds.width = size.x + (2.0f * pad); + m_Bounds.height = size.y + 2.0f; + + return m_Bounds; + } + + set { m_Bounds = value; } + } + + public Tooltip(GUIStyle theStyle, GUIStyle font) + { + style = theStyle; + m_Font = font; + } + + public Tooltip() + { + style = null; + m_Font = null; + } + + public void Draw() + { + if (string.IsNullOrEmpty(text)) + return; + + if (style != null) + { + using (new GUIColorOverride(DirectorStyles.Instance.customSkin.colorTooltipBackground)) + GUI.Label(bounds, GUIContent.none, style); + } + + var textBounds = bounds; + textBounds.x += pad; + textBounds.width -= pad; + + using (new GUIColorOverride(foreColor)) + GUI.Label(textBounds, textContent, font); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs.meta new file mode 100644 index 0000000..3640794 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 55a8539917657b14baf6c6a051a7df22 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Trackhead.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Trackhead.cs new file mode 100644 index 0000000..8a562b6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Trackhead.cs @@ -0,0 +1,363 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class Gaps + { + static readonly string kInsertTime = "Insert Time"; + + public static void Insert(TimelineAsset asset, double at, double amount, double tolerance) + { + // gather all clips + var clips = asset.flattenedTracks.SelectMany(x => x.clips).Where(x => (x.start - at) >= -tolerance).ToList(); + var markers = asset.flattenedTracks.SelectMany(x => x.GetMarkers()).Where(x => (x.time - at) >= -tolerance).ToList(); + + if (!clips.Any() && !markers.Any()) + return; + + // push undo on the tracks for the clips that are being modified + foreach (var t in clips.Select(x => x.parentTrack).Distinct()) + { + TimelineUndo.PushUndo(t, kInsertTime); + } + + // push the clips + foreach (var clip in clips) + { + clip.start += amount; + } + + // push undos and move the markers + foreach (var marker in markers) + { + var obj = marker as UnityEngine.Object; + if (obj != null) + TimelineUndo.PushUndo(obj, kInsertTime); + marker.time += amount; + } + + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + } + + class PlayheadContextMenu : Manipulator + { + readonly TimeAreaItem m_TimeAreaItem; + static readonly int[] kFrameInsertionValues = {5, 10, 25, 100}; + + public PlayheadContextMenu(TimeAreaItem timeAreaItem) + { + m_TimeAreaItem = timeAreaItem; + } + + protected override bool ContextClick(Event evt, WindowState state) + { + if (!m_TimeAreaItem.bounds.Contains(evt.mousePosition)) + return false; + + var tolerance = TimeUtility.GetEpsilon(state.editSequence.time, state.referenceSequence.frameRate); + var menu = new GenericMenu(); + + if (!TimelineWindow.instance.state.editSequence.isReadOnly) + { + menu.AddItem(EditorGUIUtility.TrTextContent("Insert/Frame/Single"), false, () => + Gaps.Insert(state.editSequence.asset, state.editSequence.time, 1.0 / state.referenceSequence.frameRate, tolerance) + ); + + for (var i = 0; i != kFrameInsertionValues.Length; ++i) + { + double f = kFrameInsertionValues[i]; + menu.AddItem(EditorGUIUtility.TrTextContent("Insert/Frame/" + kFrameInsertionValues[i] + " Frames"), false, () => + Gaps.Insert(state.editSequence.asset, state.editSequence.time, f / state.referenceSequence.frameRate, tolerance) + ); + } + + var playRangeTime = state.playRange; + if (playRangeTime.y > playRangeTime.x) + { + menu.AddItem(EditorGUIUtility.TrTextContent("Insert/Selected Time"), false, () => + Gaps.Insert(state.editSequence.asset, playRangeTime.x, playRangeTime.y - playRangeTime.x, TimeUtility.GetEpsilon(playRangeTime.x, state.referenceSequence.frameRate)) + ); + } + } + + menu.AddItem(EditorGUIUtility.TrTextContent("Select/Clips Ending Before"), false, () => SelectMenuCallback(x => x.end < state.editSequence.time + tolerance, state)); + menu.AddItem(EditorGUIUtility.TrTextContent("Select/Clips Starting Before"), false, () => SelectMenuCallback(x => x.start < state.editSequence.time + tolerance, state)); + menu.AddItem(EditorGUIUtility.TrTextContent("Select/Clips Ending After"), false, () => SelectMenuCallback(x => x.end - state.editSequence.time >= -tolerance, state)); + menu.AddItem(EditorGUIUtility.TrTextContent("Select/Clips Starting After"), false, () => SelectMenuCallback(x => x.start - state.editSequence.time >= -tolerance, state)); + menu.AddItem(EditorGUIUtility.TrTextContent("Select/Clips Intersecting"), false, () => SelectMenuCallback(x => x.start <= state.editSequence.time && state.editSequence.time <= x.end, state)); + menu.AddItem(EditorGUIUtility.TrTextContent("Select/Blends Intersecting"), false, () => SelectMenuCallback(x => SelectBlendingIntersecting(x, state.editSequence.time), state)); + menu.ShowAsContext(); + + return true; + } + + static bool SelectBlendingIntersecting(TimelineClip clip, double time) + { + return clip.start <= time && time <= clip.end && ( + (time <= clip.start + clip.blendInDuration) || + (time >= clip.end - clip.blendOutDuration) + ); + } + + static void SelectMenuCallback(Func selector, WindowState state) + { + var allClips = state.GetWindow().treeView.allClipGuis; + if (allClips == null) + return; + + SelectionManager.Clear(); + for (var i = 0; i != allClips.Count; ++i) + { + var c = allClips[i]; + + if (c != null && c.clip != null && selector(c.clip)) + { + SelectionManager.Add(c.clip); + } + } + } + } + + class TimeAreaContextMenu : Manipulator + { + protected override bool ContextClick(Event evt, WindowState state) + { + if (state.timeAreaRect.Contains(Event.current.mousePosition)) + { + var menu = new GenericMenu(); + AddTimeAreaMenuItems(menu, state); + menu.ShowAsContext(); + return true; + } + return false; + } + + internal static void AddTimeAreaMenuItems(GenericMenu menu, WindowState state) + { + foreach (var value in Enum.GetValues(typeof(TimelineAsset.DurationMode))) + { + var mode = (TimelineAsset.DurationMode)value; + var item = EditorGUIUtility.TextContent(string.Format(TimelineWindow.Styles.DurationModeText, L10n.Tr(ObjectNames.NicifyVariableName(mode.ToString())))); + + if (state.recording || state.IsEditingASubTimeline() || state.editSequence.asset == null + || state.editSequence.isReadOnly) + menu.AddDisabledItem(item); + else + menu.AddItem(item, state.editSequence.asset.durationMode == mode, () => SelectDurationCallback(state, mode)); + + menu.AddItem(DirectorStyles.showMarkersOnTimeline, state.showMarkerHeader, () => new ToggleShowMarkersOnTimeline().Execute(state)); + } + } + + static void SelectDurationCallback(WindowState state, TimelineAsset.DurationMode mode) + { + if (mode == state.editSequence.asset.durationMode) + return; + + TimelineUndo.PushUndo(state.editSequence.asset, "Duration Mode"); + + + // if we switched from Auto to Fixed, use the auto duration as the new fixed duration so the end marker stay in the same position. + if (state.editSequence.asset.durationMode == TimelineAsset.DurationMode.BasedOnClips && mode == TimelineAsset.DurationMode.FixedLength) + { + state.editSequence.asset.fixedDuration = state.editSequence.duration; + } + + state.editSequence.asset.durationMode = mode; + state.UpdateRootPlayableDuration(state.editSequence.duration); + } + } + + class Scrub : Manipulator + { + readonly Func m_OnMouseDown; + readonly Action m_OnMouseDrag; + readonly Action m_OnMouseUp; + + bool m_IsCaptured; + + public Scrub(Func onMouseDown, Action onMouseDrag, Action onMouseUp) + { + m_OnMouseDown = onMouseDown; + m_OnMouseDrag = onMouseDrag; + m_OnMouseUp = onMouseUp; + } + + protected override bool MouseDown(Event evt, WindowState state) + { + if (evt.button != 0) + return false; + + if (!m_OnMouseDown(evt, state)) + return false; + + state.AddCaptured(this); + m_IsCaptured = true; + + return true; + } + + protected override bool MouseUp(Event evt, WindowState state) + { + if (!m_IsCaptured) + return false; + + m_IsCaptured = false; + state.RemoveCaptured(this); + + m_OnMouseUp(); + + return true; + } + + protected override bool MouseDrag(Event evt, WindowState state) + { + if (!m_IsCaptured) + return false; + + m_OnMouseDrag(state.GetSnappedTimeAtMousePosition(evt.mousePosition)); + + return true; + } + } + + class TimeAreaItem : Control + { + public Color headColor { get; set; } + public Color lineColor { get; set; } + public bool drawLine { get; set; } + public bool drawHead { get; set; } + public bool canMoveHead { get; set; } + public string tooltip { get; set; } + public Vector2 boundOffset { get; set; } + + readonly GUIContent m_HeaderContent = new GUIContent(); + readonly GUIStyle m_Style; + readonly Tooltip m_Tooltip; + + Rect m_BoundingRect; + + float widgetHeight { get { return m_Style.fixedHeight; } } + float widgetWidth { get { return m_Style.fixedWidth; } } + + public Rect bounds + { + get + { + Rect r = m_BoundingRect; + r.y = TimelineWindow.instance.state.timeAreaRect.yMax - widgetHeight; + r.position += boundOffset; + + return r; + } + } + + public GUIStyle style + { + get { return m_Style; } + } + + + public bool showTooltip { get; set; } + + // is this the first frame the drag callback is being invoked + public bool firstDrag { get; private set; } + + public TimeAreaItem(GUIStyle style, Action onDrag) + { + m_Style = style; + headColor = Color.white; + var scrub = new Scrub( + (evt, state) => + { + firstDrag = true; + return state.timeAreaRect.Contains(evt.mousePosition) && bounds.Contains(evt.mousePosition); + }, + (d) => + { + if (onDrag != null) + onDrag(d); + firstDrag = false; + }, + () => + { + showTooltip = false; + firstDrag = false; + } + ); + AddManipulator(scrub); + lineColor = m_Style.normal.textColor; + drawLine = true; + drawHead = true; + canMoveHead = false; + tooltip = string.Empty; + boundOffset = Vector2.zero; + m_Tooltip = new Tooltip(DirectorStyles.Instance.displayBackground, DirectorStyles.Instance.tinyFont); + } + + public void Draw(Rect rect, WindowState state, double time) + { + var clipRect = new Rect(0.0f, 0.0f, TimelineWindow.instance.position.width, TimelineWindow.instance.position.height); + clipRect.xMin += state.sequencerHeaderWidth; + + using (new GUIViewportScope(clipRect)) + { + Vector2 windowCoordinate = rect.min; + windowCoordinate.y += 4.0f; + + windowCoordinate.x = state.TimeToPixel(time); + + m_BoundingRect = new Rect((windowCoordinate.x - widgetWidth / 2.0f), windowCoordinate.y, widgetWidth, widgetHeight); + + // Do not paint if the time cursor goes outside the timeline bounds... + if (Event.current.type == EventType.Repaint) + { + if (m_BoundingRect.xMax < state.timeAreaRect.xMin) + return; + if (m_BoundingRect.xMin > state.timeAreaRect.xMax) + return; + } + + var top = new Vector3(windowCoordinate.x, rect.y - DirectorStyles.kDurationGuiThickness); + var bottom = new Vector3(windowCoordinate.x, rect.yMax); + + if (drawLine) + { + Rect lineRect = Rect.MinMaxRect(top.x - 0.5f, top.y, bottom.x + 0.5f, bottom.y); + EditorGUI.DrawRect(lineRect, lineColor); + } + + if (drawHead) + { + Color c = GUI.color; + GUI.color = headColor; + GUI.Box(bounds, m_HeaderContent, m_Style); + GUI.color = c; + + if (canMoveHead) + EditorGUIUtility.AddCursorRect(bounds, MouseCursor.MoveArrow); + } + + if (showTooltip) + { + m_Tooltip.text = TimeReferenceUtility.ToTimeString(time); + + Vector2 position = bounds.position; + position.y = state.timeAreaRect.y; + position.y -= m_Tooltip.bounds.height; + position.x -= Mathf.Abs(m_Tooltip.bounds.width - bounds.width) / 2.0f; + + Rect tooltipBounds = bounds; + tooltipBounds.position = position; + m_Tooltip.bounds = tooltipBounds; + + m_Tooltip.Draw(); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Trackhead.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Trackhead.cs.meta new file mode 100644 index 0000000..310a4ff --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Trackhead.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 22899211c24eeb248b22704499dd108f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Unity.Timeline.Editor.asmdef b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Unity.Timeline.Editor.asmdef new file mode 100644 index 0000000..9a68038 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Unity.Timeline.Editor.asmdef @@ -0,0 +1,10 @@ +{ + "name": "Unity.Timeline.Editor", + "references": [ + "Unity.Timeline" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Unity.Timeline.Editor.asmdef.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Unity.Timeline.Editor.asmdef.meta new file mode 100644 index 0000000..1802ca3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Unity.Timeline.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 02f771204943f4a40949438e873e3eff +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/UnityEditorInternals.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/UnityEditorInternals.cs new file mode 100644 index 0000000..90ca722 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/UnityEditorInternals.cs @@ -0,0 +1,19 @@ +using System; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + static class UnityEditorInternals + { + public static Object DoObjectField(Rect position, Object obj, Type type, int controlId, bool allowScene) + { +#if UNITY_2020_1_OR_NEWER + var newObject = EditorGUI.DoObjectField(position, position, controlId, obj, null, type, null, allowScene, EditorStyles.objectField); +#else + var newObject = EditorGUI.DoObjectField(position, position, controlId, obj, type, null, null, allowScene, EditorStyles.objectField); +#endif + return newObject; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/UnityEditorInternals.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/UnityEditorInternals.cs.meta new file mode 100644 index 0000000..3644d78 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/UnityEditorInternals.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f9045505a91f4aee87d5768fffc7de5c +timeCreated: 1575581351 \ No newline at end of file diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities.meta new file mode 100644 index 0000000..697240c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a73ebdb6c1006364f8c7b37dc53d8ab7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterCache.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterCache.cs new file mode 100644 index 0000000..d5f091f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterCache.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using System.Reflection; + +namespace UnityEditor.Timeline +{ + static class AnimatedParameterCache + { + static readonly Dictionary k_ScriptPlayableFieldsCache = new Dictionary(); + static readonly Dictionary k_PropertyFieldInfoCache = new Dictionary(); + static readonly Dictionary k_PropertyIsAnimatableCache = new Dictionary(); + static readonly Dictionary k_BindingNameCache = new Dictionary(); + + public static bool TryGetScriptPlayableFields(Type type, out FieldInfo[] scriptPlayableFields) + { + return k_ScriptPlayableFieldsCache.TryGetValue(type, out scriptPlayableFields); + } + + public static void SetScriptPlayableFields(Type type, FieldInfo[] scriptPlayableFields) + { + k_ScriptPlayableFieldsCache[type] = scriptPlayableFields; + } + + public static bool TryGetFieldInfoForProperty(SerializedProperty property, out FieldInfo fieldInfo) + { + return k_PropertyFieldInfoCache.TryGetValue(new PropertyKey(property), out fieldInfo); + } + + public static void SetFieldInfoForProperty(SerializedProperty property, FieldInfo fieldInfo) + { + k_PropertyFieldInfoCache[new PropertyKey(property)] = fieldInfo; + } + + public static bool TryGetIsPropertyAnimatable(SerializedProperty property, out bool isAnimatable) + { + return k_PropertyIsAnimatableCache.TryGetValue(new PropertyKey(property), out isAnimatable); + } + + public static void SetIsPropertyAnimatable(SerializedProperty property, bool isAnimatable) + { + k_PropertyIsAnimatableCache[new PropertyKey(property)] = isAnimatable; + } + + public static bool TryGetBindingName(Type type, string path, out string bindingName) + { + return k_BindingNameCache.TryGetValue(new PropertyKey(type, path), out bindingName); + } + + public static void SetBindingName(Type type, string path, string bindingName) + { + k_BindingNameCache[new PropertyKey(type, path)] = bindingName; + } + } + + struct PropertyKey : IEquatable + { + readonly Type m_Type; + readonly string m_Path; + + public PropertyKey(SerializedProperty property) + { + m_Type = property.serializedObject.targetObject.GetType(); + m_Path = property.propertyPath; + } + + public PropertyKey(Type type, string path) + { + m_Type = type; + m_Path = path; + } + + public bool Equals(PropertyKey other) + { + return m_Type == other.m_Type && string.Equals(m_Path, other.m_Path); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + return obj is PropertyKey && Equals((PropertyKey)obj); + } + + public override int GetHashCode() + { + unchecked + { + return ((m_Type != null ? m_Type.GetHashCode() : 0) * 397) ^ (m_Path != null ? m_Path.GetHashCode() : 0); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterCache.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterCache.cs.meta new file mode 100644 index 0000000..19831f1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterCache.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1fe0f539450e54dbc85bfb2fa6b466fb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterUtility.cs new file mode 100644 index 0000000..53542e3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterUtility.cs @@ -0,0 +1,358 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + static class AnimatedParameterUtility + { + static readonly Type k_DefaultAnimationType = typeof(TimelineAsset); + static SerializedObject s_CachedObject; + + public static ICurvesOwner ToCurvesOwner(IPlayableAsset playableAsset, TimelineAsset timeline) + { + if (playableAsset == null) + return null; + + var curvesOwner = playableAsset as ICurvesOwner; + if (curvesOwner == null) + { + // If the asset is not directly an ICurvesOwner, it might be the asset for a TimelineClip + curvesOwner = TimelineRecording.FindClipWithAsset(timeline, playableAsset); + } + + return curvesOwner; + } + + public static bool TryGetSerializedPlayableAsset(UnityObject asset, out SerializedObject serializedObject) + { + serializedObject = null; + if (asset == null || Attribute.IsDefined(asset.GetType(), typeof(NotKeyableAttribute)) || !HasScriptPlayable(asset)) + return false; + + serializedObject = GetSerializedPlayableAsset(asset); + return serializedObject != null; + } + + public static SerializedObject GetSerializedPlayableAsset(UnityObject asset) + { + if (!(asset is IPlayableAsset)) + return null; + + var scriptObject = asset as ScriptableObject; + if (scriptObject == null) + return null; + + if (s_CachedObject == null || s_CachedObject.targetObject != asset) + { + s_CachedObject = new SerializedObject(scriptObject); + } + + return s_CachedObject; + } + + public static void UpdateSerializedPlayableAsset(UnityObject asset) + { + var so = GetSerializedPlayableAsset(asset); + if (so != null) + so.UpdateIfRequiredOrScript(); + } + + public static bool HasScriptPlayable(UnityObject asset) + { + if (asset == null) + return false; + + var scriptPlayable = asset as IPlayableBehaviour; + return scriptPlayable != null || GetScriptPlayableFields(asset as IPlayableAsset).Any(); + } + + public static FieldInfo[] GetScriptPlayableFields(IPlayableAsset asset) + { + if (asset == null) + return new FieldInfo[0]; + + FieldInfo[] scriptPlayableFields; + if (!AnimatedParameterCache.TryGetScriptPlayableFields(asset.GetType(), out scriptPlayableFields)) + { + scriptPlayableFields = GetScriptPlayableFields_Internal(asset); + AnimatedParameterCache.SetScriptPlayableFields(asset.GetType(), scriptPlayableFields); + } + + return scriptPlayableFields; + } + + static FieldInfo[] GetScriptPlayableFields_Internal(IPlayableAsset asset) + { + return asset.GetType() + .GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic) + .Where( + f => typeof(IPlayableBehaviour).IsAssignableFrom(f.FieldType) && // The field is an IPlayableBehaviour + (f.IsPublic || f.GetCustomAttributes(typeof(SerializeField), false).Any()) && // The field is either public or marked with [SerializeField] + !f.GetCustomAttributes(typeof(NotKeyableAttribute), false).Any() && // The field is not marked with [NotKeyable] + !f.GetCustomAttributes(typeof(HideInInspector), false).Any() && // The field is not marked with [HideInInspector] + !f.FieldType.GetCustomAttributes(typeof(NotKeyableAttribute), false).Any()) // The field is not of a type marked with [NotKeyable] + .ToArray(); + } + + public static bool HasAnyAnimatableParameters(UnityObject asset) + { + return GetAllAnimatableParameters(asset).Any(); + } + + public static IEnumerable GetAllAnimatableParameters(UnityObject asset) + { + SerializedObject serializedObject; + if (!TryGetSerializedPlayableAsset(asset, out serializedObject)) + yield break; + + var prop = serializedObject.GetIterator(); + + // We need to keep this variable because prop starts invalid + var outOfBounds = false; + while (!outOfBounds && prop.NextVisible(true)) + { + foreach (var property in SelectAnimatableProperty(prop)) + yield return property; + + // We can become out of bounds by calling SelectAnimatableProperty, if the last iterated property is a color. + outOfBounds = !prop.isValid; + } + } + + static IEnumerable SelectAnimatableProperty(SerializedProperty prop) + { + // We're only interested by animatable leaf parameters + if (!prop.hasChildren && IsParameterAnimatable(prop)) + yield return prop.Copy(); + + // Color type is not considered "visible" when iterating + if (prop.propertyType == SerializedPropertyType.Color) + { + var end = prop.GetEndProperty(); + + // For some reasons, if the last 2+ serialized properties are of type Color, prop becomes invalid and + // Next() throws an exception. This is not the case when only the last serialized property is a Color. + while (!SerializedProperty.EqualContents(prop, end) && prop.isValid && prop.Next(true)) + { + foreach (var property in SelectAnimatableProperty(prop)) + yield return property; + } + } + } + + public static bool IsParameterAnimatable(UnityObject asset, string parameterName) + { + SerializedObject serializedObject; + if (!TryGetSerializedPlayableAsset(asset, out serializedObject)) + return false; + + var prop = serializedObject.FindProperty(parameterName); + return IsParameterAnimatable(prop); + } + + public static bool IsParameterAnimatable(SerializedProperty property) + { + if (property == null) + return false; + + bool isAnimatable; + if (!AnimatedParameterCache.TryGetIsPropertyAnimatable(property, out isAnimatable)) + { + isAnimatable = IsParameterAnimatable_Internal(property); + AnimatedParameterCache.SetIsPropertyAnimatable(property, isAnimatable); + } + + return isAnimatable; + } + + static bool IsParameterAnimatable_Internal(SerializedProperty property) + { + if (property == null) + return false; + + var asset = property.serializedObject.targetObject; + + // Currently not supported + if (asset is AnimationTrack) + return false; + + if (IsParameterKeyable(property)) + return asset is IPlayableBehaviour || IsParameterAtPathAnimatable(asset, property.propertyPath); + + return false; + } + + static bool IsParameterKeyable(SerializedProperty property) + { + return IsTypeAnimatable(property.propertyType) && IsKeyableInHierarchy(property); + } + + static bool IsKeyableInHierarchy(SerializedProperty property) + { + const BindingFlags bindingFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance; + var pathSegments = property.propertyPath.Split('.'); + var type = property.serializedObject.targetObject.GetType(); + foreach (var segment in pathSegments) + { + if (type.GetCustomAttributes(typeof(NotKeyableAttribute), false).Any()) + { + return false; + } + + if (type.IsArray) + { + if (segment != "Array") + type = type.GetElementType(); + continue; + } + + var fieldInfo = type.GetField(segment, bindingFlags); + + if (fieldInfo == null || + fieldInfo.GetCustomAttributes(typeof(NotKeyableAttribute), false).Any() || + fieldInfo.GetCustomAttributes(typeof(HideInInspector), false).Any()) + { + return false; + } + + type = fieldInfo.FieldType; + } + + return true; + } + + static bool IsParameterAtPathAnimatable(UnityObject asset, string path) + { + if (asset == null) + return false; + + return GetScriptPlayableFields(asset as IPlayableAsset) + .Any( + f => path.StartsWith(f.Name, StringComparison.Ordinal) && + path.Length > f.Name.Length && + path[f.Name.Length] == '.'); + } + + public static bool IsTypeAnimatable(SerializedPropertyType type) + { + // Note: Integer is not currently supported by the animated property system + switch (type) + { + case SerializedPropertyType.Boolean: + case SerializedPropertyType.Float: + case SerializedPropertyType.Vector2: + case SerializedPropertyType.Vector3: + case SerializedPropertyType.Color: + case SerializedPropertyType.Quaternion: + case SerializedPropertyType.Vector4: + return true; + default: + return false; + } + } + + public static bool IsParameterAnimated(UnityObject asset, AnimationClip animationData, string parameterName) + { + if (asset == null || animationData == null) + return false; + + var binding = GetCurveBinding(asset, parameterName); + var bindings = AnimationClipCurveCache.Instance.GetCurveInfo(animationData).bindings; + return bindings.Any(x => BindingMatchesParameterName(x, binding.propertyName)); + } + + // Retrieve an animated parameter curve. parameter name is required to include the appropriate field for vectors + // e.g.: position + public static AnimationCurve GetAnimatedParameter(UnityObject asset, AnimationClip animationData, string parameterName) + { + if (!(asset is ScriptableObject) || animationData == null) + return null; + + var binding = GetCurveBinding(asset, parameterName); + return AnimationUtility.GetEditorCurve(animationData, binding); + } + + // get an animatable curve binding for this parameter + public static EditorCurveBinding GetCurveBinding(UnityObject asset, string parameterName) + { + var animationName = GetAnimatedParameterBindingName(asset, parameterName); + return EditorCurveBinding.FloatCurve(string.Empty, GetValidAnimationType(asset), animationName); + } + + public static string GetAnimatedParameterBindingName(UnityObject asset, string parameterName) + { + if (asset == null) + return parameterName; + + string bindingName; + if (!AnimatedParameterCache.TryGetBindingName(asset.GetType(), parameterName, out bindingName)) + { + bindingName = GetAnimatedParameterBindingName_Internal(asset, parameterName); + AnimatedParameterCache.SetBindingName(asset.GetType(), parameterName, bindingName); + } + + return bindingName; + } + + static string GetAnimatedParameterBindingName_Internal(UnityObject asset, string parameterName) + { + if (asset is IPlayableBehaviour) + return parameterName; + + // strip the IScript playable field name + var fields = GetScriptPlayableFields(asset as IPlayableAsset); + foreach (var f in fields) + { + if (parameterName.StartsWith(f.Name, StringComparison.Ordinal)) + { + if (parameterName.Length > f.Name.Length && parameterName[f.Name.Length] == '.') + return parameterName.Substring(f.Name.Length + 1); + } + } + + return parameterName; + } + + public static bool BindingMatchesParameterName(EditorCurveBinding binding, string parameterName) + { + if (binding.propertyName == parameterName) + return true; + + var indexOfDot = binding.propertyName.IndexOf('.'); + return indexOfDot > 0 && parameterName.Length == indexOfDot && + binding.propertyName.StartsWith(parameterName, StringComparison.Ordinal); + } + + // the animated type must be a non-abstract instantiable object. + public static Type GetValidAnimationType(UnityObject asset) + { + return asset != null ? asset.GetType() : k_DefaultAnimationType; + } + + public static FieldInfo GetFieldInfoForProperty(SerializedProperty property) + { + FieldInfo fieldInfo; + + if (!AnimatedParameterCache.TryGetFieldInfoForProperty(property, out fieldInfo)) + { + Type _; + fieldInfo = ScriptAttributeUtility.GetFieldInfoFromProperty(property, out _); + AnimatedParameterCache.SetFieldInfoForProperty(property, fieldInfo); + } + + return fieldInfo; + } + + public static T GetAttributeForProperty(SerializedProperty property) where T : Attribute + { + var fieldInfo = GetFieldInfoForProperty(property); + return fieldInfo.GetCustomAttributes(typeof(T), false).FirstOrDefault() as T; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterUtility.cs.meta new file mode 100644 index 0000000..695849f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/AnimatedParameterUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 84d86c98104d94063ad70bc591530f65 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BindingUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BindingUtility.cs new file mode 100644 index 0000000..5565817 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BindingUtility.cs @@ -0,0 +1,58 @@ +using System; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + static class BindingUtility + { + public static Type GetRequiredBindingType(PlayableBinding binding) + { + return binding.outputTargetType; + } + + public static void Bind(PlayableDirector director, TrackAsset bindTo, Object objectToBind) + { + if (director == null || bindTo == null || TimelineWindow.instance == null) + return; + + TimelineWindow.instance.state.previewMode = false; // returns all objects to previous state + TimelineUndo.PushUndo(director, "PlayableDirector Binding"); + director.SetGenericBinding(bindTo, objectToBind); + TimelineWindow.instance.state.rebuildGraph = true; + } + + public static BindingAction GetBindingAction(Type requiredBindingType, Object objectToBind) + { + if (requiredBindingType == null || objectToBind == null) + return BindingAction.DoNotBind; + + // prevent drag and drop of prefab assets + if (PrefabUtility.IsPartOfPrefabAsset(objectToBind)) + return BindingAction.DoNotBind; + + if (requiredBindingType.IsInstanceOfType(objectToBind)) + return BindingAction.BindDirectly; + + var draggedGameObject = objectToBind as GameObject; + + if (!typeof(Component).IsAssignableFrom(requiredBindingType) || draggedGameObject == null) + return BindingAction.DoNotBind; + + if (draggedGameObject.GetComponent(requiredBindingType) == null) + return BindingAction.BindToMissingComponent; + + return BindingAction.BindToExistingComponent; + } + } + + enum BindingAction + { + DoNotBind, + BindDirectly, + BindToExistingComponent, + BindToMissingComponent + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BindingUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BindingUtility.cs.meta new file mode 100644 index 0000000..c528748 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BindingUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ef5fa6e2005defb4ab5142723827b58e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BreadcrumbDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BreadcrumbDrawer.cs new file mode 100644 index 0000000..a3276bf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BreadcrumbDrawer.cs @@ -0,0 +1,235 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + enum TitleMode + { + None, + DisabledComponent, + Prefab, + PrefabOutOfContext, + Asset, + GameObject + } + + struct BreadCrumbTitle + { + public string name; + public TitleMode mode; + } + + class BreadcrumbDrawer + { + static readonly GUIContent s_TextContent = new GUIContent(); + static readonly string k_DisabledComponentText = L10n.Tr("The PlayableDirector is disabled"); + static readonly string k_PrefabOutOfContext = L10n.Tr("Prefab Isolation not enabled. Click to Enable."); + + static readonly GUIStyle k_BreadCrumbLeft; + static readonly GUIStyle k_BreadCrumbMid; + static readonly GUIStyle k_BreadCrumbLeftBg; + static readonly GUIStyle k_BreadCrumbMidBg; + static readonly GUIStyle k_BreadCrumbMidSelected; + static readonly GUIStyle k_BreadCrumbMidBgSelected; + + static readonly Texture k_TimelineIcon; + + const string k_Elipsis = "…"; + + static BreadcrumbDrawer() + { + k_BreadCrumbLeft = new GUIStyle("GUIEditor.BreadcrumbLeft"); + k_BreadCrumbMid = new GUIStyle("GUIEditor.BreadcrumbMid"); + k_BreadCrumbLeftBg = new GUIStyle("GUIEditor.BreadcrumbLeftBackground"); + k_BreadCrumbMidBg = new GUIStyle("GUIEditor.BreadcrumbMidBackground"); + + k_BreadCrumbMidSelected = new GUIStyle(k_BreadCrumbMid); + k_BreadCrumbMidSelected.normal = k_BreadCrumbMidSelected.onNormal; + + k_BreadCrumbMidBgSelected = new GUIStyle(k_BreadCrumbMidBg); + k_BreadCrumbMidBgSelected.normal = k_BreadCrumbMidBgSelected.onNormal; + k_TimelineIcon = EditorGUIUtility.IconContent("TimelineAsset Icon").image; + } + + static string FitTextInArea(float areaWidth, string text, GUIStyle style) + { + var borderWidth = style.border.left + style.border.right; + var textWidth = style.CalcSize(EditorGUIUtility.TextContent(text)).x; + + if (borderWidth + textWidth < areaWidth) + return text; + + // Need to truncate the text to fit in the areaWidth + var textAreaWidth = areaWidth - borderWidth; + var pixByChar = textWidth / text.Length; + var charNeeded = (int)Mathf.Floor(textAreaWidth / pixByChar); + charNeeded -= k_Elipsis.Length; + + if (charNeeded <= 0) + return k_Elipsis; + + if (charNeeded <= text.Length) + return k_Elipsis + " " + text.Substring(text.Length - charNeeded); + + return k_Elipsis; + } + + public static void Draw(float breadcrumbAreaWidth, List labels, Action navigateToBreadcrumbIndex) + { + GUILayout.BeginHorizontal(GUILayout.Width(breadcrumbAreaWidth)); + { + var labelWidth = (int)(breadcrumbAreaWidth / labels.Count); + + for (var i = 0; i < labels.Count; i++) + { + var label = labels[i]; + + var style = i == 0 ? k_BreadCrumbLeft : k_BreadCrumbMid; + var backgroundStyle = i == 0 ? k_BreadCrumbLeftBg : k_BreadCrumbMidBg; + + if (i == labels.Count - 1) + { + if (i > 0) + { + // Only tint last breadcrumb if we are dug-in + DrawBreadcrumbAsSelectedSubSequence(labelWidth, label, k_BreadCrumbMidSelected, k_BreadCrumbMidBgSelected); + } + else + { + DrawActiveBreadcrumb(labelWidth, label, style, backgroundStyle); + } + } + else + { + var previousContentColor = GUI.contentColor; + + GUI.contentColor = new Color(previousContentColor.r, + previousContentColor.g, + previousContentColor.b, + previousContentColor.a * 0.6f); + var content = GetTextContent(labelWidth, label, style); + var rect = GetBreadcrumbLayoutRect(content, style); + + if (Event.current.type == EventType.Repaint) + { + backgroundStyle.Draw(rect, GUIContent.none, 0); + } + + if (GUI.Button(rect, content, style)) + { + navigateToBreadcrumbIndex.Invoke(i); + } + GUI.contentColor = previousContentColor; + } + } + } + GUILayout.EndHorizontal(); + } + + static GUIContent GetTextContent(int width, BreadCrumbTitle text, GUIStyle style) + { + s_TextContent.tooltip = string.Empty; + s_TextContent.image = null; + if (text.mode == TitleMode.DisabledComponent) + { + s_TextContent.tooltip = k_DisabledComponentText; + s_TextContent.image = EditorGUIUtility.GetHelpIcon(MessageType.Warning); + } + else if (text.mode == TitleMode.Prefab) + s_TextContent.image = PrefabUtility.GameObjectStyles.prefabIcon; + else if (text.mode == TitleMode.GameObject) + s_TextContent.image = PrefabUtility.GameObjectStyles.gameObjectIcon; + else if (text.mode == TitleMode.Asset) + s_TextContent.image = k_TimelineIcon; + else if (text.mode == TitleMode.PrefabOutOfContext) + { + s_TextContent.image = PrefabUtility.GameObjectStyles.prefabIcon; + if (!TimelineWindow.instance.locked) + s_TextContent.tooltip = k_PrefabOutOfContext; + } + + if (s_TextContent.image != null) + width = Math.Max(0, width - s_TextContent.image.width); + s_TextContent.text = FitTextInArea(width, text.name, style); + + return s_TextContent; + } + + static void DrawBreadcrumbAsSelectedSubSequence(int width, BreadCrumbTitle label, GUIStyle style, GUIStyle backgroundStyle) + { + var rect = DrawActiveBreadcrumb(width, label, style, backgroundStyle); + const float underlineThickness = 2.0f; + const float underlineVerticalOffset = 0.0f; + var underlineHorizontalOffset = backgroundStyle.border.right * 0.333f; + var underlineRect = Rect.MinMaxRect( + rect.xMin - underlineHorizontalOffset, + rect.yMax - underlineThickness - underlineVerticalOffset, + rect.xMax - underlineHorizontalOffset, + rect.yMax - underlineVerticalOffset); + + EditorGUI.DrawRect(underlineRect, DirectorStyles.Instance.customSkin.colorSubSequenceDurationLine); + } + + static Rect GetBreadcrumbLayoutRect(GUIContent content, GUIStyle style) + { + // the image makes the button far too big compared to non-image versions + var image = content.image; + content.image = null; + var size = style.CalcSizeWithConstraints(content, Vector2.zero); + content.image = image; + if (image != null) + size.x += size.y; // assumes square image, constrained by height + + return GUILayoutUtility.GetRect(content, style, GUILayout.MaxWidth(size.x)); + } + + static Rect DrawActiveBreadcrumb(int width, BreadCrumbTitle label, GUIStyle style, GUIStyle backgroundStyle) + { + var content = GetTextContent(width, label, style); + var rect = GetBreadcrumbLayoutRect(content, style); + + if (Event.current.type == EventType.Repaint) + { + backgroundStyle.Draw(rect, GUIContent.none, 0); + } + + if (GUI.Button(rect, content, style)) + { + UnityEngine.Object target = TimelineEditor.inspectedDirector; + if (target == null) + target = TimelineEditor.inspectedAsset; + if (target != null) + { + bool ping = true; + if (label.mode == TitleMode.PrefabOutOfContext) + { + var gameObject = PrefabUtility.GetRootGameObject(target); + if (gameObject != null) + { + target = gameObject; // ping the prefab root if it's locked. + if (!TimelineWindow.instance.locked) + { + var assetPath = AssetDatabase.GetAssetPath(gameObject); + if (!string.IsNullOrEmpty(assetPath)) + { + var stage = UnityEditor.Experimental.SceneManagement.PrefabStageUtility.OpenPrefab(assetPath); + if (stage != null) + ping = false; + } + } + } + } + + if (ping) + { + EditorGUIUtility.PingObject(target); + } + } + } + + return rect; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BreadcrumbDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BreadcrumbDrawer.cs.meta new file mode 100644 index 0000000..b17803a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/BreadcrumbDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 526f285e8d4fb8140b4cdfeb9102d8cb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ClipModifier.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ClipModifier.cs new file mode 100644 index 0000000..8c54f4d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ClipModifier.cs @@ -0,0 +1,386 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + static class ClipModifier + { + public static bool Delete(TimelineAsset timeline, TimelineClip clip) + { + return timeline.DeleteClip(clip); + } + + public static bool Tile(TimelineClip[] clips) + { + if (clips.Length < 2) + return false; + + var clipsByTracks = clips.GroupBy(x => x.parentTrack) + .Select(track => new {track.Key, Items = track.OrderBy(c => c.start)}); + + foreach (var track in clipsByTracks) + { + TimelineUndo.PushUndo(track.Key, "Tile"); + } + + foreach (var track in clipsByTracks) + { + double newStart = track.Items.First().start; + foreach (var c in track.Items) + { + c.start = newStart; + newStart += c.duration; + } + } + + return true; + } + + public static bool TrimStart(TimelineClip[] clips, double trimTime) + { + var result = false; + + foreach (var clip in clips) + result |= TrimStart(clip, trimTime); + + return result; + } + + public static bool TrimStart(TimelineClip clip, double trimTime) + { + if (clip.asset == null) + return false; + + if (clip.start > trimTime) + return false; + + if (clip.end < trimTime) + return false; + + TimelineUndo.PushUndo(clip.parentTrack, "Trim Clip Start"); + + // Note: We are NOT using edit modes in this case because we want the same result + // regardless of the selected EditMode: split at cursor and delete left part + SetStart(clip, trimTime); + + return true; + } + + public static bool TrimEnd(TimelineClip[] clips, double trimTime) + { + var result = false; + + foreach (var clip in clips) + result |= TrimEnd(clip, trimTime); + + return result; + } + + public static bool TrimEnd(TimelineClip clip, double trimTime) + { + if (clip.asset == null) + return false; + + if (clip.start > trimTime) + return false; + + if (clip.end < trimTime) + return false; + + TimelineUndo.PushUndo(clip.parentTrack, "Trim Clip End"); + TrimClipWithEditMode(clip, TrimEdge.End, trimTime); + + return true; + } + + public static bool MatchDuration(TimelineClip[] clips) + { + double referenceDuration = clips[0].duration; + foreach (var clip in clips) + { + TimelineUndo.PushUndo(clip.parentTrack, "Match Clip Duration"); + + var newEnd = clip.start + referenceDuration; + TrimClipWithEditMode(clip, TrimEdge.End, newEnd); + } + + return true; + } + + public static bool Split(TimelineClip[] clips, double splitTime, PlayableDirector director) + { + var result = false; + + foreach (var clip in clips) + { + if (clip.start >= splitTime) + continue; + + if (clip.end <= splitTime) + continue; + + TimelineUndo.PushUndo(clip.parentTrack, "Split Clip"); + + TimelineClip newClip = TimelineHelpers.Clone(clip, director, director, clip.start); + + SetStart(clip, splitTime); + SetEnd(newClip, splitTime, false); + + // Sort produced by cloning clips on top of each other is unpredictable (it varies between mono runtimes) + clip.parentTrack.SortClips(); + + result = true; + } + + return result; + } + + public static void SetStart(TimelineClip clip, double time) + { + var supportsClipIn = clip.SupportsClipIn(); + var supportsPadding = TimelineUtility.IsRecordableAnimationClip(clip); + + // treat empty recordable clips as not supporting clip in (there are no keys to modify) + if (supportsPadding && (clip.animationClip == null || clip.animationClip.empty)) + { + supportsClipIn = false; + } + + if (supportsClipIn && !supportsPadding) + { + var minStart = clip.FromLocalTimeUnbound(0.0); + if (time < minStart) + time = minStart; + } + + var maxStart = clip.end - TimelineClip.kMinDuration; + if (time > maxStart) + time = maxStart; + + var timeOffset = time - clip.start; + var duration = clip.duration - timeOffset; + + if (supportsClipIn) + { + if (supportsPadding) + { + double clipInGlobal = clip.clipIn / clip.timeScale; + double keyShift = -timeOffset; + if (timeOffset < 0) // left drag, eliminate clipIn before shifting + { + double clipInDelta = Math.Max(-clipInGlobal, timeOffset); + keyShift = -Math.Min(0, timeOffset - clipInDelta); + clip.clipIn += clipInDelta * clip.timeScale; + } + else if (timeOffset > 0) // right drag, elimate padding in animation clip before adding clip in + { + var clipInfo = AnimationClipCurveCache.Instance.GetCurveInfo(clip.animationClip); + double keyDelta = clip.FromLocalTimeUnbound(clipInfo.keyTimes.Min()) - clip.start; + keyShift = -Math.Max(0, Math.Min(timeOffset, keyDelta)); + clip.clipIn += Math.Max(timeOffset + keyShift, 0) * clip.timeScale; + } + if (keyShift != 0) + { + AnimationTrackRecorder.ShiftAnimationClip(clip.animationClip, (float)(keyShift * clip.timeScale)); + } + } + else + { + clip.clipIn += timeOffset * clip.timeScale; + } + } + + clip.start = time; + clip.duration = duration; + } + + public static void SetEnd(TimelineClip clip, double time, bool affectTimeScale) + { + var duration = Math.Max(time - clip.start, TimelineClip.kMinDuration); + + if (affectTimeScale && clip.SupportsSpeedMultiplier()) + { + var f = clip.duration / duration; + clip.timeScale *= f; + } + + clip.duration = duration; + } + + public static bool ResetEditing(TimelineClip[] clips) + { + var result = false; + + foreach (var clip in clips) + result = result || ResetEditing(clip); + + return result; + } + + public static bool ResetEditing(TimelineClip clip) + { + if (clip.asset == null) + return false; + + TimelineUndo.PushUndo(clip.parentTrack, "Reset Clip Editing"); + + clip.clipIn = 0.0; + + if (clip.clipAssetDuration < double.MaxValue) + { + var duration = clip.clipAssetDuration / clip.timeScale; + TrimClipWithEditMode(clip, TrimEdge.End, clip.start + duration); + } + + return true; + } + + public static bool MatchContent(TimelineClip[] clips) + { + var result = false; + + foreach (var clip in clips) + result = result || MatchContent(clip); + + return result; + } + + public static bool MatchContent(TimelineClip clip) + { + if (clip.asset == null) + return false; + + TimelineUndo.PushUndo(clip.parentTrack, "Match Clip Content"); + + var newStartCandidate = clip.start - clip.clipIn / clip.timeScale; + var newStart = newStartCandidate < 0.0 ? 0.0 : newStartCandidate; + + TrimClipWithEditMode(clip, TrimEdge.Start, newStart); + + // In case resetting the start was blocked by edit mode or timeline start, we do the best we can + clip.clipIn = (clip.start - newStartCandidate) * clip.timeScale; + if (clip.clipAssetDuration > 0 && TimelineHelpers.HasUsableAssetDuration(clip)) + { + var duration = TimelineHelpers.GetLoopDuration(clip); + var offset = (clip.clipIn / clip.timeScale) % duration; + TrimClipWithEditMode(clip, TrimEdge.End, clip.start - offset + duration); + } + + return true; + } + + public static void TrimClipWithEditMode(TimelineClip clip, TrimEdge edge, double time) + { + var clipItem = ItemsUtils.ToItem(clip); + EditMode.BeginTrim(clipItem, edge); + if (edge == TrimEdge.Start) + EditMode.TrimStart(clipItem, time); + else + EditMode.TrimEnd(clipItem, time, false); + EditMode.FinishTrim(); + } + + public static bool CompleteLastLoop(TimelineClip[] clips) + { + foreach (var clip in clips) + { + CompleteLastLoop(clip); + } + + return true; + } + + public static void CompleteLastLoop(TimelineClip clip) + { + FixLoops(clip, true); + } + + public static bool TrimLastLoop(TimelineClip[] clips) + { + foreach (var clip in clips) + { + TrimLastLoop(clip); + } + + return true; + } + + public static void TrimLastLoop(TimelineClip clip) + { + FixLoops(clip, false); + } + + static void FixLoops(TimelineClip clip, bool completeLastLoop) + { + if (!TimelineHelpers.HasUsableAssetDuration(clip)) + return; + + var loopDuration = TimelineHelpers.GetLoopDuration(clip); + var firstLoopDuration = loopDuration - clip.clipIn * (1.0 / clip.timeScale); + + // Making sure we don't trim to zero + if (!completeLastLoop && firstLoopDuration > clip.duration) + return; + + var numLoops = (clip.duration - firstLoopDuration) / loopDuration; + var numCompletedLoops = Math.Floor(numLoops); + + if (!(numCompletedLoops < numLoops)) + return; + + if (completeLastLoop) + numCompletedLoops += 1; + + var newEnd = clip.start + firstLoopDuration + loopDuration * numCompletedLoops; + + TimelineUndo.PushUndo(clip.parentTrack, "Trim Clip Last Loop"); + + TrimClipWithEditMode(clip, TrimEdge.End, newEnd); + } + + public static bool DoubleSpeed(TimelineClip[] clips) + { + foreach (var clip in clips) + { + if (clip.SupportsSpeedMultiplier()) + { + TimelineUndo.PushUndo(clip.parentTrack, "Double Clip Speed"); + clip.timeScale = clip.timeScale * 2.0f; + } + } + + return true; + } + + public static bool HalfSpeed(TimelineClip[] clips) + { + foreach (var clip in clips) + { + if (clip.SupportsSpeedMultiplier()) + { + TimelineUndo.PushUndo(clip.parentTrack, "Half Clip Speed"); + clip.timeScale = clip.timeScale * 0.5f; + } + } + + return true; + } + + public static bool ResetSpeed(TimelineClip[] clips) + { + foreach (var clip in clips) + { + if (clip.timeScale != 1.0) + { + TimelineUndo.PushUndo(clip.parentTrack, "Reset Clip Speed"); + clip.timeScale = 1.0; + } + } + + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ClipModifier.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ClipModifier.cs.meta new file mode 100644 index 0000000..3fa03b9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ClipModifier.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b0eeee3cdfa56734abca5c1a4e7989ba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Clipboard.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Clipboard.cs new file mode 100644 index 0000000..7ed3952 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Clipboard.cs @@ -0,0 +1,142 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class Clipboard + { + class ExposedReferenceTable : IExposedPropertyTable + { + Dictionary m_ReferenceTable = new Dictionary(); + public void SetReferenceValue(PropertyName id, Object value) + { + m_ReferenceTable[id] = value; + } + + public Object GetReferenceValue(PropertyName id, out bool idValid) + { + Object reference; + idValid = m_ReferenceTable.TryGetValue(id, out reference); + return reference; + } + + public void ClearReferenceValue(PropertyName id) + { + m_ReferenceTable.Remove(id); + } + + public void Clear() + { + m_ReferenceTable.Clear(); + } + } + + public struct ClipboardTrackEntry + { + public TrackAsset item; + public TrackAsset parent; + } + + static readonly int kListInitialSize = 10; + + readonly List m_ItemsData = new List(kListInitialSize); + readonly List m_trackData = new List(kListInitialSize); + TimelineAsset rootTimeline; + + public readonly IExposedPropertyTable exposedPropertyTable = new ExposedReferenceTable(); + + public Clipboard() + { + rootTimeline = CreateTimeline(); + + EditorApplication.playModeStateChanged += OnPlayModeChanged; + } + + public void CopyItems(IEnumerable items) + { + using (new TimelineUndo.DisableUndoGuard(true)) + { + var itemsByParent = items.ToLookup(i => i.parentTrack); + foreach (var itemsGroup in itemsByParent) + { + var parent = itemsGroup.Key; + var itemsList = new List(); + foreach (var item in itemsGroup) + { + if (item is ClipItem) + itemsList.Add(CopyItem((ClipItem)item)); + else if (item is MarkerItem) + itemsList.Add(CopyItem((MarkerItem)item)); + } + m_ItemsData.Add(new ItemsPerTrack(parent, itemsList)); + } + } + } + + ClipItem CopyItem(ClipItem clipItem) + { + var newClip = TimelineHelpers.Clone(clipItem.clip, TimelineWindow.instance.state.editSequence.director, exposedPropertyTable, rootTimeline); + return new ClipItem(newClip); + } + + static MarkerItem CopyItem(MarkerItem markerItem) + { + var markerObject = markerItem.marker as Object; + if (markerObject != null) + { + var newMarker = Object.Instantiate(markerObject); + newMarker.name = markerObject.name; + return new MarkerItem((IMarker)newMarker); + } + + return null; + } + + public void CopyTracks(IEnumerable tracks) + { + using (new TimelineUndo.DisableUndoGuard(true)) + { + foreach (var track in TrackExtensions.FilterTracks(tracks)) + { + var newTrack = track.Duplicate(TimelineEditor.inspectedDirector, TimelineEditor.clipboard.exposedPropertyTable, rootTimeline); + m_trackData.Add(new ClipboardTrackEntry {item = newTrack, parent = track.parent as TrackAsset}); + } + } + } + + public IEnumerable GetTracks() + { + return m_trackData; + } + + public IEnumerable GetCopiedItems() + { + return m_ItemsData; + } + + public void Clear() + { + m_ItemsData.Clear(); + m_trackData.Clear(); + rootTimeline = CreateTimeline(); + ((ExposedReferenceTable)exposedPropertyTable).Clear(); + } + + private void OnPlayModeChanged(PlayModeStateChange state) + { + if (state == PlayModeStateChange.EnteredEditMode || state == PlayModeStateChange.EnteredPlayMode) + Clear(); + } + + static TimelineAsset CreateTimeline() + { + var timeline = ScriptableObject.CreateInstance(); + timeline.hideFlags |= HideFlags.DontSave; + timeline.name = "Clipboard"; + + return timeline; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Clipboard.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Clipboard.cs.meta new file mode 100644 index 0000000..af5870a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Clipboard.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b57629d89799e004182564256307b0cc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ControlPlayableUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ControlPlayableUtility.cs new file mode 100644 index 0000000..d7023e4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ControlPlayableUtility.cs @@ -0,0 +1,62 @@ +using System.Collections.Generic; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class ControlPlayableUtility + { + public static bool DetectCycle( + ControlPlayableAsset asset, PlayableDirector director, HashSet set = null) + { + if (director == null || asset == null || !asset.updateDirector) + return false; + + if (set == null) + set = new HashSet(); + + if (set.Contains(director)) + return true; + + var gameObject = asset.sourceGameObject.Resolve(director); + if (gameObject == null) + return false; + + set.Add(director); + + foreach (var subDirector in asset.GetComponent(gameObject)) + { + foreach (var childAsset in GetPlayableAssets(subDirector)) + { + if (DetectCycle(childAsset, subDirector, set)) + return true; + } + } + + set.Remove(director); + + return false; + } + + public static IEnumerable GetPlayableAssets(PlayableDirector director) + { + var timeline = director != null ? (director.playableAsset as TimelineAsset) : null; + if (timeline != null) + { + foreach (var t in timeline.GetOutputTracks()) + { + var controlTrack = t as ControlTrack; + if (controlTrack != null) + { + foreach (var c in t.GetClips()) + { + var asset = c.asset as ControlPlayableAsset; + if (asset != null) + yield return asset; + } + } + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ControlPlayableUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ControlPlayableUtility.cs.meta new file mode 100644 index 0000000..ab502a1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ControlPlayableUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e801faa3b0dd2478dbe801a2441b679e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs new file mode 100644 index 0000000..021a635 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs @@ -0,0 +1,47 @@ +using System; + +namespace UnityEditor.Timeline +{ + // Tells a custom [[TrackDrawer]] which [[TrackAsset]] it's a drawer for. + sealed class CustomTrackDrawerAttribute : Attribute + { + public Type assetType; + public CustomTrackDrawerAttribute(Type type) + { + assetType = type; + } + } + + /// + /// Attribute that specifies a class as an editor for an extended Timeline type. + /// + /// + /// Use this attribute on a class that extends ClipEditor, TrackEditor, or MarkerEditor to specify either the PlayableAsset, Marker, or TrackAsset derived classes for associated customization. + /// + /// + /// [CustomTimelineEditor(typeof(LightControlClip))] + /// class LightControlClipEditor : ClipEditor + /// { + /// } + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] + public sealed class CustomTimelineEditorAttribute : Attribute + { + /// + /// The type that that this editor applies to. + /// + public Type classToEdit { get; private set; } + + /// + /// Constructor. + /// + /// The type that that this editor applies to. + /// Thrown if type is null + public CustomTimelineEditorAttribute(Type type) + { + if (type == null) + throw new System.ArgumentNullException(nameof(type)); + classToEdit = type; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs.meta new file mode 100644 index 0000000..1738611 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/CustomTrackDrawerAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e1e957d39ca70834f9212a1289b6a0d5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/DisplayNameHelper.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/DisplayNameHelper.cs new file mode 100644 index 0000000..f228c4c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/DisplayNameHelper.cs @@ -0,0 +1,33 @@ +using System.Text; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + static class DisplayNameHelper + { + static readonly string k_NoAssetDisplayName = L10n.Tr(""); + static readonly string k_ReadOnlyDisplayName = L10n.Tr("[Read Only]"); + static readonly StringBuilder k_StringBuilder = new StringBuilder(); + + public static string GetDisplayName(ISequenceState sequence) + { + string displayName = sequence.director != null ? GetDisplayName(sequence.director) : GetDisplayName(sequence.asset); + if (sequence.asset != null && sequence.isReadOnly) + displayName += " " + k_ReadOnlyDisplayName; + return displayName; + } + + public static string GetDisplayName(PlayableAsset asset) + { + return asset != null ? asset.name : k_NoAssetDisplayName; + } + + public static string GetDisplayName(PlayableDirector director) + { + k_StringBuilder.Length = 0; + k_StringBuilder.Append(GetDisplayName(director.playableAsset)); + k_StringBuilder.Append(" (").Append(director.name).Append(')'); + return k_StringBuilder.ToString(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/DisplayNameHelper.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/DisplayNameHelper.cs.meta new file mode 100644 index 0000000..cb233c8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/DisplayNameHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7fc2147e42d71644aad0eaf9a3526249 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIColorOverride.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIColorOverride.cs new file mode 100644 index 0000000..47815cd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIColorOverride.cs @@ -0,0 +1,21 @@ +using System; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + struct GUIColorOverride : IDisposable + { + readonly Color m_OldColor; + + public GUIColorOverride(Color newColor) + { + m_OldColor = GUI.color; + GUI.color = newColor; + } + + public void Dispose() + { + GUI.color = m_OldColor; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIColorOverride.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIColorOverride.cs.meta new file mode 100644 index 0000000..1d338af --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIColorOverride.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 44507a833d0ca8a42aaec1c3d752eb5f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIGroupScope.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIGroupScope.cs new file mode 100644 index 0000000..e8f0413 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIGroupScope.cs @@ -0,0 +1,18 @@ +using System; +using UnityEngine; + +namespace UnityEditor +{ + struct GUIGroupScope : IDisposable + { + public GUIGroupScope(Rect position) + { + GUI.BeginGroup(position); + } + + public void Dispose() + { + GUI.EndGroup(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIGroupScope.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIGroupScope.cs.meta new file mode 100644 index 0000000..d0a2d09 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIGroupScope.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0bee8aba5e8a40446b7098666c5314d9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIMixedValueScope.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIMixedValueScope.cs new file mode 100644 index 0000000..f3da9f3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIMixedValueScope.cs @@ -0,0 +1,20 @@ +using System; +using UnityEngine; + +namespace UnityEditor +{ + struct GUIMixedValueScope : IDisposable + { + readonly bool m_PrevValue; + public GUIMixedValueScope(bool newValue) + { + m_PrevValue = EditorGUI.showMixedValue; + EditorGUI.showMixedValue = newValue; + } + + public void Dispose() + { + EditorGUI.showMixedValue = m_PrevValue; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIMixedValueScope.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIMixedValueScope.cs.meta new file mode 100644 index 0000000..94ff586 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIMixedValueScope.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d59cefc45e3c31d4a90563364e7258fa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIViewportScope.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIViewportScope.cs new file mode 100644 index 0000000..7999ffd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIViewportScope.cs @@ -0,0 +1,34 @@ +using System; +using UnityEngine; + +namespace UnityEditor +{ + // Special Clip Scope that only effects painting, and keeps the coordinate system identical + struct GUIViewportScope : IDisposable + { + bool m_open; + public GUIViewportScope(Rect position) + { + m_open = false; + if (Event.current.type == EventType.Repaint || Event.current.type == EventType.Layout) + { + GUI.BeginClip(position, -position.min, Vector2.zero, false); + m_open = true; + } + } + + public void Dispose() + { + CloseScope(); + } + + void CloseScope() + { + if (m_open) + { + GUI.EndClip(); + m_open = false; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIViewportScope.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIViewportScope.cs.meta new file mode 100644 index 0000000..1c3a2f0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/GUIViewportScope.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: af84cf39b8fa0654badd9278cbd00d77 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Graphics.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Graphics.cs new file mode 100644 index 0000000..cc9addf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Graphics.cs @@ -0,0 +1,109 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + static class Graphics + { + public static void ShadowLabel(Rect rect, string text, GUIStyle style, Color textColor, Color shadowColor) + { + ShadowLabel(rect, GUIContent.Temp(text), style, textColor, shadowColor); + } + + public static void ShadowLabel(Rect rect, GUIContent content, GUIStyle style, Color textColor, Color shadowColor) + { + var shadowRect = rect; + shadowRect.xMin += 2.0f; + shadowRect.yMin += 2.0f; + style.normal.textColor = Color.black; + GUI.Label(shadowRect, content, style); + + style.normal.textColor = textColor; + GUI.Label(rect, content, style); + } + + public static void DrawLine(Vector3 p1, Vector3 p2, Color color) + { + var c = Handles.color; + Handles.color = color; + Handles.DrawLine(p1, p2); + Handles.color = c; + } + + public static void DrawPolygonAA(Color color, Vector3[] vertices) + { + var prevColor = Handles.color; + Handles.color = color; + Handles.DrawAAConvexPolygon(vertices); + Handles.color = prevColor; + } + + public static void DrawDottedLine(Vector3 p1, Vector3 p2, float segmentsLength, Color col) + { + HandleUtility.ApplyWireMaterial(); + + GL.Begin(GL.LINES); + GL.Color(col); + + var length = Vector3.Distance(p1, p2); // ignore z component + var count = Mathf.CeilToInt(length / segmentsLength); + for (var i = 0; i < count; i += 2) + { + GL.Vertex((Vector3.Lerp(p1, p2, i * segmentsLength / length))); + GL.Vertex((Vector3.Lerp(p1, p2, (i + 1) * segmentsLength / length))); + } + + GL.End(); + } + + public static void DrawLineAtTime(WindowState state, double time, Color color, bool dotted = false) + { + var t = state.TimeToPixel(time); + + var p0 = new Vector3(t, state.timeAreaRect.yMax); + var p1 = new Vector3(t, state.timeAreaRect.yMax + state.windowHeight - WindowConstants.sliderWidth); + + if (dotted) + DrawDottedLine(p0, p1, 4.0f, color); + else + DrawLine(p0, p1, color); + } + + public static void DrawTextureRepeated(Rect area, Texture texture) + { + if (texture == null || Event.current.type != EventType.Repaint) + return; + + GUI.BeginClip(area); + int w = Mathf.CeilToInt(area.width / texture.width); + int h = Mathf.CeilToInt(area.height / texture.height); + for (int x = 0; x < w; x++) + { + for (int y = 0; y < h; y++) + { + GUI.DrawTexture(new Rect(x * texture.width, y * texture.height, texture.width, texture.height), texture); + } + } + + GUI.EndClip(); + } + + public static void DrawShadow(Rect clientRect) + { + var rect = clientRect; + rect.height = WindowConstants.shadowUnderTimelineHeight; + GUI.Box(rect, GUIContent.none, DirectorStyles.Instance.bottomShadow); + } + + public static void DrawBackgroundRect(WindowState state, Rect rect, bool subSequenceMode = false) + { + Color c = subSequenceMode ? DirectorStyles.Instance.customSkin.colorSubSequenceBackground : DirectorStyles.Instance.customSkin.colorSequenceBackground; + EditorGUI.DrawRect(rect, c); + if (state.IsEditingAPrefabAsset()) + { + c = SceneView.kSceneViewPrefabBackground.Color; + c.a = 0.5f; + EditorGUI.DrawRect(rect, c); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Graphics.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Graphics.cs.meta new file mode 100644 index 0000000..72bcc8d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Graphics.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4545bb65ccebf8040ac212d5792979b5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/KeyTraverser.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/KeyTraverser.cs new file mode 100644 index 0000000..2f64868 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/KeyTraverser.cs @@ -0,0 +1,203 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline.Utilities +{ + class KeyTraverser + { + float[] m_KeyCache; + int m_DirtyStamp = -1; + int m_LastHash = -1; + readonly TimelineAsset m_Asset; + readonly float m_Epsilon; + int m_LastIndex = -1; + + public int lastIndex + { + get { return m_LastIndex; } + } + + public static IEnumerable GetClipKeyTimes(TimelineClip clip) + { + if (clip == null || clip.animationClip == null || clip.animationClip.empty) + return new float[0]; + + return AnimationClipCurveCache.Instance.GetCurveInfo(clip.animationClip).keyTimes. + Select(k => (float)clip.FromLocalTimeUnbound(k)). // convert to sequence time + Where(k => k >= clip.start && k <= clip.end); // remove non visible keys + } + + public static IEnumerable GetTrackKeyTimes(AnimationTrack track) + { + if (track != null) + { + if (track.inClipMode) + return track.clips.Where(c => c.recordable). + SelectMany(x => GetClipKeyTimes(x)); + if (track.infiniteClip != null && !track.infiniteClip.empty) + return AnimationClipCurveCache.Instance.GetCurveInfo(track.infiniteClip).keyTimes; + } + return new float[0]; + } + + static int CalcAnimClipHash(TrackAsset asset) + { + int hash = 0; + if (asset != null) + { + AnimationTrack animTrack = asset as AnimationTrack; + if (animTrack != null) + { + for (var i = 0; i != animTrack.clips.Length; ++i) + { + hash ^= (animTrack.clips[i]).Hash(); + } + } + foreach (var subTrack in asset.GetChildTracks()) + { + if (subTrack != null) + hash ^= CalcAnimClipHash(subTrack); + } + } + return hash; + } + + internal static int CalcAnimClipHash(TimelineAsset asset) + { + int hash = 0; + foreach (var t in asset.GetRootTracks()) + { + if (t != null) + hash ^= CalcAnimClipHash(t); + } + return hash; + } + + void RebuildKeyCache() + { + m_KeyCache = m_Asset.flattenedTracks.Where(x => (x as AnimationTrack) != null) + .Cast() + .SelectMany(t => GetTrackKeyTimes(t)). + OrderBy(x => x).ToArray(); + + if (m_KeyCache.Length > 0) + { + float[] unique = new float[m_KeyCache.Length]; + unique[0] = m_KeyCache[0]; + int index = 0; + for (int i = 1; i < m_KeyCache.Length; i++) + { + if (m_KeyCache[i] - unique[index] > m_Epsilon) + { + index++; + unique[index] = m_KeyCache[i]; + } + } + m_KeyCache = unique; + Array.Resize(ref m_KeyCache, index + 1); + } + } + + public KeyTraverser(TimelineAsset timeline, float epsilon) + { + m_Asset = timeline; + m_Epsilon = epsilon; + } + + void CheckCache(int dirtyStamp) + { + int hash = CalcAnimClipHash(m_Asset); + if (dirtyStamp != m_DirtyStamp || hash != m_LastHash) + { + RebuildKeyCache(); + m_DirtyStamp = dirtyStamp; + m_LastHash = hash; + } + } + + public float GetNextKey(float key, int dirtyStamp) + { + CheckCache(dirtyStamp); + if (m_KeyCache.Length > 0) + { + if (key < m_KeyCache.Last() - m_Epsilon) + { + if (key > m_KeyCache[0] - m_Epsilon) + { + float t = key + m_Epsilon; + // binary search + int max = m_KeyCache.Length - 1; + int min = 0; + while (max - min > 1) + { + int imid = (min + max) / 2; + if (t > m_KeyCache[imid]) + min = imid; + else + max = imid; + } + m_LastIndex = max; + return m_KeyCache[max]; + } + + m_LastIndex = 0; + return m_KeyCache[0]; + } + if (key < m_KeyCache.Last() + m_Epsilon) + { + m_LastIndex = m_KeyCache.Length - 1; + return Mathf.Max(key, m_KeyCache.Last()); + } + } + m_LastIndex = -1; + return key; + } + + public float GetPrevKey(float key, int dirtyStamp) + { + CheckCache(dirtyStamp); + if (m_KeyCache.Length > 0) + { + if (key > m_KeyCache[0] + m_Epsilon) + { + if (key < m_KeyCache.Last() + m_Epsilon) + { + float t = key - m_Epsilon; + + // binary search + int max = m_KeyCache.Length - 1; + int min = 0; + while (max - min > 1) + { + int imid = (min + max) / 2; + if (t < m_KeyCache[imid]) + max = imid; + else + min = imid; + } + m_LastIndex = min; + return m_KeyCache[min]; + } + m_LastIndex = m_KeyCache.Length - 1; + return m_KeyCache.Last(); + } + if (key >= m_KeyCache[0] - m_Epsilon) + { + m_LastIndex = 0; + return Mathf.Min(key, m_KeyCache[0]); + } + } + m_LastIndex = -1; + return key; + } + + public int GetKeyCount(int dirtyStamp) + { + CheckCache(dirtyStamp); + return m_KeyCache.Length; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/KeyTraverser.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/KeyTraverser.cs.meta new file mode 100644 index 0000000..5ce97aa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/KeyTraverser.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b57f909f22642d469a39e9628535312 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/MarkerModifier.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/MarkerModifier.cs new file mode 100644 index 0000000..9da5277 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/MarkerModifier.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + static class MarkerModifier + { + public static void DeleteMarker(IMarker marker) + { + var trackAsset = marker.parent; + if (trackAsset != null) + { + SelectionManager.Remove(marker); + trackAsset.DeleteMarker(marker); + } + } + + public static IEnumerable CloneMarkersToParent(IEnumerable markers, TrackAsset parent) + { + if (!markers.Any()) return Enumerable.Empty(); + var clonedMarkers = new List(); + foreach (var marker in markers) + clonedMarkers.Add(CloneMarkerToParent(marker, parent)); + return clonedMarkers; + } + + public static IMarker CloneMarkerToParent(IMarker marker, TrackAsset parent) + { + var markerObject = marker as ScriptableObject; + if (markerObject == null) return null; + + var newMarkerObject = Object.Instantiate(markerObject); + AddMarkerToParent(newMarkerObject, parent); + + newMarkerObject.name = markerObject.name; + try + { + CustomTimelineEditorCache.GetMarkerEditor((IMarker)newMarkerObject).OnCreate((IMarker)newMarkerObject, marker); + } + catch (Exception e) + { + Debug.LogException(e); + } + + + return (IMarker)newMarkerObject; + } + + static void AddMarkerToParent(ScriptableObject marker, TrackAsset parent) + { + TimelineCreateUtilities.SaveAssetIntoObject(marker, parent); + TimelineUndo.RegisterCreatedObjectUndo(marker, "Duplicate Marker"); + TimelineUndo.PushUndo(parent, "Duplicate Marker"); + + if (parent != null) + { + parent.AddMarker(marker); + ((IMarker)marker).Initialize(parent); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/MarkerModifier.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/MarkerModifier.cs.meta new file mode 100644 index 0000000..b16c6f5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/MarkerModifier.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7cfaad4e53832d94c9421d2dd1ad82f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectExtension.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectExtension.cs new file mode 100644 index 0000000..863500d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectExtension.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using UnityEditor; + +namespace UnityEditor.Timeline +{ + static class ObjectExtension + { + public static bool IsSceneObject(this Object obj) + { + if (obj == null) + return false; + + bool isSceneType = obj is GameObject || obj is Component; + if (!isSceneType) + return false; + + return !PrefabUtility.IsPartOfPrefabAsset(obj); + } + + public static bool IsPrefab(this Object obj) + { + if (obj == null) + return false; + + return PrefabUtility.IsPartOfPrefabAsset(obj); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectExtension.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectExtension.cs.meta new file mode 100644 index 0000000..b1ff382 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectExtension.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4722a1362908a1843ab03a055c5c3fa0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectReferenceField.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectReferenceField.cs new file mode 100644 index 0000000..3ace197 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectReferenceField.cs @@ -0,0 +1,195 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEngine.Playables; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + // Describes the object references on a ScriptableObject, ignoring script fields + struct ObjectReferenceField + { + public string propertyPath; + public bool isSceneReference; + public System.Type type; + + private readonly static ObjectReferenceField[] None = new ObjectReferenceField[0]; + private readonly static Dictionary s_Cache = new Dictionary(); + + public static ObjectReferenceField[] FindObjectReferences(System.Type type) + { + if (type == null) + return None; + + if (type.IsAbstract || type.IsInterface) + return None; + + if (!typeof(ScriptableObject).IsAssignableFrom(type)) + return None; + + ObjectReferenceField[] result = null; + if (s_Cache.TryGetValue(type, out result)) + return result; + + result = SearchForFields(type); + s_Cache[type] = result; + return result; + } + + public static ObjectReferenceField[] FindObjectReferences() where T : ScriptableObject, new() + { + return FindObjectReferences(typeof(T)); + } + + private static ObjectReferenceField[] SearchForFields(System.Type t) + { + Object instance = ScriptableObject.CreateInstance(t); + var list = new List(); + + var serializableObject = new SerializedObject(instance); + var prop = serializableObject.GetIterator(); + bool enterChildren = true; + while (prop.NextVisible(enterChildren)) + { + enterChildren = true; + var ppath = prop.propertyPath; + if (ppath == "m_Script") + { + enterChildren = false; + } + else if (prop.propertyType == SerializedPropertyType.ObjectReference || prop.propertyType == SerializedPropertyType.ExposedReference) + { + enterChildren = false; + var exposedType = GetTypeFromPath(t, prop.propertyPath); + if (exposedType != null && typeof(Object).IsAssignableFrom(exposedType)) + { + bool isSceneRef = prop.propertyType == SerializedPropertyType.ExposedReference; + list.Add( + new ObjectReferenceField() {propertyPath = prop.propertyPath, isSceneReference = isSceneRef, type = exposedType} + ); + } + } + } + + Object.DestroyImmediate(instance); + if (list.Count == 0) + return None; + return list.ToArray(); + } + + private static System.Type GetTypeFromPath(System.Type baseType, string path) + { + if (string.IsNullOrEmpty(path)) + return null; + + System.Type parentType = baseType; + FieldInfo field = null; + var pathTo = path.Split(new char[] {'.'}, StringSplitOptions.RemoveEmptyEntries); + var flags = BindingFlags.FlattenHierarchy | BindingFlags.Public | BindingFlags.NonPublic | + BindingFlags.Instance; + foreach (string s in pathTo) + { + field = parentType.GetField(s, flags); + while (field == null) + { + if (parentType.BaseType == null) + return null; // Should not happen really. Means SerializedObject got the property, but the reflection missed it + parentType = parentType.BaseType; + field = parentType.GetField(s, flags); + } + + parentType = field.FieldType; + } + + // dig out exposed reference types + if (field.FieldType.IsGenericType && field.FieldType.GetGenericTypeDefinition() == typeof(ExposedReference).GetGenericTypeDefinition()) + { + return field.FieldType.GetGenericArguments()[0]; + } + + return field.FieldType; + } + + public Object Find(ScriptableObject sourceObject, Object context = null) + { + if (sourceObject == null) + return null; + + SerializedObject obj = new SerializedObject(sourceObject, context); + var prop = obj.FindProperty(propertyPath); + if (prop == null) + throw new InvalidOperationException("sourceObject is not of the proper type. It does not contain a path to " + propertyPath); + + Object result = null; + if (isSceneReference) + { + if (prop.propertyType != SerializedPropertyType.ExposedReference) + throw new InvalidOperationException(propertyPath + " is marked as a Scene Reference, but is not an exposed reference type"); + if (context == null) + Debug.LogWarning("ObjectReferenceField.Find " + " is called on a scene reference without a context, will always be null"); + + result = prop.exposedReferenceValue; + } + else + { + if (prop.propertyType != SerializedPropertyType.ObjectReference) + throw new InvalidOperationException(propertyPath + "is marked as an asset reference, but is not an object reference type"); + result = prop.objectReferenceValue; + } + + return result; + } + + /// + /// Check if an Object satisfies this field, including components + /// + public bool IsAssignable(Object obj) + { + if (obj == null) + return false; + + // types match + bool potentialMatch = type.IsAssignableFrom(obj.GetType()); + + // field is component, and it exists on the gameObject + if (!potentialMatch && typeof(Component).IsAssignableFrom(type) && obj is GameObject) + potentialMatch = ((GameObject)obj).GetComponent(type) != null; + + return potentialMatch && isSceneReference == obj.IsSceneObject(); + } + + /// + /// Assigns a value to the field + /// + public bool Assign(ScriptableObject scriptableObject, Object value, IExposedPropertyTable exposedTable = null) + { + var serializedObject = new SerializedObject(scriptableObject, exposedTable as Object); + var property = serializedObject.FindProperty(propertyPath); + if (property == null) + return false; + + // if the value is a game object, but the field is a component + if (value is GameObject && typeof(Component).IsAssignableFrom(type)) + value = ((GameObject)value).GetComponent(type); + + if (isSceneReference) + { + property.exposedReferenceValue = value; + + // the object gets dirtied, but not the scene which is where the reference is stored + var component = exposedTable as Component; + if (component != null && !EditorApplication.isPlaying) + EditorSceneManager.MarkSceneDirty(component.gameObject.scene); + } + else + property.objectReferenceValue = value; + + serializedObject.ApplyModifiedProperties(); + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectReferenceField.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectReferenceField.cs.meta new file mode 100644 index 0000000..c0655c7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/ObjectReferenceField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 29bf1d4ec1012bc45967ce95b729b8b3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/PropertyCollector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/PropertyCollector.cs new file mode 100644 index 0000000..f19300d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/PropertyCollector.cs @@ -0,0 +1,226 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class PropertyCollector : IPropertyCollector + { + readonly Stack m_ObjectStack = new Stack(); + + // Call immediately before use + public void Reset() + { + m_ObjectStack.Clear(); + } + + // call to reset caches. should be called when switching master timelines + public void Clear() + { + m_ObjectStack.Clear(); + AnimationPreviewUtilities.ClearCaches(); + } + + public void PushActiveGameObject(GameObject gameObject) + { + m_ObjectStack.Push(gameObject); + } + + public void PopActiveGameObject() + { + m_ObjectStack.Pop(); + } + + public void AddFromClip(AnimationClip clip) + { + var go = m_ObjectStack.Peek(); // allow it to throw if empty + if (go != null && clip != null) // null game object is allowed for calls to be ignored + AddFromClip(go, clip); + } + + public void AddFromClips(IEnumerable clips) + { + var go = m_ObjectStack.Peek(); + if (go != null) + AddFromClips(go, clips); + } + + public void AddFromName(string name) where T : Component + { + var go = m_ObjectStack.Peek(); // allow it to throw if empty + if (go != null) // null game object is allowed for calls to be ignored + AddFromName(go, name); + } + + public void AddFromName(string name) + { + var go = m_ObjectStack.Peek(); // allow it to throw if empty + if (go != null) // null game object is allowed for calls to be ignored + AddFromName(go, name); + } + + public void AddFromClip(GameObject obj, AnimationClip clip) + { + if (!Application.isPlaying) + AddPropertiesFromClip(obj, clip); + } + + public void AddFromClips(GameObject animatorRoot, IEnumerable clips) + { + if (Application.isPlaying) + return; + + AnimationPreviewUtilities.PreviewFromCurves(animatorRoot, AnimationPreviewUtilities.GetBindings(animatorRoot, clips)); + } + + public void AddFromName(GameObject obj, string name) where T : Component + { + if (!Application.isPlaying) + AddPropertiesFromName(obj, typeof(T), name); + } + + public void AddFromName(GameObject obj, string name) + { + if (!Application.isPlaying) + AddPropertiesFromName(obj, name); + } + + public void AddFromName(Component component, string name) + { + if (!Application.isPlaying) + AddPropertyModification(component, name); + } + + public void AddFromComponent(GameObject obj, Component component) + { + if (Application.isPlaying) + return; + + if (obj == null || component == null) + return; + + var serializedObject = new SerializedObject(component); + SerializedProperty property = serializedObject.GetIterator(); + + while (property.NextVisible(true)) + { + if (property.hasVisibleChildren || !AnimatedParameterUtility.IsTypeAnimatable(property.propertyType)) + continue; + + AddPropertyModification(component, property.propertyPath); + } + } + + void AddPropertiesFromClip(GameObject go, AnimationClip clip) + { + if (go != null && clip != null) + { + AnimationMode.InitializePropertyModificationForGameObject(go, clip); + } + } + + static void AddPropertiesFromName(GameObject go, string property) + { + if (go == null) + return; + + AddPropertyModification(go, property); + } + + static void AddPropertiesFromName(GameObject go, Type compType, string property) + { + if (go == null) + return; + var comp = go.GetComponent(compType); + if (comp == null) + return; + + AddPropertyModification(comp, property); + } + + public void AddObjectProperties(Object obj, AnimationClip clip) + { + if (obj == null || clip == null) + return; + + IPlayableAsset asset = obj as IPlayableAsset; + IPlayableBehaviour playable = obj as IPlayableBehaviour; + + // special case for assets that contain animated script playables. + // The paths in the clip start from the field with the templated playable + if (asset != null) + { + if (playable == null) + { + AddSerializedPlayableModifications(asset, clip); + } + else + { + // in this case the asset is the playable. The clip applies directly + AnimationMode.InitializePropertyModificationForObject(obj, clip); + } + } + } + + void AddSerializedPlayableModifications(IPlayableAsset asset, AnimationClip clip) + { + var obj = asset as Object; + if (obj == null) + return; + + var driver = WindowState.previewDriver; + if (driver == null || !AnimationMode.InAnimationMode(driver)) + return; + + var serializedObj = new SerializedObject(obj); + var bindings = AnimationClipCurveCache.Instance.GetCurveInfo(clip).bindings; + var fields = AnimatedParameterUtility.GetScriptPlayableFields(asset); + + // go through each binding and offset using the field name + // so the modification system can find the particle object using the asset as a root + foreach (var b in bindings) + { + foreach (var f in fields) + { + var propertyPath = f.Name + "." + b.propertyName; + if (serializedObj.FindProperty(propertyPath) != null) + { + DrivenPropertyManager.RegisterProperty(driver, obj, propertyPath); + break; + } + } + } + } + + private static void AddPropertyModification(GameObject obj, string propertyName) + { + var driver = WindowState.previewDriver; + if (driver == null || !AnimationMode.InAnimationMode(driver)) + return; + + DrivenPropertyManager.RegisterProperty(driver, obj, propertyName); + } + + private static void AddPropertyModification(Component comp, string name) + { + if (comp == null) + return; + + var driver = WindowState.previewDriver; + if (driver == null || !AnimationMode.InAnimationMode(driver)) + return; + + // Register Property will display an error if a property doesn't exist (wanted behaviour) + // However, it also displays an error on Monobehaviour m_Script property, since it can't be driven. (not wanted behaviour) + // case 967026 + if (name == "m_Script" && (comp as MonoBehaviour) != null) + return; + + DrivenPropertyManager.RegisterProperty(driver, comp, name); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/PropertyCollector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/PropertyCollector.cs.meta new file mode 100644 index 0000000..3e8f486 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/PropertyCollector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f3a562675833b4448299e4f627b0cec +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Range.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Range.cs new file mode 100644 index 0000000..745e742 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Range.cs @@ -0,0 +1,49 @@ +using System; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + struct Range + { + public double start; + public double end; + public double length { get { return end - start; } } + + public static Range Union(Range lhs, Range rhs) + { + return new Range + { + start = Math.Min(lhs.start, rhs.start), + end = Math.Max(lhs.end, rhs.end) + }; + } + + public static Range Intersection(Range lhs, Range rhs) + { + var s = Math.Max(lhs.start, rhs.start); + var e = Math.Min(lhs.end, rhs.end); + + if (s > e) + { + // No intersection returns a 0-length range from 0 to 0 + return new Range(); + } + + return new Range + { + start = s, + end = e + }; + } + + public override string ToString() + { + return ToString("F3"); + } + + public string ToString(string format) + { + return UnityString.Format("({0}, {1})", start.ToString(format), end.ToString(format)); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Range.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Range.cs.meta new file mode 100644 index 0000000..22005c4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/Range.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d31dfeaa131921f4eae00783cc48146f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SequenceSelectorNameFormater.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SequenceSelectorNameFormater.cs new file mode 100644 index 0000000..654eecb --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SequenceSelectorNameFormater.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace UnityEditor.Timeline +{ + // Class used for uniquely format names used in the GenericMenu. We can't add duplicate MenuItem in GenericMenu + // so that's why we need to keep information about the text we want to uniquely format. + class SequenceMenuNameFormater + { + Dictionary m_UniqueItem = new Dictionary(); + + public string Format(string text) + { + var key = text.GetHashCode(); + var index = 0; + + if (m_UniqueItem.ContainsKey(key)) + { + index = m_UniqueItem[key]; + index++; + m_UniqueItem[key] = index; + } + else + { + m_UniqueItem.Add(key, index); + return text; + } + + return $"{text}{index}"; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SequenceSelectorNameFormater.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SequenceSelectorNameFormater.cs.meta new file mode 100644 index 0000000..9fe16bd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SequenceSelectorNameFormater.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1861286ba69badd439188a65bebf3cda +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SpacePartitioner.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SpacePartitioner.cs new file mode 100644 index 0000000..1539a1d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SpacePartitioner.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + interface IBounds + { + Rect boundingRect { get; } + } + + class SpacePartitioner + { + internal class CachedList + { + public static readonly List Instance = new List(1000); + } + + struct Entry : IInterval + { + public object item { get; set; } + public long intervalStart { get; set; } + public long intervalEnd { get; set; } + public Rect bounds { get; set; } + + private const float kPrecision = 100.0f; + private const float kMaxFloat = (float)long.MaxValue; + private const float kMinFloat = (float)long.MinValue; + + static public Int64 FromFloat(float f) + { + if (Single.IsPositiveInfinity(f)) + return long.MaxValue; + if (Single.IsNegativeInfinity(f)) + return long.MinValue; + + f = Mathf.Clamp(f, kMinFloat, kMaxFloat); // prevent overflow of floats + f = Mathf.Clamp(f * kPrecision, kMinFloat, kMaxFloat); // clamp to 'long' range + return (long)(f); + } + } + + const EventType k_GuiEventLock = EventType.Repaint; + + IntervalTree m_Tree = new IntervalTree(); + List m_CacheList = new List(); + + public void Clear() + { + m_Tree.Clear(); + } + + public void AddBounds(IBounds bounds) + { + AddBounds(bounds, bounds.boundingRect); + } + + public void AddBounds(object item, Rect rect) + { + if (item == null) + throw new ArgumentNullException("item"); + + m_Tree.Add(new Entry() + { + intervalStart = Entry.FromFloat(rect.yMin), + intervalEnd = Entry.FromFloat(rect.yMax), + bounds = rect, + item = item + } + ); + } + + /// + /// Get items of type T at a given position + /// + /// + /// + /// + /// + /// Uses a (1,1) sized box + /// Use .ToList() or .ToArray() when not enumerating the result immediately + /// + /// + public IEnumerable GetItemsAtPosition(Vector2 position) + { + return GetItemsInArea(new Rect(position.x, position.y, 1, 1)); + } + + /// + /// + /// + /// + /// + /// + /// + public IEnumerable GetItemsInArea(Rect area) + { + m_CacheList.Clear(); + m_Tree.IntersectsWithRange(long.MinValue, long.MaxValue, m_CacheList); + + var list = CachedList.Instance; + list.Clear(); + foreach (var i in m_CacheList) + { + if (i.item is T && i.bounds.Overlaps(area)) + list.Add((T)i.item); + } + return list; + } + + public void DebugDraw() + { + var kFillColor = new Color(1.0f, 1.0f, 1.0f, 0.1f); + var kOutlineColor = Color.yellow; + + m_CacheList.Clear(); + m_Tree.IntersectsWithRange(long.MinValue, long.MaxValue, m_CacheList); + HandleUtility.ApplyWireMaterial(); + + foreach (var item in m_CacheList) + { + Handles.DrawSolidRectangleWithOutline(item.bounds, kFillColor, kOutlineColor); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SpacePartitioner.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SpacePartitioner.cs.meta new file mode 100644 index 0000000..2359cae --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/SpacePartitioner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2fa2cf7de51b0d34d9dce3747b72e49d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleManager.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleManager.cs new file mode 100644 index 0000000..794fc68 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleManager.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.Experimental; +using UnityEditor.StyleSheets; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class StyleManager + { + static readonly StyleState[] k_StyleStates = { StyleState.any }; + static readonly string k_ErrorCannotFindStyle = L10n.Tr("Cannot find style {0} for {1}"); + + static Dictionary s_CustomStyles = new Dictionary(); + static GUISkin s_CurrentSkin; + + public static GUIStyle UssStyleForType(Type type) + { + ClearCacheIfInvalid(); + + GUIStyle cachedStyle; + if (s_CustomStyles.TryGetValue(type, out cachedStyle)) + return cachedStyle; + + var style = DirectorStyles.GetGUIStyle(DirectorStyles.markerDefaultStyle); + + var customStyleForType = CustomStyleForType(type); + if (customStyleForType != null) + { + if (IsStyleValid(customStyleForType)) + style = DirectorStyles.GetGUIStyle(customStyleForType); + else + Debug.LogWarningFormat(k_ErrorCannotFindStyle, customStyleForType, type.Name); + } + + s_CustomStyles.Add(type, style); + return style; + } + + static string CustomStyleForType(Type type) + { + var attr = (CustomStyleAttribute)type.GetCustomAttributes(typeof(CustomStyleAttribute), true).FirstOrDefault(); + return attr != null ? attr.ussStyle : null; + } + + static bool IsStyleValid(string ussStyle) + { + return GUISkin.current.FindStyle(ussStyle) != null || EditorResources.styleCatalog.GetStyle(ussStyle, k_StyleStates).IsValid(); + } + + static void ClearCacheIfInvalid() + { + if (s_CurrentSkin != GUISkin.current) + s_CustomStyles.Clear(); + s_CurrentSkin = GUISkin.current; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleManager.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleManager.cs.meta new file mode 100644 index 0000000..bba0d35 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5f31f28cc64c91042976555c016ffd5f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleNormalColorOverride.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleNormalColorOverride.cs new file mode 100644 index 0000000..24016ca --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleNormalColorOverride.cs @@ -0,0 +1,23 @@ +using System; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + struct StyleNormalColorOverride : IDisposable + { + readonly GUIStyle m_Style; + readonly Color m_OldColor; + + public StyleNormalColorOverride(GUIStyle style, Color newColor) + { + m_Style = style; + m_OldColor = style.normal.textColor; + style.normal.textColor = newColor; + } + + public void Dispose() + { + m_Style.normal.textColor = m_OldColor; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleNormalColorOverride.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleNormalColorOverride.cs.meta new file mode 100644 index 0000000..b969311 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/StyleNormalColorOverride.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2bd3ca1fde4b154448ef972b0f9d292e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimeReferenceUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimeReferenceUtility.cs new file mode 100644 index 0000000..4e456f8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimeReferenceUtility.cs @@ -0,0 +1,57 @@ +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class TimeReferenceUtility + { + static WindowState state { get { return TimelineWindow.instance.state; } } + + public static double SnapToFrame(double time) + { + if (state.timeReferenceMode == TimeReferenceMode.Global) + { + time = state.editSequence.ToGlobalTime(time); + time = TimeUtility.RoundToFrame(time, state.referenceSequence.frameRate); + return state.editSequence.ToLocalTime(time); + } + + return TimeUtility.RoundToFrame(time, state.referenceSequence.frameRate); + } + + public static string ToTimeString(double time, string format = "F2") + { + if (state.timeReferenceMode == TimeReferenceMode.Global) + time = state.editSequence.ToGlobalTime(time); + + return state.editSequence.viewModel.timeInFrames ? + TimeUtility.TimeAsFrames(time, state.referenceSequence.frameRate, format) : + TimeUtility.TimeAsTimeCode(time, state.referenceSequence.frameRate, format); + } + + public static double FromTimeString(string timeString) + { + double newTime; + + if (state.timeInFrames) + { + double newFrameDouble; + if (double.TryParse(timeString, out newFrameDouble)) + newTime = TimeUtility.FromFrames(newFrameDouble, state.referenceSequence.frameRate); + else + newTime = state.editSequence.time; + } + else + { + newTime = TimeUtility.ParseTimeCode(timeString, state.referenceSequence.frameRate, -1); + } + + if (newTime >= 0.0) + { + return state.timeReferenceMode == TimeReferenceMode.Global ? + state.editSequence.ToLocalTime(newTime) : newTime; + } + + return state.editSequence.time; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimeReferenceUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimeReferenceUtility.cs.meta new file mode 100644 index 0000000..1da1a4a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimeReferenceUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f6bb32665bcc91b41a7177fd6af08ad6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimelineKeyboardNavigation.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimelineKeyboardNavigation.cs new file mode 100644 index 0000000..3cd18d8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimelineKeyboardNavigation.cs @@ -0,0 +1,387 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class KeyboardNavigation + { + public static void FrameTrackHeader(TreeViewItem treeItem = null) + { + if (TrackHeadActive()) + treeItem = treeItem ?? SelectionManager.SelectedTrackGUI().Last(); + else + { + var item = GetVisibleSelectedItems().LastOrDefault(); + treeItem = TimelineWindow.instance.allTracks.FirstOrDefault( + x => item != null && x.track == item.parentTrack); + } + + if (treeItem != null) + TimelineWindow.instance.treeView.FrameItem(treeItem); + } + + public static bool TrackHeadActive() + { + return SelectionManager.SelectedTracks().Any(x => x.IsVisibleRecursive()) && !ClipAreaActive(); + } + + public static bool ClipAreaActive() + { + return GetVisibleSelectedItems().Any(); + } + + public static IEnumerable GetVisibleSelectedItems() + { + return SelectionManager.SelectedItems().Where(x => x.parentTrack.IsVisibleRecursive()); + } + + public static IEnumerable GetVisibleTracks() + { + return TimelineWindow.instance.allTracks.Where(x => x.track.IsVisibleRecursive()); + } + + static TrackAsset PreviousTrack(this TrackAsset track) + { + var uiOrderTracks = GetVisibleTracks().Select(t => t.track).ToList(); + var selIdx = uiOrderTracks.IndexOf(track); + return selIdx > 0 ? uiOrderTracks[selIdx - 1] : null; + } + + static TrackAsset NextTrack(this TrackAsset track) + { + var uiOrderTracks = GetVisibleTracks().Select(t => t.track).ToList(); + var selIdx = uiOrderTracks.IndexOf(track); + return selIdx < uiOrderTracks.Count - 1 && selIdx != -1 ? uiOrderTracks[selIdx + 1] : null; + } + + static ITimelineItem PreviousItem(this ITimelineItem item, bool clipOnly) + { + var items = item.parentTrack.GetItems().ToArray(); + if (clipOnly) + { + items = items.Where(x => x is ClipItem).ToArray(); + } + else + { + items = items.Where(x => x is MarkerItem).ToArray(); + } + + var idx = Array.IndexOf(items, item); + return idx > 0 ? items[idx - 1] : null; + } + + static ITimelineItem NextItem(this ITimelineItem item, bool clipOnly) + { + var items = item.parentTrack.GetItems().ToArray(); + if (clipOnly) + { + items = items.Where(x => x is ClipItem).ToArray(); + } + else + { + items = items.Where(x => x is MarkerItem).ToArray(); + } + + var idx = Array.IndexOf(items, item); + return idx < items.Length - 1 ? items[idx + 1] : null; + } + + static bool FilterItems(ref List items) + { + var clipOnly = false; + if (items.Any(x => x is ClipItem)) + { + items = items.Where(x => x is ClipItem).ToList(); + clipOnly = true; + } + + return clipOnly; + } + + static ITimelineItem GetClosestItem(TrackAsset track, ITimelineItem refItem) + { + var start = refItem.start; + var end = refItem.end; + var items = track.GetItems().ToList(); + + if (refItem is ClipItem) + { + items = items.Where(x => x is ClipItem).ToList(); + } + else + { + items = items.Where(x => x is MarkerItem).ToList(); + } + + if (!items.Any()) + return null; + ITimelineItem ret = null; + var scoreToBeat = double.NegativeInfinity; + + foreach (var item in items) + { + // test for overlap + var low = Math.Max(item.start, start); + var high = Math.Min(item.end, end); + if (low <= high) + { + var score = high - low; + if (score >= scoreToBeat) + { + scoreToBeat = score; + ret = item; + } + } + } + + return ret; + } + + public static bool FocusFirstVisibleItem(WindowState state, + IEnumerable focusTracks = null) + { + var timeRange = state.timeAreaShownRange; + + var tracks = focusTracks ?? TimelineWindow.instance.treeView.visibleTracks.Where(x => x.IsVisibleRecursive() && x.GetItems().Any()); + var items = tracks.SelectMany(t => t.GetItems().OfType().Where(x => x.end >= timeRange.x && x.end <= timeRange.y || + x.start >= timeRange.x && x.start <= timeRange.y)).ToList(); + var itemFullyInView = items.Where(x => x.end >= timeRange.x && x.end <= timeRange.y && + x.start >= timeRange.x && x.start <= timeRange.y); + var itemToSelect = itemFullyInView.FirstOrDefault() ?? items.FirstOrDefault(); + if (itemToSelect != null) + { + SelectionManager.SelectOnly(itemToSelect); + return true; + } + return false; + } + + public static bool CollapseGroup(WindowState state) + { + if (TrackHeadActive()) + { + var quit = false; + foreach (var track in SelectionManager.SelectedTracks()) + { + if (!track.GetChildTracks().Any()) + continue; + if (!quit && !track.GetCollapsed()) + quit = true; + track.SetCollapsed(true); + } + if (quit) + { + state.Refresh(); + return true; + } + + var selectedTrack = SelectionManager.SelectedTracks().LastOrDefault(); + var parent = selectedTrack != null ? selectedTrack.parent as TrackAsset : null; + if (parent) + { + SelectionManager.SelectOnly(parent); + FrameTrackHeader(GetVisibleTracks().First(x => x.track == parent)); + return true; + } + } + return false; + } + + public static bool SelectLeftItem(WindowState state, bool shift = false) + { + if (ClipAreaActive()) + { + var items = SelectionManager.SelectedItems().ToList(); + var clipOnly = FilterItems(ref items); + + var item = items.Last(); + var prev = item.PreviousItem(clipOnly); + if (prev != null) + { + if (shift) + { + if (SelectionManager.Contains(prev)) + SelectionManager.Remove(item); + SelectionManager.Add(prev); + } + else + SelectionManager.SelectOnly(prev); + TimelineHelpers.FrameItems(state, new[] {prev}); + } + else if (item != null && !shift && item.parentTrack != state.editSequence.asset.markerTrack) + SelectionManager.SelectOnly(item.parentTrack); + return true; + } + return false; + } + + public static bool SelectRightItem(WindowState state, bool shift = false) + { + if (ClipAreaActive()) + { + var items = SelectionManager.SelectedItems().ToList(); + var clipOnly = FilterItems(ref items); + + var item = items.Last(); + var next = item.NextItem(clipOnly); + if (next != null) + { + if (shift) + { + if (SelectionManager.Contains(next)) + SelectionManager.Remove(item); + SelectionManager.Add(next); + } + else + SelectionManager.SelectOnly(next); + TimelineHelpers.FrameItems(state, new[] {next}); + return true; + } + } + return false; + } + + public static bool UnCollapseGroup(WindowState state) + { + if (TrackHeadActive()) + { + var quit = false; + foreach (var track in SelectionManager.SelectedTracks()) + { + if (!track.GetChildTracks().Any()) continue; + + if (!quit && track.GetCollapsed()) + quit = true; + track.SetCollapsed(false); + } + + if (quit) + { + state.Refresh(); + return true; + } + + // Transition to Clip area + var visibleTracks = GetVisibleTracks().Select(x => x.track).ToList(); + var idx = visibleTracks.IndexOf(SelectionManager.SelectedTracks().Last()); + ITimelineItem item = null; + for (var i = idx; i < visibleTracks.Count; ++i) + { + var items = visibleTracks[i].GetItems().OfType(); + if (!items.Any()) + continue; + item = items.First(); + break; + } + + if (item != null) + { + SelectionManager.SelectOnly(item); + TimelineHelpers.FrameItems(state, new[] {item}); + return true; + } + } + return false; + } + + public static bool SelectUpTrack(bool shift = false) + { + if (TrackHeadActive()) + { + var prevTrack = PreviousTrack(SelectionManager.SelectedTracks().Last()); + if (prevTrack != null) + { + if (shift) + { + if (SelectionManager.Contains(prevTrack)) + SelectionManager.Remove(SelectionManager.SelectedTracks().Last()); + SelectionManager.Add(prevTrack); + } + else + SelectionManager.SelectOnly(prevTrack); + FrameTrackHeader(GetVisibleTracks().First(x => x.track == prevTrack)); + } + return true; + } + return false; + } + + public static bool SelectUpItem(WindowState state) + { + if (ClipAreaActive()) + { + var refItem = SelectionManager.SelectedItems().Last(); + var prevTrack = refItem.parentTrack.PreviousTrack(); + while (prevTrack != null) + { + var selectionItem = GetClosestItem(prevTrack, refItem); + if (selectionItem == null) + { + prevTrack = prevTrack.PreviousTrack(); + continue; + } + + SelectionManager.SelectOnly(selectionItem); + TimelineHelpers.FrameItems(state, new[] {selectionItem}); + FrameTrackHeader(GetVisibleTracks().First(x => x.track == selectionItem.parentTrack)); + break; + } + return true; + } + + return false; + } + + public static bool SelectDownTrack(bool shift = false) + { + if (TrackHeadActive()) + { + var nextTrack = SelectionManager.SelectedTracks().Last().NextTrack(); + if (nextTrack != null) + { + if (shift) + { + if (SelectionManager.Contains(nextTrack)) + SelectionManager.Remove(SelectionManager.SelectedTracks().Last()); + SelectionManager.Add(nextTrack); + } + else + SelectionManager.SelectOnly(nextTrack); + + FrameTrackHeader(GetVisibleTracks().First(x => x.track == nextTrack)); + } + return true; + } + + return false; + } + + public static bool SelectDownItem(WindowState state) + { + if (ClipAreaActive()) + { + var refItem = SelectionManager.SelectedItems().Last(); + var nextTrack = refItem.parentTrack.NextTrack(); + while (nextTrack != null) + { + var selectionItem = GetClosestItem(nextTrack, refItem); + if (selectionItem == null) + { + nextTrack = nextTrack.NextTrack(); + continue; + } + + SelectionManager.SelectOnly(selectionItem); + TimelineHelpers.FrameItems(state, new[] {selectionItem}); + FrameTrackHeader(GetVisibleTracks().First(x => x.track == selectionItem.parentTrack)); + break; + } + return true; + } + return false; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimelineKeyboardNavigation.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimelineKeyboardNavigation.cs.meta new file mode 100644 index 0000000..7fb6aea --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TimelineKeyboardNavigation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9be6112c2b1c3ae44927680ba7b36e10 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackModifier.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackModifier.cs new file mode 100644 index 0000000..5afeb52 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackModifier.cs @@ -0,0 +1,21 @@ +using UnityEngine; +using UnityEditor; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + static class TrackModifier + { + public static bool DeleteTrack(TimelineAsset timeline, TrackAsset track) + { + if (TimelineEditor.inspectedDirector != null) + { + TimelineUndo.PushUndo(TimelineEditor.inspectedDirector, "Delete Track"); + TimelineEditor.inspectedDirector.ClearGenericBinding(track); + } + + return timeline.DeleteTrack(track); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackModifier.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackModifier.cs.meta new file mode 100644 index 0000000..f221e10 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackModifier.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 411b7c7ffc0960249b35a2a247b66ff7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackResourceCache.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackResourceCache.cs new file mode 100644 index 0000000..8eda6fe --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackResourceCache.cs @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class TrackResourceCache + { + private static Dictionary s_TrackIconCache = new Dictionary(10); + private static Dictionary s_TrackColorCache = new Dictionary(10); + public static GUIContent s_DefaultIcon = EditorGUIUtility.IconContent("UnityEngine/ScriptableObject Icon"); + + public static GUIContent GetTrackIcon(TrackAsset track) + { + if (track == null) + return s_DefaultIcon; + + GUIContent content = null; + if (!s_TrackIconCache.TryGetValue(track.GetType(), out content)) + { + content = FindTrackIcon(track); + s_TrackIconCache[track.GetType()] = content; + } + return content; + } + + public static Color GetTrackColor(TrackAsset track) + { + if (track == null) + return Color.white; + + // Try to ensure DirectorStyles is initialized first + // Note: GUISkin.current must exist to be able do so + if (!DirectorStyles.IsInitialized && GUISkin.current != null) + DirectorStyles.ReloadStylesIfNeeded(); + + Color color; + if (!s_TrackColorCache.TryGetValue(track.GetType(), out color)) + { + var attr = track.GetType().GetCustomAttributes(typeof(TrackColorAttribute), true); + if (attr.Length > 0) + { + color = ((TrackColorAttribute)attr[0]).color; + } + else + { + // case 1141958 + // There was an error initializing DirectorStyles + if (!DirectorStyles.IsInitialized) + return Color.white; + + color = DirectorStyles.Instance.customSkin.colorDefaultTrackDrawer; + } + + s_TrackColorCache[track.GetType()] = color; + } + return color; + } + + public static void ClearTrackIconCache() + { + s_TrackIconCache.Clear(); + } + + public static void SetTrackIcon(GUIContent content) where T : TrackAsset + { + s_TrackIconCache[typeof(T)] = content; + } + + public static void ClearTrackColorCache() + { + s_TrackColorCache.Clear(); + } + + public static void SetTrackColor(Color c) where T : TrackAsset + { + s_TrackColorCache[typeof(T)] = c; + } + + private static GUIContent FindTrackIcon(TrackAsset track) + { + // backwards compatible -- try to load from Gizmos folder + Texture2D texture = AssetDatabase.LoadAssetAtPath("Assets/Gizmos/" + track.GetType().Name + ".png"); + if (texture != null) + return new GUIContent(texture); + + // try to load based on the binding type + var binding = track.outputs.FirstOrDefault(); + if (binding.outputTargetType != null) + { + // Type calls don't properly handle monobehaviours, because an instance is required to + // get the monoscript icons + if (typeof(MonoBehaviour).IsAssignableFrom(binding.outputTargetType)) + { + texture = null; + var scripts = UnityEngine.Resources.FindObjectsOfTypeAll(); + foreach (var script in scripts) + { + if (script.GetClass() == binding.outputTargetType) + { + texture = AssetPreview.GetMiniThumbnail(script); + break; + } + } + } + else + { + texture = EditorGUIUtility.FindTexture(binding.outputTargetType); + } + + if (texture != null) + return new GUIContent(texture); + } + + // default to the scriptable object icon + return s_DefaultIcon; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackResourceCache.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackResourceCache.cs.meta new file mode 100644 index 0000000..be2a519 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TrackResourceCache.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 63f2caa33e79582448112b2e286d576d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TypeUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TypeUtility.cs new file mode 100644 index 0000000..2c28266 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TypeUtility.cs @@ -0,0 +1,342 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Reflection; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using Component = UnityEngine.Component; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + static class TypeUtility + { + private static Type[] s_AllTrackTypes; + private static Type[] s_AllClipTypes; + private static Type[] s_MarkerTypes; + private static Dictionary s_TrackTypeToVisibleClipType = new Dictionary(); + private static Dictionary s_TrackTypeToAllClipType = new Dictionary(); + private static Dictionary s_TrackToBindingCache = new Dictionary(); + + public static bool IsConcretePlayableAsset(Type t) + { + return typeof(IPlayableAsset).IsAssignableFrom(t) + && IsConcreteAsset(t); + } + + private static bool IsConcreteAsset(Type t) + { + return typeof(ScriptableObject).IsAssignableFrom(t) + && !t.IsAbstract + && !t.IsGenericType + && !t.IsInterface + && !typeof(TrackAsset).IsAssignableFrom(t) + && !typeof(TimelineAsset).IsAssignableFrom(t); + } + + /// + /// List of all PlayableAssets + /// + public static IEnumerable AllClipTypes() + { + if (s_AllClipTypes == null) + { + s_AllClipTypes = TypeCache.GetTypesDerivedFrom(). + Where(t => IsConcreteAsset(t)). + ToArray(); + } + return s_AllClipTypes; + } + + public static IEnumerable AllTrackTypes() + { + if (s_AllTrackTypes == null) + { + s_AllTrackTypes = TypeCache.GetTypesDerivedFrom() + .Where(x => !x.IsAbstract) + .ToArray(); + } + + return s_AllTrackTypes; + } + + public static IEnumerable GetVisiblePlayableAssetsHandledByTrack(Type trackType) + { + if (trackType == null || !typeof(TrackAsset).IsAssignableFrom(trackType)) + return Enumerable.Empty(); + + Type[] types; + if (s_TrackTypeToVisibleClipType.TryGetValue(trackType, out types)) + { + return types; + } + + // special case -- the playable track handles all types not handled by other tracks + if (trackType == typeof(PlayableTrack)) + { + types = GetUnhandledClipTypes().ToArray(); + s_TrackTypeToVisibleClipType[trackType] = types; + return types; + } + + var attributes = trackType.GetCustomAttributes(typeof(TrackClipTypeAttribute), true); + var baseClasses = attributes. + OfType(). + Where(t => t.allowAutoCreate). + Select(a => a.inspectedType); + + types = AllClipTypes().Where(t => baseClasses.Any(x => x.IsAssignableFrom(t))).ToArray(); + s_TrackTypeToVisibleClipType[trackType] = types; + return types; + } + + public static IEnumerable GetPlayableAssetsHandledByTrack(Type trackType) + { + if (trackType == null || !typeof(TrackAsset).IsAssignableFrom(trackType)) + return Enumerable.Empty(); + + Type[] types; + if (s_TrackTypeToAllClipType.TryGetValue(trackType, out types)) + { + return types; + } + + // special case -- the playable track handles all types not handled by other tracks + if (trackType == typeof(PlayableTrack)) + { + types = GetUnhandledClipTypes().ToArray(); + s_TrackTypeToAllClipType[trackType] = types; + return types; + } + + var attributes = trackType.GetCustomAttributes(typeof(TrackClipTypeAttribute), true); + var baseClasses = attributes. + OfType(). + Select(a => a.inspectedType); + + types = AllClipTypes().Where(t => baseClasses.Any(x => x.IsAssignableFrom(t))).ToArray(); + s_TrackTypeToAllClipType[trackType] = types; + return types; + } + + /// + /// Returns the binding attribute attrached to the track + /// + public static TrackBindingTypeAttribute GetTrackBindingAttribute(Type trackType) + { + if (trackType == null || !typeof(TrackAsset).IsAssignableFrom(trackType)) + return null; + + TrackBindingTypeAttribute attribute = null; + if (!s_TrackToBindingCache.TryGetValue(trackType, out attribute)) + { + attribute = (TrackBindingTypeAttribute)Attribute.GetCustomAttribute(trackType, typeof(TrackBindingTypeAttribute)); + s_TrackToBindingCache.Add(trackType, attribute); + } + + return attribute; + } + + /// + /// True if the given track has a clip type that handles the given object + /// + public static bool TrackHasClipForObject(Type trackType, Object obj) + { + return GetPlayableAssetsHandledByTrack(trackType) + .Any(c => ObjectReferenceField.FindObjectReferences(c).Any(o => o.IsAssignable(obj))); + } + + /// + /// Get the list of markers that have fields for the object + /// + public static IEnumerable MarkerTypesWithFieldForObject(Object obj) + { + return GetAllMarkerTypes().Where( + c => ObjectReferenceField.FindObjectReferences(c).Any(o => o.IsAssignable(obj)) + ); + } + + /// + /// Get the list of tracks that can handle this object as clips + /// + public static IEnumerable GetTrackTypesForObject(Object obj) + { + if (obj == null) + return Enumerable.Empty(); + + return AllTrackTypes().Where(t => TrackHasClipForObject(t, obj)); + } + + /// + /// Given a trackType and an object, does the binding type match + /// Takes into account whether creating a missing component is permitted + /// + public static bool IsTrackCreatableFromObject(Object obj, Type trackType) + { + if (obj == null || obj.IsPrefab()) + return false; + + var attribute = GetTrackBindingAttribute(trackType); + if (attribute == null || attribute.type == null) + return false; + + if (attribute.type.IsAssignableFrom(obj.GetType())) + return true; + + var gameObject = obj as GameObject; + if (gameObject != null && typeof(Component).IsAssignableFrom(attribute.type)) + { + return gameObject.GetComponent(attribute.type) != null || + (attribute.flags & TrackBindingFlags.AllowCreateComponent) != 0; + } + + return false; + } + + /// + /// Given an object, get the list of track that are creatable from it. Takes + /// binding flags into account + /// + public static IEnumerable GetTracksCreatableFromObject(Object obj) + { + if (obj == null) + return Enumerable.Empty(); + + return AllTrackTypes().Where(t => !IsHiddenInMenu(t) && IsTrackCreatableFromObject(obj, t)); + } + + /// + /// Get the list of playable assets that can handle an object for a particular track + /// + /// The type of the track + /// The object to handle + /// + public static IEnumerable GetAssetTypesForObject(Type trackType, Object obj) + { + if (obj == null) + return Enumerable.Empty(); + + return GetPlayableAssetsHandledByTrack(trackType).Where( + c => ObjectReferenceField.FindObjectReferences(c).Any(o => o.IsAssignable(obj)) + ); + } + + // get the track types for a track from it's attributes + private static IEnumerable GetTrackClipTypesFromAttributes(Type trackType) + { + if (trackType == null || !typeof(TrackAsset).IsAssignableFrom(trackType)) + return Enumerable.Empty(); + + var attributes = trackType.GetCustomAttributes(typeof(TrackClipTypeAttribute), true); + var baseClasses = attributes. + OfType(). + Select(a => a.inspectedType); + + return AllClipTypes().Where(t => baseClasses.Any(x => x.IsAssignableFrom(t))); + } + + // find the playable asset types that are unhandled + private static IEnumerable GetUnhandledClipTypes() + { + var typesHandledByTrack = AllTrackTypes().SelectMany(t => GetTrackClipTypesFromAttributes(t)); + + // exclude anything in the timeline assembly, handled by tracks, has a hide in menu attribute + // or is explicity ignored + return AllClipTypes() + .Except(typesHandledByTrack) + .Where(t => !TypeUtility.IsBuiltIn(t)) // exclude built-in + .Where(t => !typeof(TrackAsset).IsAssignableFrom(t)) // exclude track types (they are playable assets) + .Where(t => !t.IsDefined(typeof(HideInMenuAttribute), false) && !t.IsDefined(typeof(IgnoreOnPlayableTrackAttribute), true)) + .Distinct(); + } + + public static IEnumerable GetAllMarkerTypes() + { + if (s_MarkerTypes == null) + { + s_MarkerTypes = TypeCache.GetTypesDerivedFrom() + .Where(x => + typeof(ScriptableObject).IsAssignableFrom(x) + && !x.IsAbstract + && !x.IsGenericType + && !x.IsInterface) + .ToArray(); + } + return s_MarkerTypes; + } + + public static IEnumerable GetUserMarkerTypes() + { + return GetAllMarkerTypes().Where(x => !IsBuiltIn(x) && !IsHiddenInMenu(x)); + } + + public static IEnumerable GetBuiltInMarkerTypes() + { + return GetAllMarkerTypes().Where(TypeUtility.IsBuiltIn); + } + + public static bool DoesTrackSupportMarkerType(TrackAsset track, Type type) + { + if (track.supportsNotifications) + { + return true; + } + + return !typeof(INotification).IsAssignableFrom(type); + } + + internal static string GetDisplayName(Type t) + { + var displayName = ObjectNames.NicifyVariableName(t.Name); + var attr = Attribute.GetCustomAttribute(t, typeof(DisplayNameAttribute)) as DisplayNameAttribute; + if (attr != null) + displayName = attr.DisplayName; + return displayName; + } + + public static bool IsHiddenInMenu(Type type) + { + var attr = type.GetCustomAttributes(typeof(HideInMenuAttribute), false); + return attr.Length > 0; + } + + public struct ObjectReference + { + public Type type; + public bool isSceneReference; + } + + public static IEnumerable ObjectReferencesForType(Type type) + { + var objectReferences = ObjectReferenceField.FindObjectReferences(type); + var uniqueTypes = objectReferences.Select(objRef => objRef.type).Distinct(); + foreach (var refType in uniqueTypes) + { + var isSceneReference = objectReferences.Any(objRef => objRef.type == refType && objRef.isSceneReference); + yield return new ObjectReference { type = refType, isSceneReference = isSceneReference }; + } + } + + /// + /// Checks whether a type has an overridden method with a specific name. This method also checks overridden members in parent classes. + /// + public static bool HasOverrideMethod(System.Type t, string name) + { + const MethodAttributes mask = MethodAttributes.Virtual | MethodAttributes.NewSlot; + const MethodAttributes expectedResult = MethodAttributes.Virtual; + + var method = t.GetMethod(name, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); + return method != null && (method.Attributes & mask) == expectedResult; + } + + /// + /// Returns whether the given type resides in the timeline assembly + /// + public static bool IsBuiltIn(System.Type t) + { + return t != null && t.Assembly.Equals(typeof(TimelineAsset).Assembly); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TypeUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TypeUtility.cs.meta new file mode 100644 index 0000000..e73d461 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Utilities/TypeUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4c1821c1816c6fa44967b8ecb79ea7e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window.meta new file mode 100644 index 0000000..ab7469d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 28e8b16370ff78c4faca58757271619f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes.meta new file mode 100644 index 0000000..db5962f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 37472f5179ca2004489ac901814cdbc3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimeReferenceMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimeReferenceMode.cs new file mode 100644 index 0000000..873f7cd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimeReferenceMode.cs @@ -0,0 +1,8 @@ +namespace UnityEditor.Timeline +{ + enum TimeReferenceMode + { + Local = 0, + Global = 1 + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimeReferenceMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimeReferenceMode.cs.meta new file mode 100644 index 0000000..c6c0fc4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimeReferenceMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 34d6f60b171c1004e8335d52c65928a3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineActiveMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineActiveMode.cs new file mode 100644 index 0000000..aa1dd5b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineActiveMode.cs @@ -0,0 +1,42 @@ +namespace UnityEditor.Timeline +{ + class TimelineActiveMode : TimelineMode + { + public TimelineActiveMode() + { + headerState = new HeaderState + { + breadCrumb = TimelineModeGUIState.Enabled, + options = TimelineModeGUIState.Enabled, + sequenceSelector = TimelineModeGUIState.Enabled + }; + + trackOptionsState = new TrackOptionsState + { + newButton = TimelineModeGUIState.Enabled, + editAsAssetButton = TimelineModeGUIState.Hidden + }; + mode = TimelineModes.Active; + } + + public override bool ShouldShowTimeCursor(WindowState state) + { + return true; + } + + public override bool ShouldShowPlayRange(WindowState state) + { + return state.playRangeEnabled; + } + + public override TimelineModeGUIState ToolbarState(WindowState state) + { + return TimelineModeGUIState.Enabled; + } + + public override TimelineModeGUIState TrackState(WindowState state) + { + return TimelineModeGUIState.Enabled; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineActiveMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineActiveMode.cs.meta new file mode 100644 index 0000000..1d055ea --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineActiveMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 67ee43b2f6148de40861b289b0e00591 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineAssetEditionMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineAssetEditionMode.cs new file mode 100644 index 0000000..06f8581 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineAssetEditionMode.cs @@ -0,0 +1,27 @@ +namespace UnityEditor.Timeline +{ + class TimelineAssetEditionMode : TimelineInactiveMode + { + public override TimelineModeGUIState TrackState(WindowState state) + { + return TimelineModeGUIState.Enabled; + } + + public TimelineAssetEditionMode() + { + headerState = new HeaderState + { + breadCrumb = TimelineModeGUIState.Enabled, + options = TimelineModeGUIState.Enabled, + sequenceSelector = TimelineModeGUIState.Enabled + }; + + trackOptionsState = new TrackOptionsState + { + newButton = TimelineModeGUIState.Enabled, + editAsAssetButton = TimelineModeGUIState.Enabled + }; + mode = TimelineModes.AssetEdition; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineAssetEditionMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineAssetEditionMode.cs.meta new file mode 100644 index 0000000..6c5b2d1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineAssetEditionMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3477d28057cb3e4469c7ea6b8dc23046 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineDisabledMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineDisabledMode.cs new file mode 100644 index 0000000..dea7c1b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineDisabledMode.cs @@ -0,0 +1,44 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class TimelineDisabledMode : TimelineMode + { + public TimelineDisabledMode() + { + headerState = new HeaderState + { + breadCrumb = TimelineModeGUIState.Enabled, + options = TimelineModeGUIState.Enabled, + sequenceSelector = TimelineModeGUIState.Enabled + }; + + trackOptionsState = new TrackOptionsState + { + newButton = TimelineModeGUIState.Enabled, + editAsAssetButton = TimelineModeGUIState.Enabled + }; + mode = TimelineModes.Disabled; + } + + public override bool ShouldShowPlayRange(WindowState state) + { + return false; + } + + public override bool ShouldShowTimeCursor(WindowState state) + { + return true; + } + + public override TimelineModeGUIState ToolbarState(WindowState state) + { + return TimelineModeGUIState.Disabled; + } + + public override TimelineModeGUIState TrackState(WindowState state) + { + return TimelineModeGUIState.Enabled; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineDisabledMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineDisabledMode.cs.meta new file mode 100644 index 0000000..8139fb6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineDisabledMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4c5eb52d37bb6714a98af73df7d9cf2c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineInactiveMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineInactiveMode.cs new file mode 100644 index 0000000..bb63081 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineInactiveMode.cs @@ -0,0 +1,47 @@ +namespace UnityEditor.Timeline +{ + class TimelineInactiveMode : TimelineMode + { + public TimelineInactiveMode() + { + headerState = new HeaderState + { + breadCrumb = TimelineModeGUIState.Disabled, + options = TimelineModeGUIState.Enabled, + sequenceSelector = TimelineModeGUIState.Enabled + }; + + trackOptionsState = new TrackOptionsState + { + newButton = TimelineModeGUIState.Disabled, + editAsAssetButton = TimelineModeGUIState.Enabled + }; + mode = TimelineModes.Inactive; + } + + public override bool ShouldShowPlayRange(WindowState state) + { + return false; + } + + public override bool ShouldShowTimeCursor(WindowState state) + { + return false; + } + + public override TimelineModeGUIState ToolbarState(WindowState state) + { + return TimelineModeGUIState.Disabled; + } + + public override TimelineModeGUIState TrackState(WindowState state) + { + return TimelineModeGUIState.Disabled; + } + + public override TimelineModeGUIState PreviewState(WindowState state) + { + return TimelineModeGUIState.Disabled; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineInactiveMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineInactiveMode.cs.meta new file mode 100644 index 0000000..12a8898 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineInactiveMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5503f95d174761548a68a901beab13c2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineMode.cs new file mode 100644 index 0000000..1a46841 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineMode.cs @@ -0,0 +1,71 @@ +using System; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + enum TimelineModeGUIState + { + Disabled, + Hidden, + Enabled + } + + abstract class TimelineMode + { + public struct HeaderState + { + public TimelineModeGUIState breadCrumb; + public TimelineModeGUIState sequenceSelector; + public TimelineModeGUIState options; + } + + public struct TrackOptionsState + { + public TimelineModeGUIState newButton; + public TimelineModeGUIState editAsAssetButton; + } + + public HeaderState headerState { get; protected set; } + public TrackOptionsState trackOptionsState { get; protected set; } + public TimelineModes mode { get; protected set; } + + public abstract bool ShouldShowPlayRange(WindowState state); + public abstract bool ShouldShowTimeCursor(WindowState state); + + public virtual bool ShouldShowTrackBindings(WindowState state) + { + return ShouldShowTimeCursor(state); + } + + public virtual bool ShouldShowTimeArea(WindowState state) + { + return !state.IsEditingAnEmptyTimeline(); + } + + public abstract TimelineModeGUIState TrackState(WindowState state); + public abstract TimelineModeGUIState ToolbarState(WindowState state); + + public virtual TimelineModeGUIState PreviewState(WindowState state) + { + return Application.isPlaying ? TimelineModeGUIState.Disabled : TimelineModeGUIState.Enabled; + } + + public virtual TimelineModeGUIState EditModeButtonsState(WindowState state) + { + return TimelineModeGUIState.Enabled; + } + } + + [Flags] + internal enum TimelineModes + { + None = 0, + Active = 1, + ReadOnly = 2, + Inactive = 4, + Disabled = 8, + AssetEdition = 16, + All = Active | ReadOnly | Inactive | Disabled, + Default = Active | AssetEdition + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineMode.cs.meta new file mode 100644 index 0000000..7bf4435 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a2cb43d6b0c226443be7e176590837a5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineReadOnlyMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineReadOnlyMode.cs new file mode 100644 index 0000000..21418ce --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineReadOnlyMode.cs @@ -0,0 +1,52 @@ +namespace UnityEditor.Timeline +{ + class TimelineReadOnlyMode : TimelineMode + { + public TimelineReadOnlyMode() + { + headerState = new HeaderState() + { + breadCrumb = TimelineModeGUIState.Enabled, + options = TimelineModeGUIState.Enabled, + sequenceSelector = TimelineModeGUIState.Enabled, + }; + + trackOptionsState = new TrackOptionsState() + { + newButton = TimelineModeGUIState.Disabled, + editAsAssetButton = TimelineModeGUIState.Disabled, + }; + mode = TimelineModes.ReadOnly; + } + + public override bool ShouldShowPlayRange(WindowState state) + { + return state.editSequence.director != null && state.playRangeEnabled; + } + + public override bool ShouldShowTimeCursor(WindowState state) + { + return state.editSequence.director != null; + } + + public override TimelineModeGUIState TrackState(WindowState state) + { + return TimelineModeGUIState.Disabled; + } + + public override TimelineModeGUIState ToolbarState(WindowState state) + { + return state.editSequence.director == null ? TimelineModeGUIState.Disabled : TimelineModeGUIState.Enabled; + } + + public override TimelineModeGUIState PreviewState(WindowState state) + { + return state.editSequence.director == null ? TimelineModeGUIState.Disabled : TimelineModeGUIState.Enabled; + } + + public override TimelineModeGUIState EditModeButtonsState(WindowState state) + { + return TimelineModeGUIState.Disabled; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineReadOnlyMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineReadOnlyMode.cs.meta new file mode 100644 index 0000000..bd04969 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/Modes/TimelineReadOnlyMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3f8643c1f8dd449e85b548a14edbea2e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/PlaybackScroller.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/PlaybackScroller.cs new file mode 100644 index 0000000..96a9247 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/PlaybackScroller.cs @@ -0,0 +1,54 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + enum PlaybackScrollMode + { + None, + Pan, + Smooth + } + + static class PlaybackScroller + { + public static void AutoScroll(WindowState state) + { + if (Event.current.type != EventType.Layout) + return; + + switch (state.autoScrollMode) + { + case PlaybackScrollMode.Pan: + DoPanScroll(state); + break; + case PlaybackScrollMode.Smooth: + DoSmoothScroll(state); + break; + } + } + + static void DoSmoothScroll(WindowState state) + { + if (state.playing) + state.SetPlayHeadToMiddle(); + + state.UpdateLastFrameTime(); + } + + static void DoPanScroll(WindowState state) + { + if (!state.playing) + return; + + var paddingDeltaTime = state.PixelDeltaToDeltaTime(WindowConstants.autoPanPaddingInPixels); + var showRange = state.timeAreaShownRange; + var rightBoundForPan = showRange.y - paddingDeltaTime; + if (state.editSequence.time > rightBoundForPan) + { + var leftBoundForPan = showRange.x + paddingDeltaTime; + var delta = rightBoundForPan - leftBoundForPan; + state.SetTimeAreaShownRange(showRange.x + delta, showRange.y + delta); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/PlaybackScroller.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/PlaybackScroller.cs.meta new file mode 100644 index 0000000..70842a7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/PlaybackScroller.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 98545765d7a2b614b921715928035ee2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineMarkerHeaderGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineMarkerHeaderGUI.cs new file mode 100644 index 0000000..6a93cfa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineMarkerHeaderGUI.cs @@ -0,0 +1,201 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class TimelineMarkerHeaderGUI : IRowGUI, ILayerable + { + int m_TrackHash; + TimelineAsset timeline { get; } + WindowState state { get; } + MarkersLayer m_Layer; + LayerZOrder m_ZOrder = new LayerZOrder(Layer.MarkerHeaderTrack, 0); + + struct DrawData + { + public Rect headerRect; + public Rect contentRect; + public GUIStyle trackSwatchStyle; + public GUIStyle trackHeaderFont; + public Color colorTrackFont; + public bool showLockButton; + public bool showMuteButton; + } + + public TimelineMarkerHeaderGUI(TimelineAsset asset, WindowState state) + { + m_TrackHash = -1; + timeline = asset; + this.state = state; + } + + public TrackAsset asset { get { return timeline.markerTrack; } } + public Rect boundingRect { get; private set; } + public bool locked { get { return !state.showMarkerHeader; } } + + public bool showMarkers + { + get { return state.showMarkerHeader; } + } + + public bool muted + { + get { return timeline.markerTrack != null && timeline.markerTrack.muted; } + } + + Rect IRowGUI.ToWindowSpace(Rect rect) + { + //header gui is already in global coordinates + return rect; + } + + public void Draw(Rect markerHeaderRect, Rect markerContentRect, WindowState state) + { + boundingRect = markerContentRect; + var data = new DrawData() + { + headerRect = markerHeaderRect, + contentRect = markerContentRect, + trackSwatchStyle = new GUIStyle(), + trackHeaderFont = DirectorStyles.Instance.trackHeaderFont, + colorTrackFont = DirectorStyles.Instance.customSkin.colorTrackFont, + showLockButton = locked, + showMuteButton = muted + }; + + if (state.showMarkerHeader) + { + DrawMarkerDrawer(data, state); + if (Event.current.type == EventType.Repaint) + state.spacePartitioner.AddBounds(this, boundingRect); + } + + if (asset != null && Hash() != m_TrackHash) + Rebuild(); + + var rect = state.showMarkerHeader ? markerContentRect : state.timeAreaRect; + using (new GUIViewportScope(rect)) + { + if (m_Layer != null) + m_Layer.Draw(rect, state); + + HandleDragAndDrop(); + } + } + + public void Rebuild() + { + if (asset == null) + return; + + m_Layer = new MarkersLayer(Layer.MarkersOnHeader, this); + m_TrackHash = Hash(); + } + + void HandleDragAndDrop() + { + if (TimelineWindow.instance.state.editSequence.isReadOnly) + return; + + if (Event.current == null || Event.current.type != EventType.DragUpdated && + Event.current.type != EventType.DragPerform && Event.current.type != EventType.DragExited) + return; + + timeline.CreateMarkerTrack(); // Ensure Marker track is created. + var objectsBeingDropped = DragAndDrop.objectReferences.OfType(); + var candidateTime = TimelineHelpers.GetCandidateTime(TimelineWindow.instance.state, Event.current.mousePosition); + var perform = Event.current.type == EventType.DragPerform; + var director = state.editSequence != null ? state.editSequence.director : null; + DragAndDrop.visualMode = TimelineDragging.HandleClipPaneObjectDragAndDrop(objectsBeingDropped, timeline.markerTrack, perform, + timeline, null, director, candidateTime, TimelineDragging.ResolveType); + if (perform && DragAndDrop.visualMode == DragAndDropVisualMode.Copy) + { + DragAndDrop.AcceptDrag(); + } + } + + int Hash() + { + return timeline.markerTrack == null ? 0 : timeline.markerTrack.Hash(); + } + + static void DrawMarkerDrawer(DrawData data, WindowState state) + { + DrawMarkerDrawerHeaderBackground(data); + DrawMarkerDrawerHeader(data, state); + DrawMarkerDrawerContentBackground(data); + } + + static void DrawMarkerDrawerHeaderBackground(DrawData data) + { + var backgroundColor = DirectorStyles.Instance.customSkin.markerHeaderDrawerBackgroundColor; + var bgRect = data.headerRect; + bgRect.x += data.trackSwatchStyle.fixedWidth; + bgRect.width -= data.trackSwatchStyle.fixedWidth; + EditorGUI.DrawRect(bgRect, backgroundColor); + } + + static void DrawMarkerDrawerHeader(DrawData data, WindowState state) + { + var textStyle = data.trackHeaderFont; + textStyle.normal.textColor = data.colorTrackFont; + var labelRect = data.headerRect; + labelRect.x += DirectorStyles.kBaseIndent; + + EditorGUI.LabelField(labelRect, DirectorStyles.timelineMarkerTrackHeader); + + const float buttonSize = WindowConstants.trackHeaderButtonSize; + const float padding = WindowConstants.trackHeaderButtonPadding; + var x = data.headerRect.xMax - buttonSize - padding - 2f; + var y = data.headerRect.y + (data.headerRect.height - buttonSize) / 2.0f; + var buttonRect = new Rect(x, y, buttonSize, buttonSize); + + DrawTrackDropDownMenu(buttonRect, state); + buttonRect.x -= 16.0f; + + if (data.showMuteButton) + { + DrawMuteButton(buttonRect, state); + buttonRect.x -= 16.0f; + } + + if (data.showLockButton) + { + DrawLockButton(buttonRect, state); + } + } + + static void DrawMarkerDrawerContentBackground(DrawData data) + { + var trackBackgroundColor = DirectorStyles.Instance.customSkin.markerDrawerBackgroundColor; + EditorGUI.DrawRect(data.contentRect, trackBackgroundColor); + } + + static void DrawLockButton(Rect rect, WindowState state) + { + if (GUI.Button(rect, GUIContent.none, TimelineWindow.styles.locked)) + TimelineAction.Invoke(state); + } + + static void DrawTrackDropDownMenu(Rect rect, WindowState state) + { + rect.y += WindowConstants.trackOptionButtonVerticalPadding; + if (GUI.Button(rect, GUIContent.none, DirectorStyles.Instance.trackOptions)) + SequencerContextMenu.ShowMarkerHeaderContextMenu(null, state); + } + + static void DrawMuteButton(Rect rect, WindowState state) + { + if (GUI.Button(rect, GUIContent.none, TimelineWindow.styles.mute)) + TimelineAction.Invoke(state); + } + + public LayerZOrder zOrder + { + get { return m_ZOrder; } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineMarkerHeaderGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineMarkerHeaderGUI.cs.meta new file mode 100644 index 0000000..eefe711 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineMarkerHeaderGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4068e97704a16794ea218ba560cdc1e9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow.cs new file mode 100644 index 0000000..e3e21bc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow.cs @@ -0,0 +1,541 @@ +using System; +using System.Collections.Generic; +using UnityEditor.Callbacks; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.Playables; +using UnityEngine.SceneManagement; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [EditorWindowTitle(title = "Timeline", useTypeNameAsIconName = true)] + partial class TimelineWindow : EditorWindow, IHasCustomMenu + { + [Serializable] + public class TimelineWindowPreferences + { + public bool frameSnap = true; + public bool edgeSnaps = true; + public bool muteAudioScrub = true; + public bool playRangeLoopMode = true; + public PlaybackScrollMode autoScrollMode; + public EditMode.EditType editType = EditMode.EditType.Mix; + public TimeReferenceMode timeReferenceMode = TimeReferenceMode.Local; + } + + [SerializeField] TimelineWindowPreferences m_Preferences = new TimelineWindowPreferences(); + public TimelineWindowPreferences preferences { get { return m_Preferences; } } + + [SerializeField] + EditorGUIUtility.EditorLockTracker m_LockTracker = new EditorGUIUtility.EditorLockTracker(); + + readonly PreviewResizer m_PreviewResizer = new PreviewResizer(); + bool m_LastFrameHadSequence; + bool m_ForceRefreshLastSelection; + int m_CurrentSceneHashCode = -1; + + [NonSerialized] + bool m_HasBeenInitialized; + + [SerializeField] + SequenceHierarchy m_SequenceHierarchy; + static SequenceHierarchy s_LastHierarchy; + + public static TimelineWindow instance { get; private set; } + public Rect clientArea { get; set; } + public bool isDragging { get; set; } + public static DirectorStyles styles { get { return DirectorStyles.Instance; } } + public List allTracks + { + get + { + return treeView != null ? treeView.allTrackGuis : new List(); + } + } + + public WindowState state { get; private set; } + + public bool locked + { + get + { + // we can never be in a locked state if there is no timeline asset + if (state.editSequence.asset == null) + return false; + + return m_LockTracker.isLocked; + } + set { m_LockTracker.isLocked = value; } + } + + public bool hierarchyChangedThisFrame { get; private set; } + + public TimelineWindow() + { + InitializeManipulators(); + m_LockTracker.lockStateChanged.AddPersistentListener(OnLockStateChanged, UnityEventCallState.EditorAndRuntime); + } + + void OnLockStateChanged(bool locked) + { + // Make sure that upon unlocking, any selection change is updated + // Case 1123119 -- only force rebuild if not recording + if (!locked) + RefreshSelection(state != null && !state.recording); + } + + void OnEnable() + { + if (m_SequencePath == null) + m_SequencePath = new SequencePath(); + + if (m_SequenceHierarchy == null) + { + // The sequence hierarchy will become null if maximize on play is used for in/out of playmode + // a static var will hang on to the reference + if (s_LastHierarchy != null) + m_SequenceHierarchy = s_LastHierarchy; + else + m_SequenceHierarchy = SequenceHierarchy.CreateInstance(); + + state = null; + } + s_LastHierarchy = m_SequenceHierarchy; + + titleContent = GetLocalizedTitleContent(); + + m_PreviewResizer.Init("TimelineWindow"); + + // Unmaximize fix : when unmaximizing, a new window is enabled and disabled. Prevent it from overriding the instance pointer. + if (instance == null) + instance = this; + + AnimationClipCurveCache.Instance.OnEnable(); + TrackAsset.OnClipPlayableCreate += m_PlayableLookup.UpdatePlayableLookup; + TrackAsset.OnTrackAnimationPlayableCreate += m_PlayableLookup.UpdatePlayableLookup; + + if (state == null) + { + state = new WindowState(this, s_LastHierarchy); + Initialize(); + RefreshSelection(true); + m_ForceRefreshLastSelection = true; + } + } + + void OnDisable() + { + if (instance == this) + instance = null; + + if (state != null) + state.Reset(); + + if (instance == null) + SelectionManager.RemoveTimelineSelection(); + + AnimationClipCurveCache.Instance.OnDisable(); + TrackAsset.OnClipPlayableCreate -= m_PlayableLookup.UpdatePlayableLookup; + TrackAsset.OnTrackAnimationPlayableCreate -= m_PlayableLookup.UpdatePlayableLookup; + TimelineWindowViewPrefs.SaveAll(); + TimelineWindowViewPrefs.UnloadAllViewModels(); + } + + void OnDestroy() + { + if (state != null) + { + state.OnDestroy(); + } + m_HasBeenInitialized = false; + RemoveEditorCallbacks(); + AnimationClipCurveCache.Instance.Clear(); + TimelineAnimationUtilities.UnlinkAnimationWindow(); + } + + void OnLostFocus() + { + isDragging = false; + + if (state != null) + state.captured.Clear(); + + Repaint(); + } + + void OnFocus() + { + if (state == null) return; + + if (lastSelectedGO != Selection.activeObject) + { + // selection may have changed while Timeline Editor was looking away + RefreshSelection(false); + + // Inline curves may have become out of sync + RefreshInlineCurves(); + } + } + + void OnHierarchyChange() + { + hierarchyChangedThisFrame = true; + Repaint(); + } + + void OnStateChange() + { + state.UpdateRecordingState(); + if (treeView != null && state.editSequence.asset != null) + treeView.Reload(); + if (m_MarkerHeaderGUI != null) + m_MarkerHeaderGUI.Rebuild(); + } + + void OnGUI() + { + InitializeGUIIfRequired(); + UpdateGUIConstants(); + UpdateViewStateHash(); + + EditMode.HandleModeClutch(); // TODO We Want that here? + + DetectStylesChange(); + DetectActiveSceneChanges(); + DetectStateChanges(); + + state.ProcessStartFramePendingUpdates(); + + var clipRect = new Rect(0.0f, 0.0f, position.width, position.height); + clipRect.xMin += state.sequencerHeaderWidth; + + using (new GUIViewportScope(clipRect)) + state.InvokeWindowOnGuiStarted(Event.current); + + if (Event.current.type == EventType.MouseDrag && state != null && state.mouseDragLag > 0.0f) + { + state.mouseDragLag -= Time.deltaTime; + return; + } + + if (PerformUndo()) + return; + + if (EditorApplication.isPlaying) + { + if (state != null) + { + if (state.recording) + state.recording = false; + } + Repaint(); + } + + clientArea = position; + + PlaybackScroller.AutoScroll(state); + DoLayout(); + + // overlays + if (state.captured.Count > 0) + { + using (new GUIViewportScope(clipRect)) + { + foreach (var o in state.captured) + { + o.Overlay(Event.current, state); + } + Repaint(); + } + } + + if (state.showQuadTree) + state.spacePartitioner.DebugDraw(); + + // attempt another rebuild -- this will avoid 1 frame flashes + if (Event.current.type == EventType.Repaint) + { + RebuildGraphIfNecessary(); + state.ProcessEndFramePendingUpdates(); + } + + using (new GUIViewportScope(clipRect)) + { + if (Event.current.type == EventType.Repaint) + EditMode.inputHandler.OnGUI(state, Event.current); + } + + if (Event.current.type == EventType.Repaint) + hierarchyChangedThisFrame = false; + } + + static void DetectStylesChange() + { + DirectorStyles.ReloadStylesIfNeeded(); + } + + void DetectActiveSceneChanges() + { + if (m_CurrentSceneHashCode == -1) + { + m_CurrentSceneHashCode = SceneManager.GetActiveScene().GetHashCode(); + } + + if (m_CurrentSceneHashCode != SceneManager.GetActiveScene().GetHashCode()) + { + bool isSceneStillLoaded = false; + for (int a = 0; a < SceneManager.sceneCount; a++) + { + var scene = SceneManager.GetSceneAt(a); + if (scene.GetHashCode() == m_CurrentSceneHashCode && scene.isLoaded) + { + isSceneStillLoaded = true; + break; + } + } + + if (!isSceneStillLoaded) + { + if (!locked) + ClearCurrentTimeline(); + m_CurrentSceneHashCode = SceneManager.GetActiveScene().GetHashCode(); + } + } + } + + void DetectStateChanges() + { + if (state != null) + { + state.editSequence.ResetIsReadOnly(); //Force reset readonly for asset flag for each frame. + // detect if the sequence was removed under our feet + if (m_LastFrameHadSequence && state.editSequence.asset == null) + { + ClearCurrentTimeline(); + } + m_LastFrameHadSequence = state.editSequence.asset != null; + + // the currentDirector can get set to null by a deletion or scene unloading so polling is required + if (state.editSequence.director == null) + { + state.recording = false; + state.previewMode = false; + + //Case 1201405 : Check if the lock state is valid with the lock tracker state + if (locked != m_LockTracker.isLocked) + m_LockTracker.isLocked = locked; + + if (!locked && m_LastFrameHadSequence) + { + // the user may be adding a new PlayableDirector to a selected GameObject, make sure the timeline editor is shows the proper director if none is already showing + var selectedGameObject = Selection.activeObject != null ? Selection.activeObject as GameObject : null; + var selectedDirector = selectedGameObject != null ? selectedGameObject.GetComponent() : null; + if (selectedDirector != null) + { + SetCurrentTimeline(selectedDirector); + } + } + } + else + { + // the user may have changed the timeline associated with the current director + if (state.editSequence.asset != state.editSequence.director.playableAsset) + { + if (!locked) + { + SetCurrentTimeline(state.editSequence.director); + } + else + { + // Keep locked on the current timeline but set the current director to null since it's not the timeline owner anymore + SetCurrentTimeline(state.editSequence.asset); + } + } + } + } + } + + void Initialize() + { + if (!m_HasBeenInitialized) + { + InitializeStateChange(); + InitializeEditorCallbacks(); + m_HasBeenInitialized = true; + } + } + + void RefreshLastSelectionIfRequired() + { + // case 1088918 - workaround for the instanceID to object cache being update during Awake. + // This corrects any playableDirector ptrs with the correct cached version + // This can happen when going from edit to playmode + if (m_ForceRefreshLastSelection) + { + m_ForceRefreshLastSelection = false; + RestoreLastSelection(true); + } + } + + void InitializeGUIIfRequired() + { + RefreshLastSelectionIfRequired(); + InitializeTimeArea(); + if (treeView == null && state.editSequence.asset != null) + { + treeView = new TimelineTreeViewGUI(this, state.editSequence.asset, position); + } + } + + void UpdateGUIConstants() + { + m_HorizontalScrollBarSize = + GUI.skin.horizontalScrollbar.fixedHeight + GUI.skin.horizontalScrollbar.margin.top; + m_VerticalScrollBarSize = (treeView != null && treeView.showingVerticalScrollBar) + ? GUI.skin.verticalScrollbar.fixedWidth + GUI.skin.verticalScrollbar.margin.left + : 0; + } + + void UpdateViewStateHash() + { + if (Event.current.type == EventType.Layout) + state.UpdateViewStateHash(); + } + + static bool PerformUndo() + { + if (!Event.current.isKey) + return false; + + if (Event.current.keyCode != KeyCode.Z) + return false; + + if (!EditorGUI.actionKey) + return false; + + return true; + } + + public void RebuildGraphIfNecessary(bool evaluate = true) + { + if (state == null || state.editSequence.director == null || state.editSequence.asset == null) + return; + + if (state.rebuildGraph) + { + // rebuilding the graph resets the time + double time = state.editSequence.time; + + var wasPlaying = false; + + // disable preview mode, + if (!EditorApplication.isPlaying) + { + wasPlaying = state.playing; + + state.previewMode = false; + state.GatherProperties(state.masterSequence.director); + } + state.RebuildPlayableGraph(); + state.editSequence.time = time; + + if (wasPlaying) + state.Play(); + + if (evaluate) + { + // put the scene back in the correct state + state.EvaluateImmediate(); + + // this is necessary to see accurate results when inspector refreshes + // case 1154802 - this will property re-force time on the director, so + // the play head won't snap back to the timeline duration on rebuilds + if (!state.playing) + state.Evaluate(); + } + Repaint(); + } + + state.rebuildGraph = false; + } + + // for tests + public new void RepaintImmediately() + { + base.RepaintImmediately(); + } + + internal static bool IsEditingTimelineAsset(TimelineAsset timelineAsset) + { + return instance != null && instance.state != null && instance.state.editSequence.asset == timelineAsset; + } + + internal static void RepaintIfEditingTimelineAsset(TimelineAsset timelineAsset) + { + if (IsEditingTimelineAsset(timelineAsset)) + instance.Repaint(); + } + + internal class DoCreateTimeline : ProjectWindowCallback.EndNameEditAction + { + public override void Action(int instanceId, string pathName, string resourceFile) + { + var timeline = ScriptableObject.CreateInstance(); + AssetDatabase.CreateAsset(timeline, pathName); + ProjectWindowUtil.ShowCreatedAsset(timeline); + } + } + + [MenuItem("Assets/Create/Timeline", false, 450)] + public static void CreateNewTimeline() + { + var icon = EditorGUIUtility.IconContent("TimelineAsset Icon").image as Texture2D; + ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, ScriptableObject.CreateInstance(), "New Timeline.playable", icon, null); + } + + [MenuItem("Window/Sequencing/Timeline", false, 1)] + public static void ShowWindow() + { + GetWindow(typeof(SceneView)); + instance.Focus(); + } + + [OnOpenAsset(1)] + public static bool OnDoubleClick(int instanceID, int line) + { + var assetDoubleClicked = EditorUtility.InstanceIDToObject(instanceID) as TimelineAsset; + if (assetDoubleClicked == null) + return false; + + ShowWindow(); + instance.SetCurrentTimeline(assetDoubleClicked); + + return true; + } + + public virtual void AddItemsToMenu(GenericMenu menu) + { + bool disabled = state == null || state.editSequence.asset == null; + + m_LockTracker.AddItemsToMenu(menu, disabled); + } + + protected virtual void ShowButton(Rect r) + { + bool disabled = state == null || state.editSequence.asset == null; + + m_LockTracker.ShowButton(r, DirectorStyles.Instance.lockButton, disabled); + } + + internal void TreeViewKeyboardCallback() + { + if (Event.current.type != EventType.KeyDown) + return; + if (TimelineAction.HandleShortcut(state, Event.current)) + { + Event.current.Use(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow.cs.meta new file mode 100644 index 0000000..5d0992b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f817a38900380be47942905e17e7d39b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindowTimeControl.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindowTimeControl.cs new file mode 100644 index 0000000..385fb22 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindowTimeControl.cs @@ -0,0 +1,331 @@ +using System; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Timeline; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class TimelineWindowTimeControl : IAnimationWindowControl + { + [Serializable] + public struct ClipData + { + public double start; + public double duration; + public TrackAsset track; + } + + [SerializeField] ClipData m_ClipData; + [SerializeField] TimelineClip m_Clip; + [SerializeField] AnimationWindowState m_AnimWindowState; + + TrackAsset track + { + get + { + if (m_Clip != null) + { + return m_Clip.parentTrack; + } + return m_ClipData.track; + } + } + + static TimelineWindow window + { + get + { + return TimelineWindow.instance; + } + } + + static WindowState state + { + get + { + if (window != null) + return window.state; + return null; + } + } + + void OnStateChange() + { + if (state != null && state.dirtyStamp > 0 && m_AnimWindowState != null) + m_AnimWindowState.Repaint(); + } + + public void Init(AnimationWindowState animState, TimelineClip clip) + { + m_Clip = clip; + m_AnimWindowState = animState; + } + + public void Init(AnimationWindowState animState, ClipData clip) + { + m_ClipData = clip; + m_AnimWindowState = animState; + } + + public override void OnEnable() + { + if (state != null) + state.OnTimeChange += OnStateChange; + + base.OnEnable(); + } + + public void OnDisable() + { + if (state != null) + state.OnTimeChange -= OnStateChange; + } + + public override AnimationKeyTime time + { + get + { + if (state == null) + return AnimationKeyTime.Time(0.0f, 0.0f); + + return AnimationKeyTime.Time(ToAnimationClipTime(state.editSequence.time), state.referenceSequence.frameRate); + } + } + + void ChangeTime(float newTime) + { + if (state != null && state.editSequence.director != null) + { + // avoid rounding errors + var finalTime = ToGlobalTime(newTime); + if (TimeUtility.OnFrameBoundary(finalTime, state.referenceSequence.frameRate, TimeUtility.kFrameRateEpsilon)) + finalTime = TimeUtility.RoundToFrame(finalTime, state.referenceSequence.frameRate); + state.editSequence.time = finalTime; + + window.Repaint(); + } + } + + static void ChangeFrame(int frame) + { + if (state != null) + { + state.editSequence.frame = frame; + window.Repaint(); + } + } + + public override void GoToTime(float newTime) + { + ChangeTime(newTime); + } + + public override void GoToFrame(int frame) + { + ChangeFrame(frame); + } + + public override void StartScrubTime() {} + + public override void EndScrubTime() {} + + public override void ScrubTime(float newTime) + { + ChangeTime(newTime); + } + + public override void GoToPreviousFrame() + { + if (state != null) + ChangeFrame(state.editSequence.frame - 1); + } + + public override void GoToNextFrame() + { + if (state != null) + ChangeFrame(state.editSequence.frame + 1); + } + + AnimationWindowCurve[] GetCurves() + { + var curves = + (m_AnimWindowState.showCurveEditor && + m_AnimWindowState.activeCurves.Count > 0) ? m_AnimWindowState.activeCurves : m_AnimWindowState.allCurves; + return curves.ToArray(); + } + + public override void GoToPreviousKeyframe() + { + var newTime = AnimationWindowUtility.GetPreviousKeyframeTime(GetCurves(), time.time, m_AnimWindowState.clipFrameRate); + GoToTime(m_AnimWindowState.SnapToFrame(newTime, AnimationWindowState.SnapMode.SnapToClipFrame)); + } + + public override void GoToNextKeyframe() + { + var newTime = AnimationWindowUtility.GetNextKeyframeTime(GetCurves(), time.time, m_AnimWindowState.clipFrameRate); + GoToTime(m_AnimWindowState.SnapToFrame(newTime, AnimationWindowState.SnapMode.SnapToClipFrame)); + } + + public override void GoToFirstKeyframe() + { + GoToTime(0); + } + + public override void GoToLastKeyframe() + { + double animClipTime = 0; + if (m_Clip != null) + { + var curves = m_Clip.curves; + var animAsset = m_Clip.asset as AnimationPlayableAsset; + if (animAsset != null) + { + animClipTime = animAsset.clip != null ? animAsset.clip.length : 0; + } + else if (curves != null) + { + animClipTime = curves.length; + } + else + { + animClipTime = m_Clip.clipAssetDuration; + } + } + else + { + animClipTime = m_ClipData.duration; + } + + GoToTime((float)animClipTime); + } + + public override bool canPlay + { + get + { + return state != null && state.previewMode; + } + } + + public override bool playing + { + get + { + return state != null && state.playing; + } + } + + static void SetPlaybackState(bool playbackState) + { + if (state == null || playbackState == state.playing) + return; + + state.SetPlaying(playbackState); + } + + public override bool StartPlayback() + { + SetPlaybackState(true); + return state != null && state.playing; + } + + public override void StopPlayback() + { + SetPlaybackState(false); + } + + public override bool PlaybackUpdate() { return state != null && state.playing; } + + public override bool canRecord + { + get { return state != null && state.canRecord; } + } + + public override bool recording + { + get { return state != null && state.recording; } + } + + public override bool canPreview + { + get { return false; } + } + + public override bool previewing + { + get { return false; } + } + + public override bool StartRecording(Object targetObject) + { + if (!canRecord) + return false; + if (Application.isPlaying) + return false; + + if (state != null && track != null) + { + state.ArmForRecord(track); + return state.recording; + } + + return false; + } + + public override void StopRecording() + { + if (Application.isPlaying) + return; + + if (state != null && track != null) + state.UnarmForRecord(track); + } + + public override void OnSelectionChanged() {} + + public override void ResampleAnimation() {} + + public override bool StartPreview() + { + if (state != null) + state.previewMode = true; + return state != null && state.previewMode; + } + + public override void StopPreview() + { + if (state != null) + state.previewMode = false; + } + + public override void ProcessCandidates() {} + public override void ClearCandidates() {} + + double durationD + { + get + { + if (m_Clip != null) + { + return ToAnimationClipTime(m_Clip.end); + } + return m_ClipData.duration; + } + } + + double ToGlobalTime(float localTime) + { + if (m_Clip != null) + return Math.Max(0, m_Clip.FromLocalTimeUnbound(localTime)); + return Math.Max(0, m_ClipData.start + localTime); + } + + float ToAnimationClipTime(double globalTime) + { + if (m_Clip != null) + return (float)m_Clip.ToLocalTimeUnbound(globalTime); + return (float)(globalTime - m_ClipData.start); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindowTimeControl.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindowTimeControl.cs.meta new file mode 100644 index 0000000..6d8fd71 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindowTimeControl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6f25fb081e85cb743b272c2f7fbc2f6b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_ActiveTimeline.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_ActiveTimeline.cs new file mode 100644 index 0000000..004209f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_ActiveTimeline.cs @@ -0,0 +1,80 @@ +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + private TimelineAsset m_PreviousMasterSequence; + + public void ClearCurrentTimeline() + { + SetCurrentTimeline(null, null, null, true); + } + + public void SetCurrentTimeline(TimelineAsset seq) + { + SetCurrentTimeline(seq, null, null); + } + + public void SetCurrentTimeline(PlayableDirector director, TimelineClip hostClip = null) + { + var asset = director != null ? director.playableAsset as TimelineAsset : null; + SetCurrentTimeline(asset, director, hostClip); + } + + void SetCurrentTimeline(TimelineAsset seq, PlayableDirector instanceOfDirector, TimelineClip hostClip, bool force = false) + { + if (state == null) + return; + + if (!force && + state.editSequence.hostClip == hostClip && + state.editSequence.director == instanceOfDirector && + state.editSequence.asset == seq) + return; + + state.SetCurrentSequence(seq, instanceOfDirector, hostClip); + } + + void OnBeforeSequenceChange() + { + treeView = null; + m_MarkerHeaderGUI = null; + m_TimeAreaDirty = true; + + state.Reset(); + m_PlayableLookup.ClearPlayableLookup(); + + // clear old editors to caches, like audio previews, get flushed + CustomTimelineEditorCache.ClearCache(); + CustomTimelineEditorCache.ClearCache(); + CustomTimelineEditorCache.ClearCache(); + + m_PreviousMasterSequence = state.masterSequence.asset; + } + + void OnAfterSequenceChange() + { + Repaint(); + + m_SequencePath = state.GetCurrentSequencePath(); + + m_LastFrameHadSequence = state.editSequence.asset != null; + TimelineWindowViewPrefs.SaveAll(); + + // this prevent clearing the animation window when going in/out of playmode, but + // clears it when we switch master timelines + // the cast to a object will handle the case where the sequence has been deleted. + object previousMasterSequence = m_PreviousMasterSequence; + bool isDeleted = previousMasterSequence != null && m_PreviousMasterSequence == null; + bool hasChanged = m_PreviousMasterSequence != null && m_PreviousMasterSequence != state.masterSequence.asset; + if (isDeleted || hasChanged) + { + AnimationClipCurveCache.Instance.Clear(); + TimelineAnimationUtilities.UnlinkAnimationWindow(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_ActiveTimeline.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_ActiveTimeline.cs.meta new file mode 100644 index 0000000..0b12122 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_ActiveTimeline.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b7abcd1a72bb7174ca58e813c6eee9c2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Breadcrumbs.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Breadcrumbs.cs new file mode 100644 index 0000000..e5673cd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Breadcrumbs.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + List m_BreadCrumbLabels = new List(100); + + static TitleMode GetTitleMode(ISequenceState sequence) + { + var prefabStage = UnityEditor.Experimental.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage(); + // Top level + if (sequence.hostClip == null) + { + if (sequence.director != null && prefabStage != null && prefabStage.IsPartOfPrefabContents(sequence.director.gameObject)) + return TitleMode.Prefab; + if (sequence.director != null && PrefabUtility.IsPartOfPrefabAsset(sequence.director)) + return TitleMode.PrefabOutOfContext; + if (sequence.director != null && !sequence.director.isActiveAndEnabled) + return TitleMode.DisabledComponent; + if (sequence.director != null) + return TitleMode.GameObject; + if (sequence.asset != null) + return TitleMode.Asset; + } + // Subtimelines only get an error icon + else if (sequence.director != null && !sequence.director.isActiveAndEnabled && !PrefabUtility.IsPartOfPrefabAsset(sequence.director)) + return TitleMode.DisabledComponent; + + return TitleMode.None; + } + + void DoBreadcrumbGUI() + { + if (state == null) + return; + int count = 0; + foreach (var sequence in state.GetAllSequences()) + { + BreadCrumbTitle title = new BreadCrumbTitle() + { + name = DisplayNameHelper.GetDisplayName(sequence), + mode = GetTitleMode(sequence) + }; + if (count >= m_BreadCrumbLabels.Count) + m_BreadCrumbLabels.Add(title); + else + m_BreadCrumbLabels[count] = title; + count++; + } + + if (m_BreadCrumbLabels.Count > count) + m_BreadCrumbLabels.RemoveRange(count, m_BreadCrumbLabels.Count - count); + + using (new EditorGUI.DisabledScope(currentMode.headerState.breadCrumb == TimelineModeGUIState.Disabled)) + { + BreadcrumbDrawer.Draw(breadCrumbAreaWidth, m_BreadCrumbLabels, NavigateToBreadcrumbIndex); + } + } + + void NavigateToBreadcrumbIndex(int index) + { + state.PopSequencesUntilCount(index + 1); + } + + void DoSequenceSelectorGUI() + { + using (new EditorGUI.DisabledScope(currentMode.headerState.sequenceSelector == TimelineModeGUIState.Disabled)) + { + if (EditorGUILayout.DropdownButton(DirectorStyles.timelineSelectorArrow, FocusType.Passive, DirectorStyles.Instance.sequenceSwitcher, GUILayout.Width(WindowConstants.selectorWidth))) + ShowSequenceSelector(); + } + } + + void ShowSequenceSelector() + { + var allDirectors = TimelineUtility.GetDirectorsInSceneUsingAsset(null); + + var formatter = new SequenceMenuNameFormater(); + var namesAndDirectors = new List>(); + foreach (var d in allDirectors) + { + if (d.playableAsset is TimelineAsset) + { + var text = formatter.Format(DisplayNameHelper.GetDisplayName(d)); + namesAndDirectors.Add(new ValueTuple(text, d)); + } + } + + var sequenceMenu = new GenericMenu(); + foreach (var (timelineName, playableDirector) in namesAndDirectors.OrderBy(i => i.Item1)) + { + var isCurrent = state.masterSequence.director == playableDirector; + sequenceMenu.AddItem(new GUIContent(timelineName), isCurrent, OnSequenceSelected, playableDirector); + } + + if (allDirectors.Length == 0) + sequenceMenu.AddDisabledItem(DirectorStyles.noTimelinesInScene); + + sequenceMenu.DropDown(EditorGUILayout.s_LastRect); + } + + void OnSequenceSelected(object arg) + { + var directorToBindTo = (PlayableDirector)arg; + if (directorToBindTo) + { + // don't just select the object, it may already be selected. + SetCurrentTimeline(directorToBindTo); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Breadcrumbs.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Breadcrumbs.cs.meta new file mode 100644 index 0000000..2746400 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Breadcrumbs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e2cd16a2d73fe7a4c9affa2b790eb5e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Duration.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Duration.cs new file mode 100644 index 0000000..48eef2f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Duration.cs @@ -0,0 +1,128 @@ +using System; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + TimeAreaItem m_TimelineDuration; + + void DurationGUI(TimelineItemArea area, double duration) + { + // don't show the duration if the time area is not visible for some other reason. + if (!currentMode.ShouldShowTimeArea(state)) + return; + + bool headerMode = area == TimelineItemArea.Header; + + if (state.IsEditingASubTimeline()) + { + if (headerMode) + HighlightTimeAreaRange(state.editSequence.GetEvaluableRange(), DirectorStyles.Instance.customSkin.colorSubSequenceDurationLine); + + return; + } + + // don't show the duration if there's none. + if (state.editSequence.asset.durationMode == TimelineAsset.DurationMode.BasedOnClips && duration <= 0.0f) + return; + + if (m_TimelineDuration == null || m_TimelineDuration.style != styles.endmarker) + { + m_TimelineDuration = new TimeAreaItem(styles.endmarker, OnTrackDurationDrag) + { + tooltip = "End of sequence marker", + boundOffset = new Vector2(0.0f, -DirectorStyles.kDurationGuiThickness) + }; + } + + DrawDuration(headerMode, !headerMode, duration); + } + + void DrawDuration(bool drawhead, bool drawline, double duration) + { + if (state.TimeIsInRange((float)duration)) + { + // Set the colors based on the mode + Color lineColor = DirectorStyles.Instance.customSkin.colorEndmarker; + Color headColor = Color.white; + + bool canMoveHead = !EditorApplication.isPlaying && state.editSequence.asset.durationMode == TimelineAsset.DurationMode.FixedLength; + + if (canMoveHead) + { + if (Event.current.type == EventType.MouseDown) + { + if (m_TimelineDuration.bounds.Contains(Event.current.mousePosition)) + { + if (m_PlayHead != null && m_PlayHead.bounds.Contains(Event.current.mousePosition)) + { + // ignore duration markers if the mouse is over the TimeCursor. + canMoveHead = false; + } + } + } + } + else + { + lineColor.a *= 0.66f; + headColor = DirectorStyles.Instance.customSkin.colorDuration; + } + + if (canMoveHead) + m_TimelineDuration.HandleManipulatorsEvents(state); + + m_TimelineDuration.lineColor = lineColor; + m_TimelineDuration.headColor = headColor; + m_TimelineDuration.drawHead = drawhead; + m_TimelineDuration.drawLine = drawline; + m_TimelineDuration.canMoveHead = canMoveHead; + + // Draw the TimeAreaItem + // Rect trackheadRect = treeviewBounds; + //trackheadRect.height = clientArea.height; + m_TimelineDuration.Draw(sequenceRect, state, duration); + } + + // Draw Blue line in timeline indicating the duration... + if (state.editSequence.asset != null && drawhead) + { + HighlightTimeAreaRange(state.editSequence.GetEvaluableRange(), DirectorStyles.Instance.customSkin.colorDurationLine); + } + } + + void HighlightTimeAreaRange(Range range, Color lineColor) + { + if (range.length <= 0.0 || !state.RangeIsVisible(range)) return; + + Rect lineRect = Rect.MinMaxRect( + Math.Max(state.TimeToPixel(range.start), state.timeAreaRect.xMin), + state.timeAreaRect.y - DirectorStyles.kDurationGuiThickness + state.timeAreaRect.height, + Math.Min(state.TimeToPixel(range.end), state.timeAreaRect.xMax), + state.timeAreaRect.y + state.timeAreaRect.height); + EditorGUI.DrawRect(lineRect, lineColor); + } + + // Drag handler for the gui + void OnTrackDurationDrag(double newTime) + { + if (state.editSequence.asset.durationMode == TimelineAsset.DurationMode.FixedLength && !state.editSequence.isReadOnly) + { + // this is the first call to the drag + if (m_TimelineDuration.firstDrag) + { + TimelineUndo.PushUndo(state.editSequence.asset, "Change Duration"); + } + + state.editSequence.asset.fixedDuration = newTime; + + // when setting a new length, modify the duration of the timeline playable directly instead of + // rebuilding the whole graph + state.UpdateRootPlayableDuration(newTime); + } + + m_TimelineDuration.showTooltip = true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Duration.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Duration.cs.meta new file mode 100644 index 0000000..5828033 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Duration.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5b3bd7a976306c9449ba84e0591e8a0f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_EditorCallbacks.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_EditorCallbacks.cs new file mode 100644 index 0000000..68af27a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_EditorCallbacks.cs @@ -0,0 +1,272 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.Animations; +using UnityEngine.Playables; +using UnityEngine.SceneManagement; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + private int m_ComponentAddedFrame; + + void OnSelectionChangedInactive() + { + // Case 946942 -- when selection changes and the window is open but hidden, timeline + // needs to update selection immediately so preview mode is correctly released + // Case 1123119 -- except when recording + if (!hasFocus) + { + RefreshSelection(!locked && state != null && !state.recording); + } + } + + void InitializeEditorCallbacks() + { + Undo.postprocessModifications += PostprocessAnimationRecordingModifications; + Undo.postprocessModifications += ProcessAssetModifications; + Undo.undoRedoPerformed += OnUndoRedo; + EditorApplication.playModeStateChanged += OnPlayModeStateChanged; + AnimationUtility.onCurveWasModified += OnCurveModified; + EditorApplication.editorApplicationQuit += OnEditorQuit; + Selection.selectionChanged += OnSelectionChangedInactive; + EditorSceneManager.sceneSaved += OnSceneSaved; + ObjectFactory.componentWasAdded += OnComponentWasAdded; + PrefabUtility.prefabInstanceUpdated += OnPrefabApplied; + } + + void OnEditorQuit() + { + TimelineWindowViewPrefs.SaveAll(); + } + + void RemoveEditorCallbacks() + { + EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; + + Undo.undoRedoPerformed -= OnUndoRedo; + Undo.postprocessModifications -= PostprocessAnimationRecordingModifications; + Undo.postprocessModifications -= ProcessAssetModifications; + AnimationUtility.onCurveWasModified -= OnCurveModified; + EditorApplication.editorApplicationQuit -= OnEditorQuit; + Selection.selectionChanged -= OnSelectionChangedInactive; + EditorSceneManager.sceneSaved -= OnSceneSaved; + ObjectFactory.componentWasAdded -= OnComponentWasAdded; + PrefabUtility.prefabInstanceUpdated -= OnPrefabApplied; + } + + // Called when a prefab change is applied to the scene. + // Redraw so control tracks that use prefabs can show changes + void OnPrefabApplied(GameObject go) + { + if (!state.previewMode) + return; + + // if we added a component this frame, then rebuild, otherwise just let + // the individual playable handle the prefab application + if (Time.frameCount == m_ComponentAddedFrame) + TimelineEditor.Refresh(RefreshReason.ContentsModified); + else + TimelineEditor.Refresh(RefreshReason.SceneNeedsUpdate); + } + + // When the scene is save the director time will get reset. + void OnSceneSaved(Scene scene) + { + if (state != null) + state.OnSceneSaved(); + } + + void OnCurveModified(AnimationClip clip, EditorCurveBinding binding, AnimationUtility.CurveModifiedType type) + { + InspectorWindow.RepaintAllInspectors(); + if (state == null || state.previewMode == false || state.rebuildGraph) + return; + + if (type == AnimationUtility.CurveModifiedType.CurveModified) + { + Playable playable; + if (m_PlayableLookup.GetPlayableFromAnimClip(clip, out playable)) + { + playable.SetAnimatedProperties(clip); + } + + // mark the timeline clip as dirty + TimelineClip timelineClip = m_PlayableLookup.GetTimelineClipFromCurves(clip); + if (timelineClip != null) + timelineClip.MarkDirty(); + + // updates the duration of the graph without rebuilding + AnimationUtility.SyncEditorCurves(clip); // deleted keys are not synced when this is sent out, so duration could be incorrect + state.UpdateRootPlayableDuration(state.editSequence.duration); + + // don't evaluate if this is caused by recording on an animation track, the extra evaluation can cause hiccups + if (!TimelineRecording.IsRecordingAnimationTrack) + state.Evaluate(); + } + else // curve added/removed, or clip added/removed + { + state.rebuildGraph = true; + } + } + + void OnPlayModeStateChanged(PlayModeStateChange playModeState) + { + // case 923506 - make sure we save view data before switching modes + if (playModeState == PlayModeStateChange.ExitingEditMode || + playModeState == PlayModeStateChange.ExitingPlayMode) + TimelineWindowViewPrefs.SaveAll(); + + bool isPlaymodeAboutToChange = playModeState == PlayModeStateChange.ExitingEditMode || playModeState == PlayModeStateChange.ExitingPlayMode; + + // Important to stop the graph on any director so temporary objects are properly cleaned up + if (isPlaymodeAboutToChange && state != null) + state.Stop(); + } + + UndoPropertyModification[] PostprocessAnimationRecordingModifications(UndoPropertyModification[] modifications) + { + DirtyModifiedObjects(modifications); + + if (!state.recording) + return modifications; + + var remaining = TimelineRecording.ProcessUndoModification(modifications, state); + // if we've changed, we need to repaint the sequence window to show clip length changes + if (remaining != modifications) + { + // only update if us or the sequencer window has focus + // Prevents color pickers and other dialogs from being wrongly dismissed + bool repaint = (focusedWindow == null) || + (focusedWindow is InspectorWindow) || + (focusedWindow is TimelineWindow); + + if (repaint) + Repaint(); + } + + + return remaining; + } + + void DirtyModifiedObjects(UndoPropertyModification[] modifications) + { + foreach (var m in modifications) + { + if (m.currentValue == null || m.currentValue.target == null) + continue; + + var track = m.currentValue.target as TrackAsset; + var playableAsset = m.currentValue.target as PlayableAsset; + var editorClip = m.currentValue.target as EditorClip; + + if (track != null) + { + track.MarkDirty(); + } + else if (playableAsset != null) + { + var clip = TimelineRecording.FindClipWithAsset(state.editSequence.asset, playableAsset); + if (clip != null) + clip.MarkDirty(); + } + else if (editorClip != null && editorClip.clip != null) + { + editorClip.clip.MarkDirty(); + } + } + } + + UndoPropertyModification[] ProcessAssetModifications(UndoPropertyModification[] modifications) + { + bool rebuildGraph = false; + + for (int i = 0; i < modifications.Length && !rebuildGraph; i++) + { + var mod = modifications[i]; + + // check if an Avatar Mask has been modified + if (mod.previousValue != null && mod.previousValue.target is AvatarMask) + { + rebuildGraph = state.editSequence.asset != null && + state.editSequence.asset.flattenedTracks + .OfType() + .Any(x => mod.previousValue.target == x.avatarMask); + } + } + + if (rebuildGraph) + { + state.rebuildGraph = true; + Repaint(); + } + + return modifications; + } + + void OnUndoRedo() + { + var undos = new List(); + var redos = new List(); + Undo.GetRecords(undos, redos); + + var rebuildAll = redos.Any(x => x.StartsWith("Timeline ")) || undos.Any(x => x.StartsWith("Timeline")); + var evalNow = redos.Any(x => x.Contains("Edit Curve")) || undos.Any(x => x.Contains("Edit Curve")); + if (rebuildAll || evalNow) + { + ValidateSelection(); + if (state != null) + { + if (evalNow) // when curves change, the new values need to be set in the transform before the inspector handles the undo + state.EvaluateImmediate(); + if (rebuildAll) + state.Refresh(); + } + Repaint(); + } + } + + static void ValidateSelection() + { + //get all the clips in the selection + var selectedClips = Selection.GetFiltered(SelectionMode.Unfiltered).Select(x => x.clip); + foreach (var selectedClip in selectedClips) + { + var parent = selectedClip.parentTrack; + if (selectedClip.parentTrack != null) + { + if (!parent.clips.Contains(selectedClip)) + { + SelectionManager.Remove(selectedClip); + } + } + } + } + + void OnComponentWasAdded(Component c) + { + m_ComponentAddedFrame = Time.frameCount; + var go = c.gameObject; + foreach (var seq in state.GetAllSequences()) + { + if (seq.director == null || seq.asset == null) + { + return; + } + + var rebind = seq.asset.GetOutputTracks().Any(track => seq.director.GetGenericBinding(track) == go); + // Either the playable director has a binding for the GameObject or it is a sibling of the director. + // The second case is needed since we have timeline top level markerTracks that do not have a binding, but + // are still "targeting" the playable director + if (rebind || seq.director.gameObject == go) + { + seq.director.RebindPlayableGraphOutputs(); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_EditorCallbacks.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_EditorCallbacks.cs.meta new file mode 100644 index 0000000..29b3a44 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_EditorCallbacks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d1c9c1ed454d0594b951eb6a76ac62ad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Gui.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Gui.cs new file mode 100644 index 0000000..4a6f1fb --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Gui.cs @@ -0,0 +1,511 @@ +using System; +using System.Collections.Generic; +using UnityEditor.Experimental.SceneManagement; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + struct MarkerOverlay + { + public IMarker marker; + public Rect rect; + public bool isSelected; + public bool isCollapsed; + public MarkerEditor editor; + } + + + enum TimelineItemArea + { + Header, + Lines + } + + [SerializeField] float m_HierarchySplitterPerc = WindowConstants.hierarchySplitterDefaultPercentage; + + static internal readonly TimelineMode s_ActiveMode = new TimelineActiveMode(); + static internal readonly TimelineMode s_EditAssetMode = new TimelineAssetEditionMode(); + static internal readonly TimelineMode s_InactiveMode = new TimelineInactiveMode(); + static internal readonly TimelineMode s_DisabledMode = new TimelineDisabledMode(); + static internal readonly TimelineMode s_PrefabOutOfContextMode = new TimelineAssetEditionMode(); + static internal readonly TimelineMode s_ReadonlyMode = new TimelineReadOnlyMode(); + + int m_SplitterCaptured; + float m_VerticalScrollBarSize, m_HorizontalScrollBarSize; + + List m_OverlayQueue = new List(100); + + + float headerHeight + { + get + { + return WindowConstants.markerRowYPosition + (state.showMarkerHeader ? WindowConstants.markerRowHeight : 0.0f); + } + } + + public Rect markerHeaderRect + { + get { return new Rect(0.0f, WindowConstants.markerRowYPosition, state.sequencerHeaderWidth, WindowConstants.markerRowHeight); } + } + + public Rect markerContentRect + { + get { return Rect.MinMaxRect(state.sequencerHeaderWidth, WindowConstants.markerRowYPosition, position.width, WindowConstants.markerRowYPosition + WindowConstants.markerRowHeight); } + } + + Rect trackRect + { + get + { + var yMinHeight = headerHeight; + return new Rect(0, yMinHeight, position.width, position.height - yMinHeight - horizontalScrollbarHeight); + } + } + + public Rect sequenceRect + { + get { return new Rect(0.0f, WindowConstants.markerRowYPosition, position.width - WindowConstants.sliderWidth, position.height - WindowConstants.timeAreaYPosition); } + } + + public Rect sequenceHeaderRect + { + get { return new Rect(0.0f, WindowConstants.markerRowYPosition, state.sequencerHeaderWidth, position.height - WindowConstants.timeAreaYPosition); } + } + + public Rect sequenceContentRect + { + get + { + return new Rect( + state.sequencerHeaderWidth, + WindowConstants.markerRowYPosition, + position.width - state.sequencerHeaderWidth - (treeView != null && treeView.showingVerticalScrollBar ? WindowConstants.sliderWidth : 0), + position.height - WindowConstants.markerRowYPosition - horizontalScrollbarHeight); + } + } + + public float verticalScrollbarWidth + { + get + { + return m_VerticalScrollBarSize; + } + } + + public float horizontalScrollbarHeight + { + get { return m_HorizontalScrollBarSize; } + } + + float breadCrumbAreaWidth + { + get + { + return state.timeAreaRect.width - WindowConstants.selectorWidth - WindowConstants.cogButtonWidth - WindowConstants.cogButtonPadding; + } + } + + internal TimelineMode currentMode + { + get + { + if (state == null || state.editSequence.asset == null) + return s_InactiveMode; + if (state.editSequence.isReadOnly) + return s_ReadonlyMode; + if (state.editSequence.director == null || state.masterSequence.director == null) + return s_EditAssetMode; + + if (PrefabUtility.IsPartOfPrefabAsset(state.editSequence.director)) + { + var stage = PrefabStageUtility.GetCurrentPrefabStage(); + if (stage == null || !stage.IsPartOfPrefabContents(state.editSequence.director.gameObject)) + return s_PrefabOutOfContextMode; + } + + if (!state.masterSequence.director.isActiveAndEnabled) + return s_DisabledMode; + + return s_ActiveMode; + } + } + + void DoLayout() + { + var rawType = Event.current.rawType; // TODO: rawType seems to be broken after calling Use(), use this Hack and remove it once it's fixed. + var mousePosition = Event.current.mousePosition; // mousePosition is also affected by this bug and does not reflect the original position after a Use() + + Initialize(); + HandleSplitterResize(); + + var processManipulators = Event.current.type != EventType.Repaint && Event.current.type != EventType.Layout; + + if (processManipulators) + { + // Update what's under mouse the cursor + PickerUtils.DoPick(state, mousePosition); + + if (state.editSequence.asset != null) + m_PreTreeViewControl.HandleManipulatorsEvents(state); + } + + SequencerGUI(); + + if (processManipulators) + { + if (state.editSequence.asset != null) + m_PostTreeViewControl.HandleManipulatorsEvents(state); + } + + m_RectangleSelect.OnGUI(state, rawType, mousePosition); + m_RectangleZoom.OnGUI(state, rawType, mousePosition); + } + + void TimelineSectionGUI() + { + GUILayout.BeginVertical(); + { + GUILayout.BeginHorizontal(EditorStyles.toolbar, GUILayout.Width(position.width - state.sequencerHeaderWidth)); + { + DoSequenceSelectorGUI(); + DoBreadcrumbGUI(); + OptionsGUI(); + } + GUILayout.EndHorizontal(); + + TimelineGUI(); + } + GUILayout.EndVertical(); + } + + void SplitterGUI() + { + if (!state.IsEditingAnEmptyTimeline()) + { + var splitterLineRect = new Rect(state.sequencerHeaderWidth - 1.0f, 0.0f, 2.0f, clientArea.height); + EditorGUI.DrawRect(splitterLineRect, DirectorStyles.Instance.customSkin.colorTopOutline3); + } + } + + void TrackViewsGUI() + { + using (new GUIViewportScope(trackRect)) + { + TracksGUI(trackRect, state, currentMode.TrackState(state)); + } + } + + void UserOverlaysGUI() + { + if (Event.current.type != EventType.Repaint) + return; + + // the rect containing the time area plus the time ruler + var screenRect = new Rect( + state.sequencerHeaderWidth, + WindowConstants.timeAreaYPosition, + position.width - state.sequencerHeaderWidth - (treeView != null && treeView.showingVerticalScrollBar ? WindowConstants.sliderWidth : 0), + position.height - WindowConstants.timeAreaYPosition - horizontalScrollbarHeight); + + var startTime = state.PixelToTime(screenRect.xMin); + var endTime = state.PixelToTime(screenRect.xMax); + + using (new GUIViewportScope(screenRect)) + { + foreach (var entry in m_OverlayQueue) + { + var uiState = MarkerUIStates.None; + if (entry.isCollapsed) + uiState |= MarkerUIStates.Collapsed; + if (entry.isSelected) + uiState |= MarkerUIStates.Selected; + var region = new MarkerOverlayRegion(GUIClip.Clip(entry.rect), screenRect, startTime, endTime); + try + { + entry.editor.DrawOverlay(entry.marker, uiState, region); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + } + + m_OverlayQueue.Clear(); + } + + void DrawHeaderBackground() + { + var rect = state.timeAreaRect; + rect.xMin = 0.0f; + EditorGUI.DrawRect(rect, DirectorStyles.Instance.customSkin.colorTimelineBackground); + } + + void HandleBottomFillerDragAndDrop(Rect rect) + { + if (Event.current.type != EventType.DragUpdated && + Event.current.type != EventType.DragExited && + Event.current.type != EventType.DragPerform) + return; + + if (instance.treeView == null || instance.treeView.timelineDragging == null) + return; + + if (!rect.Contains(Event.current.mousePosition)) + return; + + instance.treeView.timelineDragging.DragElement(null, new Rect(), -1); + } + + void DrawHeaderBackgroundBottomFiller() + { + var rect = sequenceRect; + rect.yMin = rect.yMax; + rect.yMax = rect.yMax + WindowConstants.sliderWidth; + if (state.editSequence.asset != null && !state.IsEditingAnEmptyTimeline()) + { + rect.width = state.sequencerHeaderWidth; + } + using (new GUIViewportScope(rect)) + { + Graphics.DrawBackgroundRect(state, rect); + } + + HandleBottomFillerDragAndDrop(rect); + } + + void SequencerGUI() + { + var duration = state.editSequence.duration; + + DrawHeaderBackground(); + DurationGUI(TimelineItemArea.Header, duration); + + GUILayout.BeginHorizontal(); + { + SequencerHeaderGUI(); + TimelineSectionGUI(); + } + GUILayout.EndHorizontal(); + + TrackViewsGUI(); + MarkerHeaderGUI(); + UserOverlaysGUI(); + + DurationGUI(TimelineItemArea.Lines, duration); + PlayRangeGUI(TimelineItemArea.Lines); + TimeCursorGUI(TimelineItemArea.Lines); + DrawHeaderBackgroundBottomFiller(); + + SubTimelineRangeGUI(); + + PlayRangeGUI(TimelineItemArea.Header); + TimeCursorGUI(TimelineItemArea.Header); + + SplitterGUI(); + } + + void SubTimelineRangeGUI() + { + if (!state.IsEditingASubTimeline() || state.IsEditingAnEmptyTimeline()) return; + + var subTimelineOverlayColor = DirectorStyles.Instance.customSkin.colorSubSequenceOverlay; + + var range = state.editSequence.GetEvaluableRange(); + var area = new Vector2(state.TimeToPixel(range.start), state.TimeToPixel(range.end)); + + var fullRect = sequenceContentRect; + fullRect.yMin -= state.timeAreaRect.height; + + if (fullRect.xMin < area.x) + { + var before = fullRect; + before.xMin = fullRect.xMin; + before.xMax = Mathf.Min(area.x, fullRect.xMax); + EditorGUI.DrawRect(before, subTimelineOverlayColor); + } + + if (fullRect.xMax > area.y) + { + var after = fullRect; + after.xMin = Mathf.Max(area.y, fullRect.xMin); + after.xMax = fullRect.xMax; + EditorGUI.DrawRect(after, subTimelineOverlayColor); + + // Space above the vertical scrollbar + after.xMin = after.xMax; + after.width = verticalScrollbarWidth; + after.yMax = state.timeAreaRect.y + state.timeAreaRect.height + (state.showMarkerHeader ? WindowConstants.markerRowHeight : 0.0f); + EditorGUI.DrawRect(after, subTimelineOverlayColor); + } + } + + void HandleSplitterResize() + { + state.mainAreaWidth = position.width; + + if (state.editSequence.asset == null) + return; + + // Sequencer Header Splitter : The splitter has 6 pixels wide,center it around m_State.sequencerHeaderWidth. That's why there's this -3. + Rect sequencerHeaderSplitterRect = new Rect(state.sequencerHeaderWidth - 3.0f, 0.0f, 6.0f, clientArea.height); + EditorGUIUtility.AddCursorRect(sequencerHeaderSplitterRect, MouseCursor.SplitResizeLeftRight); + + if (Event.current.type == EventType.MouseDown) + { + if (sequencerHeaderSplitterRect.Contains(Event.current.mousePosition)) + m_SplitterCaptured = 1; + } + + if (m_SplitterCaptured > 0) + { + if (Event.current.type == EventType.MouseUp) + { + m_SplitterCaptured = 0; + Event.current.Use(); + } + + if (Event.current.type == EventType.MouseDrag) + { + if (m_SplitterCaptured == 1) + { + var percInc = Event.current.delta.x / position.width; + m_HierarchySplitterPerc = Mathf.Clamp(m_HierarchySplitterPerc + percInc, WindowConstants.minHierarchySplitter, WindowConstants.maxHierarchySplitter); + state.sequencerHeaderWidth += Event.current.delta.x; + } + + Event.current.Use(); + } + } + } + + void OptionsGUI() + { + if (currentMode.headerState.options == TimelineModeGUIState.Hidden || state.editSequence.asset == null) + return; + + using (new EditorGUI.DisabledScope(currentMode.headerState.options == TimelineModeGUIState.Disabled)) + { + GUILayout.FlexibleSpace(); + if (EditorGUILayout.DropdownButton(DirectorStyles.optionsCogIcon, FocusType.Keyboard, EditorStyles.toolbarButton)) + { + GenericMenu menu = new GenericMenu(); + + menu.AddItem(EditorGUIUtility.TrTextContent("Seconds"), !state.timeInFrames, ChangeTimeCode, "seconds"); + menu.AddItem(EditorGUIUtility.TrTextContent("Frames"), state.timeInFrames, ChangeTimeCode, "frames"); + menu.AddSeparator(""); + + TimeAreaContextMenu.AddTimeAreaMenuItems(menu, state); + + menu.AddSeparator(""); + + bool standardFrameRate = false; + standardFrameRate |= AddStandardFrameRateMenu(menu, "Frame Rate/Film (24)", 24.0f); + standardFrameRate |= AddStandardFrameRateMenu(menu, "Frame Rate/PAL (25)", 25.0f); + standardFrameRate |= AddStandardFrameRateMenu(menu, "Frame Rate/NTSC (29.97)", 29.97f); + standardFrameRate |= AddStandardFrameRateMenu(menu, "Frame Rate/30", 30.0f); + standardFrameRate |= AddStandardFrameRateMenu(menu, "Frame Rate/50", 50.0f); + standardFrameRate |= AddStandardFrameRateMenu(menu, "Frame Rate/60", 60.0f); + + if (standardFrameRate) + menu.AddDisabledItem(EditorGUIUtility.TrTextContent("Frame Rate/Custom")); + else + menu.AddItem(EditorGUIUtility.TrTextContent("Frame Rate/Custom (" + state.editSequence.frameRate + ")"), true, () => {}); + + menu.AddSeparator(""); + if (state.playRangeEnabled) + { + menu.AddItem(EditorGUIUtility.TrTextContent("Play Range Mode/Loop"), state.playRangeLoopMode, () => state.playRangeLoopMode = true); + menu.AddItem(EditorGUIUtility.TrTextContent("Play Range Mode/Once"), !state.playRangeLoopMode, () => state.playRangeLoopMode = false); + } + else + { + menu.AddDisabledItem(EditorGUIUtility.TrTextContent("Play Range Mode")); + } + menu.AddItem(EditorGUIUtility.TrTextContent("Playback Scrolling mode/None"), state.autoScrollMode == PlaybackScrollMode.None, () => state.autoScrollMode = PlaybackScrollMode.None); + menu.AddItem(EditorGUIUtility.TrTextContent("Playback Scrolling mode/Smooth"), state.autoScrollMode == PlaybackScrollMode.Smooth, () => state.autoScrollMode = PlaybackScrollMode.Smooth); + menu.AddItem(EditorGUIUtility.TrTextContent("Playback Scrolling mode/Pan"), state.autoScrollMode == PlaybackScrollMode.Pan, () => state.autoScrollMode = PlaybackScrollMode.Pan); + menu.AddSeparator(""); + menu.AddItem(EditorGUIUtility.TrTextContent("Show Audio Waveforms"), state.showAudioWaveform, () => + { + state.showAudioWaveform = !state.showAudioWaveform; + }); + menu.AddItem(EditorGUIUtility.TrTextContent("Enable Audio Scrubbing"), !state.muteAudioScrubbing, () => state.muteAudioScrubbing = !state.muteAudioScrubbing); + + menu.AddSeparator(""); + menu.AddItem(EditorGUIUtility.TrTextContent("Snap to Frame"), state.frameSnap, () => state.frameSnap = !state.frameSnap); + menu.AddItem(EditorGUIUtility.TrTextContent("Edge Snap"), state.edgeSnaps, () => state.edgeSnaps = !state.edgeSnaps); + + if (Unsupported.IsDeveloperMode()) + { + menu.AddItem(EditorGUIUtility.TrTextContent("Show Snapping Debug"), SnapEngine.displayDebugLayout, + () => SnapEngine.displayDebugLayout = !SnapEngine.displayDebugLayout); + + menu.AddItem(EditorGUIUtility.TrTextContent("Debug TimeArea"), false, + () => + Debug.LogFormat("translation: {0} scale: {1} rect: {2} shownRange: {3}", m_TimeArea.translation, m_TimeArea.scale, m_TimeArea.rect, m_TimeArea.shownArea)); + + menu.AddItem(EditorGUIUtility.TrTextContent("Edit Skin"), false, () => Selection.activeObject = DirectorStyles.Instance.customSkin); + + menu.AddItem(EditorGUIUtility.TrTextContent("Show QuadTree Debugger"), state.showQuadTree, + () => state.showQuadTree = !state.showQuadTree); + } + + menu.ShowAsContext(); + } + } + } + + bool AddStandardFrameRateMenu(GenericMenu menu, string name, float value) + { + bool on = state.editSequence.frameRate.Equals(value); + if (state.editSequence.isReadOnly) + { + menu.AddDisabledItem(EditorGUIUtility.TextContent(name), on); + } + else + { + menu.AddItem(EditorGUIUtility.TextContent(name), on, r => + { + state.editSequence.frameRate = value; + }, value); + } + return on; + } + + void ChangeTimeCode(object obj) + { + string format = obj.ToString(); + if (format == "frames") + { + state.timeInFrames = true; + } + else + { + state.timeInFrames = false; + } + } + + public void AddUserOverlay(IMarker marker, Rect rect, MarkerEditor editor, bool collapsed, bool selected) + { + if (marker == null) + throw new ArgumentNullException("marker"); + if (editor == null) + throw new ArgumentNullException("editor"); + + m_OverlayQueue.Add(new MarkerOverlay() + { + isCollapsed = collapsed, + isSelected = selected, + marker = marker, + rect = rect, + editor = editor + } + ); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Gui.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Gui.cs.meta new file mode 100644 index 0000000..cd727fa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Gui.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a956e5803e95df349bd35832492d4014 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_HeaderGui.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_HeaderGui.cs new file mode 100644 index 0000000..4e7734e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_HeaderGui.cs @@ -0,0 +1,314 @@ +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + static readonly GUIContent[] k_TimeReferenceGUIContents = + { + EditorGUIUtility.TrTextContent("Local", "Display time based on the current timeline."), + EditorGUIUtility.TrTextContent("Global", "Display time based on the master timeline.") + }; + + TimelineMarkerHeaderGUI m_MarkerHeaderGUI; + + void SequencerHeaderGUI() + { + using (new EditorGUI.DisabledScope(state.editSequence.asset == null)) + { + GUILayout.BeginVertical(); + { + TransportToolbarGUI(); + + GUILayout.BeginHorizontal(GUILayout.Width(sequenceHeaderRect.width)); + { + if (state.editSequence.asset != null) + { + GUILayout.Space(DirectorStyles.kBaseIndent); + AddButtonGUI(); + GUILayout.FlexibleSpace(); + EditModeToolbarGUI(currentMode); + ShowMarkersButton(); + EditorGUILayout.Space(); + } + } + GUILayout.EndHorizontal(); + } + GUILayout.EndVertical(); + } + } + + void MarkerHeaderGUI() + { + var timelineAsset = state.editSequence.asset; + if (timelineAsset == null) + return; + + if (m_MarkerHeaderGUI == null) + m_MarkerHeaderGUI = new TimelineMarkerHeaderGUI(timelineAsset, state); + m_MarkerHeaderGUI.Draw(markerHeaderRect, markerContentRect, state); + } + + void TransportToolbarGUI() + { + GUILayout.BeginHorizontal(EditorStyles.toolbar, GUILayout.Width(sequenceHeaderRect.width)); + { + using (new EditorGUI.DisabledScope(currentMode.PreviewState(state) == TimelineModeGUIState.Disabled)) + { + PreviewModeButtonGUI(); + } + + using (new EditorGUI.DisabledScope(currentMode.ToolbarState(state) == TimelineModeGUIState.Disabled)) + { + GotoBeginingSequenceGUI(); + PreviousEventButtonGUI(); + PlayButtonGUI(); + NextEventButtonGUI(); + GotoEndSequenceGUI(); + GUILayout.Space(10.0f); + PlayRangeButtonGUI(); + GUILayout.FlexibleSpace(); + TimeCodeGUI(); + ReferenceTimeGUI(); + } + } + GUILayout.EndHorizontal(); + } + + void PreviewModeButtonGUI() + { + EditorGUI.BeginChangeCheck(); + var enabled = state.previewMode; + enabled = GUILayout.Toggle(enabled, DirectorStyles.previewContent, EditorStyles.toolbarButton); + if (EditorGUI.EndChangeCheck()) + { + // turn off auto play as well, so it doesn't auto reenable + if (!enabled) + { + state.SetPlaying(false); + state.recording = false; + } + + state.previewMode = enabled; + + // if we are successfully enabled, rebuild the graph so initial states work correctly + // Note: testing both values because previewMode setter can "fail" + if (enabled && state.previewMode) + state.rebuildGraph = true; + } + } + + void GotoBeginingSequenceGUI() + { + if (GUILayout.Button(DirectorStyles.gotoBeginingContent, EditorStyles.toolbarButton)) + { + state.editSequence.time = 0; + state.EnsurePlayHeadIsVisible(); + } + } + + // in the editor the play button starts/stops simulation + void PlayButtonGUIEditor() + { + EditorGUI.BeginChangeCheck(); + var isPlaying = GUILayout.Toggle(state.playing, DirectorStyles.playContent, EditorStyles.toolbarButton); + if (EditorGUI.EndChangeCheck()) + { + state.SetPlaying(isPlaying); + } + } + + // in playmode the button reflects the playing state. + // needs to disabled if playing is not possible + void PlayButtonGUIPlayMode() + { + bool buttonEnabled = state.masterSequence.director != null && + state.masterSequence.director.isActiveAndEnabled; + using (new EditorGUI.DisabledScope(!buttonEnabled)) + { + PlayButtonGUIEditor(); + } + } + + void PlayButtonGUI() + { + if (!Application.isPlaying) + PlayButtonGUIEditor(); + else + PlayButtonGUIPlayMode(); + } + + void NextEventButtonGUI() + { + if (GUILayout.Button(DirectorStyles.nextFrameContent, EditorStyles.toolbarButton)) + { + state.referenceSequence.frame += 1; + } + } + + void PreviousEventButtonGUI() + { + if (GUILayout.Button(DirectorStyles.previousFrameContent, EditorStyles.toolbarButton)) + { + state.referenceSequence.frame -= 1; + } + } + + void GotoEndSequenceGUI() + { + if (GUILayout.Button(DirectorStyles.gotoEndContent, EditorStyles.toolbarButton)) + { + state.editSequence.time = state.editSequence.asset.duration; + state.EnsurePlayHeadIsVisible(); + } + } + + void PlayRangeButtonGUI() + { + using (new EditorGUI.DisabledScope(EditorApplication.isPlaying || state.IsEditingASubTimeline())) + { + state.playRangeEnabled = GUILayout.Toggle(state.playRangeEnabled, DirectorStyles.Instance.playrangeContent, EditorStyles.toolbarButton); + } + } + + void AddButtonGUI() + { + if (currentMode.trackOptionsState.newButton == TimelineModeGUIState.Hidden) + return; + + using (new EditorGUI.DisabledScope(currentMode.trackOptionsState.newButton == TimelineModeGUIState.Disabled)) + { + if (EditorGUILayout.DropdownButton(DirectorStyles.newContent, FocusType.Passive, EditorStyles.toolbarPopup)) + { + // if there is 1 and only 1 track selected, AND it's a group, add to that group + var groupTracks = SelectionManager.SelectedTracks().ToList(); + if (groupTracks.Any(x => x.GetType() != typeof(GroupTrack) || x.lockedInHierarchy)) + groupTracks = null; + + SequencerContextMenu.ShowNewTracksContextMenu(groupTracks, state, EditorGUILayout.s_LastRect); + } + } + } + + void ShowMarkersButton() + { + var asset = state.editSequence.asset; + if (asset == null) + return; + + var content = state.showMarkerHeader ? DirectorStyles.showMarkersOn : DirectorStyles.showMarkersOff; + SetShowMarkerHeader(GUILayout.Toggle(state.showMarkerHeader, content, DirectorStyles.Instance.showMarkersBtn)); + } + + internal void SetShowMarkerHeader(bool newValue) + { + if (state.showMarkerHeader == newValue) + return; + + TimelineUndo.PushUndo(state.editSequence.viewModel, "Toggle Show Markers"); + state.showMarkerHeader = newValue; + if (!newValue) + { + var asset = state.editSequence.asset; + if (asset != null && asset.markerTrack != null) + { + SelectionManager.Remove(asset.markerTrack); + foreach (var marker in asset.markerTrack.GetMarkers()) + { + SelectionManager.Remove(marker); + } + } + } + } + + internal void SetShowTrackMarkers(TrackAsset track, bool showMarkerHeader) + { + var currentValue = track.GetShowMarkers(); + if (currentValue != showMarkerHeader) + { + TimelineUndo.PushUndo(state.editSequence.viewModel, "Toggle Show Markers"); + track.SetShowMarkers(showMarkerHeader); + if (!showMarkerHeader) + { + foreach (var marker in track.GetMarkers()) + { + SelectionManager.Remove(marker); + } + } + } + } + + static void EditModeToolbarGUI(TimelineMode mode) + { + using (new EditorGUI.DisabledScope(mode.EditModeButtonsState(instance.state) == TimelineModeGUIState.Disabled)) + { + var editType = EditMode.editType; + + using (var checkScope = new EditorGUI.ChangeCheckScope()) + { + var icon = editType == EditMode.EditType.Mix ? DirectorStyles.mixOn : DirectorStyles.mixOff; + GUILayout.Toggle(editType == EditMode.EditType.Mix, icon, DirectorStyles.Instance.editModeBtn); + + if (checkScope.changed) + EditMode.editType = EditMode.EditType.Mix; + } + using (var checkScope = new EditorGUI.ChangeCheckScope()) + { + var icon = editType == EditMode.EditType.Ripple ? DirectorStyles.rippleOn : DirectorStyles.rippleOff; + GUILayout.Toggle(editType == EditMode.EditType.Ripple, icon, DirectorStyles.Instance.editModeBtn); + if (checkScope.changed) + EditMode.editType = EditMode.EditType.Ripple; + } + using (var checkScope = new EditorGUI.ChangeCheckScope()) + { + var icon = editType == EditMode.EditType.Replace ? DirectorStyles.replaceOn : DirectorStyles.replaceOff; + GUILayout.Toggle(editType == EditMode.EditType.Replace, icon, DirectorStyles.Instance.editModeBtn); + if (checkScope.changed) + EditMode.editType = EditMode.EditType.Replace; + } + } + } + + // Draws the box to enter the time field + void TimeCodeGUI() + { + EditorGUI.BeginChangeCheck(); + + var currentTime = state.editSequence.asset != null ? TimeReferenceUtility.ToTimeString(state.editSequence.time, "F1") : "0"; + var r = EditorGUILayout.GetControlRect(false, EditorGUI.kSingleLineHeight, EditorStyles.toolbarTextField, GUILayout.MinWidth(WindowConstants.minTimeCodeWidth)); + var id = GUIUtility.GetControlID("RenameFieldTextField".GetHashCode(), FocusType.Passive, r); + var newCurrentTime = EditorGUI.DelayedTextFieldInternal(r, id, GUIContent.none, currentTime, null, EditorStyles.toolbarTextField); + + if (EditorGUI.EndChangeCheck()) + state.editSequence.time = TimeReferenceUtility.FromTimeString(newCurrentTime); + } + + void ReferenceTimeGUI() + { + if (!state.IsEditingASubTimeline()) + return; + + EditorGUI.BeginChangeCheck(); + + var rect = EditorGUILayout.GetControlRect(false, EditorGUI.kSingleLineHeight, EditorStyles.toolbarButton, GUILayout.Width(WindowConstants.refTimeWidth)); + state.timeReferenceMode = (TimeReferenceMode)EditorGUI.CycleButton(rect, (int)state.timeReferenceMode, k_TimeReferenceGUIContents, EditorStyles.toolbarButtonRight); + + if (EditorGUI.EndChangeCheck()) + OnTimeReferenceModeChanged(); + } + + void OnTimeReferenceModeChanged() + { + m_TimeAreaDirty = true; + InitTimeAreaFrameRate(); + SyncTimeAreaShownRange(); + + foreach (var inspector in InspectorWindow.GetAllInspectorWindows()) + { + inspector.Repaint(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_HeaderGui.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_HeaderGui.cs.meta new file mode 100644 index 0000000..a06ca5f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_HeaderGui.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fdd19c82588da3e498a0c98951efa6c4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Manipulators.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Manipulators.cs new file mode 100644 index 0000000..ce88372 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Manipulators.cs @@ -0,0 +1,41 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + readonly Control m_PreTreeViewControl = new Control(); + readonly Control m_PostTreeViewControl = new Control(); + + readonly RectangleSelect m_RectangleSelect = new RectangleSelect(); + readonly RectangleZoom m_RectangleZoom = new RectangleZoom(); + + void InitializeManipulators() + { + // Order is important! + + // Manipulators that needs to be processed BEFORE the treeView (mainly anything clip related) + m_PreTreeViewControl.AddManipulator(new TimelinePanManipulator()); + m_PreTreeViewControl.AddManipulator(new InlineCurveResize()); + m_PreTreeViewControl.AddManipulator(new TrackZoom()); + m_PreTreeViewControl.AddManipulator(new Jog()); + m_PreTreeViewControl.AddManipulator(TimelineZoomManipulator.Instance); + m_PreTreeViewControl.AddManipulator(new ContextMenuManipulator()); + m_PreTreeViewControl.AddManipulator(new TimelineMarkerHeaderContextMenu()); + + m_PreTreeViewControl.AddManipulator(new EaseClip()); + m_PreTreeViewControl.AddManipulator(new TrimClip()); + m_PreTreeViewControl.AddManipulator(new SelectAndMoveItem()); + m_PreTreeViewControl.AddManipulator(new TrackDoubleClick()); + m_PreTreeViewControl.AddManipulator(new DrillIntoClip()); + m_PreTreeViewControl.AddManipulator(new ItemActionShortcutManipulator()); + m_PreTreeViewControl.AddManipulator(new InlineCurvesShortcutManipulator()); + + // Manipulators that needs to be processed AFTER the treeView or any GUI element able to use event (like inline curves) + m_PostTreeViewControl.AddManipulator(new TimeAreaContextMenu()); + m_PostTreeViewControl.AddManipulator(new TrackShortcutManipulator()); + m_PostTreeViewControl.AddManipulator(new TimelineShortcutManipulator()); + m_PostTreeViewControl.AddManipulator(new ClearSelection()); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Manipulators.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Manipulators.cs.meta new file mode 100644 index 0000000..1bc3569 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Manipulators.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c3a595c9a8ed19040bb2612fe168759d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayRange.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayRange.cs new file mode 100644 index 0000000..99a1ab6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayRange.cs @@ -0,0 +1,131 @@ +using System.Linq; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + TimeAreaItem m_PlayRangeEnd; + TimeAreaItem m_PlayRangeStart; + + void PlayRangeGUI(TimelineItemArea area) + { + if (!currentMode.ShouldShowPlayRange(state) || treeView == null) + return; + + if (state.masterSequence.asset != null && !state.masterSequence.asset.GetRootTracks().Any()) + return; + + // left Time Cursor + if (m_PlayRangeStart == null || m_PlayRangeStart.style != styles.playTimeRangeStart) + { + m_PlayRangeStart = new TimeAreaItem(styles.playTimeRangeStart, OnTrackHeadMinSelectDrag); + Vector2 offset = new Vector2(-2.0f, 0); + m_PlayRangeStart.boundOffset = offset; + } + + // right Time Cursor + if (m_PlayRangeEnd == null || m_PlayRangeEnd.style != styles.playTimeRangeEnd) + { + m_PlayRangeEnd = new TimeAreaItem(styles.playTimeRangeEnd, OnTrackHeadMaxSelectDrag); + Vector2 offset = new Vector2(2.0f, 0); + m_PlayRangeEnd.boundOffset = offset; + } + + if (area == TimelineItemArea.Header) + DrawPlayRange(true, false); + else if (area == TimelineItemArea.Lines) + DrawPlayRange(false, true); + } + + void DrawPlayRange(bool drawHeads, bool drawLines) + { + Rect timeCursorRect = state.timeAreaRect; + timeCursorRect.height = clientArea.height; + + m_PlayRangeEnd.HandleManipulatorsEvents(state); + m_PlayRangeStart.HandleManipulatorsEvents(state); + + // The first time a user enable the play range, we put the play range 75% around the current time... + if (state.playRange == TimelineAssetViewModel.NoPlayRangeSet) + { + float minimumPlayRangeTime = 0.01f; + float t0 = Mathf.Max(0.0f, state.PixelToTime(state.timeAreaRect.xMin)); + float t1 = Mathf.Min((float)state.masterSequence.duration, state.PixelToTime(state.timeAreaRect.xMax)); + + if (Mathf.Abs(t1 - t0) <= minimumPlayRangeTime) + { + state.playRange = new Vector2(t0, t1); + return; + } + + float deltaT = (t1 - t0) * 0.25f / 2.0f; + + t0 += deltaT; + t1 -= deltaT; + + if (t1 < t0) + { + float temp = t0; + t0 = t1; + t1 = temp; + } + + if (Mathf.Abs(t1 - t0) < minimumPlayRangeTime) + { + if (t0 - minimumPlayRangeTime > 0.0f) + t0 -= minimumPlayRangeTime; + else if (t1 + minimumPlayRangeTime < state.masterSequence.duration) + t1 += minimumPlayRangeTime; + } + + state.playRange = new Vector2(t0, t1); + } + + // Draw the head or the lines according to the parameters.. + m_PlayRangeStart.drawHead = drawHeads; + m_PlayRangeStart.drawLine = drawLines; + + m_PlayRangeEnd.drawHead = drawHeads; + m_PlayRangeEnd.drawLine = drawLines; + + var playRangeTime = state.playRange; + m_PlayRangeStart.Draw(sequenceContentRect, state, playRangeTime.x); + m_PlayRangeEnd.Draw(sequenceContentRect, state, playRangeTime.y); + + // Draw Time Range Box from Start to End... + if (state.playRangeEnabled && m_PlayHead != null) + { + Rect rect = + Rect.MinMaxRect( + Mathf.Clamp(state.TimeToPixel(playRangeTime.x), state.timeAreaRect.xMin, state.timeAreaRect.xMax), + m_PlayHead.bounds.yMax, + Mathf.Clamp(state.TimeToPixel(playRangeTime.y), state.timeAreaRect.xMin, state.timeAreaRect.xMax), + sequenceContentRect.height + state.timeAreaRect.height + timeCursorRect.y + ); + + + EditorGUI.DrawRect(rect, DirectorStyles.Instance.customSkin.colorRange); + + rect.height = 3f; + EditorGUI.DrawRect(rect, Color.white); + } + } + + void OnTrackHeadMinSelectDrag(double newTime) + { + Vector2 range = state.playRange; + range.x = (float)newTime; + state.playRange = range; + m_PlayRangeStart.showTooltip = true; + } + + void OnTrackHeadMaxSelectDrag(double newTime) + { + Vector2 range = state.playRange; + range.y = (float)newTime; + state.playRange = range; + m_PlayRangeEnd.showTooltip = true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayRange.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayRange.cs.meta new file mode 100644 index 0000000..dd2e450 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayRange.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 14d748c963c7b3549bed45457cc92c4f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs new file mode 100644 index 0000000..fbb3648 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs @@ -0,0 +1,79 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + PlayableLookup m_PlayableLookup = new PlayableLookup(); + + class PlayableLookup + { + const int k_InitialDictionarySize = 10; + + readonly Dictionary m_AnimationClipToPlayable = + new Dictionary(k_InitialDictionarySize); + readonly Dictionary m_AnimationClipToTimelineClip = + new Dictionary(k_InitialDictionarySize); + + public void UpdatePlayableLookup(TimelineClip clip, GameObject go, Playable p) + { + if (clip == null || go == null || !p.IsValid()) + return; + + if (clip.curves != null) + m_AnimationClipToTimelineClip[clip.curves] = clip; + + UpdatePlayableLookup(clip.parentTrack.timelineAsset, clip, go, p); + } + + public void UpdatePlayableLookup(TrackAsset track, GameObject go, Playable p) + { + if (track == null || go == null || !p.IsValid()) + return; + + UpdatePlayableLookup(track.timelineAsset, track, go, p); + } + + void UpdatePlayableLookup(TimelineAsset timelineAsset, ICurvesOwner curvesOwner, GameObject go, Playable p) + { + var director = go.GetComponent(); + var editingDirector = instance.state.editSequence.director; + // No Asset mode update + if (curvesOwner.curves != null && director != null && director == editingDirector && + timelineAsset == instance.state.editSequence.asset) + { + m_AnimationClipToPlayable[curvesOwner.curves] = p; + } + } + + public bool GetPlayableFromAnimClip(AnimationClip clip, out Playable p) + { + if (clip == null) + { + p = Playable.Null; + return false; + } + + return m_AnimationClipToPlayable.TryGetValue(clip, out p); + } + + public TimelineClip GetTimelineClipFromCurves(AnimationClip clip) + { + if (clip == null) + return null; + + TimelineClip timelineClip = null; + m_AnimationClipToTimelineClip.TryGetValue(clip, out timelineClip); + return timelineClip; + } + + public void ClearPlayableLookup() + { + m_AnimationClipToPlayable.Clear(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs.meta new file mode 100644 index 0000000..4e0e676 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PlayableLookup.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3168bf9e060ff4b46be4bf08e308ce97 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PreviewPlayMode.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PreviewPlayMode.cs new file mode 100644 index 0000000..ef28cdf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PreviewPlayMode.cs @@ -0,0 +1,80 @@ +using System; +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + void OnPreviewPlayModeChanged(bool isPlaying) + { + if (EditorApplication.isPlaying) + return; + + if (isPlaying) + { + PreparePreviewPlay(); + EditorApplication.update += OnPreviewPlay; + } + else + { + EditorApplication.update -= OnPreviewPlay; + } + } + + void PreparePreviewPlay() + { + if (state == null || state.masterSequence.asset == null || state.masterSequence.director == null) + return; + if (state.playRangeEnabled && !state.isJogging) + { + EnsurePlayRangeIsRespected(); + } + } + + internal void OnPreviewPlay() + { + if (state == null || state.masterSequence.asset == null || state.masterSequence.director == null) + return; + + var director = state.masterSequence.director; + if (director.timeUpdateMode == DirectorUpdateMode.Manual) + { + Repaint(); + return; + } + + if (state.isJogging) + { + ApplyJog(); + } + else if (state.playRangeEnabled) + { + EnsurePlayRangeIsRespected(); + } + + if (director.extrapolationMode == DirectorWrapMode.None && director.playableGraph.IsValid() && director.playableGraph.IsDone()) + { + //reset time if we hit the end of the timeline + state.masterSequence.time = 0.0; + state.Pause(); + } + + Repaint(); + AudioMixerWindow.RepaintAudioMixerWindow(); + } + + void ApplyJog() + { + state.masterSequence.time = Math.Max(0.0, Math.Min(state.masterSequence.duration, state.masterSequence.time + state.playbackSpeed)); + } + + void EnsurePlayRangeIsRespected() + { + var playRangeTime = state.playRange; + var time = state.masterSequence.time; + if (time > playRangeTime.y || time < playRangeTime.x) + state.masterSequence.time = playRangeTime.x; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PreviewPlayMode.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PreviewPlayMode.cs.meta new file mode 100644 index 0000000..7ccfdb9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_PreviewPlayMode.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c9c9f62af2efb948a1974650039e2db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Selection.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Selection.cs new file mode 100644 index 0000000..c736e2e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Selection.cs @@ -0,0 +1,80 @@ +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + [SerializeField] + SequencePath m_SequencePath; + private Object lastSelectedGO { get; set; } + + void OnSelectionChange() + { + RefreshSelection(false); + } + + void RefreshSelection(bool forceRebuild) + { + // if we're in Locked mode, keep current selection - don't use locked property because the + // sequence hierarchy may need to be rebuilt and it assumes no asset == unlocked + if (m_LockTracker.isLocked || (state != null && state.recording)) + { + RestoreLastSelection(forceRebuild); + return; + } + + // selection is a TimelineAsset + Object selectedObject = Selection.activeObject as TimelineAsset; + if (selectedObject != null) + { + SetCurrentSelection(Selection.activeObject); + return; + } + + // selection is a GameObject, or a prefab with a director + var selectedGO = Selection.activeGameObject; + if (selectedGO != null) + { + bool isSceneObject = !PrefabUtility.IsPartOfPrefabAsset(selectedGO); + bool hasDirector = selectedGO.GetComponent() != null; + if (isSceneObject || hasDirector) + { + SetCurrentSelection(selectedGO); + return; + } + } + + // otherwise, keep the same selection. + RestoreLastSelection(forceRebuild); + } + + void RestoreLastSelection(bool forceRebuild) + { + state.SetCurrentSequencePath(m_SequencePath, forceRebuild); + } + + void SetCurrentSelection(Object obj) + { + var selectedGameObject = obj as GameObject; + if (selectedGameObject != null) + { + PlayableDirector director = TimelineUtility.GetDirectorComponentForGameObject(selectedGameObject); + SetCurrentTimeline(director); + lastSelectedGO = selectedGameObject; + } + else + { + var selectedSequenceAsset = obj as TimelineAsset; + if (selectedSequenceAsset != null) + { + SetCurrentTimeline(selectedSequenceAsset); + lastSelectedGO = selectedGameObject; + } + } + + Repaint(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Selection.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Selection.cs.meta new file mode 100644 index 0000000..03c0749 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_Selection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 16548db454f7a3344b41ca2e5cdb52b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_StateChange.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_StateChange.cs new file mode 100644 index 0000000..789c0ba --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_StateChange.cs @@ -0,0 +1,53 @@ +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + void InitializeStateChange() + { + state.OnPlayStateChange += OnPreviewPlayModeChanged; + state.OnDirtyStampChange += OnStateChange; + state.OnBeforeSequenceChange += OnBeforeSequenceChange; + state.OnAfterSequenceChange += OnAfterSequenceChange; + + state.OnRebuildGraphChange += () => + { + // called when the graph is rebuild, since the UI tree isn't necessarily rebuilt. + if (!state.rebuildGraph) + { + // send callbacks to the tacks + if (treeView != null) + { + var allTrackGuis = treeView.allTrackGuis; + if (allTrackGuis != null) + { + for (int i = 0; i < allTrackGuis.Count; i++) + allTrackGuis[i].OnGraphRebuilt(); + } + } + } + }; + + state.OnTimeChange += () => + { + if (EditorApplication.isPlaying == false) + { + state.UpdateRecordingState(); + EditorApplication.SetSceneRepaintDirty(); + } + + // the time is sync'd prior to the callback + state.Evaluate(); // will do the repaint + + InspectorWindow.RepaintAllInspectors(); + }; + + state.OnRecordingChange += () => + { + if (!state.recording) + { + TrackAssetRecordingExtensions.ClearRecordingState(); + } + }; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_StateChange.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_StateChange.cs.meta new file mode 100644 index 0000000..65ef3fe --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_StateChange.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b926af22079e00e4a8c073321194cea1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeArea.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeArea.cs new file mode 100644 index 0000000..3b6bda6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeArea.cs @@ -0,0 +1,107 @@ +using System; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + [NonSerialized] TimelineTimeArea m_TimeArea; + public TimeArea timeArea { get { return m_TimeArea; } } + + internal static class Styles + { + public static string DurationModeText = L10n.Tr("Duration Mode/{0}"); + } + + float m_LastFrameRate; + bool m_TimeAreaDirty = true; + + void InitializeTimeArea() + { + if (m_TimeArea == null) + { + m_TimeArea = new TimelineTimeArea(state, false) + { + hRangeLocked = false, + vRangeLocked = true, + margin = 10, + scaleWithWindow = true, + hSlider = true, + vSlider = false, + hBaseRangeMin = 0.0f, + hBaseRangeMax = WindowState.kMaxShownTime, + hRangeMin = 0.0f, + hScaleMax = WindowConstants.maxTimeAreaScaling, + rect = state.timeAreaRect + }; + + m_TimeAreaDirty = true; + InitTimeAreaFrameRate(); + SyncTimeAreaShownRange(); + } + } + + void TimelineGUI() + { + if (!currentMode.ShouldShowTimeArea(state)) + return; + + Rect rect = state.timeAreaRect; + m_TimeArea.rect = new Rect(rect.x, rect.y, rect.width, clientArea.height - rect.y); + + if (m_LastFrameRate != state.referenceSequence.frameRate) + InitTimeAreaFrameRate(); + + SyncTimeAreaShownRange(); + + m_TimeArea.BeginViewGUI(); + m_TimeArea.TimeRuler(rect, state.referenceSequence.frameRate, true, false, 1.0f, state.timeInFrames ? TimeArea.TimeFormat.Frame : TimeArea.TimeFormat.TimeFrame); + m_TimeArea.EndViewGUI(); + } + + void InitTimeAreaFrameRate() + { + m_LastFrameRate = state.referenceSequence.frameRate; + m_TimeArea.hTicks.SetTickModulosForFrameRate(m_LastFrameRate); + } + + void SyncTimeAreaShownRange() + { + var range = state.timeAreaShownRange; + if (!Mathf.Approximately(range.x, m_TimeArea.shownArea.x) || !Mathf.Approximately(range.y, m_TimeArea.shownArea.xMax)) + { + // set view data onto the time area + if (m_TimeAreaDirty) + { + m_TimeArea.SetShownHRange(range.x, range.y); + m_TimeAreaDirty = false; + } + else + { + // set time area data onto the view data + state.TimeAreaChanged(); + } + } + + m_TimeArea.hBaseRangeMax = (float)state.editSequence.duration; + } + + class TimelineTimeArea : TimeArea + { + readonly WindowState m_State; + + public TimelineTimeArea(WindowState state, bool minimalGUI) : base(minimalGUI) + { + m_State = state; + } + + public override string FormatTickTime(float time, float frameRate, TimeFormat timeFormat) + { + time = m_State.timeReferenceMode == TimeReferenceMode.Global ? + (float)m_State.editSequence.ToGlobalTime(time) : time; + + return FormatTime(time, frameRate, timeFormat); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeArea.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeArea.cs.meta new file mode 100644 index 0000000..7a00108 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeArea.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b846f69b139b3a341a5699a09fa52b2c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeCursor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeCursor.cs new file mode 100644 index 0000000..9a0bee4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeCursor.cs @@ -0,0 +1,83 @@ +using System; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + TimeAreaItem m_PlayHead; + + void TimeCursorGUI(TimelineItemArea area) + { + DrawTimeOnSlider(); + if (!CanDrawTimeCursor(area)) + return; + + if (m_PlayHead == null || m_PlayHead.style != styles.timeCursor) + { + m_PlayHead = new TimeAreaItem(styles.timeCursor, OnTrackHeadDrag); + m_PlayHead.AddManipulator(new PlayheadContextMenu(m_PlayHead)); + } + + var headerMode = area == TimelineItemArea.Header; + DrawTimeCursor(headerMode, !headerMode); + } + + bool CanDrawTimeCursor(TimelineItemArea area) + { + if (!currentMode.ShouldShowTimeCursor(state)) + return false; + + if (treeView == null || state.editSequence.asset == null || (state.editSequence.asset != null && state.IsEditingAnEmptyTimeline())) + return false; + + if (area == TimelineItemArea.Lines && !state.TimeIsInRange((float)state.editSequence.time)) + return false; + + return true; + } + + void DrawTimeOnSlider() + { + if (currentMode.ShouldShowTimeCursor(state)) + { + var colorDimFactor = EditorGUIUtility.isProSkin ? 0.7f : 0.9f; + var c = styles.timeCursor.normal.textColor * colorDimFactor; + + float time = Mathf.Max((float)state.editSequence.time, 0); + float duration = (float)state.editSequence.duration; + + m_TimeArea.DrawTimeOnSlider(time, c, duration, DirectorStyles.kDurationGuiThickness); + } + } + + void DrawTimeCursor(bool drawHead, bool drawline) + { + m_PlayHead.HandleManipulatorsEvents(state); + + if (Event.current.type == EventType.MouseDown && Event.current.button == 0) + { + if (state.timeAreaRect.Contains(Event.current.mousePosition)) + { + state.SetPlaying(false); + m_PlayHead.HandleManipulatorsEvents(state); + state.editSequence.time = Math.Max(0.0, state.GetSnappedTimeAtMousePosition(Event.current.mousePosition)); + } + } + + state.isClipSnapping = false; + + m_PlayHead.drawLine = drawline; + m_PlayHead.drawHead = drawHead; + m_PlayHead.Draw(sequenceContentRect, state, state.editSequence.time); + } + + void OnTrackHeadDrag(double newTime) + { + state.editSequence.time = Math.Max(0.0, newTime); + m_PlayHead.showTooltip = true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeCursor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeCursor.cs.meta new file mode 100644 index 0000000..44d5a83 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TimeCursor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e763a90581e2d8143bc9a0e384ce6f0f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TrackGui.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TrackGui.cs new file mode 100644 index 0000000..578ae60 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TrackGui.cs @@ -0,0 +1,219 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + partial class TimelineWindow + { + public TimelineTreeViewGUI treeView { get; private set; } + + void TracksGUI(Rect clientRect, WindowState state, TimelineModeGUIState trackState) + { + if (Event.current.type == EventType.Repaint && treeView != null) + { + state.spacePartitioner.Clear(); + } + + if (state.IsEditingASubTimeline() && !state.IsEditingAnEmptyTimeline()) + { + var headerRect = clientRect; + headerRect.width = state.sequencerHeaderWidth; + Graphics.DrawBackgroundRect(state, headerRect); + + var clipRect = clientRect; + clipRect.xMin = headerRect.xMax; + Graphics.DrawBackgroundRect(state, clipRect, subSequenceMode: true); + } + else + { + Graphics.DrawBackgroundRect(state, clientRect); + } + + if (!state.IsEditingAnEmptyTimeline()) + m_TimeArea.DrawMajorTicks(sequenceContentRect, state.referenceSequence.frameRate); + + GUILayout.BeginVertical(); + { + GUILayout.Space(5.0f); + GUILayout.BeginHorizontal(); + + if (this.state.editSequence.asset == null) + DrawNoSequenceGUI(state); + else + DrawTracksGUI(clientRect, trackState); + + GUILayout.EndHorizontal(); + } + GUILayout.EndVertical(); + + Graphics.DrawShadow(clientRect); + } + + void DrawNoSequenceGUI(WindowState windowState) + { + bool showCreateButton = false; + var currentlySelectedGo = UnityEditor.Selection.activeObject != null ? UnityEditor.Selection.activeObject as GameObject : null; + var textContent = DirectorStyles.noTimelineAssetSelected; + var existingDirector = currentlySelectedGo != null ? currentlySelectedGo.GetComponent() : null; + var existingAsset = existingDirector != null ? existingDirector.playableAsset : null; + + if (currentlySelectedGo != null && !TimelineUtility.IsPrefabOrAsset(currentlySelectedGo) && existingAsset == null) + { + showCreateButton = true; + textContent = new GUIContent(String.Format(DirectorStyles.createTimelineOnSelection.text, currentlySelectedGo.name, "a Director component and a Timeline asset")); + } + GUILayout.FlexibleSpace(); + GUILayout.BeginVertical(); + GUILayout.FlexibleSpace(); + + GUILayout.Label(textContent); + + if (showCreateButton) + { + GUILayout.BeginHorizontal(); + var textSize = GUI.skin.label.CalcSize(textContent); + GUILayout.Space((textSize.x / 2.0f) - (WindowConstants.createButtonWidth / 2.0f)); + if (GUILayout.Button("Create", GUILayout.Width(WindowConstants.createButtonWidth))) + { + var message = DirectorStyles.createNewTimelineText.text + " '" + currentlySelectedGo.name + "'"; + string newSequencePath = EditorUtility.SaveFilePanelInProject(DirectorStyles.createNewTimelineText.text, currentlySelectedGo.name + "Timeline", "playable", message, ProjectWindowUtil.GetActiveFolderPath()); + if (!string.IsNullOrEmpty(newSequencePath)) + { + var newAsset = CreateInstance(); + AssetDatabase.CreateAsset(newAsset, newSequencePath); + + Undo.IncrementCurrentGroup(); + + if (existingDirector == null) + { + existingDirector = Undo.AddComponent(currentlySelectedGo); + } + + existingDirector.playableAsset = newAsset; + SetCurrentTimeline(existingDirector); + var newTrack = TimelineHelpers.CreateTrack(); + + windowState.previewMode = false; + TimelineUtility.SetSceneGameObject(windowState.editSequence.director, newTrack, currentlySelectedGo); + } + + // If we reach this point, the state of the pannel has changed; skip the rest of this GUI phase + // Fixes: case 955831 - [OSX] NullReferenceException when creating a timeline on a selected object + GUIUtility.ExitGUI(); + } + GUILayout.EndHorizontal(); + } + GUILayout.FlexibleSpace(); + GUILayout.EndVertical(); + GUILayout.FlexibleSpace(); + } + + public enum OverlayDataTypes + { + None, + BackgroundColor, + BackgroundTexture, + TextBox + } + + public struct OverlayData + { + public OverlayDataTypes types { get; private set; } + public Rect rect { get; internal set; } + public string text { get; private set; } + public Texture2D texture { get; private set; } + public Color color { get; private set; } + public GUIStyle backgroundTextStyle { get; private set; } + public GUIStyle textStyle { get; private set; } + + public static OverlayData CreateColorOverlay(Rect rectangle, Color backgroundColor) + { + OverlayData data = new OverlayData(); + data.rect = rectangle; + data.color = backgroundColor; + data.types = OverlayDataTypes.BackgroundColor; + return data; + } + + public static OverlayData CreateTextureOverlay(Rect rectangle, Texture2D backTexture) + { + OverlayData data = new OverlayData(); + data.rect = rectangle; + data.texture = backTexture; + data.types = OverlayDataTypes.BackgroundTexture; + return data; + } + + public static OverlayData CreateTextBoxOverlay(Rect rectangle, string msg, GUIStyle textstyle, Color textcolor, Color bgTextColor, GUIStyle bgTextStyle) + { + OverlayData data = new OverlayData(); + data.rect = rectangle; + data.text = msg; + data.textStyle = textstyle; + data.textStyle.normal.textColor = textcolor; + data.backgroundTextStyle = bgTextStyle; + data.backgroundTextStyle.normal.textColor = bgTextColor; + data.types = OverlayDataTypes.TextBox; + return data; + } + } + + internal List OverlayDrawData = new List(); + + void DrawTracksGUI(Rect clientRect, TimelineModeGUIState trackState) + { + GUILayout.BeginVertical(GUILayout.Height(clientRect.height)); + if (treeView != null) + { + if (Event.current.type == EventType.Layout) + { + OverlayDrawData.Clear(); + } + + treeView.OnGUI(clientRect); + + if (Event.current.type == EventType.Repaint) + { + foreach (var overlayData in OverlayDrawData) + { + using (new GUIViewportScope(sequenceContentRect)) + DrawOverlay(overlayData); + } + } + } + GUILayout.EndVertical(); + } + + void DrawOverlay(OverlayData overlayData) + { + Rect overlayRect = GUIClip.Clip(overlayData.rect); + if (overlayData.types == OverlayDataTypes.BackgroundColor) + { + EditorGUI.DrawRect(overlayRect, overlayData.color); + } + else if (overlayData.types == OverlayDataTypes.BackgroundTexture) + { + Graphics.DrawTextureRepeated(overlayRect, overlayData.texture); + } + else if (overlayData.types == OverlayDataTypes.TextBox) + { + using (new GUIColorOverride(overlayData.backgroundTextStyle.normal.textColor)) + GUI.Box(overlayRect, GUIContent.none, overlayData.backgroundTextStyle); + Graphics.ShadowLabel(overlayRect, GUIContent.Temp(overlayData.text), overlayData.textStyle, overlayData.textStyle.normal.textColor, Color.black); + } + } + + void RefreshInlineCurves() + { + foreach (var trackGUI in allTracks.OfType()) + { + if (trackGUI.inlineCurveEditor != null) + trackGUI.inlineCurveEditor.Refresh(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TrackGui.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TrackGui.cs.meta new file mode 100644 index 0000000..d90b49f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/TimelineWindow_TrackGui.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 08d23c0b73905c148b525c3c93fff580 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel.meta new file mode 100644 index 0000000..d9d92e3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9d7bb79ed0c2854a8a5ed7decc3e44f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/ScriptableObjectViewPrefs.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/ScriptableObjectViewPrefs.cs new file mode 100644 index 0000000..66b5cb8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/ScriptableObjectViewPrefs.cs @@ -0,0 +1,119 @@ +using System; +using System.IO; +using UnityEditorInternal; +using UnityEngine; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class ScriptableObjectViewPrefs : IDisposable where TViewModel : ScriptableObject + { + const string k_DefaultFilePath = "Library/"; + const string k_Extension = ".pref"; + + readonly string m_RelativePath; + readonly string m_AbsolutePath; + readonly string m_FileName; + ScriptableObject m_Asset; + TViewModel m_ViewModel; + + bool isSavable + { + get + { + return m_Asset != null && + m_ViewModel != null && + !string.IsNullOrEmpty(m_FileName); + } + } + + public ScriptableObjectViewPrefs(ScriptableObject asset, string relativeSavePath) + { + m_Asset = asset; + m_RelativePath = string.IsNullOrEmpty(relativeSavePath) ? k_DefaultFilePath : relativeSavePath; + if (!m_RelativePath.EndsWith("/", StringComparison.Ordinal)) + m_RelativePath += "/"; + + m_AbsolutePath = Application.dataPath + "/../" + m_RelativePath; + + var assetKey = GetAssetKey(asset); + m_FileName = string.IsNullOrEmpty(assetKey) ? string.Empty : assetKey + k_Extension; + } + + public TViewModel viewModel + { + get + { + if (m_ViewModel == null) + { + if (m_Asset == null) + m_ViewModel = CreateViewModel(); + else + m_ViewModel = LoadViewModel() ?? CreateViewModel(); + } + return m_ViewModel; + } + } + + public void Save() + { + if (!isSavable) + return; + + // make sure the path exists or file write will fail + if (!Directory.Exists(m_AbsolutePath)) + Directory.CreateDirectory(m_AbsolutePath); + + const bool saveAsText = true; + InternalEditorUtility.SaveToSerializedFileAndForget(new UnityObject[] { m_ViewModel }, m_RelativePath + m_FileName, saveAsText); + } + + public void DeleteFile() + { + if (!isSavable) + return; + + var path = m_AbsolutePath + m_FileName; + + if (!File.Exists(path)) + return; + + File.Delete(path); + } + + public void Dispose() + { + if (m_ViewModel != null) + UnityObject.DestroyImmediate(m_ViewModel); + + m_Asset = null; + } + + public static TViewModel CreateViewModel() + { + var model = ScriptableObject.CreateInstance(); + model.hideFlags |= HideFlags.HideAndDontSave; + return model; + } + + TViewModel LoadViewModel() + { + if (string.IsNullOrEmpty(m_FileName)) + return null; + + var objects = InternalEditorUtility.LoadSerializedFileAndForget(m_RelativePath + m_FileName); + if (objects.Length <= 0 || objects[0] == null) + return null; + + var model = (TViewModel)objects[0]; + model.hideFlags |= HideFlags.HideAndDontSave; + + return model; + } + + static string GetAssetKey(UnityObject asset) + { + return asset == null ? string.Empty : AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(asset)); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/ScriptableObjectViewPrefs.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/ScriptableObjectViewPrefs.cs.meta new file mode 100644 index 0000000..7201def --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/ScriptableObjectViewPrefs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 80ae83fdf1fb2c649bccb8c293b94556 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineAssetViewModel.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineAssetViewModel.cs new file mode 100644 index 0000000..9ae8c5a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineAssetViewModel.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using UnityEditor.IMGUI.Controls; +using UnityEngine; +using UnityEngine.Timeline; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + [Serializable] + class TrackViewModelData : ISerializationCallbackReceiver + { + public static readonly float DefaultinlineAnimationCurveHeight = 100.0f; + + public bool collapsed = true; + public bool showMarkers = true; + + public bool showInlineCurves = false; + public float inlineAnimationCurveHeight = DefaultinlineAnimationCurveHeight; + public int lastInlineCurveDataID = -1; + public TreeViewState inlineCurvesState = null; + public Rect inlineCurvesShownAreaInsideMargins = new Rect(1, 1, 1, 1); + + public Dictionary markerTimeStamps = new Dictionary(); + [SerializeField] List m_MarkerTimeStampsKeys; + [SerializeField] List m_MarkerTimeStampsValues; + + public void OnBeforeSerialize() + { + if (markerTimeStamps == null) + return; + + m_MarkerTimeStampsKeys = new List(markerTimeStamps.Count); + m_MarkerTimeStampsValues = new List(markerTimeStamps.Count); + + foreach (var kvp in markerTimeStamps) + { + m_MarkerTimeStampsKeys.Add(kvp.Key); + m_MarkerTimeStampsValues.Add(kvp.Value); + } + } + + public void OnAfterDeserialize() + { + markerTimeStamps = new Dictionary(); + + if (m_MarkerTimeStampsKeys == null || m_MarkerTimeStampsValues == null || + m_MarkerTimeStampsKeys.Count != m_MarkerTimeStampsValues.Count) + return; + + for (int i = 0; i < m_MarkerTimeStampsKeys.Count; ++i) + markerTimeStamps.Add(m_MarkerTimeStampsKeys[i], m_MarkerTimeStampsValues[i]); + } + } + + [Serializable] + class TimelineAssetViewModel : ScriptableObject, ISerializationCallbackReceiver + { + public const float DefaultTrackScale = 1.0f; + public const float DefaultVerticalScroll = 0; + + public static readonly Vector2 TimeAreaDefaultRange = new Vector2(-WindowConstants.timeAreaShownRangePadding, 5.0f); // in seconds. Hack: using negative value to force the UI to have a left margin at 0. + public static readonly Vector2 NoPlayRangeSet = new Vector2(float.MaxValue, float.MaxValue); + + public bool timeInFrames = true; + public Vector2 timeAreaShownRange = TimeAreaDefaultRange; + public bool showAudioWaveform = true; + public float trackScale = DefaultTrackScale; + public bool playRangeEnabled; + public Vector2 timeAreaPlayRange = NoPlayRangeSet; + public double windowTime; + public float verticalScroll = DefaultVerticalScroll; + public bool showMarkerHeader; + + public Dictionary tracksViewModelData = new Dictionary(); + + // Used only for serialization of the dictionary + [SerializeField] List m_Keys = new List(); + [SerializeField] List m_Vals = new List(); + + public void OnBeforeSerialize() + { + m_Keys.Clear(); + m_Vals.Clear(); + foreach (var data in tracksViewModelData) + { + // Assets that don't save, will create nulls when deserializeds + if (data.Key != null && data.Value != null && (data.Key.hideFlags & HideFlags.DontSave) == 0) + { + m_Keys.Add(data.Key); + m_Vals.Add(data.Value); + } + } + } + + public void OnAfterDeserialize() + { + } + + public void OnEnable() + { + if (m_Keys.Count == m_Vals.Count) + { + tracksViewModelData.Clear(); + for (int i = 0; i < m_Keys.Count; i++) + { + if (m_Keys[i] != null) // if the asset is overwritten the tracks can be null + tracksViewModelData[m_Keys[i]] = m_Vals[i]; + } + } + + m_Keys.Clear(); + m_Vals.Clear(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineAssetViewModel.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineAssetViewModel.cs.meta new file mode 100644 index 0000000..7a8e170 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineAssetViewModel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d79cb9ecc0d4a6d428ab98a681a33897 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineWindowViewPrefs.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineWindowViewPrefs.cs new file mode 100644 index 0000000..c1672c1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineWindowViewPrefs.cs @@ -0,0 +1,170 @@ +using UnityEngine; +using UnityEngine.Timeline; +using UnityObject = UnityEngine.Object; +using ViewModelsMap = System.Collections.Generic.Dictionary>; +using ViewModelsList = System.Collections.Generic.List>; + +namespace UnityEditor.Timeline +{ + static class TimelineWindowViewPrefs + { + public const string FilePath = "Library/Timeline"; + + static readonly ViewModelsMap k_ViewModelsMap = new ViewModelsMap(); + static readonly ViewModelsList k_UnassociatedViewModels = new ViewModelsList(); + + public static int viewModelCount + { + get { return k_ViewModelsMap.Count + k_UnassociatedViewModels.Count; } + } + + public static TimelineAssetViewModel GetOrCreateViewModel(TimelineAsset asset) + { + if (asset == null) + return CreateUnassociatedViewModel(); + + ScriptableObjectViewPrefs vm; + if (k_ViewModelsMap.TryGetValue(asset, out vm)) + return vm.viewModel; + + return CreateViewModel(asset).viewModel; + } + + public static TimelineAssetViewModel CreateUnassociatedViewModel() + { + var vm = new ScriptableObjectViewPrefs(null, FilePath); + k_UnassociatedViewModels.Add(vm); + return vm.viewModel; + } + + static ScriptableObjectViewPrefs CreateViewModel(TimelineAsset asset) + { + var vm = new ScriptableObjectViewPrefs(asset, FilePath); + k_ViewModelsMap.Add(asset, vm); + return vm; + } + + public static void SaveViewModel(TimelineAsset asset) + { + if (asset == null) + return; + + ScriptableObjectViewPrefs vm; + if (!k_ViewModelsMap.TryGetValue(asset, out vm)) + vm = CreateViewModel(asset); + + vm.Save(); + } + + public static void SaveAll() + { + foreach (var kvp in k_ViewModelsMap) + kvp.Value.Save(); + } + + public static void UnloadViewModel(TimelineAsset asset) + { + ScriptableObjectViewPrefs vm; + if (k_ViewModelsMap.TryGetValue(asset, out vm)) + { + vm.Dispose(); + k_ViewModelsMap.Remove(asset); + } + } + + public static void UnloadAllViewModels() + { + foreach (var kvp in k_ViewModelsMap) + kvp.Value.Dispose(); + + foreach (var vm in k_UnassociatedViewModels) + vm.Dispose(); + + k_ViewModelsMap.Clear(); + k_UnassociatedViewModels.Clear(); + } + + public static TrackViewModelData GetTrackViewModelData(TrackAsset track) + { + if (track == null) + return new TrackViewModelData(); + + if (track.timelineAsset == null) + return new TrackViewModelData(); + + var prefs = GetOrCreateViewModel(track.timelineAsset); + + TrackViewModelData trackData; + if (prefs.tracksViewModelData.TryGetValue(track, out trackData)) + { + return trackData; + } + + trackData = new TrackViewModelData(); + prefs.tracksViewModelData[track] = trackData; + return trackData; + } + + public static bool IsTrackCollapsed(TrackAsset track) + { + if (track == null) + return true; + + return GetTrackViewModelData(track).collapsed; + } + + public static void SetTrackCollapsed(TrackAsset track, bool collapsed) + { + if (track == null) + return; + + GetTrackViewModelData(track).collapsed = collapsed; + } + + public static bool IsShowMarkers(TrackAsset track) + { + if (track == null) + return true; + + return GetTrackViewModelData(track).showMarkers; + } + + public static void SetTrackShowMarkers(TrackAsset track, bool collapsed) + { + if (track == null) + return; + + GetTrackViewModelData(track).showMarkers = collapsed; + } + + public static bool GetShowInlineCurves(TrackAsset track) + { + if (track == null) + return false; + + return GetTrackViewModelData(track).showInlineCurves; + } + + public static void SetShowInlineCurves(TrackAsset track, bool inlineOn) + { + if (track == null) + return; + + GetTrackViewModelData(track).showInlineCurves = inlineOn; + } + + public static float GetInlineCurveHeight(TrackAsset asset) + { + if (asset == null) + return TrackViewModelData.DefaultinlineAnimationCurveHeight; + + return GetTrackViewModelData(asset).inlineAnimationCurveHeight; + } + + public static void SetInlineCurveHeight(TrackAsset asset, float height) + { + if (asset != null) + GetTrackViewModelData(asset).inlineAnimationCurveHeight = height; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineWindowViewPrefs.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineWindowViewPrefs.cs.meta new file mode 100644 index 0000000..9501d6d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/ViewModel/TimelineWindowViewPrefs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 105515c1653548242b4fe973c0f375f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/WindowConstants.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/WindowConstants.cs new file mode 100644 index 0000000..31d9b63 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/WindowConstants.cs @@ -0,0 +1,45 @@ +namespace UnityEditor.Timeline +{ + static class WindowConstants + { + public const float timeAreaYPosition = 19.0f; + public const float timeAreaHeight = 22.0f; + public const float timeAreaMinWidth = 50.0f; + public const float timeAreaShownRangePadding = 5.0f; + + public const float markerRowHeight = 18.0f; + public const float markerRowYPosition = timeAreaYPosition + timeAreaHeight; + + public const float defaultHeaderWidth = 315.0f; + public const float defaultBindingAreaWidth = 40.0f; + + public const float minHierarchySplitter = 0.15f; + public const float maxHierarchySplitter = 10.50f; + public const float hierarchySplitterDefaultPercentage = 0.2f; + + public const float minHeaderWidth = 315.0f; + public const float maxHeaderWidth = 650.0f; + + public const float maxTimeAreaScaling = 90000.0f; + public const float minTimeCodeWidth = 28.0f; // Enough space to display up to 9999 without clipping + + public const float sliderWidth = 15; + public const float shadowUnderTimelineHeight = 15.0f; + public const float createButtonWidth = 70.0f; + public const float refTimeWidth = 50.0f; + + public const float selectorWidth = 23.0f; + public const float cogButtonWidth = 32.0f; + public const float cogButtonPadding = 16.0f; + + public const float trackHeaderButtonSize = 16.0f; + public const float trackHeaderButtonPadding = 6f; + public const float trackHeaderButtonSpacing = 3.0f; + public const float trackOptionButtonVerticalPadding = 0f; + public const float trackHeaderMaxButtonsWidth = 5 * (trackHeaderButtonSize + trackHeaderButtonPadding); + + public const float trackInsertionMarkerHeight = 1f; + + public const int autoPanPaddingInPixels = 50; + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/WindowConstants.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/WindowConstants.cs.meta new file mode 100644 index 0000000..9fb0cfa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Window/WindowConstants.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6d768b1bb52e2c64ba818933dbdd8452 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors.meta new file mode 100644 index 0000000..0546914 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2d8485e4e3a2bcb429fc32900ca26d9e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationPlayableAssetInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationPlayableAssetInspector.cs new file mode 100644 index 0000000..2aaa970 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationPlayableAssetInspector.cs @@ -0,0 +1,341 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomEditor(typeof(AnimationPlayableAsset)), CanEditMultipleObjects] + class AnimationPlayableAssetInspector : Editor + { + static class Styles + { + public static readonly GUIContent RotationText = EditorGUIUtility.TrTextContent("Rotation"); + public static readonly GUIContent AnimClipText = EditorGUIUtility.TrTextContent("Animation Clip"); + public static readonly GUIContent TransformOffsetTitle = EditorGUIUtility.TrTextContent("Clip Transform Offsets", "Use this to offset the root transform position and rotation relative to the track when playing this clip"); + public static readonly GUIContent AnimationClipName = EditorGUIUtility.TrTextContent("Animation Clip Name"); + public static readonly GUIContent MatchTargetFieldsTitle = EditorGUIUtility.TrTextContent("Offsets Match Fields", "Fields to apply when matching offsets on clips. The defaults can be set on the track."); + public static readonly GUIContent UseDefaults = EditorGUIUtility.TrTextContent("Use defaults"); + public static readonly GUIContent RemoveStartOffset = EditorGUIUtility.TrTextContent("Remove Start Offset", "Makes playback of the clip play relative to first key of the root transform"); + public static readonly GUIContent ApplyFootIK = EditorGUIUtility.TrTextContent("Foot IK", "Enable to apply foot IK to the AnimationClip when the target is humanoid."); + public static readonly GUIContent Loop = EditorGUIUtility.TrTextContent("Loop", "Whether the source Animation Clip loops during playback."); + } + + TimelineWindow m_TimelineWindow; + GameObject m_Binding; + + TimelineAnimationUtilities.OffsetEditMode m_OffsetEditMode = TimelineAnimationUtilities.OffsetEditMode.None; + EditorClip m_EditorClip; + EditorClip[] m_EditorClips; + + SerializedProperty m_PositionProperty; + SerializedProperty m_RotationProperty; + SerializedProperty m_AnimClipProperty; + SerializedProperty m_UseTrackMatchFieldsProperty; + SerializedProperty m_MatchTargetFieldsProperty; + SerializedObject m_SerializedAnimClip; + SerializedProperty m_SerializedAnimClipName; + SerializedProperty m_RemoveStartOffsetProperty; + SerializedProperty m_ApplyFootIK; + SerializedProperty m_Loop; + + Vector3 m_LastPosition; + Vector3 m_LastRotation; + + public override void OnInspectorGUI() + { + if (target == null) + return; + + serializedObject.Update(); + + if (!m_TimelineWindow) m_TimelineWindow = TimelineWindow.instance; + + ShowAnimationClipField(); + ShowRecordableClipRename(); + ShowAnimationClipWarnings(); + + EditorGUI.BeginChangeCheck(); + + TransformOffsetsGUI(); + + // extra checks are because the context menu may need to cause a re-evaluate + bool changed = EditorGUI.EndChangeCheck() || + m_LastPosition != m_PositionProperty.vector3Value || + m_LastRotation != m_RotationProperty.vector3Value; + m_LastPosition = m_PositionProperty.vector3Value; + m_LastRotation = m_RotationProperty.vector3Value; + + if (changed) + { + // updates the changed properties and pushes them to the active playable + serializedObject.ApplyModifiedProperties(); + ((AnimationPlayableAsset)target).LiveLink(); + + // force an evaluate to happen next frame + if (TimelineWindow.instance != null && TimelineWindow.instance.state != null) + { + TimelineWindow.instance.state.Evaluate(); + } + } + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_ApplyFootIK, Styles.ApplyFootIK); + EditorGUILayout.PropertyField(m_Loop, Styles.Loop); + if (EditorGUI.EndChangeCheck()) + TimelineEditor.Refresh(RefreshReason.ContentsModified); + + serializedObject.ApplyModifiedProperties(); + } + + void ShowAnimationClipField() + { + bool disabled = m_EditorClips == null || m_EditorClips.Any(c => c.clip == null || c.clip.recordable); + using (new EditorGUI.DisabledScope(disabled)) + { + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_AnimClipProperty, Styles.AnimClipText); + if (EditorGUI.EndChangeCheck()) + { + // rename the timeline clips to match the animation name if it did previously + if (m_AnimClipProperty.objectReferenceValue != null && m_EditorClips != null) + { + var newName = m_AnimClipProperty.objectReferenceValue.name; + foreach (var c in m_EditorClips) + { + if (c == null || c.clip == null || c.clip.asset == null) + continue; + + var apa = c.clip.asset as AnimationPlayableAsset; + if (apa != null && apa.clip != null && c.clip.displayName == apa.clip.name) + { + if (c.clip.parentTrack != null) + Undo.RegisterCompleteObjectUndo(c.clip.parentTrack, "Inspector"); + c.clip.displayName = newName; + } + } + } + + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + } + } + + void TransformOffsetsMatchFieldsGUI() + { + var rect = EditorGUILayout.GetControlRect(true); + EditorGUI.BeginProperty(rect, Styles.MatchTargetFieldsTitle, m_UseTrackMatchFieldsProperty); + + rect = EditorGUI.PrefixLabel(rect, Styles.MatchTargetFieldsTitle); + int oldIndent = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + EditorGUI.BeginChangeCheck(); + bool val = m_UseTrackMatchFieldsProperty.boolValue; + val = EditorGUI.ToggleLeft(rect, Styles.UseDefaults, val); + if (EditorGUI.EndChangeCheck()) + m_UseTrackMatchFieldsProperty.boolValue = val; + + EditorGUI.indentLevel = oldIndent; + EditorGUI.EndProperty(); + + + if (!val || m_UseTrackMatchFieldsProperty.hasMultipleDifferentValues) + { + EditorGUI.indentLevel++; + AnimationTrackInspector.MatchTargetsFieldGUI(m_MatchTargetFieldsProperty); + EditorGUI.indentLevel--; + } + } + + void TransformOffsetsGUI() + { + if (ShouldShowOffsets()) + { + EditorGUILayout.Space(); + EditorGUILayout.LabelField(Styles.TransformOffsetTitle); + EditorGUI.indentLevel++; + + using (new EditorGUI.DisabledScope(targets.Length > 1)) + { + var previousOffsetMode = m_OffsetEditMode; + AnimationTrackInspector.ShowMotionOffsetEditModeToolbar(ref m_OffsetEditMode); + if (previousOffsetMode != m_OffsetEditMode) + { + SetTimeToClip(); + SceneView.RepaintAll(); + } + } + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_PositionProperty); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_RotationProperty, Styles.RotationText); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.Space(); + + EditorGUI.indentLevel--; + + TransformOffsetsMatchFieldsGUI(); + + EditorGUI.BeginChangeCheck(); + EditorGUILayout.PropertyField(m_RemoveStartOffsetProperty, Styles.RemoveStartOffset); + if (EditorGUI.EndChangeCheck()) + { + TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved); + Repaint(); + } + } + } + + void Reevaluate() + { + if (m_TimelineWindow != null && m_TimelineWindow.state != null) + { + m_TimelineWindow.state.Refresh(); + m_TimelineWindow.state.EvaluateImmediate(); + } + } + + // Make sure the director time is within the bounds of the clip + void SetTimeToClip() + { + if (m_TimelineWindow != null && m_TimelineWindow.state != null) + { + m_TimelineWindow.state.editSequence.time = Math.Min(m_EditorClip.clip.end, Math.Max(m_EditorClip.clip.start, m_TimelineWindow.state.editSequence.time)); + } + } + + public void OnEnable() + { + if (target == null) // case 946080 + return; + + m_EditorClip = UnityEditor.Selection.activeObject as EditorClip; + m_EditorClips = UnityEditor.Selection.objects.OfType().ToArray(); + SceneView.duringSceneGui += OnSceneGUI; + + m_PositionProperty = serializedObject.FindProperty("m_Position"); + m_PositionProperty.isExpanded = true; + m_RotationProperty = serializedObject.FindProperty("m_EulerAngles"); + m_AnimClipProperty = serializedObject.FindProperty("m_Clip"); + m_UseTrackMatchFieldsProperty = serializedObject.FindProperty("m_UseTrackMatchFields"); + m_MatchTargetFieldsProperty = serializedObject.FindProperty("m_MatchTargetFields"); + m_RemoveStartOffsetProperty = serializedObject.FindProperty("m_RemoveStartOffset"); + m_ApplyFootIK = serializedObject.FindProperty("m_ApplyFootIK"); + m_Loop = serializedObject.FindProperty("m_Loop"); + + m_LastPosition = m_PositionProperty.vector3Value; + m_LastRotation = m_RotationProperty.vector3Value; + } + + void OnDestroy() + { + SceneView.duringSceneGui -= OnSceneGUI; + } + + void OnSceneGUI(SceneView sceneView) + { + DoManipulators(); + } + + Transform GetTransform() + { + if (m_Binding != null) + return m_Binding.transform; + + if (m_TimelineWindow != null && m_TimelineWindow.state != null && + m_TimelineWindow.state.editSequence.director != null && + m_EditorClip != null && m_EditorClip.clip != null) + { + var obj = TimelineUtility.GetSceneGameObject(m_TimelineWindow.state.editSequence.director, + m_EditorClip.clip.parentTrack); + m_Binding = obj; + if (obj != null) + return obj.transform; + } + return null; + } + + void DoManipulators() + { + if (m_EditorClip == null || m_EditorClip.clip == null) + return; + + AnimationPlayableAsset animationPlayable = m_EditorClip.clip.asset as AnimationPlayableAsset; + AnimationTrack track = m_EditorClip.clip.parentTrack as AnimationTrack; + Transform transform = GetTransform(); + + if (transform != null && animationPlayable != null && m_OffsetEditMode != TimelineAnimationUtilities.OffsetEditMode.None && track != null) + { + TimelineUndo.PushUndo(animationPlayable, "Inspector"); + Vector3 position = transform.position; + Quaternion rotation = transform.rotation; + + EditorGUI.BeginChangeCheck(); + if (m_OffsetEditMode == TimelineAnimationUtilities.OffsetEditMode.Translation) + { + position = Handles.PositionHandle(position, Tools.pivotRotation == PivotRotation.Global ? Quaternion.identity : rotation); + } + else if (m_OffsetEditMode == TimelineAnimationUtilities.OffsetEditMode.Rotation) + { + rotation = Handles.RotationHandle(rotation, position); + } + + if (EditorGUI.EndChangeCheck()) + { + var res = TimelineAnimationUtilities.UpdateClipOffsets(animationPlayable, track, transform, position, rotation); + animationPlayable.position = res.position; + animationPlayable.eulerAngles = AnimationUtility.GetClosestEuler(res.rotation, animationPlayable.eulerAngles, RotationOrder.OrderZXY); + Reevaluate(); + Repaint(); + } + } + } + + void ShowAnimationClipWarnings() + { + AnimationClip clip = m_AnimClipProperty.objectReferenceValue as AnimationClip; + if (clip == null) + { + EditorGUILayout.HelpBox(AnimationPlayableAssetEditor.k_NoClipAssignedError, MessageType.Warning); + } + else if (clip.legacy) + { + EditorGUILayout.HelpBox(AnimationPlayableAssetEditor.k_LegacyClipError, MessageType.Warning); + } + } + + bool ShouldShowOffsets() + { + return targets.OfType().All(x => x.hasRootTransforms); + } + + void ShowRecordableClipRename() + { + if (targets.Length > 1 || m_EditorClip == null || m_EditorClip.clip == null || !m_EditorClip.clip.recordable) + return; + + AnimationClip clip = m_AnimClipProperty.objectReferenceValue as AnimationClip; + if (clip == null || !AssetDatabase.IsSubAsset(clip)) + return; + + if (m_SerializedAnimClip == null) + { + m_SerializedAnimClip = new SerializedObject(clip); + m_SerializedAnimClipName = m_SerializedAnimClip.FindProperty("m_Name"); + } + + if (m_SerializedAnimClipName != null) + { + m_SerializedAnimClip.Update(); + EditorGUI.BeginChangeCheck(); + EditorGUILayout.DelayedTextField(m_SerializedAnimClipName, Styles.AnimationClipName); + if (EditorGUI.EndChangeCheck()) + m_SerializedAnimClip.ApplyModifiedProperties(); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationPlayableAssetInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationPlayableAssetInspector.cs.meta new file mode 100644 index 0000000..b81fe24 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationPlayableAssetInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f7852b99951997645ae7adaac5f0b083 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationTrackInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationTrackInspector.cs new file mode 100644 index 0000000..abcccf9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationTrackInspector.cs @@ -0,0 +1,504 @@ +//#define PERF_PROFILE + +using System; +using System.ComponentModel; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + [CustomEditor(typeof(AnimationTrack)), CanEditMultipleObjects] + class AnimationTrackInspector : TrackAssetInspector + { + static class Styles + { + public static GUIContent MatchTargetFieldsTitle = EditorGUIUtility.TrTextContent("Default Offset Match Fields", "Fields to apply when matching offsets on clips. These are the defaults, and can be overridden for each clip."); + public static readonly GUIContent PositionIcon = EditorGUIUtility.IconContent("MoveTool"); + public static readonly GUIContent RotationIcon = EditorGUIUtility.IconContent("RotateTool"); + + public static GUIContent XTitle = EditorGUIUtility.TextContent("X"); + public static GUIContent YTitle = EditorGUIUtility.TextContent("Y"); + public static GUIContent ZTitle = EditorGUIUtility.TextContent("Z"); + public static GUIContent PositionTitle = EditorGUIUtility.TrTextContent("Position"); + public static GUIContent RotationTitle = EditorGUIUtility.TrTextContent("Rotation"); + + public static readonly GUIContent OffsetModeTitle = EditorGUIUtility.TrTextContent("Track Offsets"); + public static readonly string TransformOffsetInfo = L10n.Tr("Transform offsets are applied to the entire track. Use this mode to play the animation track at a fixed position and rotation."); + public static readonly string SceneOffsetInfo = L10n.Tr("Scene offsets will use the existing transform as initial offsets. Use this to play the track from the gameObjects current position and rotation."); + public static readonly string AutoOffsetInfo = L10n.Tr("Auto will apply scene offsets if there is a controller attached to the animator and transform offsets otherwise."); + public static readonly string AutoOffsetWarning = L10n.Tr("This mode is deprecated may be removed in a future release."); + public static readonly string InheritedFromParent = L10n.Tr("Inherited"); + public static readonly string InheritedToolTip = L10n.Tr("This value is inherited from it's parent track."); + + public static readonly GUIContent RecordingOffsets = EditorGUIUtility.TrTextContent("Recorded Offsets", "Offsets applied to recorded position and rotation keys"); + + public static readonly GUIContent[] OffsetContents; + public static readonly GUIContent[] OffsetInheritContents; + + static Styles() + { + var values = Enum.GetValues(typeof(TrackOffset)); + OffsetContents = new GUIContent[values.Length]; + OffsetInheritContents = new GUIContent[values.Length]; + for (var index = 0; index < values.Length; index++) + { + var offset = (TrackOffset)index; + var name = ObjectNames.NicifyVariableName(L10n.Tr(offset.ToString())); + var memInfo = typeof(TrackOffset).GetMember(offset.ToString()); + var attributes = memInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false); + if (attributes.Length > 0) + { + name = ((DescriptionAttribute)attributes[0]).Description; + } + + OffsetContents[index] = new GUIContent(name); + OffsetInheritContents[index] = new GUIContent(string.Format("{0} ({1})", InheritedFromParent, name)); + } + } + } + + TimelineAnimationUtilities.OffsetEditMode m_OffsetEditMode = TimelineAnimationUtilities.OffsetEditMode.None; + + SerializedProperty m_MatchFieldsProperty; + SerializedProperty m_TrackPositionProperty; + SerializedProperty m_TrackRotationProperty; + SerializedProperty m_AvatarMaskProperty; + SerializedProperty m_ApplyAvatarMaskProperty; + SerializedProperty m_TrackOffsetProperty; + + SerializedProperty m_RecordedOffsetPositionProperty; + SerializedProperty m_RecordedOffsetEulerProperty; + + Vector3 m_lastPosition; + Vector3 m_lastRotation; + + GUIContent m_TempContent = new GUIContent(); + + + void Evaluate() + { + if (timelineWindow.state != null && timelineWindow.state.editSequence.director != null) + { + // force the update immediately, the deferred doesn't always work with the inspector + timelineWindow.state.editSequence.director.Evaluate(); + } + } + + void RebuildGraph() + { + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + + public override void OnInspectorGUI() + { + using (new EditorGUI.DisabledScope(IsTrackLocked())) + { + serializedObject.Update(); + + DrawRootTransformOffset(); + + EditorGUI.BeginChangeCheck(); + DrawRecordedOffsetProperties(); + DrawAvatarProperties(); + if (EditorGUI.EndChangeCheck()) + RebuildGraph(); + + DrawMatchFieldsGUI(); + + serializedObject.ApplyModifiedProperties(); + } + } + + bool AnimatesRootTransform() + { + return targets.OfType().All(t => t.AnimatesRootTransform()); + } + + bool ShouldDrawOffsets() + { + bool hasMultiple; + var offsetMode = GetOffsetMode(out hasMultiple); + if (hasMultiple) + return false; + + if (offsetMode == TrackOffset.ApplySceneOffsets) + return false; + + if (offsetMode == TrackOffset.ApplyTransformOffsets) + return true; + + // Auto mode. + PlayableDirector director = this.m_Context as PlayableDirector; + if (director == null) + return false; + + // If any bound animators have controllers don't show + foreach (var track in targets.OfType()) + { + var animator = track.GetBinding(director); + if (animator != null && animator.runtimeAnimatorController != null) + return false; + } + + return true; + } + + void DrawRootTransformOffset() + { + if (!AnimatesRootTransform()) + return; + + bool showWarning = SetupOffsetTooltip(); + DrawRootTransformDropDown(); + + if (ShouldDrawOffsets()) + { + EditorGUI.indentLevel++; + DrawRootMotionToolBar(); + DrawRootMotionOffsetFields(); + EditorGUI.indentLevel--; + } + + if (showWarning) + { + EditorGUI.indentLevel++; + EditorGUILayout.HelpBox(Styles.AutoOffsetWarning, MessageType.Warning, true); + EditorGUI.indentLevel--; + } + } + + bool SetupOffsetTooltip() + { + Styles.OffsetModeTitle.tooltip = string.Empty; + bool hasMultiple; + var offsetMode = GetOffsetMode(out hasMultiple); + bool showWarning = false; + if (!hasMultiple) + { + if (offsetMode == TrackOffset.ApplyTransformOffsets) + Styles.OffsetModeTitle.tooltip = Styles.TransformOffsetInfo; + else if (offsetMode == TrackOffset.ApplySceneOffsets) + Styles.OffsetModeTitle.tooltip = Styles.SceneOffsetInfo; + else if (offsetMode == TrackOffset.Auto) + { + Styles.OffsetModeTitle.tooltip = Styles.AutoOffsetInfo; + showWarning = true; + } + } + + return showWarning; + } + + void DrawRootTransformDropDown() + { + bool anySubTracks = targets.OfType().Any(t => t.isSubTrack); + bool allSubTracks = targets.OfType().All(t => t.isSubTrack); + + bool mixed; + var rootOffsetMode = GetOffsetMode(out mixed); + + // if we are showing subtracks, we need to show the current mode from the parent + // BUT keep it disabled + if (anySubTracks) + { + m_TempContent.tooltip = string.Empty; + if (mixed) + m_TempContent.text = EditorGUI.mixedValueContent.text; + else if (!allSubTracks) + m_TempContent.text = Styles.OffsetContents[(int)rootOffsetMode].text; + else + { + m_TempContent.text = Styles.OffsetInheritContents[(int)rootOffsetMode].text; + m_TempContent.tooltip = Styles.InheritedToolTip; + } + + using (new EditorGUI.DisabledScope(true)) + EditorGUILayout.LabelField(Styles.OffsetModeTitle, m_TempContent, EditorStyles.popup); + } + else + { + // We use an enum popup explicitly because it will handle the description attribute on the enum + using (new GUIMixedValueScope(mixed)) + { + var rect = EditorGUILayout.GetControlRect(true, EditorGUI.kSingleLineHeight); + EditorGUI.BeginProperty(rect, Styles.OffsetModeTitle, m_TrackOffsetProperty); + EditorGUI.BeginChangeCheck(); + var result = (TrackOffset)EditorGUI.EnumPopup(rect, Styles.OffsetModeTitle, (TrackOffset)m_TrackOffsetProperty.intValue); + if (EditorGUI.EndChangeCheck()) + { + m_TrackOffsetProperty.enumValueIndex = (int)result; + + // this property changes the recordable state of the objects, so auto disable recording + if (TimelineWindow.instance != null) + { + if (TimelineWindow.instance.state != null) + TimelineWindow.instance.state.recording = false; + RebuildGraph(); + } + } + + EditorGUI.EndProperty(); + } + } + } + + void DrawMatchFieldsGUI() + { + if (!AnimatesRootTransform()) + return; + + m_MatchFieldsProperty.isExpanded = EditorGUILayout.Foldout(m_MatchFieldsProperty.isExpanded, Styles.MatchTargetFieldsTitle, true); + if (m_MatchFieldsProperty.isExpanded) + { + EditorGUI.indentLevel++; + MatchTargetsFieldGUI(m_MatchFieldsProperty); + EditorGUI.indentLevel--; + } + } + + void DrawRootMotionOffsetFields() + { + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_TrackPositionProperty); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_TrackRotationProperty, Styles.RotationTitle); + EditorGUILayout.EndHorizontal(); + EditorGUILayout.Space(); + EditorGUILayout.Space(); + + if (EditorGUI.EndChangeCheck()) + { + UpdateOffsets(); + } + } + + void DrawRootMotionToolBar() + { + bool disable = targets.Length > 1; + bool changed = false; + + if (!disable) + { + // detects external changes + changed |= m_lastPosition != m_TrackPositionProperty.vector3Value || m_lastRotation != m_TrackRotationProperty.vector3Value; + m_lastPosition = m_TrackPositionProperty.vector3Value; + m_lastRotation = m_TrackRotationProperty.vector3Value; + SceneView.RepaintAll(); + } + + EditorGUI.BeginChangeCheck(); + using (new EditorGUI.DisabledScope(disable)) + ShowMotionOffsetEditModeToolbar(ref m_OffsetEditMode); + changed |= EditorGUI.EndChangeCheck(); + + if (changed) + { + UpdateOffsets(); + } + } + + void UpdateOffsets() + { + foreach (var track in targets.OfType()) + track.UpdateClipOffsets(); + Evaluate(); + } + + void DrawAvatarProperties() + { + EditorGUILayout.PropertyField(m_ApplyAvatarMaskProperty); + if (m_ApplyAvatarMaskProperty.hasMultipleDifferentValues || m_ApplyAvatarMaskProperty.boolValue) + { + EditorGUI.indentLevel++; + EditorGUILayout.PropertyField(m_AvatarMaskProperty); + EditorGUI.indentLevel--; + } + EditorGUILayout.Space(); + } + + public static void ShowMotionOffsetEditModeToolbar(ref TimelineAnimationUtilities.OffsetEditMode motionOffset) + { + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + GUILayout.FlexibleSpace(); + + int newMotionOffsetMode = GUILayout.Toolbar((int)motionOffset, new[] { Styles.PositionIcon, Styles.RotationIcon }); + + if (GUI.changed) + { + if ((int)motionOffset == newMotionOffsetMode) //untoggle the button + motionOffset = TimelineAnimationUtilities.OffsetEditMode.None; + else + motionOffset = (TimelineAnimationUtilities.OffsetEditMode)newMotionOffsetMode; + } + + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + GUILayout.Space(3); + } + + public override void OnEnable() + { + base.OnEnable(); + SceneView.duringSceneGui += OnSceneGUI; + + m_MatchFieldsProperty = serializedObject.FindProperty("m_MatchTargetFields"); + m_TrackPositionProperty = serializedObject.FindProperty("m_Position"); + m_TrackRotationProperty = serializedObject.FindProperty("m_EulerAngles"); + m_TrackOffsetProperty = serializedObject.FindProperty("m_TrackOffset"); + m_AvatarMaskProperty = serializedObject.FindProperty("m_AvatarMask"); + m_ApplyAvatarMaskProperty = serializedObject.FindProperty("m_ApplyAvatarMask"); + m_RecordedOffsetPositionProperty = serializedObject.FindProperty("m_InfiniteClipOffsetPosition"); + m_RecordedOffsetEulerProperty = serializedObject.FindProperty("m_InfiniteClipOffsetEulerAngles"); + + m_lastPosition = m_TrackPositionProperty.vector3Value; + m_lastRotation = m_TrackRotationProperty.vector3Value; + } + + public void OnDestroy() + { + SceneView.duringSceneGui -= OnSceneGUI; + } + + void OnSceneGUI(SceneView sceneView) + { + DoOffsetManipulator(); + } + + void DoOffsetManipulator() + { + if (targets.Length > 1) //do not edit the track offset on a multiple selection + return; + + if (timelineWindow == null || timelineWindow.state == null || timelineWindow.state.editSequence.director == null) + return; + + AnimationTrack animationTrack = target as AnimationTrack; + if (animationTrack != null && (animationTrack.trackOffset == TrackOffset.ApplyTransformOffsets) && m_OffsetEditMode != TimelineAnimationUtilities.OffsetEditMode.None) + { + var boundObject = TimelineUtility.GetSceneGameObject(timelineWindow.state.editSequence.director, animationTrack); + var boundObjectTransform = boundObject != null ? boundObject.transform : null; + + var offsets = TimelineAnimationUtilities.GetTrackOffsets(animationTrack, boundObjectTransform); + EditorGUI.BeginChangeCheck(); + + switch (m_OffsetEditMode) + { + case TimelineAnimationUtilities.OffsetEditMode.Translation: + offsets.position = Handles.PositionHandle(offsets.position, (Tools.pivotRotation == PivotRotation.Global) + ? Quaternion.identity + : offsets.rotation); + break; + case TimelineAnimationUtilities.OffsetEditMode.Rotation: + offsets.rotation = Handles.RotationHandle(offsets.rotation, offsets.position); + break; + } + + if (EditorGUI.EndChangeCheck()) + { + TimelineUndo.PushUndo(animationTrack, "Inspector"); + TimelineAnimationUtilities.UpdateTrackOffset(animationTrack, boundObjectTransform, offsets); + Evaluate(); + Repaint(); + } + } + } + + public void DrawRecordedOffsetProperties() + { + // only show if this applies to all targets + foreach (var track in targets) + { + var animationTrack = track as AnimationTrack; + if (animationTrack == null || animationTrack.inClipMode || animationTrack.infiniteClip == null || animationTrack.infiniteClip.empty) + return; + } + + GUILayout.Label(Styles.RecordingOffsets); + EditorGUI.indentLevel++; + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_RecordedOffsetPositionProperty, Styles.PositionTitle); + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_RecordedOffsetEulerProperty, Styles.RotationTitle); + EditorGUILayout.EndHorizontal(); + EditorGUI.indentLevel--; + EditorGUILayout.Space(); + } + + public static void MatchTargetsFieldGUI(SerializedProperty property) + { + const float ToggleWidth = 20; + int value = 0; + + MatchTargetFields enumValue = (MatchTargetFields)property.intValue; + + EditorGUI.BeginChangeCheck(); + Rect rect = EditorGUILayout.GetControlRect(false, kLineHeight * 2); + Rect itemRect = new Rect(rect.x, rect.y, rect.width, kLineHeight); + EditorGUI.BeginProperty(rect, Styles.MatchTargetFieldsTitle, property); + float minWidth = 0, maxWidth = 0; + EditorStyles.label.CalcMinMaxWidth(Styles.XTitle, out minWidth, out maxWidth); + float width = minWidth + ToggleWidth; + + GUILayout.BeginHorizontal(); + Rect r = EditorGUI.PrefixLabel(itemRect, Styles.PositionTitle); + int oldIndent = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + r.width = width; + value |= EditorGUI.ToggleLeft(r, Styles.XTitle, enumValue.HasAny(MatchTargetFields.PositionX)) ? (int)MatchTargetFields.PositionX : 0; + r.x += width; + value |= EditorGUI.ToggleLeft(r, Styles.YTitle, enumValue.HasAny(MatchTargetFields.PositionY)) ? (int)MatchTargetFields.PositionY : 0; + r.x += width; + value |= EditorGUI.ToggleLeft(r, Styles.ZTitle, enumValue.HasAny(MatchTargetFields.PositionZ)) ? (int)MatchTargetFields.PositionZ : 0; + EditorGUI.indentLevel = oldIndent; + GUILayout.EndHorizontal(); + + GUILayout.BeginHorizontal(); + itemRect.y += kLineHeight; + r = EditorGUI.PrefixLabel(itemRect, Styles.RotationTitle); + EditorGUI.indentLevel = 0; + r.width = width; + value |= EditorGUI.ToggleLeft(r, Styles.XTitle, enumValue.HasAny(MatchTargetFields.RotationX)) ? (int)MatchTargetFields.RotationX : 0; + r.x += width; + value |= EditorGUI.ToggleLeft(r, Styles.YTitle, enumValue.HasAny(MatchTargetFields.RotationY)) ? (int)MatchTargetFields.RotationY : 0; + r.x += width; + value |= EditorGUI.ToggleLeft(r, Styles.ZTitle, enumValue.HasAny(MatchTargetFields.RotationZ)) ? (int)MatchTargetFields.RotationZ : 0; + EditorGUI.indentLevel = oldIndent; + GUILayout.EndHorizontal(); + + EditorGUI.EndProperty(); + if (EditorGUI.EndChangeCheck()) + { + property.intValue = value; + } + } + + static TrackOffset GetOffsetMode(AnimationTrack track) + { + if (track.isSubTrack) + { + var parent = track.parent as AnimationTrack; + if (parent != null) // fallback to the current track if there is an error + track = parent; + } + + return track.trackOffset; + } + + // gets the current mode, + TrackOffset GetOffsetMode(out bool hasMultiple) + { + var rootOffsetMode = GetOffsetMode(target as AnimationTrack); + hasMultiple = targets.OfType().Any(t => GetOffsetMode(t) != rootOffsetMode); + return rootOffsetMode; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationTrackInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationTrackInspector.cs.meta new file mode 100644 index 0000000..3f57ed4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/AnimationTrackInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: edc553b1b3c8a25438b62783410b26ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BasicAssetInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BasicAssetInspector.cs new file mode 100644 index 0000000..d746c9f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BasicAssetInspector.cs @@ -0,0 +1,41 @@ +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + // Simple inspector used by built in assets + // that only need to hide the script field + class BasicAssetInspector : Editor + { + public override void OnInspectorGUI() + { + EditorGUI.BeginChangeCheck(); + serializedObject.Update(); + + SerializedProperty property = serializedObject.GetIterator(); + bool expanded = true; + while (property.NextVisible(expanded)) + { + expanded = false; + if (SkipField(property.propertyPath)) + continue; + EditorGUILayout.PropertyField(property, true); + } + + serializedObject.ApplyModifiedProperties(); + EditorGUI.EndChangeCheck(); + } + + public virtual void ApplyChanges() + { + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + + static bool SkipField(string fieldName) + { + return fieldName == "m_Script"; + } + } + + [CustomEditor(typeof(ActivationPlayableAsset))] + class ActivationPlayableAssetInspector : BasicAssetInspector {} +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BasicAssetInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BasicAssetInspector.cs.meta new file mode 100644 index 0000000..f296b75 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BasicAssetInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e086b15460c228c4f9b116f0e3e2f175 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BuiltInCurvePresets.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BuiltInCurvePresets.cs new file mode 100644 index 0000000..2e5c8cf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BuiltInCurvePresets.cs @@ -0,0 +1,58 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + // Preset libraries + static class BuiltInPresets + { + static CurvePresetLibrary s_BlendInPresets; + static CurvePresetLibrary s_BlendOutPresets; + + internal static CurvePresetLibrary blendInPresets + { + get + { + if (s_BlendInPresets == null) + { + s_BlendInPresets = ScriptableObject.CreateInstance(); + s_BlendInPresets.Add(new AnimationCurve(CurveEditorWindow.GetConstantKeys(1f)), "None"); + s_BlendInPresets.Add(new AnimationCurve(CurveEditorWindow.GetLinearKeys()), "Linear"); + s_BlendInPresets.Add(new AnimationCurve(CurveEditorWindow.GetEaseInKeys()), "EaseIn"); + s_BlendInPresets.Add(new AnimationCurve(CurveEditorWindow.GetEaseOutKeys()), "EaseOut"); + s_BlendInPresets.Add(new AnimationCurve(CurveEditorWindow.GetEaseInOutKeys()), "EaseInOut"); + } + return s_BlendInPresets; + } + } + + internal static CurvePresetLibrary blendOutPresets + { + get + { + if (s_BlendOutPresets == null) + { + s_BlendOutPresets = ScriptableObject.CreateInstance(); + s_BlendOutPresets.Add(new AnimationCurve(CurveEditorWindow.GetConstantKeys(1f)), "None"); + s_BlendOutPresets.Add(ReverseCurve(new AnimationCurve(CurveEditorWindow.GetLinearKeys())), "Linear"); + s_BlendOutPresets.Add(ReverseCurve(new AnimationCurve(CurveEditorWindow.GetEaseInKeys())), "EaseIn"); + s_BlendOutPresets.Add(ReverseCurve(new AnimationCurve(CurveEditorWindow.GetEaseOutKeys())), "EaseOut"); + s_BlendOutPresets.Add(ReverseCurve(new AnimationCurve(CurveEditorWindow.GetEaseInOutKeys())), "EaseInOut"); + } + return s_BlendOutPresets; + } + } + + static AnimationCurve ReverseCurve(AnimationCurve curve) + { + Keyframe[] keys = curve.keys; + for (int i = 0; i < keys.Length; i++) + { + keys[i].value = 1 - keys[i].value; + keys[i].inTangent *= -1; + keys[i].outTangent *= -1; + } + curve.keys = keys; + return curve; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BuiltInCurvePresets.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BuiltInCurvePresets.cs.meta new file mode 100644 index 0000000..d294670 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/BuiltInCurvePresets.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ae05f0dd1cf145e4e8e905c7971ee433 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector.meta new file mode 100644 index 0000000..1774e4e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f68c7f7359094f045930a108c444e7a4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspector.cs new file mode 100644 index 0000000..f05cb29 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspector.cs @@ -0,0 +1,786 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Timeline; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + [CustomEditor(typeof(EditorClip)), CanEditMultipleObjects] + class ClipInspector : Editor + { + internal static class Styles + { + public static readonly GUIContent StartName = EditorGUIUtility.TrTextContent("Start", "The start time of the clip"); + public static readonly GUIContent DurationName = EditorGUIUtility.TrTextContent("Duration", "The length of the clip"); + public static readonly GUIContent EndName = EditorGUIUtility.TrTextContent("End", "The end time of the clip"); + public static readonly GUIContent EaseInDurationName = EditorGUIUtility.TrTextContent("Ease In Duration", "The length of the blend in"); + public static readonly GUIContent EaseOutDurationName = EditorGUIUtility.TrTextContent("Ease Out Duration", "The length of the blend out"); + public static readonly GUIContent ClipInName = EditorGUIUtility.TrTextContent("Clip In", "Start the clip at this local time"); + public static readonly GUIContent TimeScaleName = EditorGUIUtility.TrTextContent("Speed Multiplier", "Time scale of the playback speed"); + public static readonly GUIContent PreExtrapolateLabel = EditorGUIUtility.TrTextContent("Pre-Extrapolate", "Extrapolation used prior to the first clip"); + public static readonly GUIContent PostExtrapolateLabel = EditorGUIUtility.TrTextContent("Post-Extrapolate", "Extrapolation used after a clip ends"); + public static readonly GUIContent BlendInCurveName = EditorGUIUtility.TrTextContent("In", "Blend In Curve"); + public static readonly GUIContent BlendOutCurveName = EditorGUIUtility.TrTextContent("Out", "Blend Out Curve"); + public static readonly GUIContent PreviewTitle = EditorGUIUtility.TrTextContent("Curve Editor"); + public static readonly GUIContent ClipTimingTitle = EditorGUIUtility.TrTextContent("Clip Timing"); + public static readonly GUIContent AnimationExtrapolationTitle = EditorGUIUtility.TrTextContent("Animation Extrapolation"); + public static readonly GUIContent BlendCurvesTitle = EditorGUIUtility.TrTextContent("Blend Curves"); + public static readonly GUIContent GroupTimingTitle = EditorGUIUtility.TrTextContent("Multiple Clip Timing"); + public static readonly GUIContent MultipleClipsSelectedIncompatibleCapabilitiesWarning = EditorGUIUtility.TrTextContent("Multiple clips selected. Only common properties are shown."); + public static readonly GUIContent MultipleSelectionTitle = EditorGUIUtility.TrTextContent("Timeline Clips"); + public static readonly GUIContent MultipleClipStartName = EditorGUIUtility.TrTextContent("Start", "The start time of the clip group"); + public static readonly GUIContent MultipleClipEndName = EditorGUIUtility.TrTextContent("End", "The end time of the clip group"); + public static readonly GUIContent TimelineClipFG = DirectorStyles.IconContent("TimelineClipFG"); + public static readonly GUIContent TimelineClipBG = DirectorStyles.IconContent("TimelineClipBG"); + } + + class EditorClipSelection : ICurvesOwnerInspectorWrapper + { + public EditorClip editorClip { get; } + + public TimelineClip clip + { + get { return editorClip == null ? null : editorClip.clip; } + } + + public SerializedObject serializedPlayableAsset { get; } + + public ICurvesOwner curvesOwner + { + get { return clip; } + } + + public int lastCurveVersion { get; set; } + public double lastEvalTime { get; set; } + + public EditorClipSelection(EditorClip anEditorClip) + { + editorClip = anEditorClip; + lastCurveVersion = -1; + lastEvalTime = -1; + + var so = new SerializedObject(editorClip); + var playableAssetProperty = so.FindProperty("m_Clip.m_Asset"); + if (playableAssetProperty != null) + { + var asset = playableAssetProperty.objectReferenceValue as UnityEngine.Playables.PlayableAsset; + if (asset != null) + serializedPlayableAsset = new SerializedObject(asset); + } + } + + public double ToLocalTime(double time) + { + return clip == null ? time : clip.ToLocalTime(time); + } + } + + SerializedProperty m_DisplayNameProperty; + SerializedProperty m_BlendInDurationProperty; + SerializedProperty m_BlendOutDurationProperty; + SerializedProperty m_EaseInDurationProperty; + SerializedProperty m_EaseOutDurationProperty; + SerializedProperty m_ClipInProperty; + SerializedProperty m_TimeScaleProperty; + SerializedProperty m_PostExtrapolationModeProperty; + SerializedProperty m_PreExtrapolationModeProperty; + SerializedProperty m_PostExtrapolationTimeProperty; + SerializedProperty m_PreExtrapolationTimeProperty; + SerializedProperty m_MixInCurveProperty; + SerializedProperty m_MixOutCurveProperty; + SerializedProperty m_BlendInCurveModeProperty; + SerializedProperty m_BlendOutCurveModeProperty; + + void InitializeProperties() + { + m_DisplayNameProperty = serializedObject.FindProperty("m_Clip.m_DisplayName"); + m_BlendInDurationProperty = serializedObject.FindProperty("m_Clip.m_BlendInDuration"); + m_BlendOutDurationProperty = serializedObject.FindProperty("m_Clip.m_BlendOutDuration"); + m_EaseInDurationProperty = serializedObject.FindProperty("m_Clip.m_EaseInDuration"); + m_EaseOutDurationProperty = serializedObject.FindProperty("m_Clip.m_EaseOutDuration"); + m_ClipInProperty = serializedObject.FindProperty("m_Clip.m_ClipIn"); + m_TimeScaleProperty = serializedObject.FindProperty("m_Clip.m_TimeScale"); + m_PostExtrapolationModeProperty = serializedObject.FindProperty("m_Clip.m_PostExtrapolationMode"); + m_PreExtrapolationModeProperty = serializedObject.FindProperty("m_Clip.m_PreExtrapolationMode"); + m_PostExtrapolationTimeProperty = serializedObject.FindProperty("m_Clip.m_PostExtrapolationTime"); + m_PreExtrapolationTimeProperty = serializedObject.FindProperty("m_Clip.m_PreExtrapolationTime"); + m_MixInCurveProperty = serializedObject.FindProperty("m_Clip.m_MixInCurve"); + m_MixOutCurveProperty = serializedObject.FindProperty("m_Clip.m_MixOutCurve"); + m_BlendInCurveModeProperty = serializedObject.FindProperty("m_Clip.m_BlendInCurveMode"); + m_BlendOutCurveModeProperty = serializedObject.FindProperty("m_Clip.m_BlendOutCurveMode"); + } + + TimelineAsset m_TimelineAsset; + + List m_SelectionCache; + Editor m_SelectedPlayableAssetsInspector; + + ClipInspectorCurveEditor m_ClipCurveEditor; + AnimationCurve[] m_PreviewCurves; // the curves we are currently previewing. + CurvePresetLibrary m_CurvePresets; + + bool m_IsClipAssetInspectorExpanded = true; + GUIContent m_ClipAssetTitle = new GUIContent(); + string m_MultiselectionHeaderTitle; + + ClipInspectorSelectionInfo m_SelectionInfo; + + const double k_TimeScaleSensitivity = 0.003; + + bool hasMultipleSelection + { + get { return targets.Length > 1; } + } + + float currentFrameRate + { + get { return m_TimelineAsset != null ? m_TimelineAsset.editorSettings.fps : TimelineAsset.EditorSettings.kDefaultFps; } + } + + bool selectionHasIncompatibleCapabilities + { + get + { + return !(m_SelectionInfo.supportsBlending + && m_SelectionInfo.supportsClipIn + && m_SelectionInfo.supportsExtrapolation + && m_SelectionInfo.supportsSpeedMultiplier); + } + } + + public override bool RequiresConstantRepaint() + { + return base.RequiresConstantRepaint() || (m_SelectedPlayableAssetsInspector != null && m_SelectedPlayableAssetsInspector.RequiresConstantRepaint()); + } + + internal override void OnHeaderTitleGUI(Rect titleRect, string header) + { + if (hasMultipleSelection) + { + base.OnHeaderTitleGUI(titleRect, m_MultiselectionHeaderTitle); + return; + } + + if (m_DisplayNameProperty != null) + { + using (new EditorGUI.DisabledScope(!IsEnabled())) + { + serializedObject.Update(); + if (IsLocked()) + { + base.OnHeaderTitleGUI(titleRect, m_DisplayNameProperty.stringValue); + } + else + { + EditorGUI.BeginChangeCheck(); + EditorGUI.DelayedTextField(titleRect, m_DisplayNameProperty, GUIContent.none); + if (EditorGUI.EndChangeCheck()) + { + ApplyModifiedProperties(); + TimelineWindow.RepaintIfEditingTimelineAsset(m_TimelineAsset); + } + } + } + } + } + + internal override Rect DrawHeaderHelpAndSettingsGUI(Rect r) + { + using (new EditorGUI.DisabledScope(IsLocked())) + { + var helpSize = EditorStyles.iconButton.CalcSize(EditorGUI.GUIContents.helpIcon); + const int kTopMargin = 5; + // Show Editor Header Items. + return EditorGUIUtility.DrawEditorHeaderItems(new Rect(r.xMax - helpSize.x, r.y + kTopMargin, helpSize.x, helpSize.y), targets); + } + } + + internal override void OnHeaderIconGUI(Rect iconRect) + { + using (new EditorGUI.DisabledScope(IsLocked())) + { + var bgColor = Color.white; + if (!EditorGUIUtility.isProSkin) + bgColor.a = 0.55f; + using (new GUIColorOverride(bgColor)) + { + GUI.Label(iconRect, Styles.TimelineClipBG); + } + + var fgColor = Color.white; + if (m_SelectionInfo != null && m_SelectionInfo.uniqueParentTracks.Count == 1) + fgColor = TrackResourceCache.GetTrackColor(m_SelectionInfo.uniqueParentTracks.First()); + + using (new GUIColorOverride(fgColor)) + { + GUI.Label(iconRect, Styles.TimelineClipFG); + } + } + } + + public void OnEnable() + { + m_ClipCurveEditor = new ClipInspectorCurveEditor(); + + m_SelectionCache = new List(); + var selectedClips = new List(); + foreach (var editorClipObject in targets) + { + var editorClip = editorClipObject as EditorClip; + if (editorClip != null) + { + //all selected clips should have the same TimelineAsset + if (!IsTimelineAssetValidForEditorClip(editorClip)) + { + m_SelectionCache.Clear(); + return; + } + m_SelectionCache.Add(new EditorClipSelection(editorClip)); + selectedClips.Add(editorClip.clip); + } + } + + InitializeProperties(); + m_SelectionInfo = new ClipInspectorSelectionInfo(selectedClips); + + if (m_SelectionInfo.selectedAssetTypesAreHomogeneous) + { + var selectedAssets = m_SelectionCache.Select(e => e.clip.asset).ToArray(); + m_SelectedPlayableAssetsInspector = TimelineInspectorUtility.GetInspectorForObjects(selectedAssets); + } + + m_MultiselectionHeaderTitle = m_SelectionCache.Count + " " + Styles.MultipleSelectionTitle.text; + m_ClipAssetTitle.text = PlayableAssetSectionTitle(); + } + + void DrawClipProperties() + { + var dirtyEditorClipSelection = m_SelectionCache.Where(s => s.editorClip.GetHashCode() != s.editorClip.lastHash); + UnselectCurves(); + + EditorGUI.BeginChangeCheck(); + + //Group Selection + if (hasMultipleSelection) + { + GUILayout.Label(Styles.GroupTimingTitle); + EditorGUI.indentLevel++; + DrawGroupSelectionProperties(); + EditorGUI.indentLevel--; + EditorGUILayout.Space(); + } + + //Draw clip timing + GUILayout.Label(Styles.ClipTimingTitle); + + if (hasMultipleSelection && selectionHasIncompatibleCapabilities) + { + GUILayout.Label(Styles.MultipleClipsSelectedIncompatibleCapabilitiesWarning, EditorStyles.helpBox); + } + + EditorGUI.indentLevel++; + + if (!m_SelectionInfo.containsAtLeastTwoClipsOnTheSameTrack) + { + DrawStartTimeField(); + DrawEndTimeField(); + } + + if (!hasMultipleSelection) + { + DrawDurationProperty(); + } + + if (m_SelectionInfo.supportsBlending) + { + EditorGUILayout.Space(); + DrawBlendingProperties(); + } + + if (m_SelectionInfo.supportsClipIn) + { + EditorGUILayout.Space(); + DrawClipInProperty(); + } + + if (!hasMultipleSelection && m_SelectionInfo.supportsSpeedMultiplier) + { + EditorGUILayout.Space(); + DrawTimeScale(); + } + + EditorGUI.indentLevel--; + + bool hasDirtyEditorClips = false; + foreach (var editorClipSelection in dirtyEditorClipSelection) + { + EditorUtility.SetDirty(editorClipSelection.editorClip); + hasDirtyEditorClips = true; + } + + //Re-evaluate the graph in case of a change in properties + bool propertiesHaveChanged = false; + if (EditorGUI.EndChangeCheck() || hasDirtyEditorClips) + { + if (TimelineWindow.IsEditingTimelineAsset(m_TimelineAsset) && TimelineWindow.instance.state != null) + { + TimelineWindow.instance.state.Evaluate(); + TimelineWindow.instance.Repaint(); + } + propertiesHaveChanged = true; + } + + //Draw Animation Extrapolation + if (m_SelectionInfo.supportsExtrapolation) + { + EditorGUILayout.Space(); + GUILayout.Label(Styles.AnimationExtrapolationTitle); + EditorGUI.indentLevel++; + DrawExtrapolationOptions(); + EditorGUI.indentLevel--; + } + + //Blend curves + if (m_SelectionInfo.supportsBlending) + { + EditorGUILayout.Space(); + GUILayout.Label(Styles.BlendCurvesTitle); + EditorGUI.indentLevel++; + DrawBlendOptions(); + EditorGUI.indentLevel--; + } + + EditorGUILayout.Space(); + + if (CanShowPlayableAssetInspector()) + { + DrawClipAssetGui(); + } + + if (propertiesHaveChanged) + { + foreach (var item in m_SelectionCache) + item.editorClip.lastHash = item.editorClip.GetHashCode(); + m_SelectionInfo.Update(); + } + } + + public override void OnInspectorGUI() + { + if (TimelineWindow.instance == null || m_TimelineAsset == null) + return; + + using (new EditorGUI.DisabledScope(IsLocked())) + { + EditMode.HandleModeClutch(); + + serializedObject.Update(); + DrawClipProperties(); + ApplyModifiedProperties(); + } + } + + internal override bool IsEnabled() + { + if (!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly()) + return false; + + if (m_TimelineAsset != TimelineWindow.instance.state.editSequence.asset) + return false; + return base.IsEnabled(); + } + + void DrawTimeScale() + { + var inputEvent = InputEvent.None; + var newEndTime = m_SelectionInfo.end; + var oldTimeScale = m_TimeScaleProperty.doubleValue; + + EditorGUI.BeginChangeCheck(); + var newTimeScale = TimelineInspectorUtility.DelayedAndDraggableDoubleField(Styles.TimeScaleName, oldTimeScale, ref inputEvent, k_TimeScaleSensitivity); + + if (EditorGUI.EndChangeCheck()) + { + newTimeScale = newTimeScale.Clamp(TimelineClip.kTimeScaleMin, TimelineClip.kTimeScaleMax); + newEndTime = m_SelectionInfo.start + (m_SelectionInfo.duration * oldTimeScale / newTimeScale); + } + EditMode.inputHandler.ProcessTrim(inputEvent, newEndTime, true); + } + + void DrawStartTimeField() + { + var inputEvent = InputEvent.None; + var newStart = TimelineInspectorUtility.TimeFieldUsingTimeReference(Styles.StartName, m_SelectionInfo.multipleClipStart, false, m_SelectionInfo.hasMultipleStartValues, currentFrameRate, 0.0, TimelineClip.kMaxTimeValue, ref inputEvent); + + if (inputEvent.InputHasBegun() && m_SelectionInfo.hasMultipleStartValues) + { + var items = ItemsUtils.ToItems(m_SelectionInfo.clips); + EditMode.inputHandler.SetValueForEdge(items, AttractedEdge.Left, newStart); //if the field has multiple values, set the same start on all selected clips + m_SelectionInfo.Update(); //clips could have moved relative to each other, recalculate + } + + EditMode.inputHandler.ProcessMove(inputEvent, newStart); + } + + void DrawEndTimeField() + { + var inputEvent = InputEvent.None; + var newEndTime = TimelineInspectorUtility.TimeFieldUsingTimeReference(Styles.EndName, m_SelectionInfo.multipleClipEnd, false, m_SelectionInfo.hasMultipleEndValues, currentFrameRate, 0, TimelineClip.kMaxTimeValue, ref inputEvent); + + if (inputEvent.InputHasBegun() && m_SelectionInfo.hasMultipleEndValues) + { + var items = ItemsUtils.ToItems(m_SelectionInfo.clips); + EditMode.inputHandler.SetValueForEdge(items, AttractedEdge.Right, newEndTime); //if the field has multiple value, set the same end on all selected clips + m_SelectionInfo.Update(); //clips could have moved relative to each other, recalculate + } + + var newStartValue = m_SelectionInfo.multipleClipStart + (newEndTime - m_SelectionInfo.multipleClipEnd); + EditMode.inputHandler.ProcessMove(inputEvent, newStartValue); + } + + void DrawClipAssetGui() + { + const float labelIndent = 34; + if (m_SelectedPlayableAssetsInspector == null) + return; + + var rect = GUILayoutUtility.GetRect(GUIContent.none, EditorStyles.inspectorTitlebar); + var oldWidth = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = rect.width - labelIndent; + m_IsClipAssetInspectorExpanded = EditorGUI.FoldoutTitlebar(rect, m_ClipAssetTitle, m_IsClipAssetInspectorExpanded, false); + EditorGUIUtility.labelWidth = oldWidth; + if (m_IsClipAssetInspectorExpanded) + { + EditorGUILayout.Space(); + EditorGUI.indentLevel++; + ShowPlayableAssetInspector(); + EditorGUI.indentLevel--; + } + } + + void DrawExtrapolationOptions() + { + EditorGUI.BeginChangeCheck(); + + // PreExtrapolation + var preExtrapolationTime = m_PreExtrapolationTimeProperty.doubleValue; + bool hasPreExtrap = preExtrapolationTime > 0.0; + if (hasPreExtrap) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_PreExtrapolationModeProperty, Styles.PreExtrapolateLabel); + using (new GUIMixedValueScope(m_PreExtrapolationTimeProperty.hasMultipleDifferentValues)) + EditorGUILayout.DoubleField(preExtrapolationTime, EditorStyles.label); + EditorGUILayout.EndHorizontal(); + } + + // PostExtrapolation + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(m_PostExtrapolationModeProperty, Styles.PostExtrapolateLabel); + using (new GUIMixedValueScope(m_PostExtrapolationTimeProperty.hasMultipleDifferentValues)) + EditorGUILayout.DoubleField(m_PostExtrapolationTimeProperty.doubleValue, EditorStyles.label); + EditorGUILayout.EndHorizontal(); + } + + if (EditorGUI.EndChangeCheck()) + { + // if these options change the interval tree may need to be rebuilt. + if (TimelineWindow.IsEditingTimelineAsset(m_TimelineAsset) && TimelineWindow.instance.state != null) + { + TimelineWindow.instance.state.Refresh(); + } + } + } + + void OnDestroy() + { + DestroyImmediate(m_SelectedPlayableAssetsInspector); + } + + public override GUIContent GetPreviewTitle() + { + return Styles.PreviewTitle; + } + + public override bool HasPreviewGUI() + { + return m_PreviewCurves != null; + } + + public override void OnInteractivePreviewGUI(Rect r, GUIStyle background) + { + if (m_PreviewCurves != null && m_ClipCurveEditor != null) + { + SetCurveEditorTrackHead(); + m_ClipCurveEditor.OnGUI(r, m_CurvePresets); + } + } + + void SetCurveEditorTrackHead() + { + if (TimelineWindow.instance == null || TimelineWindow.instance.state == null) + return; + + if (hasMultipleSelection) + return; + + var editorClip = target as EditorClip; + if (editorClip == null) + return; + + var director = TimelineWindow.instance.state.editSequence.director; + + if (director == null) + return; + + m_ClipCurveEditor.trackTime = ClipInspectorCurveEditor.kDisableTrackTime; + } + + void UnselectCurves() + { + if (Event.current.type == EventType.MouseDown) + { + m_PreviewCurves = null; + if (m_ClipCurveEditor != null) + m_ClipCurveEditor.SetUpdateCurveCallback(null); + } + } + + // Callback when the mixin/mixout properties are clicked on + void OnMixCurveSelected(string title, CurvePresetLibrary library, SerializedProperty curveSelected, bool easeIn) + { + m_CurvePresets = library; + m_PreviewCurves = new[] { curveSelected.animationCurveValue }; + m_ClipCurveEditor.headerString = title; + m_ClipCurveEditor.SetCurves(m_PreviewCurves, null); + m_ClipCurveEditor.SetSelected(curveSelected.animationCurveValue); + if (easeIn) + m_ClipCurveEditor.SetUpdateCurveCallback(MixInCurveUpdated); + else + m_ClipCurveEditor.SetUpdateCurveCallback(MixOutCurveUpdated); + Repaint(); + } + + // callback when the mix property is updated + void MixInCurveUpdated(AnimationCurve curve, EditorCurveBinding binding) + { + curve.keys = CurveEditUtility.SanitizeCurveKeys(curve.keys, true); + m_MixInCurveProperty.animationCurveValue = curve; + serializedObject.ApplyModifiedProperties(); + var editorClip = target as EditorClip; + if (editorClip != null) + editorClip.lastHash = editorClip.GetHashCode(); + RefreshCurves(); + } + + void MixOutCurveUpdated(AnimationCurve curve, EditorCurveBinding binding) + { + curve.keys = CurveEditUtility.SanitizeCurveKeys(curve.keys, false); + m_MixOutCurveProperty.animationCurveValue = curve; + serializedObject.ApplyModifiedProperties(); + var editorClip = target as EditorClip; + if (editorClip != null) + editorClip.lastHash = editorClip.GetHashCode(); + RefreshCurves(); + } + + void RefreshCurves() + { + AnimationCurvePreviewCache.ClearCache(); + TimelineWindow.RepaintIfEditingTimelineAsset(m_TimelineAsset); + Repaint(); + } + + void DrawBlendCurve(GUIContent title, SerializedProperty modeProperty, SerializedProperty curveProperty, Action onCurveClick) + { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField(modeProperty, title); + if (hasMultipleSelection) + { + GUILayout.FlexibleSpace(); + } + else + { + using (new EditorGUI.DisabledScope(modeProperty.intValue != (int)TimelineClip.BlendCurveMode.Manual)) + { + ClipInspectorCurveEditor.CurveField(GUIContent.none, curveProperty, onCurveClick); + } + } + + EditorGUILayout.EndHorizontal(); + } + + void ShowPlayableAssetInspector() + { + if (!m_SelectionInfo.selectedAssetTypesAreHomogeneous) + return; + + if (m_SelectedPlayableAssetsInspector != null) + { + foreach (var selectedItem in m_SelectionCache) + CurvesOwnerInspectorHelper.PreparePlayableAsset(selectedItem); + + EditorGUI.BeginChangeCheck(); + using (new EditorGUI.DisabledScope(IsLocked())) + { + m_SelectedPlayableAssetsInspector.OnInspectorGUI(); + } + if (EditorGUI.EndChangeCheck()) + { + MarkClipsDirty(); + if (TimelineWindow.IsEditingTimelineAsset(m_TimelineAsset) && TimelineWindow.instance.state != null) + { + var basicInspector = m_SelectedPlayableAssetsInspector as BasicAssetInspector; + if (basicInspector != null) + basicInspector.ApplyChanges(); + else + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + } + } + } + + void ApplyModifiedProperties() + { + // case 926861 - we need to force the track to be dirty since modifying the clip does not + // automatically mark the track asset as dirty + if (serializedObject.ApplyModifiedProperties()) + { + foreach (var obj in serializedObject.targetObjects) + { + var editorClip = obj as EditorClip; + if (editorClip != null && editorClip.clip != null && editorClip.clip.parentTrack != null) + { + editorClip.clip.MarkDirty(); + EditorUtility.SetDirty(editorClip.clip.parentTrack); + } + } + } + } + + void MarkClipsDirty() + { + foreach (var obj in targets) + { + var editorClip = obj as EditorClip; + if (editorClip != null && editorClip.clip != null) + { + editorClip.clip.MarkDirty(); + } + } + } + + string PlayableAssetSectionTitle() + { + var firstSelectedClipAsset = m_SelectionCache.Any() ? m_SelectionCache.First().clip.asset : null; + return firstSelectedClipAsset != null + ? ObjectNames.NicifyVariableName(firstSelectedClipAsset.GetType().Name) + : string.Empty; + } + + bool IsTimelineAssetValidForEditorClip(EditorClip editorClip) + { + var trackAsset = editorClip.clip.parentTrack; + if (trackAsset == null) + return false; + + var clipTimelineAsset = trackAsset.timelineAsset; + if (m_TimelineAsset == null) + m_TimelineAsset = clipTimelineAsset; + else if (clipTimelineAsset != m_TimelineAsset) + { + m_TimelineAsset = null; + return false; + } + return true; + } + + bool CanShowPlayableAssetInspector() + { + if (hasMultipleSelection) + return m_SelectedPlayableAssetsInspector != null && + m_SelectedPlayableAssetsInspector.canEditMultipleObjects && + m_SelectionInfo.selectedAssetTypesAreHomogeneous; + else + return true; + } + + void DrawDurationProperty() + { + var minDuration = 1.0 / 30.0; + if (currentFrameRate > float.Epsilon) + { + minDuration = 1.0 / currentFrameRate; + } + + var inputEvent = InputEvent.None; + var newDuration = TimelineInspectorUtility.DurationFieldUsingTimeReference( + Styles.DurationName, m_SelectionInfo.start, m_SelectionInfo.end, false, m_SelectionInfo.hasMultipleDurationValues, currentFrameRate, minDuration, TimelineClip.kMaxTimeValue, ref inputEvent); + EditMode.inputHandler.ProcessTrim(inputEvent, m_SelectionInfo.start + newDuration, false); + } + + void DrawBlendingProperties() + { + var useBlendIn = m_SelectionInfo.hasBlendIn; + var maxBlendDuration = m_SelectionInfo.smallestDuration * 0.49; + var blendMax = useBlendIn ? TimelineClip.kMaxTimeValue : maxBlendDuration; + var inputEvent = InputEvent.None; + + TimelineInspectorUtility.TimeField(useBlendIn + ? m_BlendInDurationProperty + : m_EaseInDurationProperty, Styles.EaseInDurationName, useBlendIn, currentFrameRate, 0, blendMax, ref inputEvent); + + var useBlendOut = m_SelectionInfo.hasBlendOut; + blendMax = useBlendOut ? TimelineClip.kMaxTimeValue : maxBlendDuration; + TimelineInspectorUtility.TimeField(useBlendOut + ? m_BlendOutDurationProperty + : m_EaseOutDurationProperty, Styles.EaseOutDurationName, useBlendOut, currentFrameRate, 0, blendMax, ref inputEvent); + } + + void DrawClipInProperty() + { + var action = InputEvent.None; + TimelineInspectorUtility.TimeField(m_ClipInProperty, Styles.ClipInName, false, currentFrameRate, 0, TimelineClip.kMaxTimeValue, ref action); + } + + void DrawBlendOptions() + { + EditorGUI.BeginChangeCheck(); + + DrawBlendCurve(Styles.BlendInCurveName, m_BlendInCurveModeProperty, m_MixInCurveProperty, x => OnMixCurveSelected("Blend In", BuiltInPresets.blendInPresets, x, true)); + DrawBlendCurve(Styles.BlendOutCurveName, m_BlendOutCurveModeProperty, m_MixOutCurveProperty, x => OnMixCurveSelected("Blend Out", BuiltInPresets.blendOutPresets, x, false)); + + if (EditorGUI.EndChangeCheck()) + TimelineWindow.RepaintIfEditingTimelineAsset(m_TimelineAsset); + } + + void DrawGroupSelectionProperties() + { + var inputEvent = InputEvent.None; + var newStartTime = TimelineInspectorUtility.TimeField(Styles.MultipleClipStartName, m_SelectionInfo.multipleClipStart, false, false, currentFrameRate, 0, TimelineClip.kMaxTimeValue, ref inputEvent); + EditMode.inputHandler.ProcessMove(inputEvent, newStartTime); + + inputEvent = InputEvent.None; + var newEndTime = TimelineInspectorUtility.TimeField(Styles.MultipleClipEndName, m_SelectionInfo.multipleClipEnd, false, false, currentFrameRate, 0, TimelineClip.kMaxTimeValue, ref inputEvent); + var newStartValue = newStartTime + (newEndTime - m_SelectionInfo.multipleClipEnd); + EditMode.inputHandler.ProcessMove(inputEvent, newStartValue); + } + + bool IsLocked() + { + if (!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly()) + return true; + + return targets.OfType().Any(t => t.clip.parentTrack != null && t.clip.parentTrack.lockedInHierarchy); + } + + static bool IsCurrentSequenceReadOnly() + { + return TimelineWindow.instance.state.editSequence.isReadOnly; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspector.cs.meta new file mode 100644 index 0000000..165a3ea --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dff73c4907c95264c8fc095a81f9d51e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorCurveEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorCurveEditor.cs new file mode 100644 index 0000000..e4c5ca5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorCurveEditor.cs @@ -0,0 +1,348 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditorInternal; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class ClipInspectorCurveEditor + { + CurveEditor m_CurveEditor; + + AnimationCurve[] m_Curves; + CurveWrapper[] m_CurveWrappers; + + const float k_HeaderHeight = 30; + const float k_PresetHeight = 30; + + Action m_CurveUpdatedCallback; + GUIContent m_TextContent = new GUIContent(); + + GUIStyle m_LabelStyle; + GUIStyle m_LegendStyle; + + // Track time. controls the position of the track head + public static readonly double kDisableTrackTime = double.NaN; + double m_trackTime = kDisableTrackTime; + public double trackTime { get { return m_trackTime; } set { m_trackTime = value; } } + + public string headerString { get; set; } + + public ClipInspectorCurveEditor() + { + var curveEditorSettings = new CurveEditorSettings + { + allowDeleteLastKeyInCurve = false, + allowDraggingCurvesAndRegions = true, + hTickLabelOffset = 0.1f, + showAxisLabels = true, + useFocusColors = false, + wrapColor = new EditorGUIUtility.SkinnedColor(Color.black), + hSlider = false, + hRangeMin = 0.0f, + vRangeMin = 0.0F, + vRangeMax = 1.0f, + hRangeMax = 1.0F, + vSlider = false, + hRangeLocked = false, + vRangeLocked = false, + + hTickStyle = new TickStyle + { + tickColor = new EditorGUIUtility.SkinnedColor(new Color(0.0f, 0.0f, 0.0f, 0.2f)), + distLabel = 30, + stubs = false, + centerLabel = true + }, + + vTickStyle = new TickStyle + { + tickColor = new EditorGUIUtility.SkinnedColor(new Color(1.0f, 0.0f, 0.0f, 0.2f)), + distLabel = 20, + stubs = false, + centerLabel = true + } + }; + + m_CurveEditor = new CurveEditor(new Rect(0, 0, 1000, 100), new CurveWrapper[0], true) + { + settings = curveEditorSettings, + ignoreScrollWheelUntilClicked = true + }; + } + + internal bool InitStyles() + { + if (EditorStyles.s_Current == null) + return false; + + if (m_LabelStyle == null) + { + m_LabelStyle = new GUIStyle(EditorStyles.whiteLargeLabel); + m_LegendStyle = new GUIStyle(EditorStyles.miniBoldLabel); + + m_LabelStyle.alignment = TextAnchor.MiddleCenter; + m_LegendStyle.alignment = TextAnchor.MiddleCenter; + } + return true; + } + + internal void OnGUI(Rect clientRect, CurvePresetLibrary presets) + { + const float presetPad = 30.0f; + + if (!InitStyles()) + return; + + if (m_Curves == null || m_Curves.Length == 0) + return; + + // regions + var headerRect = new Rect(clientRect.x, clientRect.y, clientRect.width, k_HeaderHeight); + var curveRect = new Rect(clientRect.x, clientRect.y + headerRect.height, clientRect.width, clientRect.height - k_HeaderHeight - k_PresetHeight); + var presetRect = new Rect(clientRect.x + presetPad, clientRect.y + curveRect.height + k_HeaderHeight, clientRect.width - presetPad, k_PresetHeight); + + GUI.Box(headerRect, headerString, m_LabelStyle); + + //Case 1201474 : Force to update only when Repaint event is called as the new rect provided on other event create a wrong curve editor computation. + if (Event.current.type == EventType.Repaint) + { + m_CurveEditor.rect = curveRect; + m_CurveEditor.shownAreaInsideMargins = new Rect(0, 0, 1, 1); + } + m_CurveEditor.animationCurves = m_CurveWrappers; + UpdateSelectionColors(); + + DrawTrackHead(curveRect); + + EditorGUI.BeginChangeCheck(); + + m_CurveEditor.OnGUI(); + DrawPresets(presetRect, presets); + + bool hasChanged = EditorGUI.EndChangeCheck(); + + if (presets == null) + DrawLegend(presetRect); + + if (hasChanged) + ProcessUpdates(); + } + + void DrawPresets(Rect position, PresetLibrary curveLibrary) + { + if (curveLibrary == null || curveLibrary.Count() == 0) + return; + + const int maxNumPresets = 9; + int numPresets = curveLibrary.Count(); + int showNumPresets = Mathf.Min(numPresets, maxNumPresets); + + const float swatchWidth = 30; + const float swatchHeight = 15; + const float spaceBetweenSwatches = 10; + float presetButtonsWidth = showNumPresets * swatchWidth + (showNumPresets - 1) * spaceBetweenSwatches; + float flexWidth = (position.width - presetButtonsWidth) * 0.5f; + + // Preset swatch area + float curY = (position.height - swatchHeight) * 0.5f; + float curX = 3.0f; + if (flexWidth > 0) + curX = flexWidth; + + GUI.BeginGroup(position); + + for (int i = 0; i < showNumPresets; i++) + { + if (i > 0) + curX += spaceBetweenSwatches; + + var swatchRect = new Rect(curX, curY, swatchWidth, swatchHeight); + m_TextContent.tooltip = curveLibrary.GetName(i); + if (GUI.Button(swatchRect, m_TextContent, GUIStyle.none)) + { + // if there is only 1, no need to specify + IEnumerable wrappers = m_CurveWrappers; + if (m_CurveWrappers.Length > 1) + wrappers = m_CurveWrappers.Where(x => x.selected == CurveWrapper.SelectionMode.Selected); + + foreach (var wrapper in wrappers) + { + var presetCurve = (AnimationCurve)curveLibrary.GetPreset(i); + wrapper.curve.keys = (Keyframe[])presetCurve.keys.Clone(); + wrapper.changed = true; + } + } + + if (Event.current.type == EventType.Repaint) + curveLibrary.Draw(swatchRect, i); + + curX += swatchWidth; + } + + GUI.EndGroup(); + } + + // draw a line representing where in the current clip we are + void DrawTrackHead(Rect clientRect) + { + DirectorStyles styles = TimelineWindow.styles; + if (styles == null) + return; + + if (!double.IsNaN(m_trackTime)) + { + float x = m_CurveEditor.TimeToPixel((float)m_trackTime, clientRect); + x = Mathf.Clamp(x, clientRect.xMin, clientRect.xMax); + var p1 = new Vector2(x, clientRect.yMin); + var p2 = new Vector2(x, clientRect.yMax); + Graphics.DrawLine(p1, p2, DirectorStyles.Instance.customSkin.colorPlayhead); + } + } + + // Draws a legend for the displayed curves + void DrawLegend(Rect r) + { + if (m_CurveWrappers == null || m_CurveWrappers.Length == 0) + return; + + Color c = GUI.color; + float boxWidth = r.width / m_CurveWrappers.Length; + for (int i = 0; i < m_CurveWrappers.Length; i++) + { + CurveWrapper cw = m_CurveWrappers[i]; + if (cw != null) + { + var pos = new Rect(r.x + i * boxWidth, r.y, boxWidth, r.height); + var textColor = cw.color; + textColor.a = 1; + GUI.color = textColor; + string name = LabelName(cw.binding.propertyName); + EditorGUI.LabelField(pos, name, m_LegendStyle); + } + } + GUI.color = c; + } + + // Helper for making label name appropriately small + static char[] s_LabelMarkers = { '_' }; + + static string LabelName(string propertyName) + { + propertyName = AnimationWindowUtility.GetPropertyDisplayName(propertyName); + int index = propertyName.LastIndexOfAny(s_LabelMarkers); + if (index >= 0) + propertyName = propertyName.Substring(index); + return propertyName; + } + + public void SetCurves(AnimationCurve[] curves, EditorCurveBinding[] bindings) + { + m_Curves = curves; + if (m_Curves != null && m_Curves.Length > 0) + { + m_CurveWrappers = new CurveWrapper[m_Curves.Length]; + for (int i = 0; i < m_Curves.Length; i++) + { + var cw = new CurveWrapper + { + renderer = new NormalCurveRenderer(m_Curves[i]), + readOnly = false, + color = EditorGUI.kCurveColor, + id = curves[i].GetHashCode(), + hidden = false, + regionId = -1 + }; + + cw.renderer.SetWrap(WrapMode.Clamp, WrapMode.Clamp); + cw.renderer.SetCustomRange(0, 1); + + if (bindings != null) + { + cw.binding = bindings[i]; + cw.color = CurveUtility.GetPropertyColor(bindings[i].propertyName); + cw.id = bindings[i].GetHashCode(); + } + + m_CurveWrappers[i] = cw; + } + + UpdateSelectionColors(); + m_CurveEditor.animationCurves = m_CurveWrappers; + } + } + + internal void SetUpdateCurveCallback(Action callback) + { + m_CurveUpdatedCallback = callback; + } + + void ProcessUpdates() + { + foreach (var cw in m_CurveWrappers) + { + if (cw.changed) + { + cw.changed = false; + + if (m_CurveUpdatedCallback != null) + m_CurveUpdatedCallback(cw.curve, cw.binding); + } + } + } + + public void SetSelected(AnimationCurve curve) + { + m_CurveEditor.SelectNone(); + for (int i = 0; i < m_Curves.Length; i++) + { + if (curve == m_Curves[i]) + { + m_CurveWrappers[i].selected = CurveWrapper.SelectionMode.Selected; + m_CurveEditor.AddSelection(new CurveSelection(m_CurveWrappers[i].id, 0)); + } + } + + UpdateSelectionColors(); + } + + void UpdateSelectionColors() + { + if (m_CurveWrappers == null) + return; + + // manually manage selection colors + foreach (var cw in m_CurveWrappers) + { + Color c = cw.color; + if (cw.readOnly) + c.a = 0.75f; + else if (cw.selected != CurveWrapper.SelectionMode.None) + c.a = 1.0f; + else + c.a = 0.5f; + cw.color = c; + } + } + + public static void CurveField(GUIContent title, SerializedProperty property, Action onClick) + { + Rect controlRect = EditorGUILayout.GetControlRect(GUILayout.MinWidth(20)); + EditorGUI.BeginProperty(controlRect, title, property); + DrawCurve(controlRect, property, onClick, EditorGUI.kCurveColor, EditorGUI.kCurveBGColor); + EditorGUI.EndProperty(); + } + + static Rect DrawCurve(Rect controlRect, SerializedProperty property, Action onClick, Color fgColor, Color bgColor) + { + if (GUI.Button(controlRect, GUIContent.none)) + { + if (onClick != null) + onClick(property); + } + EditorGUIUtility.DrawCurveSwatch(controlRect, null, property, fgColor, bgColor); + return controlRect; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorCurveEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorCurveEditor.cs.meta new file mode 100644 index 0000000..1d16576 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorCurveEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d3d14fa8f6934e14d92e37279e40e89b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorSelectionInfo.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorSelectionInfo.cs new file mode 100644 index 0000000..7c2d088 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorSelectionInfo.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class ClipInspectorSelectionInfo + { + public double start, end, duration; + public double multipleClipStart, multipleClipEnd; + public double smallestDuration; + + public bool hasMultipleStartValues, hasMultipleEndValues, hasMultipleDurationValues; + public bool supportsExtrapolation, supportsClipIn, supportsSpeedMultiplier, supportsBlending; + public bool hasBlendIn, hasBlendOut; + public bool selectedAssetTypesAreHomogeneous; + public bool containsAtLeastTwoClipsOnTheSameTrack; + + public HashSet uniqueParentTracks = new HashSet(); + public ICollection clips { get; private set; } + + public ClipInspectorSelectionInfo(ICollection selectedClips) + { + supportsBlending = supportsClipIn = supportsExtrapolation = supportsSpeedMultiplier = true; + hasBlendIn = hasBlendOut = true; + selectedAssetTypesAreHomogeneous = true; + smallestDuration = TimelineClip.kMaxTimeValue; + start = end = duration = 0; + multipleClipStart = multipleClipEnd = 0; + hasMultipleStartValues = hasMultipleEndValues = hasMultipleDurationValues = false; + containsAtLeastTwoClipsOnTheSameTrack = false; + + clips = selectedClips; + Build(); + } + + void Build() + { + if (!clips.Any()) return; + + var firstSelectedClip = clips.First(); + if (firstSelectedClip == null) return; + + var firstSelectedClipAssetType = firstSelectedClip.asset != null ? firstSelectedClip.asset.GetType() : null; + + smallestDuration = TimelineClip.kMaxTimeValue; + InitSelectionBounds(firstSelectedClip); + InitMultipleClipBounds(firstSelectedClip); + + foreach (var clip in clips) + { + if (clip == null) continue; + + uniqueParentTracks.Add(clip.parentTrack); + selectedAssetTypesAreHomogeneous &= clip.asset.GetType() == firstSelectedClipAssetType; + + UpdateClipCaps(clip); + UpdateBlends(clip); + UpdateSmallestDuration(clip); + UpdateMultipleValues(clip); + UpdateMultipleValues(clip); + } + containsAtLeastTwoClipsOnTheSameTrack = uniqueParentTracks.Count != clips.Count; + } + + public void Update() + { + var firstSelectedClip = clips.First(); + if (firstSelectedClip == null) return; + + hasBlendIn = hasBlendOut = true; + hasMultipleStartValues = hasMultipleDurationValues = hasMultipleEndValues = false; + smallestDuration = TimelineClip.kMaxTimeValue; + InitSelectionBounds(firstSelectedClip); + InitMultipleClipBounds(firstSelectedClip); + + foreach (var clip in clips) + { + if (clip == null) continue; + + UpdateBlends(clip); + UpdateSmallestDuration(clip); + UpdateMultipleValues(clip); + } + } + + void InitSelectionBounds(TimelineClip clip) + { + start = clip.start; + duration = clip.duration; + end = clip.start + clip.duration; + } + + void InitMultipleClipBounds(TimelineClip firstSelectedClip) + { + multipleClipStart = firstSelectedClip.start; + multipleClipEnd = end; + } + + void UpdateSmallestDuration(TimelineClip clip) + { + smallestDuration = Math.Min(smallestDuration, clip.duration); + } + + void UpdateClipCaps(TimelineClip clip) + { + supportsBlending &= clip.SupportsBlending(); + supportsClipIn &= clip.SupportsClipIn(); + supportsExtrapolation &= clip.SupportsExtrapolation(); + supportsSpeedMultiplier &= clip.SupportsSpeedMultiplier(); + } + + void UpdateMultipleValues(TimelineClip clip) + { + hasMultipleStartValues |= !Mathf.Approximately((float)clip.start, (float)start); + hasMultipleDurationValues |= !Mathf.Approximately((float)clip.duration, (float)duration); + var clipEnd = clip.start + clip.duration; + hasMultipleEndValues |= !Mathf.Approximately((float)clipEnd, (float)end); + + multipleClipStart = Math.Min(multipleClipStart, clip.start); + multipleClipEnd = Math.Max(multipleClipEnd, clip.end); + } + + void UpdateBlends(TimelineClip clip) + { + hasBlendIn &= clip.hasBlendIn; + hasBlendOut &= clip.hasBlendOut; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorSelectionInfo.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorSelectionInfo.cs.meta new file mode 100644 index 0000000..bd8f85e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/ClipInspector/ClipInspectorSelectionInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 57a39be2178cca94ab21e15c082e3ab6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner.meta new file mode 100644 index 0000000..309cb0a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86cacab070a0a46e99aedb596a32c4fe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/CurvesOwnerInspectorHelper.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/CurvesOwnerInspectorHelper.cs new file mode 100644 index 0000000..c5c4405 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/CurvesOwnerInspectorHelper.cs @@ -0,0 +1,109 @@ +using System; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + static class CurvesOwnerInspectorHelper + { + // Because what is animated is not the asset, but the instanced playable, + // we apply the animation clip here to preview what is being shown + // This could be improved doing something more inline with animation mode, + // and reverting values that aren't be recorded later to avoid dirtying the asset + public static void PreparePlayableAsset(ICurvesOwnerInspectorWrapper wrapper) + { + if (Event.current.type != EventType.Repaint) + return; + + if (wrapper.serializedPlayableAsset == null) + return; + + var curvesOwner = wrapper.curvesOwner; + if (curvesOwner == null || curvesOwner.curves == null) + return; + + var timelineWindow = TimelineWindow.instance; + if (timelineWindow == null || timelineWindow.state == null) + return; + + // requires preview mode. reset the eval time so previous value is correct value is displayed while toggling + if (!timelineWindow.state.previewMode) + { + wrapper.lastEvalTime = -1; + return; + } + + var time = wrapper.ToLocalTime(timelineWindow.state.editSequence.time); + + // detect if the time has changed, or if the curves have changed + if (Math.Abs(wrapper.lastEvalTime - time) < TimeUtility.kTimeEpsilon) + { + int curveVersion = AnimationClipCurveCache.Instance.GetCurveInfo(curvesOwner.curves).version; + if (curveVersion == wrapper.lastCurveVersion) + return; + + wrapper.lastCurveVersion = curveVersion; + } + + wrapper.lastEvalTime = time; + + var clipInfo = AnimationClipCurveCache.Instance.GetCurveInfo(curvesOwner.curves); + int count = clipInfo.bindings.Length; + if (count == 0) + return; + + wrapper.serializedPlayableAsset.Update(); + + var prop = wrapper.serializedPlayableAsset.GetIterator(); + while (prop.NextVisible(true)) + { + if (curvesOwner.IsParameterAnimated(prop.propertyPath)) + { + var curve = curvesOwner.GetAnimatedParameter(prop.propertyPath); + switch (prop.propertyType) + { + case SerializedPropertyType.Boolean: + prop.boolValue = curve.Evaluate((float)time) > 0; + break; + case SerializedPropertyType.Float: + prop.floatValue = curve.Evaluate((float)time); + break; + case SerializedPropertyType.Integer: + prop.intValue = Mathf.FloorToInt(curve.Evaluate((float)time)); + break; + case SerializedPropertyType.Color: + SetAnimatedValue(curvesOwner, prop, "r", time); + SetAnimatedValue(curvesOwner, prop, "g", time); + SetAnimatedValue(curvesOwner, prop, "b", time); + SetAnimatedValue(curvesOwner, prop, "a", time); + break; + case SerializedPropertyType.Quaternion: + case SerializedPropertyType.Vector4: + SetAnimatedValue(curvesOwner, prop, "w", time); + goto case SerializedPropertyType.Vector3; + case SerializedPropertyType.Vector3: + SetAnimatedValue(curvesOwner, prop, "z", time); + goto case SerializedPropertyType.Vector2; + case SerializedPropertyType.Vector2: + SetAnimatedValue(curvesOwner, prop, "x", time); + SetAnimatedValue(curvesOwner, prop, "y", time); + break; + } + } + } + + wrapper.serializedPlayableAsset.ApplyModifiedPropertiesWithoutUndo(); + } + + static void SetAnimatedValue(ICurvesOwner clip, SerializedProperty property, string path, double localTime) + { + var prop = property.FindPropertyRelative(path); + if (prop != null) + { + var curve = clip.GetAnimatedParameter(prop.propertyPath); + if (curve != null) + prop.floatValue = curve.Evaluate((float)localTime); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/CurvesOwnerInspectorHelper.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/CurvesOwnerInspectorHelper.cs.meta new file mode 100644 index 0000000..17e8bb3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/CurvesOwnerInspectorHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9a371bcbba2084dd0a8ebc6826aa8794 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/ICurvesOwnerInspectorWrapper.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/ICurvesOwnerInspectorWrapper.cs new file mode 100644 index 0000000..0ce6f58 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/ICurvesOwnerInspectorWrapper.cs @@ -0,0 +1,14 @@ +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + interface ICurvesOwnerInspectorWrapper + { + ICurvesOwner curvesOwner { get; } + SerializedObject serializedPlayableAsset { get; } + int lastCurveVersion { get; set; } + double lastEvalTime { get; set; } + + double ToLocalTime(double time); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/ICurvesOwnerInspectorWrapper.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/ICurvesOwnerInspectorWrapper.cs.meta new file mode 100644 index 0000000..746e970 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/CurvesOwner/ICurvesOwnerInspectorWrapper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 926a61ff0dec44a5aab649acb411e9ad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/DirectorNamedColorInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/DirectorNamedColorInspector.cs new file mode 100644 index 0000000..5646870 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/DirectorNamedColorInspector.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + /// + /// Internally used Inspector + /// + [CustomEditor(typeof(DirectorNamedColor))] + class DirectorNamedColorInspector : Editor + { + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + if (GUILayout.Button("ToTextAsset")) + { + DirectorStyles.Instance.ExportSkinToFile(); + } + + if (GUILayout.Button("Reload From File")) + { + DirectorStyles.Instance.ReloadSkin(); + UnityEditor.Selection.activeObject = DirectorStyles.Instance.customSkin; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/DirectorNamedColorInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/DirectorNamedColorInspector.cs.meta new file mode 100644 index 0000000..250f3d4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/DirectorNamedColorInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c8ceb9efacb4974bb3b7e2a87137b07 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClip.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClip.cs new file mode 100644 index 0000000..edd3d9d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClip.cs @@ -0,0 +1,24 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [ExcludeFromPreset] + class EditorClip : ScriptableObject + { + [SerializeField] TimelineClip m_Clip; + + public TimelineClip clip + { + get { return m_Clip; } + set { m_Clip = value; } + } + + public int lastHash { get; set; } + + public override int GetHashCode() + { + return clip.Hash(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClip.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClip.cs.meta new file mode 100644 index 0000000..1887ce2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 197c1114eb793d24c8ef31120a134e88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClipFactory.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClipFactory.cs new file mode 100644 index 0000000..d065b37 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClipFactory.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Timeline; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + static class EditorClipFactory + { + static Dictionary s_EditorCache = new Dictionary(); + + public static EditorClip GetEditorClip(TimelineClip clip) + { + if (clip == null) + throw new ArgumentException("parameter cannot be null"); + + if (s_EditorCache.ContainsKey(clip)) + { + var editorClip = s_EditorCache[clip]; + if (editorClip != null) + return editorClip; + } + + var editor = ScriptableObject.CreateInstance(); + editor.hideFlags |= HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor; + editor.lastHash = -1; + editor.clip = clip; + s_EditorCache[clip] = editor; + + return editor; + } + + public static void RemoveEditorClip(TimelineClip clip) + { + if (clip == null) + return; + + if (s_EditorCache.ContainsKey(clip)) + { + var obj = s_EditorCache[clip]; + if (obj != null) + UnityObject.DestroyImmediate(obj); + s_EditorCache.Remove(clip); + } + } + + public static bool Contains(TimelineClip clip) + { + return clip != null && s_EditorCache.ContainsKey(clip); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClipFactory.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClipFactory.cs.meta new file mode 100644 index 0000000..3681c42 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/EditorClipFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f6ba30c492ac73742bc0cfee6817045a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/GroupTrackInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/GroupTrackInspector.cs new file mode 100644 index 0000000..5791e51 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/GroupTrackInspector.cs @@ -0,0 +1,107 @@ +//#define PERF_PROFILE + +using System.Linq; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomEditor(typeof(GroupTrack)), CanEditMultipleObjects] + class GroupTrackInspector : TrackAssetInspector + { + static class Styles + { + public static readonly GUIContent GroupSubTrackHeaderName = EditorGUIUtility.TrTextContent("Name"); + public static readonly GUIContent GroupSubTrackHeaderType = EditorGUIUtility.TrTextContent("Type"); + public static readonly GUIContent GroupSubTrackHeaderDuration = EditorGUIUtility.TrTextContent("Duration"); + public static readonly GUIContent GroupSubTrackHeaderFrames = EditorGUIUtility.TrTextContent("Frames"); + public static readonly GUIContent GroupInvalidTrack = EditorGUIUtility.TrTextContent("Invalid Track"); + } + + ReorderableList m_SubTracks; + + public override void OnInspectorGUI() + { + foreach (var group in targets) + { + var groupTrack = group as GroupTrack; + if (groupTrack == null) return; + + var childrenTracks = groupTrack.GetChildTracks(); + var groupTrackName = groupTrack.name; + + GUILayout.Label(childrenTracks.Count() > 0 + ? groupTrackName + " (" + childrenTracks.Count() + ")" + : groupTrackName, EditorStyles.boldLabel); + GUILayout.Space(3.0f); + + // the subTrackObjects is used because it's the internal list + m_SubTracks.list = groupTrack.subTracksObjects; + m_SubTracks.DoLayoutList(); + m_SubTracks.index = -1; + } + } + + public override void OnEnable() + { + base.OnEnable(); + + m_SubTracks = new ReorderableList(new string[] {}, typeof(string), false, true, false, false) + { + drawElementCallback = OnDrawSubTrack, + drawHeaderCallback = OnDrawHeader, + showDefaultBackground = true, + index = 0, + elementHeight = 20 + }; + } + + static void OnDrawHeader(Rect rect) + { + int sections = 4; + float sectionWidth = rect.width / sections; + + rect.width = sectionWidth; + GUI.Label(rect, Styles.GroupSubTrackHeaderName, EditorStyles.label); + rect.x += sectionWidth; + GUI.Label(rect, Styles.GroupSubTrackHeaderType, EditorStyles.label); + rect.x += sectionWidth; + GUI.Label(rect, Styles.GroupSubTrackHeaderDuration, EditorStyles.label); + rect.x += sectionWidth; + GUI.Label(rect, Styles.GroupSubTrackHeaderFrames, EditorStyles.label); + } + + void OnDrawSubTrack(Rect rect, int index, bool selected, bool focused) + { + int sections = 4; + float sectionWidth = rect.width / sections; + + var childrenTrack = m_SubTracks.list[index] as TrackAsset; + if (childrenTrack == null) + { + object o = m_SubTracks.list[index]; + rect.width = sectionWidth; + if (o != null) // track is loaded, but has broken script + { + string name = ((UnityEngine.Object)m_SubTracks.list[index]).name; + GUI.Label(rect, name, EditorStyles.label); + } + rect.x += sectionWidth; + using (new GUIColorOverride(DirectorStyles.kClipErrorColor)) + GUI.Label(rect, Styles.GroupInvalidTrack.text, EditorStyles.label); + return; + } + + rect.width = sectionWidth; + GUI.Label(rect, childrenTrack.name, EditorStyles.label); + rect.x += sectionWidth; + GUI.Label(rect, childrenTrack.GetType().Name, EditorStyles.label); + rect.x += sectionWidth; + GUI.Label(rect, childrenTrack.duration.ToString(), EditorStyles.label); + rect.x += sectionWidth; + double exactFrames = TimeUtility.ToExactFrames(childrenTrack.duration, TimelineWindow.instance.state.referenceSequence.frameRate); + GUI.Label(rect, exactFrames.ToString(), EditorStyles.label); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/GroupTrackInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/GroupTrackInspector.cs.meta new file mode 100644 index 0000000..2730aef --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/GroupTrackInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 41dcdc094b311464c8d6cb614548d89b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/MarkerInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/MarkerInspector.cs new file mode 100644 index 0000000..e8dea73 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/MarkerInspector.cs @@ -0,0 +1,69 @@ +using System; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomEditor(typeof(Marker), true)] + [CanEditMultipleObjects] + class MarkerInspector : BasicAssetInspector + { + static class Styles + { + public static readonly string MultipleMarkerSelectionTitle = L10n.Tr("{0} Markers"); + public static readonly string UndoCommand = L10n.Tr("Rename marker"); + } + + internal override bool IsEnabled() + { + if (!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly()) + return false; + var marker = target as Marker; + if (marker != null) + { + if (!marker.parent.GetShowMarkers()) + return false; + } + return base.IsEnabled(); + } + + internal override void OnHeaderTitleGUI(Rect titleRect, string header) + { + if (targets.Length > 1) + { + var multiSelectTitle = string.Format(Styles.MultipleMarkerSelectionTitle, targets.Length); + base.OnHeaderTitleGUI(titleRect, multiSelectTitle); + return; + } + + var marker = target as Marker; + if (marker != null) + { + if (marker.parent.GetShowMarkers() && TimelineUtility.IsCurrentSequenceValid() && !IsCurrentSequenceReadOnly()) + { + EditorGUI.BeginChangeCheck(); + var newName = EditorGUI.DelayedTextField(titleRect, marker.name); + if (EditorGUI.EndChangeCheck()) + { + TimelineUndo.PushUndo(marker, Styles.UndoCommand); + marker.name = newName; + } + } + else + { + base.OnHeaderTitleGUI(titleRect, marker.name); + } + } + else + { + var typeName = TypeUtility.GetDisplayName(target.GetType()); + EditorGUILayout.LabelField(typeName); + } + } + + static bool IsCurrentSequenceReadOnly() + { + return TimelineWindow.instance.state.editSequence.isReadOnly; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/MarkerInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/MarkerInspector.cs.meta new file mode 100644 index 0000000..9f6e901 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/MarkerInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fb461734117c80c43ab595d699f801eb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimeFieldDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimeFieldDrawer.cs new file mode 100644 index 0000000..622f5b4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimeFieldDrawer.cs @@ -0,0 +1,69 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomPropertyDrawer(typeof(TimeFieldAttribute), true)] + class TimeFieldDrawer : PropertyDrawer + { + static WindowState state + { + get { return TimelineWindow.instance != null ? TimelineWindow.instance.state : null; } + } + + static float currentFrameRate + { + get { return state != null ? TimelineWindow.instance.state.referenceSequence.frameRate : 0.0f; } + } + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + if (property.propertyType != SerializedPropertyType.Float) + { + GUILayout.Label("TimeField only works on floating point types"); + return; + } + + var timeFieldAttribute = attribute as TimeFieldAttribute; + if (timeFieldAttribute == null) + return; + + var rect = EditorGUILayout.s_LastRect; + EditorGUI.BeginChangeCheck(); + + if (timeFieldAttribute.useEditMode == TimeFieldAttribute.UseEditMode.ApplyEditMode) + TimeFieldWithEditMode(rect, property, label); + else + TimeField(rect, property, label); + + if (EditorGUI.EndChangeCheck()) + { + if (state != null) + state.Refresh(); + } + } + + static void TimeField(Rect rect, SerializedProperty property, GUIContent label) + { + var evt1 = InputEvent.None; + TimelineInspectorUtility.TimeField(rect, property, label, false, currentFrameRate, 0, float.MaxValue, ref evt1); + } + + static void TimeFieldWithEditMode(Rect rect, SerializedProperty property, GUIContent label) + { + double minStartTime; + if (property.hasMultipleDifferentValues) + minStartTime = SelectionManager.SelectedItems().Min(i => i.start); + else + minStartTime = property.doubleValue; + + var evt = InputEvent.None; + var newValue = TimelineInspectorUtility.TimeField( + rect, label, minStartTime, false, property.hasMultipleDifferentValues, currentFrameRate, 0.0, float.MaxValue, ref evt); + + EditMode.inputHandler.ProcessMove(evt, newValue); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimeFieldDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimeFieldDrawer.cs.meta new file mode 100644 index 0000000..89749e8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimeFieldDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b0c73ea1c5ff95e43806e9002c155070 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs new file mode 100644 index 0000000..9229464 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs @@ -0,0 +1,78 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomEditor(typeof(TimelineAsset)), CanEditMultipleObjects] + class TimelineAssetInspector : Editor + { + static class Styles + { + public static readonly GUIContent FrameRate = EditorGUIUtility.TrTextContent("Frame Rate", "The frame rate at which this sequence updates"); + public static readonly GUIContent DurationMode = EditorGUIUtility.TrTextContent("Duration Mode", "Specified how the duration of the sequence is calculated"); + public static readonly GUIContent Duration = EditorGUIUtility.TrTextContent("Duration", "The length of the sequence"); + public static readonly GUIContent HeaderTitleMultiselection = EditorGUIUtility.TrTextContent("Timeline Assets"); + } + + SerializedProperty m_FrameRateProperty; + SerializedProperty m_DurationModeProperty; + SerializedProperty m_FixedDurationProperty; + + void InitializeProperties() + { + m_FrameRateProperty = serializedObject.FindProperty("m_EditorSettings").FindPropertyRelative("m_Framerate"); + m_DurationModeProperty = serializedObject.FindProperty("m_DurationMode"); + m_FixedDurationProperty = serializedObject.FindProperty("m_FixedDuration"); + } + + public void OnEnable() + { + InitializeProperties(); + } + + internal override bool IsEnabled() + { + return !FileUtil.HasReadOnly(targets) && base.IsEnabled(); + } + + protected override void OnHeaderGUI() + { + string headerTitle; + if (targets.Length == 1) + headerTitle = target.name; + else + headerTitle = targets.Length.ToString() + " " + Styles.HeaderTitleMultiselection.text; + + DrawHeaderGUI(this, headerTitle, 0); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUI.BeginChangeCheck(); + + EditorGUILayout.PropertyField(m_FrameRateProperty, Styles.FrameRate, GUILayout.MinWidth(140)); + var frameRate = m_FrameRateProperty.doubleValue; + + EditorGUILayout.PropertyField(m_DurationModeProperty, Styles.DurationMode, GUILayout.MinWidth(140)); + + var durationMode = (TimelineAsset.DurationMode)m_DurationModeProperty.enumValueIndex; + var inputEvent = InputEvent.None; + if (durationMode == TimelineAsset.DurationMode.FixedLength) + TimelineInspectorUtility.TimeField(m_FixedDurationProperty, Styles.Duration, false, frameRate, double.Epsilon, TimelineClip.kMaxTimeValue * 2, ref inputEvent); + else + { + var isMixed = targets.Length > 1; + TimelineInspectorUtility.TimeField(Styles.Duration, ((TimelineAsset)target).duration, true, isMixed, frameRate, double.MinValue, double.MaxValue, ref inputEvent); + } + + bool changed = EditorGUI.EndChangeCheck(); + + serializedObject.ApplyModifiedProperties(); + + if (changed) + TimelineWindow.RepaintIfEditingTimelineAsset((TimelineAsset)target); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs.meta new file mode 100644 index 0000000..1ba0620 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineAssetInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e00a5dea786950546a21b0e2d817e466 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineInspectorUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineInspectorUtility.cs new file mode 100644 index 0000000..f1c9d4a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineInspectorUtility.cs @@ -0,0 +1,353 @@ +using System; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [Flags] + enum InputEvent + { + None = 0, + DragEnter = 1, + DragExit = 2, + Drag = 4, + KeyboardInput = 8 + } + + static class InputEventMethods + { + public static bool InputHasBegun(this InputEvent evt) + { + return evt == InputEvent.DragEnter || evt == InputEvent.KeyboardInput; + } + } + + static class TimelineInspectorUtility + { + internal static class Styles + { + public static readonly GUIContent SecondsPrefix = EditorGUIUtility.TrTextContent("s", "Seconds"); + public static readonly GUIContent FramesPrefix = EditorGUIUtility.TrTextContent("f", "Frames"); + } + + public static void TimeField(SerializedProperty property, GUIContent label, bool readOnly, double frameRate, double minValue, double maxValue, ref InputEvent inputEvent) + { + var rect = EditorGUILayout.GetControlRect(); + TimeField(rect, property, label, readOnly, frameRate, minValue, maxValue, ref inputEvent); + } + + // Display Time related properties in frames and seconds + public static void TimeField(Rect rect, SerializedProperty property, GUIContent label, bool readOnly, double frameRate, double minValue, double maxValue, ref InputEvent inputEvent) + { + GUIContent title = EditorGUI.BeginProperty(rect, label, property); + rect = EditorGUI.PrefixLabel(rect, title); + + int indentLevel = EditorGUI.indentLevel; + float labelWidth = EditorGUIUtility.labelWidth; + EditorGUI.indentLevel = 0; + EditorGUIUtility.labelWidth = (int)EditorGUI.kMiniLabelW; + using (new GUIMixedValueScope(property.hasMultipleDifferentValues)) + { + var secondsRect = new Rect(rect.xMin, rect.yMin, rect.width / 2 - EditorGUI.kSpacingSubLabel, rect.height); + var framesRect = new Rect(rect.xMin + rect.width / 2, rect.yMin, rect.width / 2, rect.height); + + if (readOnly) + { + EditorGUI.FloatField(secondsRect, Styles.SecondsPrefix, (float)property.doubleValue, EditorStyles.label); + } + else + { + EditorGUI.BeginChangeCheck(); + DelayedAndDraggableDoubleField(secondsRect, Styles.SecondsPrefix, property, ref inputEvent); + if (EditorGUI.EndChangeCheck()) + { + property.doubleValue = Clamp(property.doubleValue, minValue, maxValue); + } + } + + if (frameRate > TimeUtility.kTimeEpsilon) + { + EditorGUI.BeginChangeCheck(); + + double time = property.doubleValue; + int frames = TimeUtility.ToFrames(time, frameRate); + double exactFrames = TimeUtility.ToExactFrames(time, frameRate); + bool useIntField = TimeUtility.OnFrameBoundary(time, frameRate); + + if (readOnly) + { + if (useIntField) + EditorGUI.IntField(framesRect, Styles.FramesPrefix, frames, EditorStyles.label); + else + EditorGUI.DoubleField(framesRect, Styles.FramesPrefix, exactFrames, EditorStyles.label); + } + else + { + if (useIntField) + { + int newFrames = DelayedAndDraggableIntField(framesRect, Styles.FramesPrefix, frames, ref inputEvent); + time = Math.Max(0, TimeUtility.FromFrames(newFrames, frameRate)); + } + else + { + double newExactFrames = DelayedAndDraggableDoubleField(framesRect, Styles.FramesPrefix, exactFrames, ref inputEvent); + time = Math.Max(0, TimeUtility.FromFrames((int)Math.Floor(newExactFrames), frameRate)); + } + } + + if (EditorGUI.EndChangeCheck()) + { + property.doubleValue = Clamp(time, minValue, maxValue); + } + } + + EditorGUI.indentLevel = indentLevel; + EditorGUIUtility.labelWidth = labelWidth; + EditorGUI.EndProperty(); + } + } + + public static double TimeFieldUsingTimeReference( + GUIContent label, double time, bool readOnly, bool showMixed, double frameRate, double minValue, + double maxValue, ref InputEvent inputEvent) + { + var state = TimelineWindow.instance.state; + var needsTimeConversion = state != null && state.timeReferenceMode == TimeReferenceMode.Global; + + if (needsTimeConversion) + time = state.editSequence.ToGlobalTime(time); + + var t = TimeField(label, time, readOnly, showMixed, frameRate, minValue, maxValue, ref inputEvent); + + if (needsTimeConversion) + t = state.editSequence.ToLocalTime(t); + + return t; + } + + public static double DurationFieldUsingTimeReference( + GUIContent label, double start, double end, bool readOnly, bool showMixed, double frameRate, + double minValue, double maxValue, ref InputEvent inputEvent) + { + var state = TimelineWindow.instance.state; + var needsTimeConversion = state != null && state.timeReferenceMode == TimeReferenceMode.Global; + + if (needsTimeConversion) + { + start = state.editSequence.ToGlobalTime(start); + end = state.editSequence.ToGlobalTime(end); + } + + var duration = end - start; + + var t = TimeField(label, duration, readOnly, showMixed, frameRate, minValue, maxValue, ref inputEvent); + + end = start + t; + + if (needsTimeConversion) + { + start = state.editSequence.ToLocalTime(start); + end = state.editSequence.ToLocalTime(end); + } + + return end - start; + } + + public static double TimeField(Rect rect, GUIContent label, double time, bool readOnly, bool showMixed, double frameRate, double minValue, double maxValue, ref InputEvent inputEvent) + { + EditorGUILayout.BeginHorizontal(label, GUIStyle.none); + rect = EditorGUI.PrefixLabel(rect, label); + + int indentLevel = EditorGUI.indentLevel; + float labelWidth = EditorGUIUtility.labelWidth; + EditorGUI.indentLevel = 0; + EditorGUIUtility.labelWidth = (int)EditorGUI.kMiniLabelW; + using (new GUIMixedValueScope(showMixed)) + { + var secondsRect = new Rect(rect.xMin, rect.yMin, rect.width / 2 - EditorGUI.kSpacingSubLabel, rect.height); + var framesRect = new Rect(rect.xMin + rect.width / 2, rect.yMin, rect.width / 2, rect.height); + + if (readOnly) + { + EditorGUI.FloatField(secondsRect, Styles.SecondsPrefix, (float)time, EditorStyles.label); + } + else + { + time = DelayedAndDraggableDoubleField(secondsRect, Styles.SecondsPrefix, time, ref inputEvent); + } + + if (frameRate > TimeUtility.kTimeEpsilon) + { + int frames = TimeUtility.ToFrames(time, frameRate); + double exactFrames = TimeUtility.ToExactFrames(time, frameRate); + bool useIntField = TimeUtility.OnFrameBoundary(time, frameRate); + if (readOnly) + { + if (useIntField) + EditorGUI.IntField(framesRect, Styles.FramesPrefix, frames, EditorStyles.label); + else + EditorGUI.FloatField(framesRect, Styles.FramesPrefix, (float)exactFrames, EditorStyles.label); + } + else + { + double newTime; + EditorGUI.BeginChangeCheck(); + if (useIntField) + { + int newFrames = DelayedAndDraggableIntField(framesRect, Styles.FramesPrefix, frames, ref inputEvent); + newTime = Math.Max(0, TimeUtility.FromFrames(newFrames, frameRate)); + } + else + { + double newExactFrames = DelayedAndDraggableDoubleField(framesRect, Styles.FramesPrefix, exactFrames, ref inputEvent); + newTime = Math.Max(0, TimeUtility.FromFrames((int)Math.Floor(newExactFrames), frameRate)); + } + + if (EditorGUI.EndChangeCheck()) + { + time = newTime; + } + } + } + + EditorGUILayout.EndHorizontal(); + EditorGUI.indentLevel = indentLevel; + EditorGUIUtility.labelWidth = labelWidth; + } + + return Clamp(time, minValue, maxValue); + } + + public static double TimeField(GUIContent label, double time, bool readOnly, bool showMixed, double frameRate, double minValue, double maxValue, ref InputEvent inputEvent) + { + var rect = EditorGUILayout.GetControlRect(); + return TimeField(rect, label, time, readOnly, showMixed, frameRate, minValue, maxValue, ref inputEvent); + } + + static InputEvent InputEventType(Rect rect, int id) + { + var evt = Event.current; + switch (evt.GetTypeForControl(id)) + { + case EventType.MouseDown: + if (rect.Contains(evt.mousePosition) && evt.button == 0) + { + return InputEvent.DragEnter; + } + break; + case EventType.MouseUp: + if (GUIUtility.hotControl == id) + { + return InputEvent.DragExit; + } + break; + case EventType.MouseDrag: + if (GUIUtility.hotControl == id) + { + return InputEvent.Drag; + } + break; + case EventType.KeyDown: + if (GUIUtility.hotControl == id && evt.keyCode == KeyCode.Escape) + { + return InputEvent.DragExit; + } + break; + } + return InputEvent.None; + } + + static double DelayedAndDraggableDoubleField(Rect rect, GUIContent label, double value, ref InputEvent inputEvent, double dragSensitivity) + { + var id = GUIUtility.GetControlID(FocusType.Keyboard); + var fieldRect = EditorGUI.PrefixLabel(rect, id, label); + rect.xMax = fieldRect.x; + + double refValue = value; + long dummy = 0; + + inputEvent |= InputEventType(rect, id); + + EditorGUI.DragNumberValue(rect, id, true, ref refValue, ref dummy, dragSensitivity); + + EditorGUI.BeginChangeCheck(); + var result = EditorGUI.DelayedDoubleFieldInternal(fieldRect, GUIContent.none, refValue, EditorStyles.numberField); + if (EditorGUI.EndChangeCheck()) + inputEvent |= InputEvent.KeyboardInput; + + return result; + } + + static int DelayedAndDraggableIntField(Rect rect, GUIContent label, int value, ref InputEvent inputEvent, long dragSensitivity) + { + var id = GUIUtility.GetControlID(FocusType.Keyboard); + var fieldRect = EditorGUI.PrefixLabel(rect, id, label); + rect.xMax = fieldRect.x; + + double dummy = 0.0; + long refValue = value; + + inputEvent |= InputEventType(rect, id); + + EditorGUI.DragNumberValue(rect, id, false, ref dummy, ref refValue, dragSensitivity); + + EditorGUI.BeginChangeCheck(); + var result = EditorGUI.DelayedIntFieldInternal(fieldRect, GUIContent.none, (int)refValue, EditorStyles.numberField); + if (EditorGUI.EndChangeCheck()) + inputEvent |= InputEvent.KeyboardInput; + + return result; + } + + internal static double DelayedAndDraggableDoubleField(GUIContent label, double value, ref InputEvent action, double dragSensitivity) + { + var r = EditorGUILayout.s_LastRect = EditorGUILayout.GetControlRect(false, EditorGUI.kSingleLineHeight); + return DelayedAndDraggableDoubleField(r, label, value, ref action, dragSensitivity); + } + + static void DelayedAndDraggableDoubleField(Rect rect, GUIContent label, SerializedProperty property, ref InputEvent inputEvent) + { + EditorGUI.BeginChangeCheck(); + var newValue = DelayedAndDraggableDoubleField(rect, label, property.doubleValue, ref inputEvent); + if (EditorGUI.EndChangeCheck()) + property.doubleValue = newValue; + } + + static double DelayedAndDraggableDoubleField(Rect rect, GUIContent label, double value, ref InputEvent inputEvent) + { + var dragSensitivity = NumericFieldDraggerUtility.CalculateFloatDragSensitivity(value); + return DelayedAndDraggableDoubleField(rect, label, value, ref inputEvent, dragSensitivity); + } + + static int DelayedAndDraggableIntField(Rect rect, GUIContent label, int value, ref InputEvent inputEvent) + { + var dragSensitivity = NumericFieldDraggerUtility.CalculateIntDragSensitivity(value); + return DelayedAndDraggableIntField(rect, label, value, ref inputEvent, dragSensitivity); + } + + internal static T Clamp(this T val, T min, T max) where T : IComparable + { + if (val.CompareTo(min) < 0) return min; + if (val.CompareTo(max) > 0) return max; + return val; + } + + public static Editor GetInspectorForObjects(UnityEngine.Object[] objects) + { + // create cached editor throws on assembly reload... + try + { + if (objects.Any(x => x != null)) + { + var director = TimelineWindow.instance.state.editSequence.director; + return Editor.CreateEditorWithContext(objects, director, null); + } + } + catch (Exception) + {} + + return null; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineInspectorUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineInspectorUtility.cs.meta new file mode 100644 index 0000000..808a29d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TimelineInspectorUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3387717991705ce4e8ef033a0e543a06 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TrackAssetInspector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TrackAssetInspector.cs new file mode 100644 index 0000000..91e83e1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TrackAssetInspector.cs @@ -0,0 +1,203 @@ +//#define PERF_PROFILE + +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomEditor(typeof(TrackAsset), true, isFallback = true)] + [CanEditMultipleObjects] + class TrackAssetInspector : Editor + { + class TrackCurvesWrapper : ICurvesOwnerInspectorWrapper + { + public ICurvesOwner curvesOwner { get; } + public SerializedObject serializedPlayableAsset { get; } + + public int lastCurveVersion { get; set; } + public double lastEvalTime { get; set; } + + public TrackCurvesWrapper(TrackAsset track) + { + lastCurveVersion = -1; + lastEvalTime = -1; + + if (track != null) + { + curvesOwner = track; + serializedPlayableAsset = new SerializedObject(track); + } + } + + public double ToLocalTime(double time) + { + return time; + } + } + + TrackCurvesWrapper m_TrackCurvesWrapper; + + SerializedProperty m_Name; + bool m_IsBuiltInType; + + Texture m_HeaderIcon; + + + protected TimelineWindow timelineWindow + { + get + { + return TimelineWindow.instance; + } + } + + protected bool IsTrackLocked() + { + if (!TimelineUtility.IsCurrentSequenceValid() || IsCurrentSequenceReadOnly()) + return true; + + return targets.Any(track => ((TrackAsset)track).lockedInHierarchy); + } + + public override void OnInspectorGUI() + { + using (new EditorGUI.DisabledScope(IsTrackLocked())) + { + DrawInspector(); + } + } + + internal override bool IsEnabled() + { + return TimelineUtility.IsCurrentSequenceValid() && !IsCurrentSequenceReadOnly() && base.IsEnabled(); + } + + internal override void OnHeaderTitleGUI(Rect titleRect, string header) + { + serializedObject.Update(); + + var textFieldRect = titleRect; + using (new GUIMixedValueScope(m_Name.hasMultipleDifferentValues)) + { + var seqWindow = TimelineWindow.instance; + + if (IsTrackLocked()) + { + base.OnHeaderTitleGUI(titleRect, m_Name.stringValue); + } + else + { + EditorGUI.BeginChangeCheck(); + string newName = EditorGUI.DelayedTextField(textFieldRect, m_Name.stringValue, EditorStyles.textField); + if (EditorGUI.EndChangeCheck() && !string.IsNullOrEmpty(newName)) + { + for (int c = 0; c < targets.Length; c++) + { + ObjectNames.SetNameSmart(targets[c], newName); + } + + if (seqWindow != null) + seqWindow.Repaint(); + } + + serializedObject.ApplyModifiedProperties(); + } + } + } + + internal override void OnHeaderIconGUI(Rect iconRect) + { + if (TimelineWindow.instance == null) + return; + using (new EditorGUI.DisabledScope(IsTrackLocked())) + { + if (m_HeaderIcon != null) + GUI.Label(iconRect, GUIContent.Temp(m_HeaderIcon)); + } + } + + internal override Rect DrawHeaderHelpAndSettingsGUI(Rect r) + { + using (new EditorGUI.DisabledScope(IsTrackLocked())) + { + var helpSize = EditorStyles.iconButton.CalcSize(EditorGUI.GUIContents.helpIcon); + const int kTopMargin = 5; + + // Show Editor Header Items. + return EditorGUIUtility.DrawEditorHeaderItems(new Rect(r.xMax - helpSize.x, r.y + kTopMargin, helpSize.x, helpSize.y), targets); + } + } + + public virtual void OnEnable() + { + m_IsBuiltInType = target != null && target.GetType().Assembly == typeof(TrackAsset).Assembly; + m_Name = serializedObject.FindProperty("m_Name"); + m_TrackCurvesWrapper = new TrackCurvesWrapper(target as TrackAsset); + m_HeaderIcon = TrackResourceCache.s_DefaultIcon.image; + + // only worry about the first track. if types are different, a different inspector is used. + var track = target as TrackAsset; + if (track != null) + { + var drawer = CustomTimelineEditorCache.GetTrackEditor(track); + UnityEngine.Object binding = null; + var director = m_Context as PlayableDirector; + if (director != null) + binding = director.GetGenericBinding(track); + + var options = drawer.GetTrackOptions(track, binding); + if (options.icon != null) + m_HeaderIcon = options.icon; + else + m_HeaderIcon = TrackResourceCache.GetTrackIcon(track).image; + } + } + + void DrawInspector() + { + if (serializedObject == null) + return; + + CurvesOwnerInspectorHelper.PreparePlayableAsset(m_TrackCurvesWrapper); + serializedObject.Update(); + + using (var changeScope = new EditorGUI.ChangeCheckScope()) + { + DrawTrackProperties(); + + if (changeScope.changed) + { + serializedObject.ApplyModifiedProperties(); + ApplyChanges(); + } + } + } + + protected virtual void DrawTrackProperties() + { + var property = serializedObject.GetIterator(); + var expanded = true; + while (property.NextVisible(expanded)) + { + // Don't draw script field for built-in types + if (m_IsBuiltInType && "m_Script" == property.propertyPath) + continue; + + EditorGUILayout.PropertyField(property, !expanded); + expanded = false; + } + } + + protected virtual void ApplyChanges() + { + TimelineEditor.Refresh(RefreshReason.ContentsModified); + } + + static bool IsCurrentSequenceReadOnly() + { + return TimelineWindow.instance.state.editSequence.isReadOnly; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TrackAssetInspector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TrackAssetInspector.cs.meta new file mode 100644 index 0000000..922b049 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/inspectors/TrackAssetInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8795e0dd0041d2f44b1fe1959fc9fb53 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview.meta new file mode 100644 index 0000000..dfb1cae --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ffcbe86028d681144b703991885c535a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/AnimationTrackKeyDataSource.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/AnimationTrackKeyDataSource.cs new file mode 100644 index 0000000..38c2f81 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/AnimationTrackKeyDataSource.cs @@ -0,0 +1,25 @@ +using UnityEngine; +using UnityEngine.Timeline; + +// Data sources for key overlays +namespace UnityEditor.Timeline +{ + // Used for key overlays manipulators + class AnimationTrackKeyDataSource : BasePropertyKeyDataSource + { + readonly float m_TrackOffset; + + protected override AnimationClip animationClip { get; } + + public AnimationTrackKeyDataSource(AnimationTrack track) + { + animationClip = track != null ? track.infiniteClip : null; + m_TrackOffset = track != null ? (float)track.infiniteClipTimeOffset : 0.0f; + } + + protected override float TransformKeyTime(float keyTime) + { + return keyTime + m_TrackOffset; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/AnimationTrackKeyDataSource.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/AnimationTrackKeyDataSource.cs.meta new file mode 100644 index 0000000..3c81758 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/AnimationTrackKeyDataSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a0b56195e00682b4594dfaeef9d5fa78 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Control.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Control.cs new file mode 100644 index 0000000..8788058 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Control.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; + +namespace UnityEditor.Timeline +{ + class Control + { + readonly List m_Manipulators = new List(); + + public bool HandleManipulatorsEvents(WindowState state) + { + var isHandled = false; + + foreach (var manipulator in m_Manipulators) + { + isHandled = manipulator.HandleEvent(state); + if (isHandled) + break; + } + + return isHandled; + } + + public void AddManipulator(Manipulator m) + { + m_Manipulators.Add(m); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Control.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Control.cs.meta new file mode 100644 index 0000000..71c8d33 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Control.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 077690d334440b044bdd51b26b3e9413 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers.meta new file mode 100644 index 0000000..a7ad23a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d40a0edbdcdcf9747a420f3bbe0f18db +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/AnimationTrackDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/AnimationTrackDrawer.cs new file mode 100644 index 0000000..0e9ef89 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/AnimationTrackDrawer.cs @@ -0,0 +1,86 @@ +using System; +using System.ComponentModel; +using System.Linq; +using JetBrains.Annotations; +using UnityEngine; +using UnityEditor; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + [CustomTrackDrawer(typeof(AnimationTrack)), UsedImplicitly] + class AnimationTrackDrawer : TrackDrawer + { + internal static class Styles + { + public static readonly GUIContent AnimationButtonOnTooltip = EditorGUIUtility.TrTextContent("", "Avatar Mask enabled\nClick to disable"); + public static readonly GUIContent AnimationButtonOffTooltip = EditorGUIUtility.TrTextContent("", "Avatar Mask disabled\nClick to enable"); + } + + public override bool DrawTrackHeaderButton(Rect rect, TrackAsset track, WindowState state) + { + var animTrack = track as AnimationTrack; + bool hasAvatarMask = animTrack != null && animTrack.avatarMask != null; + if (hasAvatarMask) + { + var style = animTrack.applyAvatarMask + ? DirectorStyles.Instance.avatarMaskOn + : DirectorStyles.Instance.avatarMaskOff; + var tooltip = animTrack.applyAvatarMask + ? Styles.AnimationButtonOnTooltip + : Styles.AnimationButtonOffTooltip; + if (GUI.Button(rect, tooltip, style)) + { + animTrack.applyAvatarMask = !animTrack.applyAvatarMask; + if (state != null) + state.rebuildGraph = true; + } + } + return hasAvatarMask; + } + + public override void DrawRecordingBackground(Rect trackRect, TrackAsset trackAsset, Vector2 visibleTime, WindowState state) + { + base.DrawRecordingBackground(trackRect, trackAsset, visibleTime, state); + DrawBorderOfAddedRecordingClip(trackRect, trackAsset, visibleTime, (WindowState)state); + } + + static void DrawBorderOfAddedRecordingClip(Rect trackRect, TrackAsset trackAsset, Vector2 visibleTime, WindowState state) + { + if (!state.IsArmedForRecord(trackAsset)) + return; + + AnimationTrack animTrack = trackAsset as AnimationTrack; + if (animTrack == null || !animTrack.inClipMode) + return; + + // make sure there is no clip but we can add one + TimelineClip clip = null; + if (trackAsset.FindRecordingClipAtTime(state.editSequence.time, out clip) || clip != null) + return; + + float yMax = trackRect.yMax; + float yMin = trackRect.yMin; + + double startGap = 0; + double endGap = 0; + + trackAsset.GetGapAtTime(state.editSequence.time, out startGap, out endGap); + if (double.IsInfinity(endGap)) + endGap = visibleTime.y; + + if (startGap > visibleTime.y || endGap < visibleTime.x) + return; + + + startGap = Math.Max(startGap, visibleTime.x); + endGap = Math.Min(endGap, visibleTime.y); + + float xMin = state.TimeToPixel(startGap); + float xMax = state.TimeToPixel(endGap); + + var r = Rect.MinMaxRect(xMin, yMin, xMax, yMax); + ClipDrawer.DrawClipSelectionBorder(r, ClipBorder.Recording(), ClipBlends.kNone); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/AnimationTrackDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/AnimationTrackDrawer.cs.meta new file mode 100644 index 0000000..20fed76 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/AnimationTrackDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cb281723220c9964094e6c52e0ece792 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/ClipDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/ClipDrawer.cs new file mode 100644 index 0000000..266e465 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/ClipDrawer.cs @@ -0,0 +1,678 @@ +using System; +using UnityEngine.Timeline; +using UnityEngine; +using System.Linq; +using System.Collections.Generic; + +namespace UnityEditor.Timeline +{ + enum BlendKind + { + None, + Ease, + Mix + } + + enum BlendAngle + { + Descending, + Ascending + } + + struct IconData + { + public enum Side { Left = -1, Right = 1 } + + public Texture2D icon; + public Color tint; + + public float width { get { return 16; } } + public float height { get { return 16; } } + + public IconData(Texture2D icon) + { + this.icon = icon; + tint = Color.white; + } + } + + class ClipBorder + { + public readonly Color color; + public readonly float thickness; + + ClipBorder(Color color, float thickness) + { + this.color = color; + this.thickness = thickness; + } + + const float k_ClipSelectionBorder = 1.0f; + const float k_ClipRecordingBorder = 2.0f; + + public static ClipBorder Recording() + { + return new ClipBorder(DirectorStyles.Instance.customSkin.colorRecordingClipOutline, k_ClipRecordingBorder); + } + + public static ClipBorder Selection() + { + return new ClipBorder(Color.white, k_ClipSelectionBorder); + } + + public static ClipBorder Default() + { + return new ClipBorder(DirectorStyles.Instance.customSkin.clipBorderColor, k_ClipSelectionBorder); + } + } + + struct ClipBlends + { + public readonly BlendKind inKind; + public readonly Rect inRect; + + public readonly BlendKind outKind; + public readonly Rect outRect; + + public ClipBlends(BlendKind inKind, Rect inRect, BlendKind outKind, Rect outRect) + { + this.inKind = inKind; + this.inRect = inRect; + this.outKind = outKind; + this.outRect = outRect; + } + + public static readonly ClipBlends kNone = new ClipBlends(BlendKind.None, Rect.zero, BlendKind.None, Rect.zero); + } + + struct ClipDrawData + { + public TimelineClip clip; // clip being drawn + public Rect targetRect; // rectangle to draw to + public Rect unclippedRect; // the clip's unclipped rect + public Rect clippedRect; // the clip's clipped rect to the visible time area + public Rect clipCenterSection; // clip center section + public string title; // clip title + public bool selected; // is the clip selected + public bool inlineCurvesSelected; // is the inline curve of the clip selected + public double localVisibleStartTime; + public double localVisibleEndTime; + public IconData[] leftIcons; + public IconData[] rightIcons; + public TimelineClip previousClip; + public bool previousClipSelected; + public bool supportsLooping; + public int minLoopIndex; + public List loopRects; + public ClipBlends clipBlends; + public ClipDrawOptions ClipDrawOptions; + public ClipEditor clipEditor; + } + + static class ClipDrawer + { + public static class Styles + { + public static readonly Texture2D iconWarn = EditorGUIUtility.LoadIconRequired("console.warnicon.inactive.sml"); + public static readonly string HoldText = LocalizationDatabase.GetLocalizedString("HOLD"); + public static readonly Texture2D s_IconNoRecord = EditorGUIUtility.LoadIcon("console.erroricon.sml"); + public static readonly GUIContent s_ClipNotRecorable = EditorGUIUtility.TrTextContent("", "This clip is not recordable"); + public static readonly GUIContent s_ClipNoRecordInBlend = EditorGUIUtility.TrTextContent("", "Recording in blends in prohibited"); + } + + const float k_ClipSwatchLineThickness = 4.0f; + const float k_MinClipWidth = 7.0f; + const float k_ClipInOutMinWidth = 15.0f; + const float k_ClipLoopsMinWidth = 20.0f; + const float k_ClipLabelPadding = 6.0f; + const float k_ClipLabelMinWidth = 10.0f; + const float k_IconsPadding = 1.0f; + const float k_ClipInlineWidth = 1.0f; + + static readonly GUIContent s_TitleContent = new GUIContent(); + static readonly IconData[] k_ClipErrorIcons = { new IconData {icon = Styles.iconWarn, tint = DirectorStyles.kClipErrorColor} }; + static readonly Dictionary s_LoopStringCache = new Dictionary(100); + + // caches the loopstring to avoid allocation from string concats + static string GetLoopString(int loopIndex) + { + string loopString = null; + if (!s_LoopStringCache.TryGetValue(loopIndex, out loopString)) + { + loopString = "L" + loopIndex; + s_LoopStringCache[loopIndex] = loopString; + } + return loopString; + } + + static void DrawLoops(ClipDrawData drawData) + { + if (drawData.loopRects == null || drawData.loopRects.Count == 0) + return; + + var oldColor = GUI.color; + + int loopIndex = drawData.minLoopIndex; + for (int l = 0; l < drawData.loopRects.Count; l++) + { + Rect theRect = drawData.loopRects[l]; + theRect.x -= drawData.unclippedRect.x; + theRect.x += 1; + theRect.width -= 2.0f; + theRect.y = 5.0f; + theRect.height -= 4.0f; + theRect.xMin -= 4f; + + if (theRect.width >= 5f) + { + using (new GUIViewportScope(drawData.clipCenterSection)) + { + GUI.color = new Color(0.0f, 0.0f, 0.0f, 0.2f); + GUI.Label(theRect, GUIContent.none, DirectorStyles.Instance.displayBackground); + + if (theRect.width > 36.0f) + { + var style = DirectorStyles.Instance.fontClipLoop; + GUI.color = new Color(0.0f, 0.0f, 0.0f, 0.3f); + var loopContent = new GUIContent(drawData.supportsLooping ? GetLoopString(loopIndex) : Styles.HoldText); + GUI.Label(theRect, loopContent, style); + } + } + } + + loopIndex++; + + if (!drawData.supportsLooping) + break; + } + + GUI.color = oldColor; + } + + static void DrawClipBorder(ClipDrawData drawData) + { + var animTrack = drawData.clip.parentTrack as AnimationTrack; + var selectionBorder = ClipBorder.Selection(); + + if (TimelineWindow.instance.state.recording && animTrack == null && drawData.clip.parentTrack.IsRecordingToClip(drawData.clip)) + { + DrawClipSelectionBorder(drawData.clipCenterSection, selectionBorder, drawData.clipBlends); + return; + } + + DrawClipDefaultBorder(drawData.clipCenterSection, ClipBorder.Default(), drawData.clipBlends); + + if (drawData.selected) + DrawClipSelectionBorder(drawData.clipCenterSection, selectionBorder, drawData.clipBlends); + + if (drawData.previousClip != null && drawData.previousClipSelected) + DrawClipBlendSelectionBorder(drawData.clipCenterSection, selectionBorder, drawData.clipBlends); + } + + public static void DrawClipSelectionBorder(Rect clipRect, ClipBorder border, ClipBlends blends) + { + var thickness = border.thickness; + var color = border.color; + var min = clipRect.min; + var max = clipRect.max; + + //Left line + if (blends.inKind == BlendKind.None) + EditorGUI.DrawRect(new Rect(min.x, min.y, thickness, max.y - min.y), color); + else + DrawBlendLine(blends.inRect, blends.inKind == BlendKind.Mix ? BlendAngle.Descending : BlendAngle.Ascending, thickness, color); + + //Right line + if (blends.outKind == BlendKind.None) + EditorGUI.DrawRect(new Rect(max.x - thickness, min.y, thickness, max.y - min.y), color); + else + DrawBlendLine(blends.outRect, BlendAngle.Descending, thickness, color); + + //Top line + var xTop1 = blends.inKind == BlendKind.Mix ? blends.inRect.xMin : min.x; + var xTop2 = max.x; + EditorGUI.DrawRect(new Rect(xTop1, min.y, xTop2 - xTop1, thickness), color); + + //Bottom line + var xBottom1 = blends.inKind == BlendKind.Ease ? blends.inRect.xMin : min.x; + var xBottom2 = blends.outKind == BlendKind.None ? max.x : blends.outRect.xMax; + EditorGUI.DrawRect(new Rect(xBottom1, max.y - thickness, xBottom2 - xBottom1, thickness), color); + } + + static Vector3[] s_BlendLines = new Vector3[4]; + static void DrawBlendLine(Rect rect, BlendAngle blendAngle, float width, Color color) + { + var halfWidth = width / 2.0f; + Vector2 p0, p1; + var inverse = 1.0f; + if (blendAngle == BlendAngle.Descending) + { + p0 = rect.min; + p1 = rect.max; + } + else + { + p0 = new Vector2(rect.xMax, rect.yMin); + p1 = new Vector2(rect.xMin, rect.yMax); + inverse = -1.0f; + } + s_BlendLines[0] = new Vector3(p0.x - halfWidth, p0.y + halfWidth * inverse); + s_BlendLines[1] = new Vector3(p1.x - halfWidth, p1.y + halfWidth * inverse); + s_BlendLines[2] = new Vector3(p1.x + halfWidth, p1.y - halfWidth * inverse); + s_BlendLines[3] = new Vector3(p0.x + halfWidth, p0.y - halfWidth * inverse); + Graphics.DrawPolygonAA(color, s_BlendLines); + } + + static void DrawClipBlendSelectionBorder(Rect clipRect, ClipBorder border, ClipBlends blends) + { + var color = border.color; + var thickness = border.thickness; + if (blends.inKind == BlendKind.Mix) + { + DrawBlendLine(blends.inRect, BlendAngle.Descending, thickness, color); + var xBottom1 = blends.inRect.xMin; + var xBottom2 = blends.inRect.xMax; + EditorGUI.DrawRect(new Rect(xBottom1, clipRect.max.y - thickness, xBottom2 - xBottom1, thickness), color); + } + } + + static void DrawClipDefaultBorder(Rect clipRect, ClipBorder border, ClipBlends blends) + { + var color = border.color; + var thickness = border.thickness; + + // Draw vertical lines at the edges of the clip + EditorGUI.DrawRect(new Rect(clipRect.xMin, clipRect.y, thickness, clipRect.height), color); //left + //only draw the right one when no out mix blend + if (blends.outKind != BlendKind.Mix) + EditorGUI.DrawRect(new Rect(clipRect.xMax - thickness, clipRect.y, thickness, clipRect.height), color); //right + //draw a vertical line for the previous clip + if (blends.inKind == BlendKind.Mix) + EditorGUI.DrawRect(new Rect(blends.inRect.xMin, blends.inRect.y, thickness, blends.inRect.height), color); //left + + //Draw blend line + if (blends.inKind == BlendKind.Mix) + DrawBlendLine(blends.inRect, BlendAngle.Descending, thickness, color); + } + + static void DrawClipTimescale(Rect targetRect, Rect clippedRect, double timeScale) + { + if (timeScale != 1.0) + { + const float xOffset = 4.0f; + const float yOffset = 6.0f; + var segmentLength = timeScale > 1.0f ? 5.0f : 15.0f; + + // clamp to the visible region to reduce the line count (case 1213189), but adject the start segment to match the visuals of drawing targetRect + var startX = clippedRect.min.x - ((clippedRect.min.x - targetRect.min.x) % (segmentLength*2)); + var endX = clippedRect.max.x; + + var start = new Vector3(startX + xOffset, targetRect.min.y + yOffset, 0.0f); + var end = new Vector3(endX - xOffset, targetRect.min.y + yOffset, 0.0f); + + Graphics.DrawDottedLine(start, end, segmentLength, DirectorStyles.Instance.customSkin.colorClipFont); + Graphics.DrawDottedLine(start + new Vector3(0.0f, 1.0f, 0.0f), end + new Vector3(0.0f, 1.0f, 0.0f), segmentLength, DirectorStyles.Instance.customSkin.colorClipFont); + } + } + + static void DrawClipInOut(Rect targetRect, TimelineClip clip) + { + var assetDuration = TimelineHelpers.GetClipAssetEndTime(clip); + + bool drawClipOut = assetDuration TimeUtility.kTimeEpsilon; + + bool drawClipIn = clip.clipIn > 0.0; + + if (!drawClipIn && !drawClipOut) + return; + + var rect = targetRect; + + if (drawClipOut) + { + var icon = DirectorStyles.Instance.clipOut; + var iconRect = new Rect(rect.xMax - icon.fixedWidth - 2.0f, + rect.yMin + (rect.height - icon.fixedHeight) * 0.5f, + icon.fixedWidth, icon.fixedHeight); + + GUI.Label(iconRect, GUIContent.none, icon); + } + + if (drawClipIn) + { + var icon = DirectorStyles.Instance.clipIn; + var iconRect = new Rect(2.0f + rect.xMin, + rect.yMin + (rect.height - icon.fixedHeight) * 0.5f, + icon.fixedWidth, icon.fixedHeight); + + GUI.Label(iconRect, GUIContent.none, icon); + } + } + + static void DrawClipLabel(ClipDrawData data, Rect availableRect, Color color) + { + var errorText = data.ClipDrawOptions.errorText; + var hasError = !string.IsNullOrEmpty(errorText); + var textColor = hasError ? DirectorStyles.kClipErrorColor : color; + var tooltip = hasError ? errorText : data.ClipDrawOptions.tooltip; + + if (hasError) + DrawClipLabel(data.title, availableRect, textColor, k_ClipErrorIcons, null, tooltip); + else + DrawClipLabel(data.title, availableRect, textColor, data.leftIcons, data.rightIcons, tooltip); + } + + static void DrawClipLabel(string title, Rect availableRect, Color color, string errorText = "") + { + var hasError = !string.IsNullOrEmpty(errorText); + var textColor = hasError ? DirectorStyles.kClipErrorColor : color; + + if (hasError) + DrawClipLabel(title, availableRect, textColor, k_ClipErrorIcons, null, errorText); + else + DrawClipLabel(title, availableRect, textColor, null, null, errorText); + } + + static void DrawClipLabel(string title, Rect availableRect, Color textColor, IconData[] leftIcons, IconData[] rightIcons, string tooltipMessage = "") + { + s_TitleContent.text = title; + var neededTextWidth = DirectorStyles.Instance.fontClip.CalcSize(s_TitleContent).x; + var neededIconWidthLeft = 0.0f; + var neededIconWidthRight = 0.0f; + + if (leftIcons != null) + for (int i = 0, n = leftIcons.Length; i < n; ++i) + neededIconWidthLeft += leftIcons[i].width + k_IconsPadding; + + if (rightIcons != null) + for (int i = 0, n = rightIcons.Length; i < n; ++i) + neededIconWidthRight += rightIcons[i].width + k_IconsPadding; + + var neededIconWidth = Mathf.Max(neededIconWidthLeft, neededIconWidthRight); + + // Atomic operation: We either show all icons or no icons at all + var showIcons = neededTextWidth / 2.0f + neededIconWidth < availableRect.width / 2.0f; + + if (showIcons) + { + if (leftIcons != null) + DrawClipIcons(leftIcons, IconData.Side.Left, neededTextWidth, availableRect); + + if (rightIcons != null) + DrawClipIcons(rightIcons, IconData.Side.Right, neededTextWidth, availableRect); + } + + if (neededTextWidth > availableRect.width) + s_TitleContent.text = DirectorStyles.Elipsify(title, availableRect.width, neededTextWidth); + + s_TitleContent.tooltip = tooltipMessage; + DrawClipName(availableRect, s_TitleContent, textColor); + } + + static void DrawClipIcons(IconData[] icons, IconData.Side side, float labelWidth, Rect availableRect) + { + var halfText = labelWidth / 2.0f; + var offset = halfText + k_IconsPadding; + + foreach (var iconData in icons) + { + offset += iconData.width / 2.0f + k_IconsPadding; + + var iconRect = + new Rect(0.0f, 0.0f, iconData.width, iconData.height) + { + center = new Vector2(availableRect.center.x + offset * (int)side, availableRect.center.y) + }; + + DrawIcon(iconRect, iconData.tint, iconData.icon); + + offset += iconData.width / 2.0f; + } + } + + static void DrawClipName(Rect rect, GUIContent content, Color textColor) + { + Graphics.ShadowLabel(rect, content, DirectorStyles.Instance.fontClip, textColor, Color.black); + } + + static void DrawIcon(Rect imageRect, Color color, Texture2D icon) + { + GUI.DrawTexture(imageRect, icon, ScaleMode.ScaleAndCrop, true, 0, color, 0, 0); + } + + static void DrawClipBackground(Rect clipCenterSection, bool selected) + { + if (Event.current.type != EventType.Repaint) + return; + + var color = selected ? DirectorStyles.Instance.customSkin.clipSelectedBckg : DirectorStyles.Instance.customSkin.clipBckg; + EditorGUI.DrawRect(clipCenterSection, color); + } + + static Vector3[] s_BlendVertices = new Vector3[3]; + static void DrawClipBlends(ClipBlends blends, Color inColor, Color outColor, Color backgroundColor) + { + switch (blends.inKind) + { + case BlendKind.Ease: + // 2 + // / | + // / | + // 0---1 + EditorGUI.DrawRect(blends.inRect, backgroundColor); + s_BlendVertices[0] = new Vector3(blends.inRect.xMin, blends.inRect.yMax); + s_BlendVertices[1] = new Vector3(blends.inRect.xMax, blends.inRect.yMax); + s_BlendVertices[2] = new Vector3(blends.inRect.xMax, blends.inRect.yMin); + Graphics.DrawPolygonAA(inColor, s_BlendVertices); + break; + case BlendKind.Mix: + // 0---2 + // \ | + // \ | + // 1 + s_BlendVertices[0] = new Vector3(blends.inRect.xMin, blends.inRect.yMin); + s_BlendVertices[1] = new Vector3(blends.inRect.xMax, blends.inRect.yMax); + s_BlendVertices[2] = new Vector3(blends.inRect.xMax, blends.inRect.yMin); + Graphics.DrawPolygonAA(inColor, s_BlendVertices); + break; + } + + if (blends.outKind != BlendKind.None) + { + if (blends.outKind == BlendKind.Ease) + EditorGUI.DrawRect(blends.outRect, backgroundColor); + // 0 + // | \ + // | \ + // 1---2 + s_BlendVertices[0] = new Vector3(blends.outRect.xMin, blends.outRect.yMin); + s_BlendVertices[1] = new Vector3(blends.outRect.xMin, blends.outRect.yMax); + s_BlendVertices[2] = new Vector3(blends.outRect.xMax, blends.outRect.yMax); + Graphics.DrawPolygonAA(outColor, s_BlendVertices); + } + } + + static void DrawClipSwatch(Rect targetRect, Color swatchColor) + { + // Draw Colored Line at the bottom. + var colorRect = targetRect; + colorRect.yMin = colorRect.yMax - k_ClipSwatchLineThickness; + EditorGUI.DrawRect(colorRect, swatchColor); + } + + public static void DrawSimpleClip(TimelineClip clip, Rect targetRect, ClipBorder border, Color overlay, ClipDrawOptions drawOptions) + { + GUI.BeginClip(targetRect); + var clipRect = new Rect(0.0f, 0.0f, targetRect.width, targetRect.height); + + var orgColor = GUI.color; + GUI.color = overlay; + + DrawClipBackground(clipRect, false); + GUI.color = orgColor; + + if (clipRect.width <= k_MinClipWidth) + { + clipRect.width = k_MinClipWidth; + } + + DrawClipSwatch(targetRect, drawOptions.highlightColor * overlay); + + if (targetRect.width >= k_ClipInOutMinWidth) + DrawClipInOut(clipRect, clip); + + var textRect = clipRect; + + textRect.xMin += k_ClipLabelPadding; + textRect.xMax -= k_ClipLabelPadding; + + if (textRect.width > k_ClipLabelMinWidth) + DrawClipLabel(clip.displayName, textRect, Color.white, drawOptions.errorText); + + if (border != null) + DrawClipSelectionBorder(clipRect, border, ClipBlends.kNone); + + GUI.EndClip(); + } + + public static void DrawDefaultClip(ClipDrawData drawData) + { + var customSkin = DirectorStyles.Instance.customSkin; + var blendInColor = drawData.selected ? customSkin.clipBlendInSelected : customSkin.clipBlendIn; + var blendOutColor = drawData.selected ? customSkin.clipBlendOutSelected : customSkin.clipBlendOut; + var easeBackgroundColor = customSkin.clipEaseBckgColor; + + DrawClipBlends(drawData.clipBlends, blendInColor, blendOutColor, easeBackgroundColor); + DrawClipBackground(drawData.clipCenterSection, drawData.selected); + + if (drawData.targetRect.width > k_MinClipWidth) + { + DrawClipEditorBackground(drawData); + } + else + { + drawData.targetRect.width = k_MinClipWidth; + drawData.clipCenterSection.width = k_MinClipWidth; + } + + DrawClipTimescale(drawData.targetRect, drawData.clippedRect, drawData.clip.timeScale); + + if (drawData.targetRect.width >= k_ClipInOutMinWidth) + DrawClipInOut(drawData.targetRect, drawData.clip); + + var labelRect = drawData.clipCenterSection; + + if (drawData.targetRect.width >= k_ClipLoopsMinWidth) + { + bool selected = drawData.selected || drawData.inlineCurvesSelected; + + if (selected) + { + if (drawData.loopRects != null && drawData.loopRects.Any()) + { + DrawLoops(drawData); + + var l = drawData.loopRects[0]; + labelRect.xMax = Math.Min(labelRect.xMax, l.x - drawData.unclippedRect.x); + } + } + } + + labelRect.xMin += k_ClipLabelPadding; + labelRect.xMax -= k_ClipLabelPadding; + + if (labelRect.width > k_ClipLabelMinWidth) + { + DrawClipLabel(drawData, labelRect, Color.white); + } + + DrawClipSwatch(drawData.targetRect, drawData.ClipDrawOptions.highlightColor); + DrawClipBorder(drawData); + } + + static void DrawClipEditorBackground(ClipDrawData drawData) + { + var isRepaint = (Event.current.type == EventType.Repaint); + if (isRepaint && drawData.clipEditor != null) + { + var customBodyRect = drawData.clippedRect; + customBodyRect.yMin += k_ClipInlineWidth; + customBodyRect.yMax -= k_ClipSwatchLineThickness; + var region = new ClipBackgroundRegion(customBodyRect, drawData.localVisibleStartTime, drawData.localVisibleEndTime); + try + { + drawData.clipEditor.DrawBackground(drawData.clip, region); + } + catch (Exception e) + { + Debug.LogException(e); + } + } + } + + public static void DrawAnimationRecordBorder(ClipDrawData drawData) + { + if (!drawData.clip.parentTrack.IsRecordingToClip(drawData.clip)) + return; + + var time = new DiscreteTime(TimelineWindow.instance.state.editSequence.time); + var start = new DiscreteTime(drawData.clip.start + drawData.clip.mixInDuration); + var end = new DiscreteTime(drawData.clip.end - drawData.clip.mixOutDuration); + + if (time < start || time >= end) + return; + + DrawClipSelectionBorder(drawData.clipCenterSection, ClipBorder.Recording(), ClipBlends.kNone); + } + + public static void DrawRecordProhibited(ClipDrawData drawData) + { + DrawRecordInvalidClip(drawData); + DrawRecordOnBlend(drawData); + } + + public static void DrawRecordOnBlend(ClipDrawData drawData) + { + double time = TimelineWindow.instance.state.editSequence.time; + if (time >= drawData.clip.start && time < drawData.clip.start + drawData.clip.mixInDuration) + { + Rect r = Rect.MinMaxRect(drawData.clippedRect.xMin, drawData.clippedRect.yMin, drawData.clipCenterSection.xMin, drawData.clippedRect.yMax); + DrawInvalidRecordIcon(r, Styles.s_ClipNoRecordInBlend); + } + + if (time <= drawData.clip.end && time > drawData.clip.end - drawData.clip.mixOutDuration) + { + Rect r = Rect.MinMaxRect(drawData.clipCenterSection.xMax, drawData.clippedRect.yMin, drawData.clippedRect.xMax, drawData.clippedRect.yMax); + DrawInvalidRecordIcon(r, Styles.s_ClipNoRecordInBlend); + } + } + + public static void DrawRecordInvalidClip(ClipDrawData drawData) + { + if (drawData.clip.recordable) + return; + + double time = TimelineWindow.instance.state.editSequence.time; + if (time < drawData.clip.start + drawData.clip.mixInDuration || time > drawData.clip.end - drawData.clip.mixOutDuration) + return; + + DrawInvalidRecordIcon(drawData.clipCenterSection, Styles.s_ClipNotRecorable); + } + + public static void DrawInvalidRecordIcon(Rect rect, GUIContent helpText) + { + EditorGUI.DrawRect(rect, new Color(0, 0, 0, 0.30f)); + + var icon = Styles.s_IconNoRecord; + if (rect.width < icon.width || rect.height < icon.height) + return; + + float x = rect.x + (rect.width - icon.width) * 0.5f; + float y = rect.y + (rect.height - icon.height) * 0.5f; + Rect r = new Rect(x, y, icon.width, icon.height); + GUI.Label(r, helpText); + GUI.DrawTexture(r, icon, ScaleMode.ScaleAndCrop, true, 0, Color.white, 0, 0); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/ClipDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/ClipDrawer.cs.meta new file mode 100644 index 0000000..e1493e6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/ClipDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 63118a0c9ee42ac46b7f30e793177a76 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/InfiniteTrackDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/InfiniteTrackDrawer.cs new file mode 100644 index 0000000..b2c5d7f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/InfiniteTrackDrawer.cs @@ -0,0 +1,86 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class InfiniteTrackDrawer : TrackDrawer + { + readonly IPropertyKeyDataSource m_DataSource; + Rect m_TrackRect; + + public InfiniteTrackDrawer(IPropertyKeyDataSource dataSource) + { + m_DataSource = dataSource; + } + + public bool CanDraw(TrackAsset track, WindowState state) + { + var keys = m_DataSource.GetKeys(); + var isTrackEmpty = track.clips.Length == 0; + + return keys != null || (state.IsArmedForRecord(track) && isTrackEmpty); + } + + static void DrawRecordBackground(Rect trackRect) + { + var styles = DirectorStyles.Instance; + + EditorGUI.DrawRect(trackRect, styles.customSkin.colorInfiniteTrackBackgroundRecording); + + Graphics.ShadowLabel(trackRect, + DirectorStyles.Elipsify(DirectorStyles.recordingLabel.text, trackRect, styles.fontClip), + styles.fontClip, Color.white, Color.black); + } + + public override bool DrawTrack(Rect trackRect, TrackAsset trackAsset, Vector2 visibleTime, WindowState state) + { + m_TrackRect = trackRect; + + if (!CanDraw(trackAsset, state)) + return true; + + if (state.recording && state.IsArmedForRecord(trackAsset)) + DrawRecordBackground(trackRect); + + GUI.Box(trackRect, GUIContent.none, DirectorStyles.Instance.infiniteTrack); + + var shadowRect = trackRect; + shadowRect.yMin = shadowRect.yMax; + shadowRect.height = 15.0f; + if (Event.current.type == EventType.Repaint) + DirectorStyles.Instance.bottomShadow.Draw(shadowRect, false, false, false, false); + + var keys = m_DataSource.GetKeys(); + if (keys != null && keys.Length > 0) + { + foreach (var k in keys) + DrawKeyFrame(k, state); + } + + return true; + } + + void DrawKeyFrame(float key, WindowState state) + { + var x = state.TimeToPixel(key); + var bounds = new Rect(x, m_TrackRect.yMin + 3.0f, 1.0f, m_TrackRect.height - 6.0f); + + if (!m_TrackRect.Overlaps(bounds)) + return; + + var iconWidth = DirectorStyles.Instance.keyframe.fixedWidth; + var iconHeight = DirectorStyles.Instance.keyframe.fixedHeight; + + var keyframeRect = bounds; + keyframeRect.width = iconWidth; + keyframeRect.height = iconHeight; + keyframeRect.xMin -= iconWidth / 2.0f; + keyframeRect.yMin = m_TrackRect.yMin + ((m_TrackRect.height - iconHeight) / 2.0f); + + // case 890650 : Make sure to use GUI.Label and not GUI.Box since the number of key frames can vary while dragging keys in the inline curves causing hotControls to be desynchronized + GUI.Label(keyframeRect, GUIContent.none, DirectorStyles.Instance.keyframe); + + EditorGUI.DrawRect(bounds, DirectorStyles.Instance.customSkin.colorInfiniteClipLine); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/InfiniteTrackDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/InfiniteTrackDrawer.cs.meta new file mode 100644 index 0000000..fd7c0b5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/InfiniteTrackDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ea6a8a826704f743b3b0ce3e9d3c9a9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers.meta new file mode 100644 index 0000000..920cf3a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 16388ae022a89264b84107f0c1b44680 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs new file mode 100644 index 0000000..910123e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class ClipsLayer : ItemsLayer + { + static readonly GUIStyle k_ConnectorIcon = DirectorStyles.Instance.connector; + + public ClipsLayer(Layer layerOrder, IRowGUI parent) : base(layerOrder) + { + var track = parent.asset; + track.SortClips(); + TimelineClipGUI previousClipGUI = null; + + foreach (var clip in track.clips) + { + var oldClipGUI = ItemToItemGui.GetGuiForClip(clip); + var isInvalid = oldClipGUI != null && oldClipGUI.isInvalid; // HACK Make sure to carry invalidy state when refereshing the cache. + + var currentClipGUI = new TimelineClipGUI(clip, parent, this) {isInvalid = isInvalid}; + if (previousClipGUI != null) previousClipGUI.nextClip = currentClipGUI; + currentClipGUI.previousClip = previousClipGUI; + AddItem(currentClipGUI); + previousClipGUI = currentClipGUI; + } + } + + public override void Draw(Rect rect, WindowState state) + { + base.Draw(rect, state); //draw clips + DrawConnector(items.OfType()); + } + + static void DrawConnector(IEnumerable clips) + { + if (Event.current.type != EventType.Repaint) + return; + + foreach (var clip in clips) + { + if (clip.previousClip != null && clip.visible && clip.treeViewRect.width > 14 && + (DiscreteTime)clip.start == (DiscreteTime)clip.previousClip.end) + { + // draw little connector widget + var localRect = clip.treeViewRect; + localRect.x -= Mathf.Floor(k_ConnectorIcon.fixedWidth / 2.0f); + localRect.width = k_ConnectorIcon.fixedWidth; + localRect.height = k_ConnectorIcon.fixedHeight; + GUI.Label(localRect, GUIContent.none, k_ConnectorIcon); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs.meta new file mode 100644 index 0000000..58ef809 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ClipsLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a809a4b50addbf44b9023b5e7f9fd4d2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ItemsLayer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ItemsLayer.cs new file mode 100644 index 0000000..7446d59 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ItemsLayer.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + enum Layer : byte + { + Clips, + ClipHandles, + Markers, + MarkerHeaderTrack, + MarkersOnHeader + } + + struct LayerZOrder : IComparable + { + Layer m_Layer; + int m_ZOrder; + + public LayerZOrder(Layer layer, int zOrder) + { + m_Layer = layer; + m_ZOrder = zOrder; + } + + public int CompareTo(LayerZOrder other) + { + if (m_Layer == other.m_Layer) + return m_ZOrder.CompareTo(other.m_ZOrder); + return m_Layer.CompareTo(other.m_Layer); + } + + public static LayerZOrder operator++(LayerZOrder x) + { + return new LayerZOrder(x.m_Layer, x.m_ZOrder + 1); + } + + public LayerZOrder ChangeLayer(Layer layer) + { + return new LayerZOrder(layer, m_ZOrder); + } + } + + interface ILayerable + { + LayerZOrder zOrder { get; } + } + + interface IZOrderProvider + { + LayerZOrder Next(); + } + + abstract class ItemsLayer : IZOrderProvider + { + // provide a buffer for time-based culling to allow for UI that extends slightly beyong the time (e.g. markers) + // prevents popping of marker visibility. + private const int kVisibilityBufferInPixels = 10; + + int m_PreviousLayerStateHash = -1; + LayerZOrder m_LastZOrder; + + public LayerZOrder Next() + { + return m_LastZOrder++; + } + + readonly List m_Items = new List(); + bool m_NeedSort = true; + + public virtual void Draw(Rect rect, WindowState state) + { + if (!m_Items.Any()) return; + + Sort(); + + // buffer to prevent flickering of markers at boundaries + var onePixelTime = state.PixelDeltaToDeltaTime(kVisibilityBufferInPixels); + var visibleTime = state.timeAreaShownRange + new Vector2(-onePixelTime, onePixelTime); + var layerViewStateHasChanged = GetLayerViewStateChanged(rect, state); + + foreach (var item in m_Items) + { + item.visible = item.end > visibleTime.x && item.start < visibleTime.y; + if (!item.visible) + continue; + + item.Draw(rect, layerViewStateHasChanged, state); + } + } + + public IEnumerable items + { + get + { + return m_Items; + } + } + + protected void AddItem(TimelineItemGUI item) + { + m_Items.Add(item); + m_NeedSort = true; + } + + protected ItemsLayer(Layer layerOrder) + { + m_LastZOrder = new LayerZOrder(layerOrder, 0); + } + + void Sort() + { + if (!m_NeedSort) + return; + + m_Items.Sort((a, b) => a.zOrder.CompareTo(b.zOrder)); + m_NeedSort = false; + } + + bool GetLayerViewStateChanged(Rect rect, WindowState state) + { + var layerStateHash = rect.GetHashCode().CombineHash(state.viewStateHash); + var layerViewStateHasChanged = layerStateHash != m_PreviousLayerStateHash; + + if (Event.current.type == EventType.Layout && layerViewStateHasChanged) + m_PreviousLayerStateHash = layerStateHash; + + return layerViewStateHasChanged; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ItemsLayer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ItemsLayer.cs.meta new file mode 100644 index 0000000..5ebff18 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/ItemsLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ef97f39912c138b4cabdccedfb24093b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/MarkersLayer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/MarkersLayer.cs new file mode 100644 index 0000000..50d1432 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/MarkersLayer.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class MarkersLayer : ItemsLayer + { + public MarkersLayer(Layer layerOrder, IRowGUI parent) : base(layerOrder) + { + CreateLists(parent); + } + + void CreateLists(IRowGUI parent) + { + var markerCount = parent.asset.GetMarkerCount(); + if (markerCount == 0) return; + + var accumulator = new List(); + var sortedMarkers = new List(parent.asset.GetMarkers()); + var vm = TimelineWindowViewPrefs.GetTrackViewModelData(parent.asset); + + sortedMarkers.Sort((lhs, rhs) => + { + // Sort by time first + var timeComparison = lhs.time.CompareTo(rhs.time); + if (timeComparison != 0) + return timeComparison; + + // If there's a collision, sort by edit timestamp + var lhsObject = lhs as object; + var rhsObject = rhs as object; + + if (lhsObject.Equals(null) || rhsObject.Equals(null)) + return 0; + + var lhsHash = lhsObject.GetHashCode(); + var rhsHash = rhsObject.GetHashCode(); + + if (vm.markerTimeStamps.ContainsKey(lhsHash) && vm.markerTimeStamps.ContainsKey(rhsHash)) + return vm.markerTimeStamps[lhsHash].CompareTo(vm.markerTimeStamps[rhsHash]); + + return 0; + }); + + foreach (var current in sortedMarkers) + { + // TODO: Take zoom factor into account? + if (accumulator.Count > 0 && Math.Abs(current.time - accumulator[accumulator.Count - 1].time) > TimeUtility.kTimeEpsilon) + ProcessAccumulator(accumulator, parent); + + accumulator.Add(current); + } + + ProcessAccumulator(accumulator, parent); + } + + void ProcessAccumulator(List accumulator, IRowGUI parent) + { + if (accumulator.Count == 0) return; + + if (accumulator.Count == 1) + { + AddItem(new TimelineMarkerGUI(accumulator[0], parent, this)); + } + else + { + // Ensure that the cluster is always considered *below* the markers it contains. + var clusterZOrder = Next(); + AddItem( + new TimelineMarkerClusterGUI( + accumulator.Select(m => new TimelineMarkerGUI(m, parent, this)).ToList(), + parent, this, clusterZOrder)); + } + + accumulator.Clear(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/MarkersLayer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/MarkersLayer.cs.meta new file mode 100644 index 0000000..32b0787 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/Layers/MarkersLayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bea62e1faac8f9a48a4cb919ea05cb6a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackDrawer.cs new file mode 100644 index 0000000..a29fefa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackDrawer.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +namespace UnityEditor.Timeline +{ + class TrackDrawer : GUIDrawer + { + internal WindowState sequencerState { get; set; } + + + public static TrackDrawer CreateInstance(TrackAsset trackAsset) + { + if (trackAsset == null) + return Activator.CreateInstance(); + + TrackDrawer drawer; + + try + { + drawer = (TrackDrawer)Activator.CreateInstance(TimelineHelpers.GetCustomDrawer(trackAsset.GetType())); + } + catch (Exception) + { + drawer = Activator.CreateInstance(); + } + + drawer.track = trackAsset; + return drawer; + } + + protected TrackAsset track { get; private set; } + + public virtual bool DrawTrackHeaderButton(Rect rect, TrackAsset track, WindowState state) + { + return false; + } + + public virtual bool DrawTrack(Rect trackRect, TrackAsset trackAsset, Vector2 visibleTime, WindowState state) + { + return false; + } + + public virtual void DrawRecordingBackground(Rect trackRect, TrackAsset trackAsset, Vector2 visibleTime, WindowState state) + { + EditorGUI.DrawRect(trackRect, DirectorStyles.Instance.customSkin.colorTrackBackgroundRecording); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackDrawer.cs.meta new file mode 100644 index 0000000..9588043 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9a0f991b6c2f45b44b92e163f9969e8e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackItemsDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackItemsDrawer.cs new file mode 100644 index 0000000..677c2fe --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackItemsDrawer.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + struct TrackItemsDrawer + { + List m_Layers; + ClipsLayer m_ClipsLayer; + + public IEnumerable clips + { + get { return m_ClipsLayer.items.Cast(); } + } + + public TrackItemsDrawer(IRowGUI parent) + { + m_Layers = null; + m_ClipsLayer = null; + BuildGUICache(parent); + } + + void BuildGUICache(IRowGUI parent) + { + m_ClipsLayer = new ClipsLayer(Layer.Clips, parent); + m_Layers = new List + { + m_ClipsLayer, + new MarkersLayer(Layer.Markers, parent) + }; + } + + public void Draw(Rect rect, WindowState state) + { + foreach (var layer in m_Layers) + { + layer.Draw(rect, state); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackItemsDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackItemsDrawer.cs.meta new file mode 100644 index 0000000..d41923c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Drawers/TrackItemsDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c7137daaeb11e8647bf1ade9b7e9aa97 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IPropertyKeyDataSource.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IPropertyKeyDataSource.cs new file mode 100644 index 0000000..a26deb6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IPropertyKeyDataSource.cs @@ -0,0 +1,71 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEditorInternal; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + interface IPropertyKeyDataSource + { + float[] GetKeys(); // Get the keys + Dictionary GetDescriptions(); // Caches for descriptions + } + + abstract class BasePropertyKeyDataSource : IPropertyKeyDataSource + { + static readonly StringBuilder k_StringBuilder = new StringBuilder(); + + protected abstract AnimationClip animationClip { get; } + + public virtual float[] GetKeys() + { + if (animationClip == null) + return null; + + var info = AnimationClipCurveCache.Instance.GetCurveInfo(animationClip); + return info.keyTimes.Select(TransformKeyTime).ToArray(); + } + + public virtual Dictionary GetDescriptions() + { + var map = new Dictionary(); + var info = AnimationClipCurveCache.Instance.GetCurveInfo(animationClip); + var processed = new HashSet(); + + foreach (var b in info.bindings) + { + var groupID = b.GetGroupID(); + if (processed.Contains(groupID)) + continue; + + var group = info.GetGroupBinding(groupID); + var prefix = AnimationWindowUtility.GetNicePropertyGroupDisplayName(b.type, b.propertyName); + + foreach (var t in info.keyTimes) + { + k_StringBuilder.Length = 0; + + var key = TransformKeyTime(t); + if (map.ContainsKey(key)) + k_StringBuilder.Append(map[key]) + .Append('\n'); + + k_StringBuilder.Append(prefix) + .Append(" : ") + .Append(group.GetDescription(key)); + + map[key] = k_StringBuilder.ToString(); + } + processed.Add(groupID); + } + + return map; + } + + protected virtual float TransformKeyTime(float keyTime) + { + return keyTime; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IPropertyKeyDataSource.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IPropertyKeyDataSource.cs.meta new file mode 100644 index 0000000..4c8993c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IPropertyKeyDataSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ee83d5e1ad2ac4c9aa39e3a6f256062e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IRowGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IRowGUI.cs new file mode 100644 index 0000000..0745c6a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IRowGUI.cs @@ -0,0 +1,16 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + interface IRowGUI + { + TrackAsset asset { get; } + Rect boundingRect { get; } + bool locked { get; } + bool showMarkers { get; } + bool muted { get; } + + Rect ToWindowSpace(Rect treeViewRect); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IRowGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IRowGUI.cs.meta new file mode 100644 index 0000000..26dcaed --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/IRowGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ecec8cdc3ff99e4a9c65635d7e6b043 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/InlineCurveEditor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/InlineCurveEditor.cs new file mode 100644 index 0000000..0bff23f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/InlineCurveEditor.cs @@ -0,0 +1,299 @@ +using System.Linq; +using JetBrains.Annotations; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + interface IClipCurveEditorOwner + { + ClipCurveEditor clipCurveEditor { get; } + bool inlineCurvesSelected { get; set; } + bool showLoops { get; } + TrackAsset owner { get; } + } + + class InlineCurveResizeHandle : IBounds + { + public Rect boundingRect { get; private set; } + + public TimelineTrackGUI trackGUI { get; } + + public InlineCurveResizeHandle(TimelineTrackGUI trackGUI) + { + this.trackGUI = trackGUI; + } + + public void Draw(Rect headerRect, Rect trackRect, WindowState state) + { + var rect = new Rect(headerRect.xMax + 4, headerRect.yMax - 5.0f, trackRect.width - 4, 5.0f); + + var handleColor = Handles.color; + Handles.color = Color.black; + Handles.DrawAAPolyLine(1.0f, + new Vector3(rect.x, rect.yMax, 0.0f), + new Vector3(rect.xMax, rect.yMax, 0.0f)); + Handles.color = handleColor; + + EditorGUIUtility.AddCursorRect(rect, MouseCursor.SplitResizeUpDown); + + boundingRect = trackGUI.ToWindowSpace(rect); + + if (Event.current.type == EventType.Repaint) + { + state.spacePartitioner.AddBounds(this); + + var dragStyle = new GUIStyle("RL DragHandle"); + dragStyle.Draw(rect, GUIContent.none, false, false, false, false); + } + } + } + + class InlineCurveEditor : IBounds + { + Rect m_TrackRect; + Rect m_HeaderRect; + readonly TimelineTrackGUI m_TrackGUI; + readonly InlineCurveResizeHandle m_ResizeHandle; + + bool m_LastSelectionWasClip; + TimelineClipGUI m_LastSelectedClipGUI; + + Rect IBounds.boundingRect { get { return m_TrackGUI.ToWindowSpace(m_TrackRect); } } + + [UsedImplicitly] // Used in tests + public TimelineClipGUI currentClipGui + { + get { return m_LastSelectedClipGUI; } + } + + public IClipCurveEditorOwner currentCurveEditor + { + get { return m_LastSelectionWasClip ? (IClipCurveEditorOwner)m_LastSelectedClipGUI : (IClipCurveEditorOwner)m_TrackGUI; } + } + + public InlineCurveEditor(TimelineTrackGUI trackGUI) + { + m_TrackGUI = trackGUI; + m_ResizeHandle = new InlineCurveResizeHandle(trackGUI); + } + + static bool MouseOverTrackArea(Rect curveRect, Rect trackRect) + { + curveRect.y = trackRect.y; + curveRect.height = trackRect.height; + + // clamp the curve editor to the track. this allows the menu to scroll properly + curveRect.xMin = Mathf.Max(curveRect.xMin, trackRect.xMin); + curveRect.xMax = trackRect.xMax; + + return curveRect.Contains(Event.current.mousePosition); + } + + static bool MouseOverHeaderArea(Rect headerRect, Rect trackRect) + { + headerRect.y = trackRect.y; + headerRect.height = trackRect.height; + + return headerRect.Contains(Event.current.mousePosition); + } + + static void DrawCurveEditor(IClipCurveEditorOwner clipCurveEditorOwner, WindowState state, Rect headerRect, Rect trackRect, Vector2 activeRange, bool locked) + { + ClipCurveEditor clipCurveEditor = clipCurveEditorOwner.clipCurveEditor; + CurveDataSource dataSource = clipCurveEditor.dataSource; + Rect curveRect = dataSource.GetBackgroundRect(state); + + bool newlySelected = false; + + if (Event.current.type == EventType.MouseDown || Event.current.type == EventType.ContextClick) + newlySelected = MouseOverTrackArea(curveRect, trackRect) || MouseOverHeaderArea(headerRect, trackRect); + + // make sure to not use any event before drawing the curve. + bool prevEnabledState = GUI.enabled; + GUI.enabled = true; + clipCurveEditorOwner.clipCurveEditor.DrawHeader(headerRect); + GUI.enabled = prevEnabledState; + + bool displayAsSelected = !locked && (clipCurveEditorOwner.inlineCurvesSelected || newlySelected); + + using (new EditorGUI.DisabledScope(locked)) + clipCurveEditor.DrawCurveEditor(trackRect, state, activeRange, clipCurveEditorOwner.showLoops, displayAsSelected); + + if (newlySelected && !locked) + { + clipCurveEditorOwner.inlineCurvesSelected = true; + HandleCurrentEvent(); + } + } + + public void Draw(Rect headerRect, Rect trackRect, WindowState state) + { + m_TrackRect = trackRect; + m_TrackRect.height -= 5.0f; + + if (Event.current.type == EventType.Repaint) + state.spacePartitioner.AddBounds(this); + + // Remove the indentation of this track to render it properly, otherwise every GUI elements will be offsetted. + headerRect.x -= DirectorStyles.kBaseIndent; + headerRect.width += DirectorStyles.kBaseIndent; + + // Remove the width of the color swatch. + headerRect.x += 4.0f; + headerRect.width -= 4.0f; + + m_HeaderRect = headerRect; + + EditorGUI.DrawRect(m_HeaderRect, DirectorStyles.Instance.customSkin.colorAnimEditorBinding); + + if (ShouldShowClipCurves(state)) + { + DrawCurveEditorsForClipsOnTrack(m_HeaderRect, m_TrackRect, state); + } + else if (ShouldShowTrackCurves()) + { + DrawCurveEditorForTrack(m_HeaderRect, m_TrackRect, state); + } + else + { + DrawCurvesEditorForNothingSelected(m_HeaderRect, m_TrackRect, state); + } + + m_ResizeHandle.Draw(headerRect, trackRect, state); + + // If MouseDown or ContextClick are not consumed by the curves, use the event to prevent it from going deeper into the treeview. + if (Event.current.type == EventType.ContextClick) + { + var r = Rect.MinMaxRect(m_HeaderRect.xMin, m_HeaderRect.yMin, m_TrackRect.xMax, m_TrackRect.yMax); + if (r.Contains(Event.current.mousePosition)) + Event.current.Use(); + } + + UpdateViewModel(); + } + + public void Refresh() + { + if (m_LastSelectionWasClip) + RefreshInlineCurves(m_LastSelectedClipGUI); + else + RefreshInlineCurves(m_TrackGUI); + } + + static void RefreshInlineCurves(IClipCurveEditorOwner guiItem) + { + if (guiItem.clipCurveEditor != null && guiItem.clipCurveEditor.dataSource != null) + guiItem.clipCurveEditor.dataSource.RebuildCurves(); + } + + void DrawCurveEditorForTrack(Rect headerRect, Rect trackRect, WindowState state) + { + if (m_TrackGUI.clipCurveEditor == null) + return; + + var activeRange = new Vector2(state.TimeToPixel(0.0d), state.TimeToPixel(state.editSequence.duration)); + DrawCurveEditor(m_TrackGUI, state, headerRect, trackRect, activeRange, m_TrackGUI.locked); + m_LastSelectionWasClip = false; + } + + void DrawCurveEditorsForClipsOnTrack(Rect headerRect, Rect trackRect, WindowState state) + { + if (m_TrackGUI.clips.Count == 0) + return; + + if (Event.current.type == EventType.Layout) + { + TimelineClipGUI selectedClip = SelectionManager.SelectedClipGUI().FirstOrDefault(x => x.parent == m_TrackGUI); + if (selectedClip != null) + { + m_LastSelectedClipGUI = selectedClip; + } + else if (state.recording && state.IsArmedForRecord(m_TrackGUI.track)) + { + if (m_LastSelectedClipGUI == null || !m_TrackGUI.track.IsRecordingToClip(m_LastSelectedClipGUI.clip)) + { + var clip = m_TrackGUI.clips.FirstOrDefault(x => m_TrackGUI.track.IsRecordingToClip(x.clip)); + if (clip != null) + m_LastSelectedClipGUI = clip; + } + } + + if (m_LastSelectedClipGUI == null) + m_LastSelectedClipGUI = m_TrackGUI.clips[0]; + } + + if (m_LastSelectedClipGUI == null || m_LastSelectedClipGUI.clipCurveEditor == null || m_LastSelectedClipGUI.isInvalid) + return; + + var activeRange = new Vector2(state.TimeToPixel(m_LastSelectedClipGUI.clip.start), state.TimeToPixel(m_LastSelectedClipGUI.clip.end)); + DrawCurveEditor(m_LastSelectedClipGUI, state, headerRect, trackRect, activeRange, m_TrackGUI.locked); + m_LastSelectionWasClip = true; + } + + void DrawCurvesEditorForNothingSelected(Rect headerRect, Rect trackRect, WindowState state) + { + if (m_LastSelectionWasClip || !TrackHasCurvesToShow() && m_TrackGUI.clips.Count > 0) + { + DrawCurveEditorsForClipsOnTrack(headerRect, trackRect, state); + } + else + { + DrawCurveEditorForTrack(headerRect, trackRect, state); + } + } + + bool ShouldShowClipCurves(WindowState state) + { + if (m_TrackGUI.clips.Count == 0) + return false; + + // Is a clip selected or being recorded to? + return SelectionManager.SelectedClipGUI().FirstOrDefault(x => x.parent == m_TrackGUI) != null || + state.recording && state.IsArmedForRecord(m_TrackGUI.track) && m_TrackGUI.clips.FirstOrDefault(x => m_TrackGUI.track.IsRecordingToClip(x.clip)) != null; + } + + bool ShouldShowTrackCurves() + { + if (m_TrackGUI == null) + return false; + + var isTrackSelected = SelectionManager.SelectedTrackGUI().FirstOrDefault(x => x == m_TrackGUI) != null; + + if (!isTrackSelected) + return false; + + return TrackHasCurvesToShow(); + } + + bool TrackHasCurvesToShow() + { + var animTrack = m_TrackGUI.track as AnimationTrack; + if (animTrack != null && !animTrack.inClipMode) + return true; + + return m_TrackGUI.track.HasAnyAnimatableParameters(); + } + + void UpdateViewModel() + { + var curveEditor = currentCurveEditor.clipCurveEditor; + if (curveEditor == null || curveEditor.bindingHierarchy.treeViewController == null) + return; + + var vm = TimelineWindowViewPrefs.GetTrackViewModelData(m_TrackGUI.track); + vm.inlineCurvesState = curveEditor.bindingHierarchy.treeViewController.state; + vm.inlineCurvesShownAreaInsideMargins = curveEditor.shownAreaInsideMargins; + vm.lastInlineCurveDataID = curveEditor.dataSource.id; + } + + static void HandleCurrentEvent() + { +#if UNITY_EDITOR_OSX + Event.current.type = EventType.Ignore; +#else + Event.current.Use(); +#endif + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/InlineCurveEditor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/InlineCurveEditor.cs.meta new file mode 100644 index 0000000..cbc0b18 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/InlineCurveEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e1f640f1769d6274194cf97b0e24602c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui.meta new file mode 100644 index 0000000..f19c2d2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d816a6ab06c6834480f5f45f440e287 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/ISelectable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/ISelectable.cs new file mode 100644 index 0000000..5f312c1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/ISelectable.cs @@ -0,0 +1,11 @@ +using System; + +namespace UnityEditor.Timeline +{ + interface ISelectable : ILayerable + { + void Select(); + bool IsSelected(); + void Deselect(); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/ISelectable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/ISelectable.cs.meta new file mode 100644 index 0000000..970ecaa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/ISelectable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4acbfc0398bab674f922f693e58f4afc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineClipGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineClipGUI.cs new file mode 100644 index 0000000..7d00228 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineClipGUI.cs @@ -0,0 +1,760 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TimelineClipGUI : TimelineItemGUI, IClipCurveEditorOwner, ISnappable, IAttractable + { + EditorClip m_EditorItem; + + Rect m_ClipCenterSection; + readonly List m_LoopRects = new List(); + + ClipDrawData m_ClipDrawData; + Rect m_MixOutRect = new Rect(); + Rect m_MixInRect = new Rect(); + int m_MinLoopIndex = 1; + + // clip dirty detection + int m_LastDirtyIndex = Int32.MinValue; + bool m_ClipViewDirty = true; + + bool supportResize { get; } + public ClipCurveEditor clipCurveEditor { get; set; } + public TimelineClipGUI previousClip { get; set; } + public TimelineClipGUI nextClip { get; set; } + + static readonly float k_MinMixWidth = 2; + static readonly float k_MaxHandleWidth = 10f; + static readonly float k_MinHandleWidth = 1f; + + bool? m_ShowDrillIcon; + ClipEditor m_ClipEditor; + + static List s_TempSubDirectors = new List(); + + static readonly IconData k_DiggableClipIcon = new IconData(DirectorStyles.LoadIcon("TimelineDigIn")); + + string name + { + get + { + if (string.IsNullOrEmpty(clip.displayName)) + return "(Empty)"; + + return clip.displayName; + } + } + + public bool inlineCurvesSelected + { + get { return SelectionManager.IsCurveEditorFocused(this); } + set + { + if (!value && SelectionManager.IsCurveEditorFocused(this)) + SelectionManager.SelectInlineCurveEditor(null); + else + SelectionManager.SelectInlineCurveEditor(this); + } + } + + public Rect mixOutRect + { + get + { + var percent = clip.mixOutPercentage; + var x = Mathf.Round(treeViewRect.width * (1 - percent)); + var width = Mathf.Round(treeViewRect.width * percent); + m_MixOutRect.Set(x, 0.0f, width, treeViewRect.height); + return m_MixOutRect; + } + } + + public Rect mixInRect + { + get + { + var width = Mathf.Round(treeViewRect.width * clip.mixInPercentage); + m_MixInRect.Set(0.0f, 0.0f, width, treeViewRect.height); + return m_MixInRect; + } + } + + public ClipBlends GetClipBlends() + { + var _mixInRect = mixInRect; + var _mixOutRect = mixOutRect; + + var blendInKind = BlendKind.None; + if (_mixInRect.width > k_MinMixWidth && clip.hasBlendIn) + blendInKind = BlendKind.Mix; + else if (_mixInRect.width > k_MinMixWidth) + blendInKind = BlendKind.Ease; + + var blendOutKind = BlendKind.None; + if (_mixOutRect.width > k_MinMixWidth && clip.hasBlendOut) + blendOutKind = BlendKind.Mix; + else if (_mixOutRect.width > k_MinMixWidth) + blendOutKind = BlendKind.Ease; + + return new ClipBlends(blendInKind, _mixInRect, blendOutKind, _mixOutRect); + } + + public override double start + { + get { return clip.start; } + } + + public override double end + { + get { return clip.end; } + } + + public bool supportsLooping + { + get { return clip.SupportsLooping(); } + } + + // for the inline curve editor, only show loops if we recorded the asset + bool IClipCurveEditorOwner.showLoops + { + get { return clip.SupportsLooping() && (clip.asset is AnimationPlayableAsset); } + } + + TrackAsset IClipCurveEditorOwner.owner + { + get { return clip.parentTrack; } + } + + public bool supportsSubTimelines + { + get { return m_ClipEditor.supportsSubTimelines; } + } + + + public int minLoopIndex + { + get { return m_MinLoopIndex; } + } + + public TrackDrawer drawer + { + get { return ((TimelineTrackGUI)parent).drawer; } + } + + public Rect clippedRect { get; private set; } + + public override void Select() + { + zOrder = zOrderProvider.Next(); + SelectionManager.Add(clip); + } + + public override bool IsSelected() + { + return SelectionManager.Contains(clip); + } + + public override void Deselect() + { + SelectionManager.Remove(clip); + } + + public override ITimelineItem item + { + get { return ItemsUtils.ToItem(clip); } + } + + IZOrderProvider zOrderProvider { get; } + + public TimelineClipHandle leftHandle { get; } + public TimelineClipHandle rightHandle { get; } + + public TimelineClipGUI(TimelineClip clip, IRowGUI parent, IZOrderProvider provider) : base(parent) + { + zOrderProvider = provider; + zOrder = provider.Next(); + + m_EditorItem = EditorClipFactory.GetEditorClip(clip); + m_ClipEditor = CustomTimelineEditorCache.GetClipEditor(clip); + + supportResize = true; + + leftHandle = new TimelineClipHandle(this, TrimEdge.Start); + rightHandle = new TimelineClipHandle(this, TrimEdge.End); + + ItemToItemGui.Add(clip, this); + } + + void CreateInlineCurveEditor(WindowState state) + { + if (clipCurveEditor != null) + return; + + var animationClip = clip.animationClip; + + if (animationClip != null && animationClip.empty) + animationClip = null; + + // prune out clips coming from FBX + if (animationClip != null && !clip.recordable) + return; // don't show, even if there are curves + + if (animationClip == null && !clip.HasAnyAnimatableParameters()) + return; // nothing to show + + state.AddEndFrameDelegate((istate, currentEvent) => + { + clipCurveEditor = new ClipCurveEditor(CurveDataSource.Create(this), TimelineWindow.instance, clip.parentTrack); + return true; + }); + } + + public TimelineClip clip + { + get { return m_EditorItem.clip; } + } + + // Draw the actual clip. Defers to the track drawer for customization + void UpdateDrawData(WindowState state, Rect drawRect, string title, bool selected, bool previousClipSelected, float rectXOffset) + { + m_ClipDrawData.clip = clip; + m_ClipDrawData.targetRect = drawRect; + m_ClipDrawData.clipCenterSection = m_ClipCenterSection; + m_ClipDrawData.unclippedRect = treeViewRect; + m_ClipDrawData.title = title; + m_ClipDrawData.selected = selected; + m_ClipDrawData.inlineCurvesSelected = inlineCurvesSelected; + m_ClipDrawData.previousClip = previousClip != null ? previousClip.clip : null; + m_ClipDrawData.previousClipSelected = previousClipSelected; + + Vector3 shownAreaTime = state.timeAreaShownRange; + m_ClipDrawData.localVisibleStartTime = clip.ToLocalTimeUnbound(Math.Max(clip.start, shownAreaTime.x)); + m_ClipDrawData.localVisibleEndTime = clip.ToLocalTimeUnbound(Math.Min(clip.end, shownAreaTime.y)); + + m_ClipDrawData.clippedRect = new Rect(clippedRect.x - rectXOffset, 0.0f, clippedRect.width, clippedRect.height); + + m_ClipDrawData.minLoopIndex = minLoopIndex; + m_ClipDrawData.loopRects = m_LoopRects; + m_ClipDrawData.supportsLooping = supportsLooping; + m_ClipDrawData.clipBlends = GetClipBlends(); + m_ClipDrawData.clipEditor = m_ClipEditor; + m_ClipDrawData.ClipDrawOptions = UpdateClipDrawOptions(m_ClipEditor, clip); + + UpdateClipIcons(state); + } + + void UpdateClipIcons(WindowState state) + { + // Pass 1 - gather size + int required = 0; + bool requiresDigIn = ShowDrillIcon(state.editSequence.director); + if (requiresDigIn) + required++; + + var icons = m_ClipDrawData.ClipDrawOptions.icons; + foreach (var icon in icons) + { + if (icon != null) + required++; + } + + // Pass 2 - copy icon data + if (required == 0) + { + m_ClipDrawData.rightIcons = null; + return; + } + + if (m_ClipDrawData.rightIcons == null || m_ClipDrawData.rightIcons.Length != required) + m_ClipDrawData.rightIcons = new IconData[required]; + + int index = 0; + if (requiresDigIn) + m_ClipDrawData.rightIcons[index++] = k_DiggableClipIcon; + + foreach (var icon in icons) + { + if (icon != null) + m_ClipDrawData.rightIcons[index++] = new IconData(icon); + } + } + + static ClipDrawOptions UpdateClipDrawOptions(ClipEditor clipEditor, TimelineClip clip) + { + try + { + return clipEditor.GetClipOptions(clip); + } + catch (Exception e) + { + Debug.LogException(e); + } + + return CustomTimelineEditorCache.GetDefaultClipEditor().GetClipOptions(clip); + } + + static void DrawClip(ClipDrawData drawData) + { + ClipDrawer.DrawDefaultClip(drawData); + + if (drawData.clip.asset is AnimationPlayableAsset) + { + var state = TimelineWindow.instance.state; + if (state.recording && state.IsArmedForRecord(drawData.clip.parentTrack)) + { + ClipDrawer.DrawAnimationRecordBorder(drawData); + ClipDrawer.DrawRecordProhibited(drawData); + } + } + } + + public void DrawGhostClip(Rect targetRect) + { + DrawSimpleClip(targetRect, ClipBorder.Selection(), new Color(1.0f, 1.0f, 1.0f, 0.5f)); + } + + public void DrawInvalidClip(Rect targetRect) + { + DrawSimpleClip(targetRect, ClipBorder.Selection(), DirectorStyles.Instance.customSkin.colorInvalidClipOverlay); + } + + void DrawSimpleClip(Rect targetRect, ClipBorder border, Color overlay) + { + var drawOptions = UpdateClipDrawOptions(CustomTimelineEditorCache.GetClipEditor(clip), clip); + ClipDrawer.DrawSimpleClip(clip, targetRect, border, overlay, drawOptions); + } + + void DrawInto(Rect drawRect, WindowState state) + { + if (Event.current.type != EventType.Repaint) + return; + + // create the inline curve editor if not already created + CreateInlineCurveEditor(state); + + // @todo optimization, most of the calculations (rect, offsets, colors, etc.) could be cached + // and rebuilt when the hash of the clip changes. + + if (isInvalid) + { + DrawInvalidClip(treeViewRect); + return; + } + + GUI.BeginClip(drawRect); + + var originRect = new Rect(0.0f, 0.0f, drawRect.width, drawRect.height); + string clipLabel = name; + var selected = SelectionManager.Contains(clip); + var previousClipSelected = previousClip != null && SelectionManager.Contains(previousClip.clip); + + if (selected && 1.0 != clip.timeScale) + clipLabel += " " + clip.timeScale.ToString("F2") + "x"; + + UpdateDrawData(state, originRect, clipLabel, selected, previousClipSelected, drawRect.x); + DrawClip(m_ClipDrawData); + + GUI.EndClip(); + + if (clip.parentTrack != null && !clip.parentTrack.lockedInHierarchy) + { + if (selected && supportResize) + { + var cursorRect = rect; + cursorRect.xMin += leftHandle.boundingRect.width; + cursorRect.xMax -= rightHandle.boundingRect.width; + EditorGUIUtility.AddCursorRect(cursorRect, MouseCursor.MoveArrow); + } + + if (supportResize) + { + var handleWidth = Mathf.Clamp(drawRect.width * 0.3f, k_MinHandleWidth, k_MaxHandleWidth); + + leftHandle.Draw(drawRect, handleWidth, state); + rightHandle.Draw(drawRect, handleWidth, state); + } + } + } + + void CalculateClipRectangle(Rect trackRect, WindowState state) + { + if (m_ClipViewDirty) + { + var clipRect = RectToTimeline(trackRect, state); + treeViewRect = clipRect; + + // calculate clipped rect + clipRect.xMin = Mathf.Max(clipRect.xMin, trackRect.xMin); + clipRect.xMax = Mathf.Min(clipRect.xMax, trackRect.xMax); + + if (clipRect.width > 0 && clipRect.width < 2) + { + clipRect.width = 5.0f; + } + + clippedRect = clipRect; + } + } + + void AddToSpacePartitioner(WindowState state) + { + if (Event.current.type == EventType.Repaint && !parent.locked) + state.spacePartitioner.AddBounds(this, rect); + } + + void CalculateBlendRect() + { + m_ClipCenterSection = treeViewRect; + m_ClipCenterSection.x = 0; + m_ClipCenterSection.y = 0; + + m_ClipCenterSection.xMin = Mathf.Round(treeViewRect.width * clip.mixInPercentage); + m_ClipCenterSection.width = Mathf.Round(treeViewRect.width); + m_ClipCenterSection.xMax -= Mathf.Round(mixOutRect.width + treeViewRect.width * clip.mixInPercentage); + } + + // Entry point to the Clip Drawing... + public override void Draw(Rect trackRect, bool trackRectChanged, WindowState state) + { + // if the clip has changed, fire the appropriate callback + DetectClipChanged(trackRectChanged); + + // update the clip projected rectangle on the timeline + CalculateClipRectangle(trackRect, state); + + AddToSpacePartitioner(state); + + // update the blend rects (when clip overlaps with others) + CalculateBlendRect(); + + // update the loop rects (when clip loops) + CalculateLoopRects(trackRect, state); + + DrawExtrapolation(trackRect, treeViewRect); + + DrawInto(treeViewRect, state); + + ResetClipChanged(); + } + + void DetectClipChanged(bool trackRectChanged) + { + if (Event.current.type == EventType.Layout) + { + if (clip.DirtyIndex != m_LastDirtyIndex) + { + m_ClipViewDirty = true; + + try + { + m_ClipEditor.OnClipChanged(clip); + } + catch (Exception e) + { + Debug.LogException(e); + } + + m_LastDirtyIndex = clip.DirtyIndex; + } + m_ClipViewDirty |= trackRectChanged; + } + } + + void ResetClipChanged() + { + if (Event.current.type == EventType.Repaint) + m_ClipViewDirty = false; + } + + GUIStyle GetExtrapolationIcon(TimelineClip.ClipExtrapolation mode) + { + GUIStyle extrapolationIcon = null; + + switch (mode) + { + case TimelineClip.ClipExtrapolation.None: return null; + case TimelineClip.ClipExtrapolation.Hold: extrapolationIcon = m_Styles.extrapolationHold; break; + case TimelineClip.ClipExtrapolation.Loop: extrapolationIcon = m_Styles.extrapolationLoop; break; + case TimelineClip.ClipExtrapolation.PingPong: extrapolationIcon = m_Styles.extrapolationPingPong; break; + case TimelineClip.ClipExtrapolation.Continue: extrapolationIcon = m_Styles.extrapolationContinue; break; + } + + return extrapolationIcon; + } + + Rect GetPreExtrapolationBounds(Rect trackRect, Rect clipRect, GUIStyle icon) + { + float x = clipRect.xMin - (icon.fixedWidth + 10.0f); + float y = trackRect.yMin + (trackRect.height - icon.fixedHeight) / 2.0f; + + if (previousClip != null) + { + float distance = Mathf.Abs(treeViewRect.xMin - previousClip.treeViewRect.xMax); + + if (distance < icon.fixedWidth) + return new Rect(0.0f, 0.0f, 0.0f, 0.0f); + + if (distance < icon.fixedWidth + 20.0f) + { + float delta = (distance - icon.fixedWidth) / 2.0f; + x = clipRect.xMin - (icon.fixedWidth + delta); + } + } + + return new Rect(x, y, icon.fixedWidth, icon.fixedHeight); + } + + Rect GetPostExtrapolationBounds(Rect trackRect, Rect clipRect, GUIStyle icon) + { + float x = clipRect.xMax + 10.0f; + float y = trackRect.yMin + (trackRect.height - icon.fixedHeight) / 2.0f; + + if (nextClip != null) + { + float distance = Mathf.Abs(nextClip.treeViewRect.xMin - treeViewRect.xMax); + + if (distance < icon.fixedWidth) + return new Rect(0.0f, 0.0f, 0.0f, 0.0f); + + if (distance < icon.fixedWidth + 20.0f) + { + float delta = (distance - icon.fixedWidth) / 2.0f; + x = clipRect.xMax + delta; + } + } + + return new Rect(x, y, icon.fixedWidth, icon.fixedHeight); + } + + static void DrawExtrapolationIcon(Rect rect, GUIStyle icon) + { + GUI.Label(rect, GUIContent.none, icon); + } + + void DrawExtrapolation(Rect trackRect, Rect clipRect) + { + if (clip.hasPreExtrapolation) + { + GUIStyle icon = GetExtrapolationIcon(clip.preExtrapolationMode); + + if (icon != null) + { + Rect iconBounds = GetPreExtrapolationBounds(trackRect, clipRect, icon); + + if (iconBounds.width > 1 && iconBounds.height > 1) + DrawExtrapolationIcon(iconBounds, icon); + } + } + + if (clip.hasPostExtrapolation) + { + GUIStyle icon = GetExtrapolationIcon(clip.postExtrapolationMode); + + if (icon != null) + { + Rect iconBounds = GetPostExtrapolationBounds(trackRect, clipRect, icon); + + if (iconBounds.width > 1 && iconBounds.height > 1) + DrawExtrapolationIcon(iconBounds, icon); + } + } + } + + static Rect ProjectRectOnTimeline(Rect rect, Rect trackRect, WindowState state) + { + Rect newRect = rect; + // transform clipRect into pixel-space + newRect.x *= state.timeAreaScale.x; + newRect.width *= state.timeAreaScale.x; + + newRect.x += state.timeAreaTranslation.x + trackRect.xMin; + + // adjust clipRect height and vertical centering + const int clipPadding = 2; + newRect.y = trackRect.y + clipPadding; + newRect.height = trackRect.height - (2 * clipPadding); + return newRect; + } + + void CalculateLoopRects(Rect trackRect, WindowState state) + { + if (!m_ClipViewDirty) + return; + + m_LoopRects.Clear(); + if (clip.duration < WindowState.kTimeEpsilon) + return; + + var times = TimelineHelpers.GetLoopTimes(clip); + var loopDuration = TimelineHelpers.GetLoopDuration(clip); + m_MinLoopIndex = -1; + + // we have a hold, no need to compute all loops + if (!supportsLooping) + { + if (times.Length > 1) + { + var t = times[1]; + float loopTime = (float)(clip.duration - t); + m_LoopRects.Add(ProjectRectOnTimeline(new Rect((float)(t + clip.start), 0, loopTime, 0), trackRect, state)); + } + return; + } + + var range = state.timeAreaShownRange; + var visibleStartTime = range.x - clip.start; + var visibleEndTime = range.y - clip.start; + + for (int i = 1; i < times.Length; i++) + { + var t = times[i]; + + // don't draw off screen loops + if (t > visibleEndTime) + break; + + float loopTime = Mathf.Min((float)(clip.duration - t), (float)loopDuration); + var loopEnd = t + loopTime; + + if (loopEnd < visibleStartTime) + continue; + + m_LoopRects.Add(ProjectRectOnTimeline(new Rect((float)(t + clip.start), 0, loopTime, 0), trackRect, state)); + + if (m_MinLoopIndex == -1) + m_MinLoopIndex = i; + } + } + + public override Rect RectToTimeline(Rect trackRect, WindowState state) + { + var offsetFromTimeSpaceToPixelSpace = state.timeAreaTranslation.x + trackRect.xMin; + + var start = (float)(DiscreteTime)clip.start; + var end = (float)(DiscreteTime)clip.end; + + return Rect.MinMaxRect( + Mathf.Round(start * state.timeAreaScale.x + offsetFromTimeSpaceToPixelSpace), Mathf.Round(trackRect.yMin), + Mathf.Round(end * state.timeAreaScale.x + offsetFromTimeSpaceToPixelSpace), Mathf.Round(trackRect.yMax) + ); + } + + public IEnumerable SnappableEdgesFor(IAttractable attractable, ManipulateEdges manipulateEdges) + { + var edges = new List(); + + bool canAddEdges = !parent.muted; + + if (canAddEdges) + { + // Hack: Trim Start in Ripple mode should not have any snap point added + if (EditMode.editType == EditMode.EditType.Ripple && manipulateEdges == ManipulateEdges.Left) + return edges; + + if (attractable != this) + { + if (EditMode.editType == EditMode.EditType.Ripple) + { + bool skip = false; + + // Hack: Since Trim End and Move in Ripple mode causes other snap point to move on the same track (which is not supported), disable snapping for this special cases... + // TODO Find a proper way to have different snap edges for each edit mode. + if (manipulateEdges == ManipulateEdges.Right) + { + var otherClipGUI = attractable as TimelineClipGUI; + skip = otherClipGUI != null && otherClipGUI.parent == parent; + } + else if (manipulateEdges == ManipulateEdges.Both) + { + var moveHandler = attractable as MoveItemHandler; + skip = moveHandler != null && moveHandler.movingItems.Any(clips => clips.targetTrack == clip.parentTrack && clip.start >= clips.start); + } + + if (skip) + return edges; + } + + AddEdge(edges, clip.start); + AddEdge(edges, clip.end); + } + else + { + if (manipulateEdges == ManipulateEdges.Right) + { + var d = TimelineHelpers.GetClipAssetEndTime(clip); + + if (d < double.MaxValue) + { + if (clip.SupportsLooping()) + { + var l = TimelineHelpers.GetLoopDuration(clip); + + var shownTime = TimelineWindow.instance.state.timeAreaShownRange; + do + { + AddEdge(edges, d, false); + d += l; + } + while (d < shownTime.y); + } + else + { + AddEdge(edges, d, false); + } + } + } + + if (manipulateEdges == ManipulateEdges.Left) + { + var clipInfo = AnimationClipCurveCache.Instance.GetCurveInfo(clip.animationClip); + if (clipInfo != null && clipInfo.keyTimes.Any()) + AddEdge(edges, clip.FromLocalTimeUnbound(clipInfo.keyTimes.Min()), false); + } + } + } + return edges; + } + + public bool ShouldSnapTo(ISnappable snappable) + { + return true; + } + + bool ShowDrillIcon(PlayableDirector resolver) + { + if (!m_ShowDrillIcon.HasValue || TimelineWindow.instance.hierarchyChangedThisFrame) + { + var nestable = m_ClipEditor.supportsSubTimelines; + m_ShowDrillIcon = nestable && resolver != null; + if (m_ShowDrillIcon.Value) + { + s_TempSubDirectors.Clear(); + try + { + m_ClipEditor.GetSubTimelines(clip, resolver, s_TempSubDirectors); + } + catch (Exception e) + { + Debug.LogException(e); + } + + m_ShowDrillIcon &= s_TempSubDirectors.Count > 0; + } + } + + return m_ShowDrillIcon.Value; + } + + static void AddEdge(List edges, double time, bool showEdgeHint = true) + { + var shownTime = TimelineWindow.instance.state.timeAreaShownRange; + if (time >= shownTime.x && time <= shownTime.y) + edges.Add(new Edge(time, showEdgeHint)); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineClipGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineClipGUI.cs.meta new file mode 100644 index 0000000..4e94156 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineClipGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3c01b61b3a6887c49a15276fd38be918 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineItemGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineItemGUI.cs new file mode 100644 index 0000000..522b35e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineItemGUI.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Timeline; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + static class ItemToItemGui + { + static Dictionary s_ItemToItemGUI = + new Dictionary(); + + public static void Add(TimelineClip clip, TimelineItemGUI gui) + { + s_ItemToItemGUI[clip] = gui; + } + + public static void Add(IMarker marker, TimelineItemGUI gui) + { + s_ItemToItemGUI[marker] = gui; + } + + public static TimelineClipGUI GetGuiForClip(TimelineClip clip) + { + return GetGuiForItem(clip) as TimelineClipGUI; + } + + public static TimelineMarkerGUI GetGuiForMarker(IMarker marker) + { + return GetGuiForItem(marker) as TimelineMarkerGUI; + } + + static TimelineItemGUI GetGuiForItem(object item) + { + if (item == null) + return null; + + TimelineItemGUI gui; + s_ItemToItemGUI.TryGetValue(item, out gui); + return gui; + } + } + + abstract class TimelineItemGUI : ISelectable + { + protected readonly DirectorStyles m_Styles; + + public abstract ITimelineItem item { get; } + public abstract double start { get; } + public abstract double end { get; } + public abstract void Draw(Rect rect, bool rectChanged, WindowState state); + public abstract Rect RectToTimeline(Rect trackRect, WindowState state); + + public virtual void Select() {} + public virtual bool IsSelected() { return false; } + public virtual void Deselect() {} + + public virtual void StartDrag() {} + public virtual void StopDrag() {} + + public LayerZOrder zOrder { get; set; } + + public bool visible { get; set; } + public bool isInvalid { get; set; } + + public IRowGUI parent { get; } + + public Rect rect + { + get { return parent.ToWindowSpace(treeViewRect); } + } + + public Rect treeViewRect + { + get { return m_TreeViewRect; } + protected set + { + m_TreeViewRect = value; + if (value.width < 0.0f) + m_TreeViewRect.width = 1.0f; + } + } + + Rect m_TreeViewRect; + + protected TimelineItemGUI(IRowGUI parent) + { + this.parent = parent; + m_Styles = DirectorStyles.Instance; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineItemGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineItemGUI.cs.meta new file mode 100644 index 0000000..a38143d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineItemGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6f515f8ecd3b6a546b90abaae2553f99 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerClusterGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerClusterGUI.cs new file mode 100644 index 0000000..b0ffeac --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerClusterGUI.cs @@ -0,0 +1,150 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +using UnityObject = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class TimelineMarkerClusterGUI : TimelineItemGUI + { + readonly List m_MarkerGUIs; + readonly IZOrderProvider m_ZOrderProvider; + + public TimelineMarkerGUI topMarker + { + get { return m_MarkerGUIs.LastOrDefault(); } + } + + TimelineMarkerGUI m_ManipulatedMarker; + + public TimelineMarkerClusterGUI(List guis, IRowGUI parent, + IZOrderProvider zOrderProvider, LayerZOrder layerZOrder) + : base(parent) + { + m_MarkerGUIs = guis; + m_ZOrderProvider = zOrderProvider; + zOrder = layerZOrder; + SortMarkers(); + topMarker.onStartDrag += OnDragTopMarker; + } + + public override double start + { + get { return topMarker.start; } + } + + public override double end + { + get { return topMarker.end; } + } + + public override ITimelineItem item + { + get { return topMarker.item; } + } + + public override void Select() + { + foreach (var marker in m_MarkerGUIs) + { + if (!marker.IsSelected()) + marker.Select(); + } + } + + public override void Deselect() + { + foreach (var marker in m_MarkerGUIs) + { + if (marker.IsSelected()) + marker.Deselect(); + } + } + + public override void Draw(Rect trackRect, bool trackRectChanged, WindowState state) + { + RegisterRect(state); + + topMarker.Draw(trackRect, trackRectChanged, state); + + if (m_MarkerGUIs.Count > 1) + GUI.Box(treeViewRect, String.Empty, DirectorStyles.Instance.markerMultiOverlay); + + if (m_ManipulatedMarker != null) + m_ManipulatedMarker.Draw(trackRect, trackRectChanged, state); + } + + public override Rect RectToTimeline(Rect trackRect, WindowState state) + { + return topMarker.RectToTimeline(trackRect, state); + } + + public void CycleTop() + { + if (m_MarkerGUIs.Count < 2) + return; + + topMarker.onStartDrag -= OnDragTopMarker; + + var last = topMarker; + for (int i = 0; i < m_MarkerGUIs.Count; ++i) + { + var next = m_MarkerGUIs[i]; + m_MarkerGUIs[i] = last; + last = next; + } + + topMarker.zOrder = m_ZOrderProvider.Next(); + + topMarker.onStartDrag += OnDragTopMarker; + } + + void OnDragTopMarker() + { + m_ManipulatedMarker = topMarker; + m_ManipulatedMarker.onStartDrag -= OnDragTopMarker; + m_MarkerGUIs.RemoveAt(m_MarkerGUIs.Count - 1); + } + + void SortMarkers() + { + m_MarkerGUIs.Sort((lhs, rhs) => lhs.zOrder.CompareTo(rhs.zOrder)); + } + + void RegisterRect(WindowState state) + { + treeViewRect = topMarker.treeViewRect; + + if (Event.current.type == EventType.Repaint && !parent.locked) + state.spacePartitioner.AddBounds(this, rect); + } + + public static bool CanCycleMarkers() + { + if (!SelectionManager.SelectedMarkers().Any()) + return false; + + var cluster = PickerUtils.PickedLayerableOfType(); + + if (cluster == null) + return false; + + // Only cycle if the marker is selected and nothing else is selected + return cluster.topMarker.IsSelected() && SelectionManager.Count() == 1; + } + + public static void CycleMarkers() + { + var cluster = PickerUtils.PickedLayerableOfType(); + + if (cluster == null) + return; + + cluster.topMarker.Deselect(); + cluster.CycleTop(); + cluster.topMarker.Select(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerClusterGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerClusterGUI.cs.meta new file mode 100644 index 0000000..692661f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerClusterGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2c03ae9aa36a4fd44a983831f44654be +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerGUI.cs new file mode 100644 index 0000000..5f054f7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerGUI.cs @@ -0,0 +1,193 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Timeline; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class TimelineMarkerGUI : TimelineItemGUI, ISnappable, IAttractable + { + public event Action onStartDrag; + + int m_ProjectedClipHash; + int m_MarkerHash; + bool m_Selectable; + + MarkerDrawOptions m_MarkerDrawOptions; + MarkerEditor m_Editor; + + IMarker marker { get; } + + bool selectable + { + get { return m_Selectable; } + } + + public double time + { + get { return marker.time; } + } + + public override double start + { + get { return time; } + } + + public override double end + { + get { return time; } + } + + public override void Select() + { + zOrder = zOrderProvider.Next(); + SelectionManager.Add(marker); + TimelineWindowViewPrefs.GetTrackViewModelData(parent.asset).markerTimeStamps[m_MarkerHash] = DateTime.UtcNow.Ticks; + } + + public override bool IsSelected() + { + return SelectionManager.Contains(marker); + } + + public override void Deselect() + { + SelectionManager.Remove(marker); + } + + public override ITimelineItem item + { + get { return ItemsUtils.ToItem(marker); } + } + + IZOrderProvider zOrderProvider { get; } + + public TimelineMarkerGUI(IMarker theMarker, IRowGUI parent, IZOrderProvider provider) : base(parent) + { + marker = theMarker; + m_Selectable = marker.GetType().IsSubclassOf(typeof(UnityObject)); + + m_MarkerHash = 0; + var o = marker as object; + if (!o.Equals(null)) + m_MarkerHash = o.GetHashCode(); + + zOrderProvider = provider; + zOrder = zOrderProvider.Next(); + ItemToItemGui.Add(marker, this); + m_Editor = CustomTimelineEditorCache.GetMarkerEditor(theMarker); + } + + int ComputeDirtyHash() + { + return time.GetHashCode(); + } + + static void DrawMarker(Rect drawRect, Type type, bool isSelected, bool isCollapsed, MarkerDrawOptions options) + { + if (Event.current.type == EventType.Repaint) + { + bool hasError = !string.IsNullOrEmpty(options.errorText); + + var style = StyleManager.UssStyleForType(type); + style.Draw(drawRect, GUIContent.none, false, false, !isCollapsed, isSelected); + + // case1141836: Use of GUI.Box instead of GUI.Label causes desync in UI controlID + if (hasError) + GUI.Label(drawRect, String.Empty, DirectorStyles.Instance.markerWarning); + + var tooltip = hasError ? options.errorText : options.tooltip; + if (!string.IsNullOrEmpty(tooltip) && drawRect.Contains(Event.current.mousePosition)) + { + GUIStyle.SetMouseTooltip(tooltip, drawRect); + } + } + } + + void UpdateDrawData() + { + if (Event.current.type == EventType.Layout) + { + try + { + m_MarkerDrawOptions = m_Editor.GetMarkerOptions(marker); + } + catch (Exception e) + { + Debug.LogException(e); + m_MarkerDrawOptions = CustomTimelineEditorCache.GetDefaultMarkerEditor().GetMarkerOptions(marker); + } + } + } + + public override void Draw(Rect trackRect, bool trackRectChanged, WindowState state) + { + UpdateDrawData(); + + // compute marker hash + var currentMarkerHash = ComputeDirtyHash(); + + // update the clip projected rectangle on the timeline + CalculateClipRectangle(trackRect, state, currentMarkerHash, trackRectChanged); + + var isSelected = selectable && SelectionManager.Contains(marker); + var showMarkers = parent.showMarkers; + + QueueOverlay(treeViewRect, isSelected, !showMarkers); + DrawMarker(treeViewRect, marker.GetType(), isSelected, !showMarkers, m_MarkerDrawOptions); + + if (Event.current.type == EventType.Repaint && showMarkers && !parent.locked) + state.spacePartitioner.AddBounds(this, rect); + } + + public void QueueOverlay(Rect rect, bool isSelected, bool isCollapsed) + { + if (Event.current.type == EventType.Repaint && m_Editor.supportsDrawOverlay) + { + rect = GUIClip.Unclip(rect); + TimelineWindow.instance.AddUserOverlay(marker, rect, m_Editor, isCollapsed, isSelected); + } + } + + public override void StartDrag() + { + if (onStartDrag != null) + onStartDrag.Invoke(); + } + + void CalculateClipRectangle(Rect trackRect, WindowState state, int projectedClipHash, bool trackRectChanged) + { + if (m_ProjectedClipHash == projectedClipHash && !trackRectChanged) + return; + + m_ProjectedClipHash = projectedClipHash; + treeViewRect = RectToTimeline(trackRect, state); + } + + public override Rect RectToTimeline(Rect trackRect, WindowState state) + { + var style = StyleManager.UssStyleForType(marker.GetType()); + var width = style.fixedWidth; + var height = style.fixedHeight; + var x = ((float)marker.time * state.timeAreaScale.x) + state.timeAreaTranslation.x + trackRect.xMin; + x -= 0.5f * width; + return new Rect(x, trackRect.y, width, height); + } + + public IEnumerable SnappableEdgesFor(IAttractable attractable, ManipulateEdges manipulateEdges) + { + var edges = new List(); + var attractableGUI = attractable as TimelineMarkerGUI; + var canAddEdges = !(attractableGUI != null && attractableGUI.parent == parent); + if (canAddEdges) + edges.Add(new Edge(time)); + return edges; + } + + public bool ShouldSnapTo(ISnappable snappable) + { + return snappable != this; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerGUI.cs.meta new file mode 100644 index 0000000..ecfff45 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ItemGui/TimelineMarkerGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8d34348f8b97a334291f5cf31adc5d67 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsClips.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsClips.cs new file mode 100644 index 0000000..9a51bc6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsClips.cs @@ -0,0 +1,77 @@ +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class ItemActionShortcutManipulator : Manipulator + { + protected override bool ExecuteCommand(Event evt, WindowState state) + { + if (state.IsEditingASubItem()) + return false; + + var consumed = false; + var clips = SelectionManager.SelectedClips(); + foreach (var clip in clips) + consumed |= ItemAction.HandleShortcut(state, evt, clip); + + var markers = SelectionManager.SelectedMarkers(); + foreach (var marker in markers) + consumed |= ItemAction.HandleShortcut(state, evt, marker); + + return consumed; + } + } + + class DrillIntoClip : Manipulator + { + protected override bool DoubleClick(Event evt, WindowState state) + { + if (evt.button != 0) + return false; + + var guiClip = PickerUtils.PickedLayerableOfType(); + + if (guiClip == null) + return false; + + if (!TimelineWindow.instance.state.editSequence.isReadOnly && (guiClip.clip.curves != null || guiClip.clip.animationClip != null)) + ItemAction.Invoke(state, guiClip.clip); + + if (guiClip.supportsSubTimelines) + ItemAction.Invoke(state, guiClip.clip); + + return true; + } + } + + class ContextMenuManipulator : Manipulator + { + protected override bool MouseDown(Event evt, WindowState state) + { + if (evt.button == 1) + ItemSelection.HandleSingleSelection(evt); + + return false; + } + + protected override bool ContextClick(Event evt, WindowState state) + { + if (evt.alt) + return false; + + var selectable = PickerUtils.PickedLayerableOfType(); + + if (selectable != null && selectable.IsSelected()) + { + SequencerContextMenu.ShowItemContextMenu(evt.mousePosition, + SelectionManager.SelectedClips().ToArray(), + SelectionManager.SelectedMarkers().ToArray()); + return true; + } + + return false; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsClips.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsClips.cs.meta new file mode 100644 index 0000000..c230e78 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsClips.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b222f61a1f7253e4d8e8cc82bfde9e42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTimeline.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTimeline.cs new file mode 100644 index 0000000..a3fcac8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTimeline.cs @@ -0,0 +1,287 @@ +using System; +using System.Linq; +using UnityEditor.ShortcutManagement; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class TimelinePanManipulator : Manipulator + { + const float k_MaxPanSpeed = 50.0f; + bool m_Active; + + protected override bool MouseDown(Event evt, WindowState state) + { + if ((evt.button == 2 && evt.modifiers == EventModifiers.None) || + (evt.button == 0 && evt.modifiers == EventModifiers.Alt)) + { + TimelineCursors.SetCursor(TimelineCursors.CursorType.Pan); + + m_Active = true; + return true; + } + + return false; + } + + protected override bool MouseUp(Event evt, WindowState state) + { + if (m_Active) + { + TimelineCursors.ClearCursor(); + state.editorWindow.Repaint(); + } + + return false; + } + + protected override bool MouseDrag(Event evt, WindowState state) + { + // Note: Do not rely on evt.button here as some 3rd party automation + // software does not properly set the button data during drag. + + if (!m_Active) + return false; + + return Pan(evt, state); + } + + protected override bool MouseWheel(Event evt, WindowState state) + { + if (Math.Abs(evt.delta.x) < 1e-5 || Math.Abs(evt.delta.x) <= Math.Abs(evt.delta.y)) + return false; + + TimelineZoomManipulator.InvalidateWheelZoom(); + + var panEvent = new Event(evt); + panEvent.delta = new Vector2(panEvent.delta.x * k_MaxPanSpeed * -1.0f, 0.0f); + + return Pan(panEvent, state); + } + + static bool Pan(Event evt, WindowState state) + { + var cursorRect = TimelineWindow.instance.sequenceContentRect; + cursorRect.xMax = TimelineWindow.instance.position.xMax; + cursorRect.yMax = TimelineWindow.instance.position.yMax; + + if (state.GetWindow() != null && state.GetWindow().treeView != null) + { + var scroll = state.GetWindow().treeView.scrollPosition; + scroll.y -= evt.delta.y; + state.GetWindow().treeView.scrollPosition = scroll; + state.OffsetTimeArea((int)evt.delta.x); + return true; + } + + return false; + } + } + + + class TimelineZoomManipulator : Manipulator + { + Vector2 m_MouseDownPos = Vector2.zero; + Vector2 m_InitialShownRange = Vector2.zero; + float m_FocalTime; + float m_LastMouseMoveX = -1; + float m_ZoomFactor = 1; + bool m_WheelUsedLast; + + TimelineZoomManipulator() {} + + public static readonly TimelineZoomManipulator Instance = new TimelineZoomManipulator(); + + internal void DoZoom(float zoomFactor, WindowState state) + { + var refRange = state.timeAreaShownRange; + DoZoom(zoomFactor, state, refRange, (refRange.x + refRange.y) / 2); + // Force resetting the reference zoom after a Framing operation + InvalidateWheelZoom(); + } + + static void DoZoom(float zoomFactor, WindowState state, Vector2 refRange, float focalTime) + { + const float kMinRange = 0.05f; // matches zoomable area. + + var s = zoomFactor; + if (s <= 0) return; + + var t = Mathf.Max(focalTime, refRange.x); + var x = (refRange.x + t * (s - 1)) / s; + var y = (refRange.y + t * (s - 1)) / s; + + // don't set it if we reach the limit or panning happens + if (Math.Abs(x - y) > kMinRange) + { + // Zoomable area does not protect 100% against crazy values + state.SetTimeAreaShownRange( + Math.Max(x, -WindowConstants.timeAreaShownRangePadding), + Math.Min(y, WindowState.kMaxShownTime)); + } + } + + internal static void InvalidateWheelZoom() + { + Instance.m_WheelUsedLast = false; + } + + protected override bool MouseDown(Event evt, WindowState state) + { + m_MouseDownPos = evt.mousePosition; + m_FocalTime = state.PixelToTime(m_MouseDownPos.x); + m_InitialShownRange = state.timeAreaShownRange; + return false; + } + + protected override bool MouseWheel(Event evt, WindowState state) + { + if (Math.Abs(evt.delta.y) < 1e-5) + return false; + + var zoomRect = TimelineWindow.instance.sequenceContentRect; + zoomRect.yMax += TimelineWindow.instance.horizontalScrollbarHeight; + + if (!zoomRect.Contains(evt.mousePosition)) + return false; + + if (!m_WheelUsedLast || Mathf.Abs(m_LastMouseMoveX - evt.mousePosition.x) > 1.0f) + { + m_LastMouseMoveX = evt.mousePosition.x; + m_FocalTime = state.PixelToTime(m_LastMouseMoveX); + m_InitialShownRange = state.timeAreaShownRange; + m_ZoomFactor = 1; + } + + var newZoom = m_ZoomFactor * (-evt.delta.y * 0.02f + 1); + newZoom = Mathf.Clamp(newZoom, 1e-7f, 1e7f); + + var lastRange = state.timeAreaShownRange; + DoZoom(newZoom, state, m_InitialShownRange, m_FocalTime); + + // if we hit a limit, don't change the zoom + // this prevents accumulating when zoom doesn't change + if (lastRange != state.timeAreaShownRange) + m_ZoomFactor = newZoom; + + m_WheelUsedLast = true; + return true; + } + + protected override bool MouseDrag(Event evt, WindowState state) + { + // Fast zoom... + if (evt.modifiers != EventModifiers.Alt || evt.button != 1) return false; + + var mouseMoveLength = Event.current.mousePosition - m_MouseDownPos; + var delta = Math.Abs(mouseMoveLength.x) > Math.Abs(mouseMoveLength.y) + ? mouseMoveLength.x + : -mouseMoveLength.y; + m_ZoomFactor = PixelToZoom(delta); + DoZoom(m_ZoomFactor, state, m_InitialShownRange, m_FocalTime); + + m_WheelUsedLast = false; + return true; + } + + static float PixelToZoom(float x) + { + const float pixel2Zoom = 1 / 300.0f; + x *= pixel2Zoom; + if (x < -0.75) + { + // Rational function that behaves like 1+x on [-0.75,inf) and asymptotically reaches zero on (-inf,-0.75] + // The coefficients were obtained by the following constraints: + //1) f(-0.75) = 0.25 + //2) f'(-0.75) = 1 C1 continuity + //3) f(-3) = 0.001 (asymptotically zero) + return 1 / (98.6667f + 268.444f * x + 189.63f * x * x); + } + return 1 + x; + } + } + + class TimelineShortcutManipulator : Manipulator + { + protected override bool ValidateCommand(Event evt, WindowState state) + { + return evt.commandName == EventCommandNames.Copy || + evt.commandName == EventCommandNames.Paste || + evt.commandName == EventCommandNames.Duplicate || + evt.commandName == EventCommandNames.SelectAll || + evt.commandName == EventCommandNames.Delete || + evt.commandName == EventCommandNames.SoftDelete || + evt.commandName == EventCommandNames.FrameSelected; + } + + protected override bool ExecuteCommand(Event evt, WindowState state) + { + if (state.IsCurrentEditingASequencerTextField()) + return false; + + if (evt.commandName == EventCommandNames.SelectAll) + { + TimelineAction.Invoke(state); + return true; + } + + if (evt.commandName == EventCommandNames.SoftDelete) + { + TimelineAction.Invoke(state); + return true; + } + + if (evt.commandName == EventCommandNames.FrameSelected) + { + TimelineAction.Invoke(state); + return true; + } + + return TimelineAction.HandleShortcut(state, evt); + } + } + + class InlineCurvesShortcutManipulator : Manipulator + { + protected override bool ExecuteCommand(Event evt, WindowState state) + { + if (state.IsCurrentEditingASequencerTextField()) + return false; + + var inlineCurveEditor = SelectionManager.GetCurrentInlineEditorCurve(); + if (inlineCurveEditor == null || !inlineCurveEditor.inlineCurvesSelected) + return false; + + if (evt.commandName != EventCommandNames.FrameSelected) + return false; + + TimelineAction.Invoke(state); + return true; + } + + // CurveEditor uses an hardcoded shortcut to execute the FrameAll action, preventing the ShortcutManager from + // ever picking it up. We have to hijack it to ensure our code is being run when framing inline curves. + protected override bool KeyDown(Event evt, WindowState state) + { + var inlineCurveEditor = SelectionManager.GetCurrentInlineEditorCurve(); + if (inlineCurveEditor == null || !inlineCurveEditor.inlineCurvesSelected) + return false; + + // Not conflicting with the hardcoded value + if (evt.keyCode != KeyCode.A) + return false; + + var combination = ShortcutManager.instance.GetShortcutBinding(Shortcuts.Timeline.frameAll) + .keyCombinationSequence.ToList(); + + var shortcutCombination = combination.First(); + var currentCombination = KeyCombination.FromKeyboardInput(evt); + + // User is not actually pressing the correct key combination for FrameAll + if (combination.Count == 1 && shortcutCombination.Equals(currentCombination)) + TimelineAction.Invoke(state); + + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTimeline.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTimeline.cs.meta new file mode 100644 index 0000000..5612ca4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTimeline.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d029640460cf8ff47bbbfe69f49ddf29 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTracks.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTracks.cs new file mode 100644 index 0000000..3bd2a1c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTracks.cs @@ -0,0 +1,103 @@ +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class InlineCurveResize : Manipulator + { + bool m_Captured; + + float m_CapturedHeight; + float m_CaptureMouseYPos; + + InlineCurveResizeHandle m_Target; + + protected override bool MouseDown(Event evt, WindowState state) + { + m_Target = PickerUtils.PickedInlineCurveResizer(); + if (m_Target == null) + return false; + + m_Captured = true; + m_CapturedHeight = TimelineWindowViewPrefs.GetInlineCurveHeight(m_Target.trackGUI.track); + m_CaptureMouseYPos = GUIUtility.GUIToScreenPoint(Event.current.mousePosition).y; + state.AddCaptured(this); + + return true; + } + + protected override bool MouseDrag(Event evt, WindowState state) + { + if (!m_Captured || m_Target == null) + return false; + + var trackGUI = m_Target.trackGUI; + + float inlineTrackHeight = m_CapturedHeight + + (GUIUtility.GUIToScreenPoint(Event.current.mousePosition).y - m_CaptureMouseYPos); + + TimelineWindowViewPrefs.SetInlineCurveHeight(trackGUI.track, Mathf.Max(inlineTrackHeight, 60.0f)); + + state.GetWindow().treeView.CalculateRowRects(); + + return true; + } + + protected override bool MouseUp(Event evt, WindowState state) + { + if (!m_Captured) + return false; + + state.RemoveCaptured(this); + m_Captured = false; + + return true; + } + } + + class TrackDoubleClick : Manipulator + { + protected override bool DoubleClick(Event evt, WindowState state) + { + if (evt.button != 0) + return false; + + var trackGUI = PickerUtils.PickedTrackBaseGUI(); + + if (trackGUI == null) + return false; + + // Double-click is only available for AnimationTracks: it conflicts with selection mechanics on other tracks + if ((trackGUI.track as AnimationTrack) == null) + return false; + + return EditTrackInAnimationWindow.Do(state, trackGUI.track); + } + } + + class TrackShortcutManipulator : Manipulator + { + protected override bool ExecuteCommand(Event evt, WindowState state) + { + if (state.IsCurrentEditingASequencerTextField()) + return false; + + var tracks = SelectionManager.SelectedTracks().ToList(); + + var itemGUIs = SelectionManager.SelectedClipGUI(); + + foreach (var itemGUI in itemGUIs) + { + var trackGUI = itemGUI.parent == null ? null : itemGUI.parent as TimelineTrackBaseGUI; + if (trackGUI == null) + continue; + + if (!tracks.Contains(trackGUI.track)) + tracks.Add(trackGUI.track); + } + + return TrackAction.HandleShortcut(state, evt, tracks.ToArray()); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTracks.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTracks.cs.meta new file mode 100644 index 0000000..cfbbb31 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/ManipulationsTracks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5151708d47edd4344ba8e7bd469d966e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs new file mode 100644 index 0000000..d0aac15 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs @@ -0,0 +1,91 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + abstract class Manipulator + { + int m_Id; + + protected virtual bool MouseDown(Event evt, WindowState state) { return false; } + protected virtual bool MouseDrag(Event evt, WindowState state) { return false; } + protected virtual bool MouseWheel(Event evt, WindowState state) { return false; } + protected virtual bool MouseUp(Event evt, WindowState state) { return false; } + protected virtual bool DoubleClick(Event evt, WindowState state) { return false; } + protected virtual bool KeyDown(Event evt, WindowState state) { return false; } + protected virtual bool KeyUp(Event evt, WindowState state) { return false; } + protected virtual bool ContextClick(Event evt, WindowState state) { return false; } + protected virtual bool ValidateCommand(Event evt, WindowState state) { return false; } + protected virtual bool ExecuteCommand(Event evt, WindowState state) { return false; } + + public virtual void Overlay(Event evt, WindowState state) {} + + public bool HandleEvent(WindowState state) + { + if (m_Id == 0) + m_Id = GUIUtility.GetPermanentControlID(); + + bool isHandled = false; + var evt = Event.current; + + switch (evt.GetTypeForControl(m_Id)) + { + case EventType.ScrollWheel: + isHandled = MouseWheel(evt, state); + break; + + case EventType.MouseUp: + { + if (GUIUtility.hotControl == m_Id) + { + isHandled = MouseUp(evt, state); + + GUIUtility.hotControl = 0; + evt.Use(); + } + } + break; + + case EventType.MouseDown: + { + isHandled = evt.clickCount < 2 ? MouseDown(evt, state) : DoubleClick(evt, state); + + if (isHandled) + GUIUtility.hotControl = m_Id; + } + break; + + case EventType.MouseDrag: + { + if (GUIUtility.hotControl == m_Id) + isHandled = MouseDrag(evt, state); + } + break; + + case EventType.KeyDown: + isHandled = KeyDown(evt, state); + break; + + case EventType.KeyUp: + isHandled = KeyUp(evt, state); + break; + + case EventType.ContextClick: + isHandled = ContextClick(evt, state); + break; + + case EventType.ValidateCommand: + isHandled = ValidateCommand(evt, state); + break; + + case EventType.ExecuteCommand: + isHandled = ExecuteCommand(evt, state); + break; + } + + if (isHandled) + evt.Use(); + + return isHandled; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs.meta new file mode 100644 index 0000000..9676bc0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Manipulator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2bf68308f6cdff141ab98cd34174e4f1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/PickerUtils.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/PickerUtils.cs new file mode 100644 index 0000000..50d0382 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/PickerUtils.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + static class PickerUtils + { + public static List pickedElements { get; private set; } + + public static void DoPick(WindowState state, Vector2 mousePosition) + { + if (state.GetWindow().sequenceContentRect.Contains(mousePosition)) + { + pickedElements = state.spacePartitioner.GetItemsAtPosition(mousePosition).ToList(); + } + else + { + if (pickedElements != null) + pickedElements.Clear(); + else + pickedElements = new List(); + } + } + + public static T PickedLayerableOfType() where T : class, ILayerable + { + return pickedElements.OfType().OrderBy(x => x.zOrder).LastOrDefault() as T; + } + + public static InlineCurveResizeHandle PickedInlineCurveResizer() + { + return pickedElements.FirstOrDefault(e => e is InlineCurveResizeHandle) as InlineCurveResizeHandle; + } + + public static TimelineTrackBaseGUI PickedTrackBaseGUI() + { + return pickedElements.FirstOrDefault(e => e is TimelineTrackBaseGUI) as TimelineTrackBaseGUI; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/PickerUtils.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/PickerUtils.cs.meta new file mode 100644 index 0000000..829ef0a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/PickerUtils.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 16950289b516d6747868e0f7bf7b37a0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping.meta new file mode 100644 index 0000000..bb822d5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 06ae1baf5524b314fa65b173b9eca869 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/IAttractable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/IAttractable.cs new file mode 100644 index 0000000..772809d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/IAttractable.cs @@ -0,0 +1,21 @@ +namespace UnityEditor.Timeline +{ + enum AttractedEdge + { + None, + Left, + Right + } + + interface IAttractable + { + bool ShouldSnapTo(ISnappable snappable); + double start { get; } + double end { get; } + } + + interface IAttractionHandler + { + void OnAttractedEdge(IAttractable attractable, ManipulateEdges manipulateEdges, AttractedEdge edge, double time); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/IAttractable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/IAttractable.cs.meta new file mode 100644 index 0000000..570a8b9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/IAttractable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6bfec54ce89b0b642a65d44def023b99 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/ISnappable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/ISnappable.cs new file mode 100644 index 0000000..52a17a6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/ISnappable.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; + +namespace UnityEditor.Timeline +{ + struct Edge + { + public double time { get; set; } + + public bool showSnapHint { get; set; } + + public Edge(double edgeTime, bool snapHint = true) : this() + { + time = edgeTime; + showSnapHint = snapHint; + } + } + + interface ISnappable + { + IEnumerable SnappableEdgesFor(IAttractable attractable, ManipulateEdges manipulateEdges); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/ISnappable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/ISnappable.cs.meta new file mode 100644 index 0000000..dccc3e2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/ISnappable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3664a2ade19bb7848a4d2c96ac9148e3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/SnapEngine.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/SnapEngine.cs new file mode 100644 index 0000000..8aca3d4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/SnapEngine.cs @@ -0,0 +1,288 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + enum ManipulateEdges + { + Left, + Right, + Both + } + + class SnapEngine + { + static readonly float k_MagnetInfluenceInPixels = 10.0f; + + class SnapInfo + { + public double time { get; set; } + + public bool showSnapHint { get; set; } + + public bool IsInInfluenceZone(double currentTime, WindowState state) + { + var pos = state.TimeToPixel(currentTime); + var magnetPos = state.TimeToPixel(time); + + return Math.Abs(pos - magnetPos) < k_MagnetInfluenceInPixels; + } + } + + struct TimeBoundaries + { + public TimeBoundaries(double l, double r) + { + left = l; + right = r; + } + + public readonly double left; + public readonly double right; + + public TimeBoundaries Translate(double d) + { + return new TimeBoundaries(left + d, right + d); + } + } + + public static bool displayDebugLayout; + + readonly IAttractable m_Attractable; + readonly IAttractionHandler m_AttractionHandler; + readonly ManipulateEdges m_ManipulateEdges; + + readonly WindowState m_State; + + double m_GrabbedTime; + TimeBoundaries m_GrabbedTimes; + + TimeBoundaries m_CurrentTimes; + + readonly List m_Magnets = new List(); + + bool m_SnapEnabled; + + public SnapEngine(IAttractable attractable, IAttractionHandler attractionHandler, ManipulateEdges manipulateEdges, WindowState state, + Vector2 mousePosition, IEnumerable snappables = null) + { + m_Attractable = attractable; + m_ManipulateEdges = manipulateEdges; + + m_AttractionHandler = attractionHandler; + m_State = state; + + m_CurrentTimes = m_GrabbedTimes = new TimeBoundaries(m_Attractable.start, m_Attractable.end); + m_GrabbedTime = m_State.PixelToTime(mousePosition.x); + + // Add Time zero as Magnet + AddMagnet(0.0, true, state); + + // Add current Time as Magnet + // case1157280 only add current time as magnet if visible + if (TimelineWindow.instance.currentMode.ShouldShowTimeCursor(m_State)) + AddMagnet(state.editSequence.time, true, state); + + if (state.IsEditingASubTimeline()) + { + // Add start and end of evaluable range as Magnets + // This includes the case where the master timeline has a fixed length + var range = state.editSequence.GetEvaluableRange(); + AddMagnet(range.start, true, state); + AddMagnet(range.end, true, state); + } + else if (state.masterSequence.asset.durationMode == TimelineAsset.DurationMode.FixedLength) + { + // Add end sequence Time as Magnet + AddMagnet(state.masterSequence.asset.duration, true, state); + } + + + if (snappables == null) + snappables = GetVisibleSnappables(m_State); + + foreach (var snappable in snappables) + { + if (!attractable.ShouldSnapTo(snappable)) + continue; + + var edges = snappable.SnappableEdgesFor(attractable, manipulateEdges); + foreach (var edge in edges) + AddMagnet(edge.time, edge.showSnapHint, state); + } + } + + public static IEnumerable GetVisibleSnappables(WindowState state) + { + Rect rect = TimelineWindow.instance.state.timeAreaRect; + rect.height = float.MaxValue; + return state.spacePartitioner.GetItemsInArea(rect).ToArray(); + } + + void AddMagnet(double magnetTime, bool showSnapHint, WindowState state) + { + var magnet = m_Magnets.FirstOrDefault(m => m.time.Equals(magnetTime)); + if (magnet == null) + { + if (IsMagnetInShownArea(magnetTime, state)) + m_Magnets.Add(new SnapInfo { time = magnetTime, showSnapHint = showSnapHint }); + } + else + { + magnet.showSnapHint |= showSnapHint; + } + } + + static bool IsMagnetInShownArea(double time, WindowState state) + { + var shownArea = state.timeAreaShownRange; + return time >= shownArea.x && time <= shownArea.y; + } + + SnapInfo GetMagnetAt(double time) + { + return m_Magnets.FirstOrDefault(m => m.time.Equals(time)); + } + + SnapInfo ClosestMagnet(double time) + { + SnapInfo candidate = null; + var min = double.MaxValue; + foreach (var magnetInfo in m_Magnets) + { + var m = Math.Abs(magnetInfo.time - time); + if (m < min) + { + candidate = magnetInfo; + min = m; + } + } + + if (candidate != null && candidate.IsInInfluenceZone(time, m_State)) + return candidate; + + return null; + } + + public void Snap(Vector2 currentMousePosition, EventModifiers modifiers) + { + var d = m_State.PixelToTime(currentMousePosition.x) - m_GrabbedTime; + + m_CurrentTimes = m_GrabbedTimes.Translate(d); + + bool isLeft = m_ManipulateEdges == ManipulateEdges.Left || m_ManipulateEdges == ManipulateEdges.Both; + bool isRight = m_ManipulateEdges == ManipulateEdges.Right || m_ManipulateEdges == ManipulateEdges.Both; + + bool attracted = false; + + m_SnapEnabled = modifiers == ManipulatorsUtils.actionModifier ? !m_State.edgeSnaps : m_State.edgeSnaps; + + if (m_SnapEnabled) + { + SnapInfo leftActiveMagnet = null; + SnapInfo rightActiveMagnet = null; + + if (isLeft) + leftActiveMagnet = ClosestMagnet(m_CurrentTimes.left); + + if (isRight) + rightActiveMagnet = ClosestMagnet(m_CurrentTimes.right); + + if (leftActiveMagnet != null || rightActiveMagnet != null) + { + attracted = true; + + bool leftAttraction = false; + + if (rightActiveMagnet == null) + { + // Attracted by a left magnet only. + leftAttraction = true; + } + else + { + if (leftActiveMagnet != null) + { + // Attracted by both magnets, choose the closest one. + var leftDistance = Math.Abs(leftActiveMagnet.time - m_CurrentTimes.left); + var rightDistance = Math.Abs(rightActiveMagnet.time - m_CurrentTimes.right); + + leftAttraction = leftDistance <= rightDistance; + } + // else, Attracted by right magnet only + } + + if (leftAttraction) + { + m_AttractionHandler.OnAttractedEdge(m_Attractable, m_ManipulateEdges, AttractedEdge.Left, leftActiveMagnet.time); + } + else + { + m_AttractionHandler.OnAttractedEdge(m_Attractable, m_ManipulateEdges, AttractedEdge.Right, rightActiveMagnet.time); + } + } + } + + if (!attracted) + { + var time = isLeft ? m_CurrentTimes.left : m_CurrentTimes.right; + + time = m_State.SnapToFrameIfRequired(time); + + m_AttractionHandler.OnAttractedEdge(m_Attractable, m_ManipulateEdges, AttractedEdge.None, time); + } + } + + public void OnGUI(bool showLeft = true, bool showRight = true) + { + if (displayDebugLayout) + { + // Display Magnet influence zone + foreach (var m in m_Magnets) + { + var window = TimelineWindow.instance; + var rect = new Rect(m_State.TimeToPixel(m.time) - k_MagnetInfluenceInPixels, window.state.timeAreaRect.yMax, 2f * k_MagnetInfluenceInPixels, m_State.windowHeight); + EditorGUI.DrawRect(rect, new Color(1f, 0f, 0f, 0.4f)); + } + + // Display Cursor position + var mousePos = Event.current.mousePosition; + var time = m_State.PixelToTime(mousePos.x); + var p = new Vector2(m_State.TimeToPixel(time), TimelineWindow.instance.state.timeAreaRect.yMax); + var s = new Vector2(1f, m_State.windowHeight); + EditorGUI.DrawRect(new Rect(p, s), Color.blue); + + p = new Vector2(m_State.TimeToPixel(m_GrabbedTime), TimelineWindow.instance.state.timeAreaRect.yMax); + s = new Vector2(1f, m_State.windowHeight); + EditorGUI.DrawRect(new Rect(p, s), Color.red); + + p = new Vector2(m_State.TimeToPixel(m_CurrentTimes.left), TimelineWindow.instance.state.timeAreaRect.yMax); + s = new Vector2(1f, m_State.windowHeight); + EditorGUI.DrawRect(new Rect(p, s), Color.yellow); + + p = new Vector2(m_State.TimeToPixel(m_CurrentTimes.right), TimelineWindow.instance.state.timeAreaRect.yMax); + EditorGUI.DrawRect(new Rect(p, s), Color.yellow); + } + + if (m_SnapEnabled) + { + if (showLeft) + DrawMagnetLineAt(m_Attractable.start); + + if (showRight) + DrawMagnetLineAt(m_Attractable.end); + } + } + + void DrawMagnetLineAt(double time) + { + var magnet = GetMagnetAt(time); + + if (magnet != null && magnet.showSnapHint) + Graphics.DrawLineAtTime(m_State, magnet.time, Color.white); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/SnapEngine.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/SnapEngine.cs.meta new file mode 100644 index 0000000..a2ce57d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/Snapping/SnapEngine.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 48967a2d5427ac2489cc0ea61da5f1a0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipHandle.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipHandle.cs new file mode 100644 index 0000000..6bd2238 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipHandle.cs @@ -0,0 +1,53 @@ +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class TimelineClipHandle : ILayerable + { + Rect m_Rect; + readonly TimelineClipGUI m_ClipGUI; + readonly TrimEdge m_TrimDirection; + readonly LayerZOrder m_ZOrder; + + public Rect boundingRect + { + get { return m_ClipGUI.parent.ToWindowSpace(m_Rect); } + } + + public TrimEdge trimDirection + { + get { return m_TrimDirection; } + } + + public TimelineClipGUI clipGUI + { + get { return m_ClipGUI; } + } + + public LayerZOrder zOrder + { + get { return m_ZOrder; } + } + + public TimelineClipHandle(TimelineClipGUI theClipGUI, TrimEdge trimDirection) + { + m_TrimDirection = trimDirection; + m_ClipGUI = theClipGUI; + m_ZOrder = theClipGUI.zOrder.ChangeLayer(Layer.ClipHandles); + } + + public void Draw(Rect clientRect, float width, WindowState state) + { + var handleRect = clientRect; + handleRect.width = width; + + if (m_TrimDirection == TrimEdge.End) + handleRect.x = clientRect.xMax - width; + + m_Rect = handleRect; + if (!TimelineWindow.instance.state.editSequence.isReadOnly) + EditorGUIUtility.AddCursorRect(handleRect, MouseCursor.SplitResizeLeftRight); + state.spacePartitioner.AddBounds(this, boundingRect); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipHandle.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipHandle.cs.meta new file mode 100644 index 0000000..df0e041 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipHandle.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3e29cdd1646803545b8fb18908666ec4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipUnion.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipUnion.cs new file mode 100644 index 0000000..4288992 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipUnion.cs @@ -0,0 +1,126 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditorInternal; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class TimelineClipUnion + { + List m_Members = new List(); + Rect m_BoundingRect; + Rect m_Union; + double m_Start; + double m_Duration; + bool m_InitUnionRect = true; + + void Add(TimelineClipGUI clip) + { + m_Members.Add(clip); + if (m_Members.Count == 1) + { + m_BoundingRect = clip.clippedRect; + } + else + { + m_BoundingRect = Encompass(m_BoundingRect, clip.rect); + } + } + + public void Draw(Rect parentRect, WindowState state) + { + if (m_InitUnionRect) + { + m_Start = m_Members.OrderBy(c => c.clip.start).First().clip.start; + m_Duration = m_Members.Sum(c => c.clip.duration); + m_InitUnionRect = false; + } + + m_Union = new Rect((float)(m_Start) * state.timeAreaScale.x, 0, (float)m_Duration * state.timeAreaScale.x, 0); + + // transform clipRect into pixel-space + m_Union.xMin += state.timeAreaTranslation.x + parentRect.x; + m_Union.xMax += state.timeAreaTranslation.x + parentRect.x; + m_Union.y = parentRect.y + 4.0f; + m_Union.height = parentRect.height - 8.0f; + + // calculate clipped rect + if (m_Union.x < parentRect.xMin) + { + var overflow = parentRect.xMin - m_Union.x; + m_Union.x = parentRect.xMin; + m_Union.width -= overflow; + } + + // bail out if completely clipped + if (m_Union.xMax < parentRect.xMin) + return; + if (m_Union.xMin > parentRect.xMax) + return; + + EditorGUI.DrawRect(m_Union, DirectorStyles.Instance.customSkin.colorClipUnion); + } + + public static List Build(List clips) + { + var unions = new List(); + if (clips == null) + return unions; + + TimelineClipUnion currentUnion = null; + foreach (var c in clips) + { + if (currentUnion == null) + { + currentUnion = new TimelineClipUnion(); + currentUnion.Add(c); + unions.Add(currentUnion); + } + else + { + Rect result; + if (Intersection(c.rect, currentUnion.m_BoundingRect, out result)) + { + currentUnion.Add(c); + } + else + { + currentUnion = new TimelineClipUnion(); + currentUnion.Add(c); + unions.Add(currentUnion); + } + } + } + + return unions; + } + + public static Rect Encompass(Rect a, Rect b) + { + Rect newRect = a; + newRect.xMin = Mathf.Min(a.xMin, b.xMin); + newRect.yMin = Mathf.Min(a.yMin, b.yMin); + newRect.xMax = Mathf.Max(a.xMax, b.xMax); + newRect.yMax = Mathf.Max(a.yMax, b.yMax); + return newRect; + } + + public static bool Intersection(Rect r1, Rect r2, out Rect intersection) + { + if (!r1.Overlaps(r2) && !r2.Overlaps(r1)) + { + intersection = new Rect(0, 0, 0, 0); + return false; + } + + float left = Mathf.Max(r1.xMin, r2.xMin); + float top = Mathf.Max(r1.yMin, r2.yMin); + + float right = Mathf.Min(r1.xMax, r2.xMax); + float bottom = Mathf.Min(r1.yMax, r2.yMax); + + intersection = new Rect(left, top, right - left, bottom - top); + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipUnion.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipUnion.cs.meta new file mode 100644 index 0000000..86b5654 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineClipUnion.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dc99dfeec967f2644b25dd6bace59b7e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDataSource.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDataSource.cs new file mode 100644 index 0000000..2337392 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDataSource.cs @@ -0,0 +1,222 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TimelineDataSource : TreeViewDataSource + { + readonly TimelineWindow m_TimelineWindow; + readonly TimelineTreeViewGUI m_ParentGUI; + + public List allTrackGuis { get; private set; } + + TreeViewItem treeroot + { + get { return m_RootItem; } + } + + public TimelineDataSource(TimelineTreeViewGUI parentGUI, TreeViewController treeView, TimelineWindow sequencerWindow) + : base(treeView) + { + m_TreeView.useExpansionAnimation = false; + m_TimelineWindow = sequencerWindow; + m_ParentGUI = parentGUI; + FetchData(); + } + + public override bool IsExpanded(TreeViewItem item) + { + if (!IsExpandable(item)) + return true; + + return IsExpanded(item.id); + } + + public override bool IsExpandable(TreeViewItem item) + { + var expandable = false; + + var track = item as TimelineTrackBaseGUI; + + if (track != null) + expandable = track.expandable; + + return expandable && item.hasChildren; + } + + public sealed override void FetchData() + { + // create root item + m_RootItem = new TimelineGroupGUI(m_TreeView, m_ParentGUI, 1, 0, null, "root", null, true); + + var tree = new Dictionary(); + + var filteredView = m_TimelineWindow.state.editSequence.asset.trackObjects; + allTrackGuis = new List(filteredView.Count()); + + foreach (var t in filteredView) + { + CreateItem(t, ref tree, filteredView.OfType(), m_RootItem); + } + + m_NeedRefreshRows = true; + + SetExpanded(m_RootItem, true); + } + + TimelineTrackBaseGUI CreateItem(ScriptableObject scriptableObject, ref Dictionary tree, IEnumerable selectedRows, TreeViewItem parentTreeViewItem) + { + // if a script doesn't load correctly, the trackAsset will be NULL, but the scriptableObject __should_ be intact (but == null will be true) + var trackAsset = scriptableObject as TrackAsset; + + if (tree == null) + throw new ArgumentNullException("tree"); + + if (selectedRows == null) + throw new ArgumentNullException("selectedRows"); + + if (trackAsset != null && tree.ContainsKey(trackAsset)) + return tree[trackAsset]; + + TimelineTrackBaseGUI parentItem = parentTreeViewItem as TimelineTrackBaseGUI; + + // should we create the parent? + TrackAsset parentTrack = trackAsset != null ? (trackAsset.parent as TrackAsset) : null; + if (trackAsset != null && parentTrack != null && selectedRows.Contains(parentTrack)) + { + parentItem = CreateItem(parentTrack, ref tree, selectedRows, parentTreeViewItem); + } + + int theDepth = -1; + if (parentItem != null) + theDepth = parentItem.depth; + theDepth++; + + TimelineTrackBaseGUI newItem; + if (trackAsset == null) + { + PlayableAsset parent = m_TimelineWindow.state.editSequence.asset; + if (parentItem != null && parentItem.track != null) + parent = parentItem.track; + + newItem = new TimelineTrackErrorGUI(m_TreeView, m_ParentGUI, 0, theDepth, parentItem, "ERROR", scriptableObject, parent); + } + else if (trackAsset.GetType() != typeof(GroupTrack)) + { + newItem = new TimelineTrackGUI(m_TreeView, m_ParentGUI, trackAsset.GetInstanceID(), theDepth, parentItem, trackAsset.name, trackAsset); + } + else + { + newItem = new TimelineGroupGUI(m_TreeView, m_ParentGUI, trackAsset.GetInstanceID(), theDepth, parentItem, trackAsset.name, trackAsset, false); + } + + allTrackGuis.Add(newItem); + + if (parentItem != null) + { + if (parentItem.children == null) + parentItem.children = new List(); + parentItem.children.Add(newItem); + } + else + { + m_RootItem = newItem; + SetExpanded(m_RootItem, true); + } + + if (trackAsset != null) + tree[trackAsset] = newItem; + + var actorAsAnimTrack = newItem.track as AnimationTrack; + bool isEditableInfiniteClip = actorAsAnimTrack != null && actorAsAnimTrack.ShouldShowInfiniteClipEditor(); + if (isEditableInfiniteClip) + { + if (newItem.children == null) + newItem.children = new List(); + } + else if (trackAsset != null) + { + // check if clips on this track have animation, if so we inline a animationEditorTrack + bool clipHasAnimatableAnimationCurves = false; + + for (var i = 0; i != newItem.track.clips.Length; ++i) + { + var curveClip = newItem.track.clips[i].curves; + var animationClip = newItem.track.clips[i].animationClip; + + // prune out clip with zero curves + if (curveClip != null && curveClip.empty) + curveClip = null; + + if (animationClip != null && animationClip.empty) + animationClip = null; + + // prune out clips coming from FBX + if (animationClip != null && ((animationClip.hideFlags & HideFlags.NotEditable) != 0)) + animationClip = null; + + if (!newItem.track.clips[i].recordable) + animationClip = null; + + clipHasAnimatableAnimationCurves = (curveClip != null) || (animationClip != null); + if (clipHasAnimatableAnimationCurves) + break; + } + + if (clipHasAnimatableAnimationCurves) + { + if (newItem.children == null) + newItem.children = new List(); + } + } + + if (trackAsset != null) + { + // Here we are using the internal subTrackObject so we can properly handle tracks whose script + // can't load (via ScriptableObject) + foreach (var subTrack in trackAsset.subTracksObjects) + { + CreateItem(subTrack, ref tree, selectedRows, newItem); + } + } + return newItem; + } + + public override bool CanBeParent(TreeViewItem item) + { + // will prevent track becoming subtracks via dragging + TimelineTrackGUI track = item as TimelineTrackGUI; + if (track != null) + return false; + + return true; + } + + public void ExpandItems(TreeViewItem item) + { + if (treeroot == item) + { + SetExpanded(treeroot, true); + } + + TimelineGroupGUI gui = item as TimelineGroupGUI; + if (gui != null && gui.track != null) + { + SetExpanded(item, !gui.track.GetCollapsed()); + } + + if (item.children != null) + { + for (int c = 0; c < item.children.Count; c++) + { + ExpandItems(item.children[c]); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDataSource.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDataSource.cs.meta new file mode 100644 index 0000000..5d40d2d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDataSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e8c30efa89029e447b0dc0efc75b294c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDragging.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDragging.cs new file mode 100644 index 0000000..8162c06 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDragging.cs @@ -0,0 +1,683 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEditor.Timeline; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; +using UnityObject = UnityEngine.Object; + +namespace UnityEditor +{ + class TimelineDragging : TreeViewDragging + { + public delegate bool TypeResolver(IEnumerable types, Action onComplete, string format); + + private static readonly string k_SelectTrackWithBinding = LocalizationDatabase.GetLocalizedString("Add {0}"); + private static readonly string k_SelectTrackWithClip = LocalizationDatabase.GetLocalizedString("Add Clip With {0}"); + private static readonly string k_SelectClip = LocalizationDatabase.GetLocalizedString("Add {0}"); + + + const string k_GenericDragId = "TimelineDragging"; + readonly int kDragSensitivity = 2; + readonly TimelineAsset m_Timeline; + readonly TimelineWindow m_Window; + + class TimelineDragData + { + public TimelineDragData(List draggedItems) + { + this.draggedItems = draggedItems; + } + + public readonly List draggedItems; + } + + public TimelineDragging(TreeViewController treeView, TimelineWindow window, TimelineAsset data) + : base(treeView) + { + m_Timeline = data; + m_Window = window; + } + + public override bool CanStartDrag(TreeViewItem targetItem, List draggedItemIDs, Vector2 mouseDownPosition) + { + if (Event.current.modifiers != EventModifiers.None) + return false; + + // Can only drag when starting in the track header area + if (mouseDownPosition.x > m_Window.sequenceHeaderRect.xMax) + return false; + + var trackBaseGUI = targetItem as TimelineTrackBaseGUI; + + if (trackBaseGUI == null || trackBaseGUI.track == null) + return false; + + if (trackBaseGUI.track.lockedInHierarchy) + return false; + + if (Event.current.type == EventType.MouseDrag && Mathf.Abs(Event.current.delta.y) < kDragSensitivity) + return false; + + // Make sure dragged items are selected + // TODO Use similar system than the SceneHierarchyWindow in order to handle selection between treeView and tracks. + SelectionManager.Clear(); + var draggedTrackGUIs = m_Window.allTracks.Where(t => draggedItemIDs.Contains(t.id)); + foreach (var trackGUI in draggedTrackGUIs) + SelectionManager.Add(trackGUI.track); + + return true; + } + + public override void StartDrag(TreeViewItem draggedNode, List draggedItemIDs) + { + DragAndDrop.PrepareStartDrag(); + var tvItems = SelectionManager.SelectedTrackGUI().Cast().ToList(); + DragAndDrop.SetGenericData(k_GenericDragId, new TimelineDragData(tvItems)); + DragAndDrop.objectReferences = new UnityObject[] {}; // this IS required for dragging to work + + string title = draggedItemIDs.Count + (draggedItemIDs.Count > 1 ? "s" : ""); // title is only shown on OSX (at the cursor) + + TimelineGroupGUI groupGui = draggedNode as TimelineGroupGUI; + if (groupGui != null) + { + title = groupGui.displayName; + } + DragAndDrop.StartDrag(title); + } + + public static bool IsDraggingEvent() + { + return Event.current.type == EventType.DragUpdated || + Event.current.type == EventType.DragExited || + Event.current.type == EventType.DragPerform; + } + + public static bool ResolveType(IEnumerable types, Action onComplete, string formatString) + { + if (!types.Any() || onComplete == null) + return false; + + if (types.Count() == 1) + { + onComplete(types.First()); + return true; + } + + var menu = new GenericMenu(); + + var builtInTypes = types.Where(TypeUtility.IsBuiltIn).OrderBy(TypeUtility.GetDisplayName).ToArray(); + var customTypes = types.Where(x => !TypeUtility.IsBuiltIn(x)).OrderBy(TypeUtility.GetDisplayName).ToArray(); + + foreach (var t in builtInTypes) + { + menu.AddItem(new GUIContent(string.Format(formatString, TypeUtility.GetDisplayName(t))), false, s => onComplete((System.Type)s), t); + } + + if (builtInTypes.Length != 0 && customTypes.Length != 0) + menu.AddSeparator(string.Empty); + + foreach (var t in customTypes) + { + menu.AddItem(new GUIContent(string.Format(formatString, TypeUtility.GetDisplayName(t))), false, s => onComplete((System.Type)s), t); + } + + menu.ShowAsContext(); + return true; + } + + public override bool DragElement(TreeViewItem targetItem, Rect targetItemRect, int row) + { + if (TimelineWindow.instance.state.editSequence.isReadOnly) + return false; + // the drop rect contains the row rect plus additional spacing. The base drag element overlaps 1/2 the height of the next track + // which interferes with track bindings + var targetTrack = targetItem as TimelineGroupGUI; + if (row > 0 && targetTrack != null && !targetTrack.dropRect.Contains(Event.current.mousePosition)) + return false; + + return base.DragElement(targetItem, targetItemRect, row); + } + + TreeViewItem GetNextItem(TreeViewItem item) + { + if (item == null) + return null; + + if (item.parent == null) + { + int row = m_Window.treeView.data.GetRow(item.id); + var items = m_Window.treeView.data.GetRows(); + if (items.Count > row + 1) + return items[row + 1]; + return null; + } + + var children = item.parent.children; + if (children == null) + return null; + + for (int i = 0; i < children.Count - 1; i++) + { + if (children[i] == item) + return children[i + 1]; + } + return null; + } + + private static TrackAsset GetTrack(TreeViewItem item) + { + TimelineTrackBaseGUI baseGui = item as TimelineTrackBaseGUI; + if (baseGui == null) + return null; + return baseGui.track; + } + + // The drag and drop may be over an expanded group but might be between tracks + private void HandleNestedItemGUI(ref TreeViewItem parentItem, ref TreeViewItem targetItem, ref TreeViewItem insertBefore) + { + const float kTopPad = 5; + const float kBottomPad = 5; + + insertBefore = null; + + if (!ShouldUseHierarchyDragAndDrop()) + return; + + var targetTrack = targetItem as TimelineGroupGUI; + if (targetTrack == null) + return; + + var mousePosition = Event.current.mousePosition; + + var dropBefore = targetTrack.rowRect.yMin + kTopPad > mousePosition.y; + var dropAfter = !(targetTrack.track is GroupTrack) && (targetTrack.rowRect.yMax - kBottomPad < mousePosition.y); + + targetTrack.drawInsertionMarkerBefore = dropBefore; + targetTrack.drawInsertionMarkerAfter = dropAfter; + + if (dropBefore) + { + targetItem = parentItem; + parentItem = targetItem != null ? targetItem.parent : null; + insertBefore = targetTrack; + } + else if (dropAfter) + { + targetItem = parentItem; + parentItem = targetItem != null ? targetItem.parent : null; + insertBefore = GetNextItem(targetTrack); + } + else if (targetTrack.track is GroupTrack) + { + targetTrack.isDropTarget = true; + } + } + + public override DragAndDropVisualMode DoDrag(TreeViewItem parentItem, TreeViewItem targetItem, bool perform, DropPosition dropPos) + { + m_Window.isDragging = false; + + var retMode = DragAndDropVisualMode.None; + + var trackDragData = DragAndDrop.GetGenericData(k_GenericDragId) as TimelineDragData; + + if (trackDragData != null) + { + retMode = HandleTrackDrop(parentItem, targetItem, perform, dropPos); + if (retMode == DragAndDropVisualMode.Copy && targetItem != null && Event.current.type == EventType.DragUpdated) + { + var targetActor = targetItem as TimelineGroupGUI; + if (targetActor != null) + targetActor.isDropTarget = true; + } + } + else if (DragAndDrop.objectReferences.Any()) + { + var objectsBeingDropped = DragAndDrop.objectReferences.OfType(); + var director = m_Window.state.editSequence.director; + + if (ShouldUseHierarchyDragAndDrop()) + { + // for object drawing + var originalTarget = targetItem; + TreeViewItem insertBeforeItem = null; + HandleNestedItemGUI(ref parentItem, ref targetItem, ref insertBeforeItem); + var track = GetTrack(targetItem); + var parent = GetTrack(parentItem); + var insertBefore = GetTrack(insertBeforeItem); + retMode = HandleHierarchyPaneDragAndDrop(objectsBeingDropped, track, perform, m_Timeline, director, ResolveType, insertBefore); + + // fallback to old clip behaviour + if (retMode == DragAndDropVisualMode.None) + { + retMode = HandleClipPaneObjectDragAndDrop(objectsBeingDropped, track, perform, m_Timeline, parent, director, m_Window.state.timeAreaShownRange.x, ResolveType, insertBefore); + } + + // if we are rejected, clear any drop markers + if (retMode == DragAndDropVisualMode.Rejected && targetItem != null) + { + ClearInsertionMarkers(originalTarget); + ClearInsertionMarkers(targetItem); + ClearInsertionMarkers(parentItem); + ClearInsertionMarkers(insertBeforeItem); + } + } + else + { + var candidateTime = TimelineHelpers.GetCandidateTime(m_Window.state, Event.current.mousePosition); + retMode = HandleClipPaneObjectDragAndDrop(objectsBeingDropped, GetTrack(targetItem), perform, m_Timeline, GetTrack(parentItem), director, candidateTime, ResolveType); + } + } + + m_Window.isDragging = false; + + return retMode; + } + + void ClearInsertionMarkers(TreeViewItem item) + { + var trackGUI = item as TimelineTrackBaseGUI; + if (trackGUI != null) + { + trackGUI.drawInsertionMarkerAfter = false; + trackGUI.drawInsertionMarkerBefore = false; + trackGUI.isDropTarget = false; + } + } + + bool ShouldUseHierarchyDragAndDrop() + { + return m_Window.state.IsEditingAnEmptyTimeline() || m_Window.state.sequencerHeaderWidth > Event.current.mousePosition.x; + } + + public static DragAndDropVisualMode HandleHierarchyPaneDragAndDrop(IEnumerable objectsBeingDropped, TrackAsset targetTrack, bool perform, TimelineAsset timeline, PlayableDirector director, TypeResolver typeResolver, TrackAsset insertBefore = null) + { + if (timeline == null) + return DragAndDropVisualMode.Rejected; + + // if we are over a target track, defer to track binding system (implemented in TrackGUIs), unless we are a groupTrack + if (targetTrack != null && (targetTrack as GroupTrack) == null) + return DragAndDropVisualMode.None; + + if (targetTrack != null && targetTrack.lockedInHierarchy) + return DragAndDropVisualMode.Rejected; + + var tracksWithBinding = objectsBeingDropped.SelectMany(TypeUtility.GetTracksCreatableFromObject).Distinct(); + if (!tracksWithBinding.Any()) + return DragAndDropVisualMode.None; + + if (perform) + { + System.Action onResolve = trackType => + { + foreach (var obj in objectsBeingDropped) + { + if (!obj.IsPrefab() && TypeUtility.IsTrackCreatableFromObject(obj, trackType)) + { + var newTrack = TimelineHelpers.CreateTrack(timeline, trackType, targetTrack, string.Empty); + if (insertBefore != null) + { + if (targetTrack != null) + targetTrack.MoveLastTrackBefore(insertBefore); + else + timeline.MoveLastTrackBefore(insertBefore); + } + + TimelineHelpers.Bind(newTrack, obj, director); + } + } + TimelineEditor.Refresh(RefreshReason.ContentsAddedOrRemoved); + }; + typeResolver(tracksWithBinding, onResolve, k_SelectTrackWithBinding); + } + + return DragAndDropVisualMode.Copy; + } + + public static DragAndDropVisualMode HandleClipPaneObjectDragAndDrop(IEnumerable objectsBeingDropped, TrackAsset targetTrack, bool perform, TimelineAsset timeline, TrackAsset parent, PlayableDirector director, double candidateTime, TypeResolver typeResolver, TrackAsset insertBefore = null) + { + if (timeline == null) + return DragAndDropVisualMode.Rejected; + + // locked tracks always reject + if (targetTrack != null && targetTrack.lockedInHierarchy) + return DragAndDropVisualMode.Rejected; + + // treat group tracks as having no track + if (targetTrack is GroupTrack) + { + parent = targetTrack; + targetTrack = null; + } + + // Special case for monoscripts, since they describe the type + if (objectsBeingDropped.Any(o => o is MonoScript)) + return HandleClipPaneMonoScriptDragAndDrop(objectsBeingDropped.OfType(), targetTrack, perform, timeline, parent, director, candidateTime); + + // no unity objects, or explicit exceptions + if (!objectsBeingDropped.Any() || objectsBeingDropped.Any(o => !ValidateObjectDrop(o))) + return DragAndDropVisualMode.Rejected; + + // reject scene references if we have no context + if (director == null && objectsBeingDropped.Any(o => o.IsSceneObject())) + return DragAndDropVisualMode.Rejected; + + var validTrackTypes = objectsBeingDropped.SelectMany(o => TypeUtility.GetTrackTypesForObject(o)).Distinct().ToList(); + // special case for playable assets + if (objectsBeingDropped.Any(o => TypeUtility.IsConcretePlayableAsset(o.GetType()))) + { + var playableAssets = objectsBeingDropped.OfType().Where(o => TypeUtility.IsConcretePlayableAsset(o.GetType())); + return HandleClipPanePlayableAssetDragAndDrop(playableAssets, targetTrack, perform, timeline, parent, director, candidateTime, typeResolver); + } + + var markerTypes = objectsBeingDropped.SelectMany(o => TypeUtility.MarkerTypesWithFieldForObject(o)).Distinct(); + + // Markers support all tracks + if (!markerTypes.Any()) + { + // No tracks support this object + if (!validTrackTypes.Any()) + return DragAndDropVisualMode.Rejected; + + // no tracks for this object + if (targetTrack != null && !validTrackTypes.Contains(targetTrack.GetType())) + return DragAndDropVisualMode.Rejected; + } + + // there is no target track, dropping to empty space, or onto a group + if (perform) + { + // choose track and then clip + if (targetTrack == null) + { + var createdTrack = HandleTrackAndItemCreation(objectsBeingDropped, candidateTime, typeResolver, timeline, parent, validTrackTypes, insertBefore); + if (!createdTrack) + { + timeline.CreateMarkerTrack(); + HandleItemCreation(objectsBeingDropped, timeline.markerTrack, candidateTime, typeResolver, true); // menu is always popped if ambiguous choice + } + } + // just choose clip/marker + else + { + HandleItemCreation(objectsBeingDropped, targetTrack, candidateTime, typeResolver, true); // menu is always popped if ambiguous choice + } + } + + return DragAndDropVisualMode.Copy; + } + + static bool HandleTrackAndItemCreation(IEnumerable objectsBeingDropped, double candidateTime, TypeResolver typeResolver, TimelineAsset timeline, TrackAsset parent, IEnumerable validTrackTypes, TrackAsset insertBefore = null) + { + Action onResolved = t => + { + var newTrack = TimelineHelpers.CreateTrack(timeline, t, parent, string.Empty); + if (insertBefore != null) + { + if (parent != null) + parent.MoveLastTrackBefore(insertBefore); + else + timeline.MoveLastTrackBefore(insertBefore); + } + HandleItemCreation(objectsBeingDropped, newTrack, candidateTime, typeResolver, validTrackTypes.Count() == 1); // menu is popped if ambiguous clip choice and unambiguous track choice + }; + return typeResolver(validTrackTypes, t => onResolved(t), k_SelectTrackWithClip); // Did it create a track + } + + static void HandleItemCreation(IEnumerable objectsBeingDropped, TrackAsset targetTrack, double candidateTime, TypeResolver typeResolver, bool allowMenu) + { + var assetTypes = objectsBeingDropped.Select(o => + TypeUtility.GetAssetTypesForObject(targetTrack.GetType(), o) + .Union(TypeUtility.MarkerTypesWithFieldForObject(o))).ToList(); + Action onCreateItem = assetType => + { + if (typeof(PlayableAsset).IsAssignableFrom(assetType)) + { + TimelineHelpers.CreateClipsFromObjects(assetType, targetTrack, candidateTime, + objectsBeingDropped); + } + else + { + TimelineHelpers.CreateMarkersFromObjects(assetType, targetTrack, candidateTime, objectsBeingDropped); + } + }; + + var flatAssetTypes = assetTypes.SelectMany(x => x).Distinct(); + // If there is a one to one mapping between assets and timeline types, no need to go through the type resolution, not ambiguous. + if (assetTypes.All(x => x.Count() <= 1)) + { + foreach (var type in flatAssetTypes) + { + onCreateItem(type); + } + } + else + { + if (!allowMenu) // If we already popped a menu, and are presented with an ambiguous choice, take the first entry + { + flatAssetTypes = new[] {flatAssetTypes.First()}; + } + + typeResolver(flatAssetTypes, onCreateItem, k_SelectClip); + } + } + + /// Handles drag and drop of a mono script. + public static DragAndDropVisualMode HandleClipPaneMonoScriptDragAndDrop(IEnumerable scriptsBeingDropped, TrackAsset targetTrack, bool perform, TimelineAsset timeline, TrackAsset parent, PlayableDirector director, double candidateTime) + { + var playableAssetTypes = scriptsBeingDropped.Select(s => s.GetClass()).Where(TypeUtility.IsConcretePlayableAsset).Distinct(); + if (!playableAssetTypes.Any()) + return DragAndDropVisualMode.Rejected; + + var targetTrackType = typeof(PlayableTrack); + if (targetTrack != null) + targetTrackType = targetTrack.GetType(); + + var trackAssetsTypes = TypeUtility.GetPlayableAssetsHandledByTrack(targetTrackType); + var supportedTypes = trackAssetsTypes.Intersect(playableAssetTypes); + if (!supportedTypes.Any()) + return DragAndDropVisualMode.Rejected; + + if (perform) + { + if (targetTrack == null) + targetTrack = TimelineHelpers.CreateTrack(timeline, targetTrackType, parent, string.Empty); + TimelineHelpers.CreateClipsFromTypes(supportedTypes, targetTrack, candidateTime); + } + + return DragAndDropVisualMode.Copy; + } + + public static DragAndDropVisualMode HandleClipPanePlayableAssetDragAndDrop(IEnumerable assetsBeingDropped, TrackAsset targetTrack, bool perform, TimelineAsset timeline, TrackAsset parent, PlayableDirector director, double candidateTime, TypeResolver typeResolver) + { + // get the list of supported track types + var assetTypes = assetsBeingDropped.Select(x => x.GetType()).Distinct(); + IEnumerable supportedTypes = null; + if (targetTrack == null) + { + supportedTypes = TypeUtility.AllTrackTypes().Where(t => TypeUtility.GetPlayableAssetsHandledByTrack(t).Intersect(assetTypes).Any()).ToList(); + } + else + { + supportedTypes = Enumerable.Empty(); + var trackAssetTypes = TypeUtility.GetPlayableAssetsHandledByTrack(targetTrack.GetType()); + if (trackAssetTypes.Intersect(assetTypes).Any()) + supportedTypes = new[] {targetTrack.GetType()}; + } + + if (!supportedTypes.Any()) + return DragAndDropVisualMode.Rejected; + + if (perform) + { + Action onResolved = (t) => + { + if (targetTrack == null) + targetTrack = TimelineHelpers.CreateTrack(timeline, t, parent, string.Empty); + + var clipTypes = TypeUtility.GetPlayableAssetsHandledByTrack(targetTrack.GetType()); + foreach (var asset in assetsBeingDropped) + { + if (clipTypes.Contains(asset.GetType())) + TimelineHelpers.CreateClipOnTrackFromPlayableAsset(asset, targetTrack, candidateTime); + } + }; + + typeResolver(supportedTypes, onResolved, k_SelectTrackWithClip); + } + + + return DragAndDropVisualMode.Copy; + } + + static bool ValidateObjectDrop(UnityObject obj) + { + // legacy animation clips are not supported at all + AnimationClip clip = obj as AnimationClip; + if (clip != null && clip.legacy) + return false; + + return !(obj is TimelineAsset); + } + + public DragAndDropVisualMode HandleTrackDrop(TreeViewItem parentItem, TreeViewItem targetItem, bool perform, DropPosition dropPos) + { + ((TimelineTreeView)m_Window.treeView.gui).showInsertionMarker = false; + var trackDragData = (TimelineDragData)DragAndDrop.GetGenericData(k_GenericDragId); + bool validDrag = ValidDrag(targetItem, trackDragData.draggedItems); + if (!validDrag) + return DragAndDropVisualMode.None; + + + var draggedTracks = trackDragData.draggedItems.OfType().Select(x => x.track).ToList(); + if (draggedTracks.Count == 0) + return DragAndDropVisualMode.None; + + if (parentItem != null) + { + var parentActor = parentItem as TimelineGroupGUI; + if (parentActor != null && parentActor.track != null) + { + if (parentActor.track.lockedInHierarchy) + return DragAndDropVisualMode.Rejected; + + if (draggedTracks.Any(x => !TimelineCreateUtilities.ValidateParentTrack(parentActor.track, x.GetType()))) + return DragAndDropVisualMode.Rejected; + } + } + + var insertAfterItem = targetItem as TimelineGroupGUI; + if (insertAfterItem != null && insertAfterItem.track != null) + { + ((TimelineTreeView)m_Window.treeView.gui).showInsertionMarker = true; + } + + if (dropPos == DropPosition.Upon) + { + var groupGUI = targetItem as TimelineGroupGUI; + if (groupGUI != null) + groupGUI.isDropTarget = true; + } + + if (perform) + { + PlayableAsset targetParent = m_Timeline; + var parentActor = parentItem as TimelineGroupGUI; + + if (parentActor != null && parentActor.track != null) + targetParent = parentActor.track; + + TrackAsset siblingTrack = insertAfterItem != null ? insertAfterItem.track : null; + + // where the user drops after the last track, make sure to place it after all the tracks + if (targetParent == m_Timeline && dropPos == DropPosition.Below && siblingTrack == null) + { + siblingTrack = m_Timeline.GetRootTracks().LastOrDefault(x => !draggedTracks.Contains(x)); + } + + if (TrackExtensions.ReparentTracks(TrackExtensions.FilterTracks(draggedTracks).ToList(), targetParent, siblingTrack, dropPos == DropPosition.Above)) + { + m_Window.state.Refresh(); + } + } + + return DragAndDropVisualMode.Move; + } + + public static void HandleBindingDragAndDrop(TrackAsset dropTarget, Type requiredBindingType) + { + var objectBeingDragged = DragAndDrop.objectReferences[0]; + + var action = BindingUtility.GetBindingAction(requiredBindingType, objectBeingDragged); + DragAndDrop.visualMode = action == BindingAction.DoNotBind + ? DragAndDropVisualMode.Rejected + : DragAndDropVisualMode.Link; + + if (action == BindingAction.DoNotBind || Event.current.type != EventType.DragPerform) + return; + + var director = TimelineEditor.inspectedDirector; + + switch (action) + { + case BindingAction.BindDirectly: + { + BindingUtility.Bind(director, dropTarget, objectBeingDragged); + break; + } + case BindingAction.BindToExistingComponent: + { + var gameObjectBeingDragged = objectBeingDragged as GameObject; + Debug.Assert(gameObjectBeingDragged != null, "The object being dragged was detected as being a GameObject"); + + BindingUtility.Bind(director, dropTarget, gameObjectBeingDragged.GetComponent(requiredBindingType)); + break; + } + case BindingAction.BindToMissingComponent: + { + var gameObjectBeingDragged = objectBeingDragged as GameObject; + Debug.Assert(gameObjectBeingDragged != null, "The object being dragged was detected as being a GameObject"); + + var typeNameOfComponent = requiredBindingType.ToString().Split(".".ToCharArray()).Last(); + var bindMenu = new GenericMenu(); + + bindMenu.AddItem( + EditorGUIUtility.TextContent("Create " + typeNameOfComponent + " on " + gameObjectBeingDragged.name), + false, + nullParam => BindingUtility.Bind(director, dropTarget, Undo.AddComponent(gameObjectBeingDragged, requiredBindingType)), + null); + + bindMenu.AddSeparator(""); + bindMenu.AddItem(EditorGUIUtility.TrTextContent("Cancel"), false, userData => {}, null); + bindMenu.ShowAsContext(); + + break; + } + default: + { + //no-op + return; + } + } + + DragAndDrop.AcceptDrag(); + } + + static bool ValidDrag(TreeViewItem target, List draggedItems) + { + TreeViewItem currentParent = target; + while (currentParent != null) + { + if (draggedItems.Contains(currentParent)) + return false; + currentParent = currentParent.parent; + } + + // dragging into the sequence itself + return true; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDragging.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDragging.cs.meta new file mode 100644 index 0000000..4aff0f8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineDragging.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fcd66bf74cbeb264aa99679c7df84427 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineGroupGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineGroupGUI.cs new file mode 100644 index 0000000..8341b8b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineGroupGUI.cs @@ -0,0 +1,310 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TimelineGroupGUI : TimelineTrackBaseGUI + { + protected DirectorStyles m_Styles; + protected Rect m_TreeViewRect = new Rect(0, 0, 0, 0); + protected GUIContent m_ProblemIcon = new GUIContent(); + + bool m_MustRecomputeUnions = true; + int m_GroupDepth; + readonly bool m_IsReferencedTrack; + readonly List m_Unions = new List(); + + public override Rect boundingRect + { + get { return ToWindowSpace(m_TreeViewRect); } + } + + public Rect ToWindowSpace(Rect localRect) + { + localRect.position += treeViewToWindowTransformation; + return localRect; + } + + public override bool expandable + { + get { return !m_IsRoot; } + } + + // The expanded rectangle (contains children) as calculated by the the tree gui + public Rect expandedRect { get; set; } + // The row rectangle (header only) as calculated by the tree gui + public Rect rowRect { get; set; } + // the drop rectangle as set by the tree gui when targetted by a drag and drop + public Rect dropRect { get; set; } + + public TimelineGroupGUI(TreeViewController treeview, TimelineTreeViewGUI treeviewGUI, int id, int depth, TreeViewItem parent, string displayName, TrackAsset trackAsset, bool isRoot) + : base(id, depth, parent, displayName, trackAsset, treeview, treeviewGUI) + { + m_Styles = DirectorStyles.Instance; + m_IsRoot = isRoot; + + var trackPath = AssetDatabase.GetAssetPath(trackAsset); + var sequencePath = AssetDatabase.GetAssetPath(treeviewGUI.TimelineWindow.state.editSequence.asset); + if (trackPath != sequencePath) + m_IsReferencedTrack = true; + + m_GroupDepth = CalculateGroupDepth(parent); + } + + public virtual float GetHeight(WindowState state) + { + // group tracks don't scale in height + return TrackEditor.DefaultTrackHeight; + } + + public override void OnGraphRebuilt() {} + + static int CalculateGroupDepth(TreeViewItem parent) + { + int depth = 0; + + bool done = false; + do + { + var gui = parent as TimelineGroupGUI; + if (gui == null || gui.track == null) + done = true; + else + { + if (gui.track is GroupTrack) + depth++; + + parent = parent.parent; + } + } + while (!done); + + return depth; + } + + internal static float Spaced(float width) + { + return width > 0 ? width + WindowConstants.trackHeaderButtonSpacing : 0; + } + + void DrawTrackButtons(Rect headerRect, WindowState state) + { + const float buttonSize = WindowConstants.trackHeaderButtonSize; + const float padding = WindowConstants.trackHeaderButtonPadding; + + var buttonRect = new Rect(headerRect.xMax - buttonSize - padding, headerRect.y + ((headerRect.height - buttonSize) / 2f), buttonSize, buttonSize); + + if (GUI.Button(buttonRect, EditorGUIUtility.IconContent("CreateAddNew"), m_Styles.trackGroupAddButton)) + { + // the drop down will apply to all selected tracks + if (!SelectionManager.Contains(track)) + { + SelectionManager.Clear(); + SelectionManager.Add(track); + } + SequencerContextMenu.ShowNewTracksContextMenu(SelectionManager.SelectedTracks().ToArray(), TimelineWindow.state, buttonRect); + } + buttonRect.x -= buttonSize; + buttonRect.x -= Spaced(DrawMuteButton(buttonRect, state)); + buttonRect.x -= Spaced(DrawLockButton(buttonRect, state)); + } + + public void SetExpanded(bool expanded) + { + var collapseChanged = expanded != isExpanded; + isExpanded = expanded; + if (collapseChanged) + { + track.SetCollapsed(!expanded); + m_MustRecomputeUnions = true; + } + } + + public override void Draw(Rect headerRect, Rect contentRect, WindowState state) + { + if (track == null || m_IsRoot) + return; + + if (m_MustRecomputeUnions) + RecomputeRectUnions(); + + if (depth == 1) + Graphics.DrawBackgroundRect(state, headerRect); + + var background = headerRect; + background.height = expandedRect.height; + + var groupColor = TrackResourceCache.GetTrackColor(track); + + m_TreeViewRect = contentRect; + + var col = groupColor; + + var isSelected = SelectionManager.Contains(track); + + if (isSelected) + col = DirectorStyles.Instance.customSkin.colorSelection; + else if (isDropTarget) + col = DirectorStyles.Instance.customSkin.colorDropTarget; + else + { + if (m_GroupDepth % 2 == 1) + { + float h, s, v; + Color.RGBToHSV(col, out h, out s, out v); + v += 0.06f; + col = Color.HSVToRGB(h, s, v); + } + } + + if (background.width > 0) + { + using (new GUIColorOverride(col)) + GUI.Box(background, GUIContent.none, m_Styles.groupBackground); + } + + var trackRectBackground = headerRect; + trackRectBackground.xMin += background.width; + trackRectBackground.width = contentRect.width; + trackRectBackground.height = background.height; + + if (isSelected) + { + col = state.IsEditingASubTimeline() + ? m_Styles.customSkin.colorTrackSubSequenceBackgroundSelected + : m_Styles.customSkin.colorTrackBackgroundSelected; + } + else + { + col = m_Styles.customSkin.colorGroupTrackBackground; + } + + EditorGUI.DrawRect(trackRectBackground, col); + if (!isExpanded && children != null && children.Count > 0) + { + var collapsedTrackRect = contentRect; + + foreach (var u in m_Unions) + u.Draw(collapsedTrackRect, state); + } + + using (new GUIGroupScope(headerRect)) + { + var groupRect = new Rect(0, 0, headerRect.width, headerRect.height); + DrawName(groupRect, isSelected); + DrawTrackButtons(groupRect, state); + } + + if (IsTrackRecording(state)) + { + using (new GUIColorOverride(DirectorStyles.Instance.customSkin.colorTrackBackgroundRecording)) + GUI.Label(background, GUIContent.none, m_Styles.displayBackground); + } + + // is this a referenced track? + if (m_IsReferencedTrack) + { + var refRect = contentRect; + refRect.x = state.timeAreaRect.xMax - 20.0f; + refRect.y += 5.0f; + refRect.width = 30.0f; + GUI.Label(refRect, DirectorStyles.referenceTrackLabel, EditorStyles.label); + } + + var bgRect = contentRect; + if (track as GroupTrack != null || AllChildrenMuted(this)) + bgRect.height = expandedRect.height; + DrawTrackState(contentRect, bgRect, track); + } + + void DrawName(Rect rect, bool isSelected) + { + var labelRect = rect; + labelRect.xMin += 20; + var actorName = track != null ? track.name : "missing"; + labelRect.width = m_Styles.groupFont.CalcSize(new GUIContent(actorName)).x; + labelRect.width = Math.Max(labelRect.width, 50.0f); + + // if we aren't bound to anything, we show a text field that allows to rename the actor + // otherwise we show a ObjectField to allow binding to a go + if (track != null && track is GroupTrack) + { + var textColor = m_Styles.groupFont.normal.textColor; + + if (isSelected) + textColor = Color.white; + + string newName; + + EditorGUI.BeginChangeCheck(); + using (new StyleNormalColorOverride(m_Styles.groupFont, textColor)) + { + newName = EditorGUI.DelayedTextField(labelRect, GUIContent.none, track.GetInstanceID(), track.name, m_Styles.groupFont); + } + + if (EditorGUI.EndChangeCheck() && !string.IsNullOrEmpty(newName)) + { + track.name = newName; + displayName = track.name; + } + } + } + + protected bool IsSubTrack() + { + if (track == null) + return false; + + var parentTrack = track.parent as TrackAsset; + if (parentTrack == null) + return false; + + return parentTrack.GetType() != typeof(GroupTrack); + } + + protected TrackAsset ParentTrack() + { + if (IsSubTrack()) + return track.parent as TrackAsset; + return null; + } + + // is there currently a recording track + bool IsTrackRecording(WindowState state) + { + if (!state.recording) + return false; + if (track.GetType() != typeof(GroupTrack)) + return false; + + return state.GetArmedTrack(track) != null; + } + + void RecomputeRectUnions() + { + m_MustRecomputeUnions = false; + m_Unions.Clear(); + if (children == null) + return; + + foreach (var c in children.OfType()) + { + c.RebuildGUICacheIfNecessary(); + m_Unions.AddRange(TimelineClipUnion.Build(c.clips)); + } + } + + static bool AllChildrenMuted(TimelineGroupGUI groupGui) + { + if (!groupGui.track.muted) + return false; + if (groupGui.children == null) + return true; + return groupGui.children.OfType().All(AllChildrenMuted); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineGroupGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineGroupGUI.cs.meta new file mode 100644 index 0000000..470f3aa --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineGroupGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 00187582b67e7654b914b5a0d37daafb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackBaseGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackBaseGUI.cs new file mode 100644 index 0000000..b957f33 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackBaseGUI.cs @@ -0,0 +1,218 @@ +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + abstract class TimelineTrackBaseGUI : TreeViewItem, IBounds + { + static class Styles + { + public static readonly GUIContent s_LockedAndMuted = EditorGUIUtility.TrTextContent("Locked / Muted"); + public static readonly GUIContent s_LockedAndPartiallyMuted = EditorGUIUtility.TrTextContent("Locked / Partially Muted"); + public static readonly GUIContent s_Locked = EditorGUIUtility.TrTextContent("Locked"); + public static readonly GUIContent s_Muted = EditorGUIUtility.TrTextContent("Muted"); + public static readonly GUIContent s_PartiallyMuted = EditorGUIUtility.TrTextContent("Partially Muted"); + + public static readonly Texture2D lockBg = DirectorStyles.GetBackgroundImage(DirectorStyles.Instance.lockedBG); + } + + protected bool m_IsRoot = false; + protected const float k_ButtonSize = 16.0f; + + readonly TimelineTreeViewGUI m_TreeViewGUI; + readonly TrackDrawer m_Drawer; + + public Vector2 treeViewToWindowTransformation { get; set; } + public bool isExpanded { get; set; } + public bool isDropTarget { protected get; set; } + public TrackAsset track { get; } + TreeViewController treeView { get; } + + public TimelineWindow TimelineWindow + { + get + { + if (m_TreeViewGUI == null) + return null; + + return m_TreeViewGUI.TimelineWindow; + } + } + + public TrackDrawer drawer + { + get { return m_Drawer; } + } + + public virtual float GetVerticalSpacingBetweenTracks() + { + return 3.0f; + } + + public bool visibleRow { get; set; } // is the header row visible + public bool visibleExpanded { get; set; } // is the expanded area (group) visible + public bool drawInsertionMarkerBefore { get; set; } + public bool drawInsertionMarkerAfter { get; set; } + + public abstract Rect boundingRect { get; } + public abstract bool expandable { get; } + public abstract void Draw(Rect headerRect, Rect contentRect, WindowState state); + public abstract void OnGraphRebuilt(); // callback when the corresponding graph is rebuilt. This can happen, but not have the GUI rebuilt. + + protected TimelineTrackBaseGUI(int id, int depth, TreeViewItem parent, string displayName, TrackAsset trackAsset, TreeViewController tv, TimelineTreeViewGUI tvgui) + : base(id, depth, parent, displayName) + { + m_Drawer = TrackDrawer.CreateInstance(trackAsset); + m_Drawer.sequencerState = tvgui.TimelineWindow.state; + + isExpanded = false; + isDropTarget = false; + track = trackAsset; + treeView = tv; + + m_TreeViewGUI = tvgui; + } + + public static TimelineTrackBaseGUI FindGUITrack(TrackAsset track) + { + var allTracks = TimelineWindow.instance.allTracks; + return allTracks.Find(x => x.track == track); + } + + protected void DrawTrackState(Rect trackRect, Rect expandedRect, TrackAsset track) + { + if (Event.current.type == EventType.Layout) + { + bool needStateBox = false; + + //Mute + if (track.muted && !TimelineUtility.IsParentMuted(track)) + { + Rect bgRect = expandedRect; + TimelineWindow.instance.OverlayDrawData.Add(TimelineWindow.OverlayData.CreateColorOverlay(GUIClip.Unclip(bgRect), DirectorStyles.Instance.customSkin.colorTrackDarken)); + needStateBox = true; + } + + //Lock + if (!needStateBox && track.locked && !TimelineUtility.IsLockedFromGroup(track)) + { + Rect bgRect = expandedRect; + TimelineWindow.instance.OverlayDrawData.Add(TimelineWindow.OverlayData.CreateTextureOverlay(GUIClip.Unclip(bgRect), Styles.lockBg)); + needStateBox = true; + } + + if (needStateBox) + { + DrawTrackStateBox(trackRect, track); + } + } + } + + void DrawTrackStateBox(Rect trackRect, TrackAsset track) + { + const float k_LockTextPadding = 40f; + var styles = DirectorStyles.Instance; + + bool locked = track.locked && !TimelineUtility.IsLockedFromGroup(track); + bool muted = track.muted && !TimelineUtility.IsParentMuted(track); + bool allSubTrackMuted = TimelineUtility.IsAllSubTrackMuted(track); + + GUIContent content = null; + if (locked && muted) + { + content = Styles.s_LockedAndMuted; + if (!allSubTrackMuted) + content = Styles.s_LockedAndPartiallyMuted; + } + else if (locked) content = Styles.s_Locked; + else if (muted) + { + content = Styles.s_Muted; + if (!allSubTrackMuted) + content = Styles.s_PartiallyMuted; + } + + // the track could be locked, but we only show the 'locked portion' on the upper most track + // that is causing the lock + if (content == null) + return; + + var textRect = trackRect; + textRect.width = styles.fontClip.CalcSize(content).x + k_LockTextPadding; + textRect.x += (trackRect.width - textRect.width) / 2f; + textRect.height -= 4f; + textRect.y += 2f; + + + TimelineWindow.instance.OverlayDrawData.Add(TimelineWindow.OverlayData.CreateTextBoxOverlay(GUIClip.Unclip(textRect), content.text, styles.fontClip, Color.white, styles.customSkin.colorLockTextBG, styles.displayBackground)); + } + + protected float DrawMuteButton(Rect rect, WindowState state) + { + if (track.mutedInHierarchy) + { + using (new EditorGUI.DisabledScope(TimelineUtility.IsParentMuted(track))) + { + if (GUI.Button(rect, GUIContent.none, TimelineWindow.styles.mute)) + { + MuteTrack.Mute(state, new[] { track }, false); + } + } + + return WindowConstants.trackHeaderButtonSize; + } + + return 0.0f; + } + + protected float DrawLockButton(Rect rect, WindowState state) + { + if (track.lockedInHierarchy) + { + // if the parent is locked, show it the lock disabled + using (new EditorGUI.DisabledScope(TimelineUtility.IsLockedFromGroup(track))) + { + if (GUI.Button(rect, GUIContent.none, TimelineWindow.styles.locked)) + { + LockTrack.SetLockState(new[] { track }, !track.locked, state); + } + } + + return WindowConstants.trackHeaderButtonSize; + } + + return 0.0f; + } + + public void DrawInsertionMarkers(Rect rowRectWithIndent) + { + const float insertionHeight = WindowConstants.trackInsertionMarkerHeight; + if (Event.current.type == EventType.Repaint && (drawInsertionMarkerAfter || drawInsertionMarkerBefore)) + { + if (drawInsertionMarkerBefore) + { + var rect = new Rect(rowRectWithIndent.x, rowRectWithIndent.y - insertionHeight * 0.5f - 2.0f, rowRectWithIndent.width, insertionHeight); + EditorGUI.DrawRect(rect, Color.white); + } + + if (drawInsertionMarkerAfter) + { + var rect = new Rect(rowRectWithIndent.x, rowRectWithIndent.y + rowRectWithIndent.height - insertionHeight * 0.5f + 1.0f, rowRectWithIndent.width, insertionHeight); + EditorGUI.DrawRect(rect, Color.white); + } + } + } + + public void ClearDrawFlags() + { + if (Event.current.type == EventType.Repaint) + { + isDropTarget = false; + drawInsertionMarkerAfter = false; + drawInsertionMarkerBefore = false; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackBaseGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackBaseGUI.cs.meta new file mode 100644 index 0000000..50e7b73 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackBaseGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9b1a3034a9e81704abdd08677a2d035f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackErrorGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackErrorGUI.cs new file mode 100644 index 0000000..7e32e2c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackErrorGUI.cs @@ -0,0 +1,185 @@ +using System; +using UnityEditor.IMGUI.Controls; +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEditor.Timeline +{ + class TimelineTrackErrorGUI : TimelineTrackBaseGUI + { + static class Styles + { + public static readonly GUIContent ErrorText = EditorGUIUtility.TrTextContent("Track cannot be loaded.", "Please fix any compile errors in the script for this track"); + public static readonly Texture2D IconWarn = EditorGUIUtility.LoadIconRequired("console.warnicon.inactive.sml"); + public static readonly GUIContent RemoveTrack = EditorGUIUtility.TrTextContent("Delete"); + + public static readonly Color WarningBoxBackgroundColor = new Color(115.0f / 255.0f, 115.0f / 255.0f, 115.0f / 255.0f); // approved for both skins + public static readonly Color WarningBoxHighlightColor = new Color(229 / 255.0f, 208 / 255.0f, 54 / 255.0f); // brigher than standard warning color for contrast + } + + Rect m_TrackRect; + ScriptableObject m_ScriptableObject; + PlayableAsset m_Owner; + static GUIContent s_GUIContent = new GUIContent(); + + public TimelineTrackErrorGUI(TreeViewController treeview, TimelineTreeViewGUI treeviewGUI, int id, int depth, TreeViewItem parent, string displayName, ScriptableObject track, PlayableAsset owner) + : base(id, depth, parent, displayName, null, treeview, treeviewGUI) + { + m_ScriptableObject = track; + m_Owner = owner; + } + + public override Rect boundingRect + { + get { return m_TrackRect; } + } + + public override bool expandable + { + get { return false; } + } + + public override void Draw(Rect headerRect, Rect contentRect, WindowState state) + { + m_TrackRect = contentRect; + + DrawMissingTrackHeader(headerRect, state); + DrawMissingTrackBody(contentRect); + } + + void DrawMissingTrackHeader(Rect headerRect, WindowState state) + { + var styles = DirectorStyles.Instance; + + // Draw a header + Color backgroundColor = styles.customSkin.colorTrackHeaderBackground; + var bgRect = headerRect; + bgRect.x += styles.trackSwatchStyle.fixedWidth; + bgRect.width -= styles.trackSwatchStyle.fixedWidth; + EditorGUI.DrawRect(bgRect, backgroundColor); + + // draw the warning icon + var errorIcon = Styles.IconWarn; + Rect iconRect = new Rect(headerRect.xMin + styles.trackSwatchStyle.fixedWidth, headerRect.yMin + 0.5f * (headerRect.height - errorIcon.height), errorIcon.width, errorIcon.height); + if (iconRect.width > 0 && iconRect.height > 0) + { + GUI.DrawTexture(iconRect, errorIcon, ScaleMode.ScaleAndCrop, true, 0, DirectorStyles.kClipErrorColor, 0, 0); + } + + // Draw the name + + // m_ScriptableObject == null will return true because the script can't be loaded. so this checks + // to make sure it is actually not null so we can grab the name + object o = m_ScriptableObject; + if (o != null) + { + s_GUIContent.text = m_ScriptableObject.name; + var textStyle = styles.trackHeaderFont; + textStyle.normal.textColor = styles.customSkin.colorTrackFont; // TODO -- we shouldn't modify the style like this. track header does it though :( + Rect textRect = headerRect; + textRect.xMin = iconRect.xMax + 1; + textRect.xMax = Math.Min(textRect.xMin + styles.trackHeaderFont.CalcSize(s_GUIContent).x, headerRect.xMax - 1); + EditorGUI.LabelField(textRect, s_GUIContent, textStyle); + } + + + // Draw the color swatch to the left of the track, darkened by the mute + var color = Color.Lerp(DirectorStyles.kClipErrorColor, styles.customSkin.colorTrackDarken, styles.customSkin.colorTrackDarken.a); + color.a = 1; + using (new GUIColorOverride(color)) + { + var colorSwatchRect = headerRect; + colorSwatchRect.width = styles.trackSwatchStyle.fixedWidth; + GUI.Label(colorSwatchRect, GUIContent.none, styles.trackSwatchStyle); + } + + // draw darken overlay + EditorGUI.DrawRect(bgRect, styles.customSkin.colorTrackDarken); + + DrawRemoveMenu(headerRect, state); + } + + void DrawRemoveMenu(Rect headerRect, WindowState state) + { + const float pad = 3; + const float buttonSize = 16; + var buttonRect = new Rect(headerRect.xMax - buttonSize - pad, headerRect.y + ((headerRect.height - buttonSize) / 2f) + 2, buttonSize, buttonSize); + + if (GUI.Button(buttonRect, GUIContent.none, DirectorStyles.Instance.trackOptions)) + { + GenericMenu menu = new GenericMenu(); + + var owner = m_Owner; + var scriptableObject = m_ScriptableObject; + + menu.AddItem(Styles.RemoveTrack, false, () => + { + if (TrackExtensions.RemoveBrokenTrack(owner, scriptableObject)) + state.Refresh(); + } + ); + + menu.ShowAsContext(); + } + } + + static void DrawMissingTrackBody(Rect contentRect) + { + if (contentRect.width < 0) + return; + + var styles = DirectorStyles.Instance; + + // draw a track rectangle + EditorGUI.DrawRect(contentRect, styles.customSkin.colorTrackDarken); + // draw the warning box + DrawScriptWarningBox(contentRect, Styles.ErrorText); + } + + static void DrawScriptWarningBox(Rect trackRect, GUIContent content) + { + var styles = DirectorStyles.Instance; + const float kTextPadding = 52f; + + var errorIcon = Styles.IconWarn; + float textWidth = styles.fontClip.CalcSize(content).x; + + var outerRect = trackRect; + outerRect.width = textWidth + kTextPadding + errorIcon.width; + outerRect.x += (trackRect.width - outerRect.width) / 2f; + outerRect.height -= 4f; + outerRect.y += 1f; + + bool drawText = true; + if (outerRect.width > trackRect.width) + { + outerRect.x = trackRect.x; + outerRect.width = trackRect.width; + drawText = false; + } + + var innerRect = new Rect(outerRect.x + 2, outerRect.y + 2, outerRect.width - 4, outerRect.height - 4); + using (new GUIColorOverride(Styles.WarningBoxHighlightColor)) + GUI.Box(outerRect, GUIContent.none, styles.displayBackground); + using (new GUIColorOverride(Styles.WarningBoxBackgroundColor)) + GUI.Box(innerRect, GUIContent.none, styles.displayBackground); + + + if (drawText) + { + var iconRect = new Rect(outerRect.x + kTextPadding / 2.0f - 4.0f, outerRect.y + (outerRect.height - errorIcon.height) / 2.0f, errorIcon.width, errorIcon.height); + var textRect = new Rect(iconRect.xMax + 4.0f, outerRect.y, textWidth, outerRect.height); + + GUI.DrawTexture(iconRect, errorIcon, ScaleMode.ScaleAndCrop, true, 0, Styles.WarningBoxHighlightColor, 0, 0); + Graphics.ShadowLabel(textRect, content, styles.fontClip, Color.white, Color.black); + } + else if (errorIcon.width > innerRect.width) + { + var iconRect = new Rect(outerRect.x + (outerRect.width - errorIcon.width) / 2.0f, outerRect.y + (outerRect.height - errorIcon.height) / 2.0f, errorIcon.width, errorIcon.height); + GUI.DrawTexture(iconRect, errorIcon, ScaleMode.ScaleAndCrop, true, 0, Styles.WarningBoxHighlightColor, 0, 0); + } + } + + public override void OnGraphRebuilt() {} + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackErrorGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackErrorGUI.cs.meta new file mode 100644 index 0000000..dd754e2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackErrorGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 200617708f5b36a4da2e2a3f1ceacedd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackGUI.cs new file mode 100644 index 0000000..c15d96d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackGUI.cs @@ -0,0 +1,812 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEditor.StyleSheets; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; +using Object = UnityEngine.Object; + +namespace UnityEditor.Timeline +{ + class TimelineTrackGUI : TimelineGroupGUI, IClipCurveEditorOwner, IRowGUI + { + struct TrackDrawData + { + public bool m_AllowsRecording; + public bool m_ShowTrackBindings; + public bool m_HasBinding; + public bool m_IsSubTrack; + public PlayableBinding m_Binding; + public UnityEngine.Object m_TrackBinding; + public Texture m_TrackIcon; + } + + static class Styles + { + public static readonly string kArmForRecordDisabled = L10n.Tr("Recording is not permitted when Track Offsets are set to Auto. Track Offset settings can be changed in the track menu of the base track."); + public static Texture2D kProblemIcon = DirectorStyles.GetBackgroundImage(DirectorStyles.Instance.warning); + } + + static GUIContent s_ArmForRecordContentOn; + static GUIContent s_ArmForRecordContentOff; + static GUIContent s_ArmForRecordDisabled; + + bool m_InlineCurvesSkipped; + int m_TrackHash = -1; + int m_BlendHash = -1; + int m_LastDirtyIndex = -1; + + readonly InfiniteTrackDrawer m_InfiniteTrackDrawer; + TrackItemsDrawer m_ItemsDrawer; + TrackDrawData m_TrackDrawData; + TrackDrawOptions m_TrackDrawOptions; + readonly TrackEditor m_TrackEditor; + readonly GUIContent m_DefaultTrackIcon; + + + public override bool expandable + { + get { return hasChildren; } + } + + internal InlineCurveEditor inlineCurveEditor { get; set; } + + public ClipCurveEditor clipCurveEditor { get; private set; } + + public bool inlineCurvesSelected + { + get { return SelectionManager.IsCurveEditorFocused(this); } + set + { + if (!value && SelectionManager.IsCurveEditorFocused(this)) + SelectionManager.SelectInlineCurveEditor(null); + else + SelectionManager.SelectInlineCurveEditor(this); + } + } + + bool IClipCurveEditorOwner.showLoops + { + get { return false; } + } + + TrackAsset IClipCurveEditorOwner.owner + { + get { return track; } + } + + static bool DoesTrackAllowsRecording(TrackAsset track) + { + // if the root animation track is in auto mode, recording is not allowed + var animTrack = TimelineUtility.GetSceneReferenceTrack(track) as AnimationTrack; + if (animTrack != null) + return animTrack.trackOffset != TrackOffset.Auto; + + return false; + } + + bool? m_TrackHasAnimatableParameters; + bool trackHasAnimatableParameters + { + get + { + // cache this value to avoid the recomputation + if (!m_TrackHasAnimatableParameters.HasValue) + m_TrackHasAnimatableParameters = track.HasAnyAnimatableParameters() || + track.clips.Any(c => c.HasAnyAnimatableParameters()); + + return m_TrackHasAnimatableParameters.Value; + } + } + + public bool locked + { + get { return track.lockedInHierarchy; } + } + + public bool showMarkers + { + get { return track.GetShowMarkers(); } + } + + public bool muted + { + get { return track.muted; } + } + + public List clips + { + get + { + return m_ItemsDrawer.clips == null ? new List(0) : m_ItemsDrawer.clips.ToList(); + } + } + + TrackAsset IRowGUI.asset { get { return track; } } + + bool showTrackRecordingDisabled + { + get + { + // if the root animation track is in auto mode, recording is not allowed + var animTrack = TimelineUtility.GetSceneReferenceTrack(track) as AnimationTrack; + return animTrack != null && animTrack.trackOffset == TrackOffset.Auto; + } + } + + public TimelineTrackGUI(TreeViewController tv, TimelineTreeViewGUI w, int id, int depth, TreeViewItem parent, string displayName, TrackAsset sequenceActor) + : base(tv, w, id, depth, parent, displayName, sequenceActor, false) + { + AnimationTrack animationTrack = sequenceActor as AnimationTrack; + if (animationTrack != null) + m_InfiniteTrackDrawer = new InfiniteTrackDrawer(new AnimationTrackKeyDataSource(animationTrack)); + else if (sequenceActor.HasAnyAnimatableParameters() && !sequenceActor.clips.Any()) + m_InfiniteTrackDrawer = new InfiniteTrackDrawer(new TrackPropertyCurvesDataSource(sequenceActor)); + + UpdateInfiniteClipEditor(w.TimelineWindow); + + var bindings = track.outputs.ToArray(); + m_TrackDrawData.m_HasBinding = bindings.Length > 0; + if (m_TrackDrawData.m_HasBinding) + m_TrackDrawData.m_Binding = bindings[0]; + m_TrackDrawData.m_IsSubTrack = IsSubTrack(); + m_TrackDrawData.m_AllowsRecording = DoesTrackAllowsRecording(sequenceActor); + m_DefaultTrackIcon = TrackResourceCache.GetTrackIcon(track); + + + m_TrackEditor = CustomTimelineEditorCache.GetTrackEditor(sequenceActor); + + try + { + m_TrackDrawOptions = m_TrackEditor.GetTrackOptions(track, null); + } + catch (Exception e) + { + Debug.LogException(e); + m_TrackDrawOptions = CustomTimelineEditorCache.GetDefaultTrackEditor().GetTrackOptions(track, null); + } + + m_TrackDrawOptions.errorText = null; // explicitly setting to null for an uninitialized state + + RebuildGUICacheIfNecessary(); + } + + public override float GetVerticalSpacingBetweenTracks() + { + if (track != null && track.isSubTrack) + return 1.0f; // subtracks have less of a gap than tracks + return base.GetVerticalSpacingBetweenTracks(); + } + + void UpdateInfiniteClipEditor(TimelineWindow window) + { + if (clipCurveEditor != null || track == null || !track.ShouldShowInfiniteClipEditor()) + return; + + var dataSource = CurveDataSource.Create(this); + clipCurveEditor = new ClipCurveEditor(dataSource, window, track); + } + + void DetectTrackChanged() + { + if (Event.current.type == EventType.Layout) + { + // incremented when a track or it's clips changed + if (m_LastDirtyIndex != track.DirtyIndex) + { + try + { + m_TrackEditor.OnTrackChanged(track); + } + catch (Exception e) + { + Debug.LogException(e); + } + m_LastDirtyIndex = track.DirtyIndex; + } + OnTrackChanged(); + } + } + + // Called when the source track data, including it's clips have changed has changed. + void OnTrackChanged() + { + // recompute blends if necessary + int newBlendHash = BlendHash(); + if (m_BlendHash != newBlendHash) + { + UpdateClipOverlaps(); + m_BlendHash = newBlendHash; + } + + RebuildGUICacheIfNecessary(); + } + + void UpdateDrawData(WindowState state) + { + if (Event.current.type == EventType.Layout) + { + m_TrackDrawData.m_ShowTrackBindings = false; + m_TrackDrawData.m_TrackBinding = null; + + + if (state.editSequence.director != null && showSceneReference) + { + m_TrackDrawData.m_ShowTrackBindings = state.GetWindow().currentMode.ShouldShowTrackBindings(state); + m_TrackDrawData.m_TrackBinding = state.editSequence.director.GetGenericBinding(track); + } + + var lastError = m_TrackDrawOptions.errorText; + var lastHeight = m_TrackDrawOptions.minimumHeight; + try + { + m_TrackDrawOptions = m_TrackEditor.GetTrackOptions(track, m_TrackDrawData.m_TrackBinding); + } + catch (Exception e) + { + Debug.LogException(e); + m_TrackDrawOptions = CustomTimelineEditorCache.GetDefaultTrackEditor().GetTrackOptions(track, m_TrackDrawData.m_TrackBinding); + } + + m_TrackDrawData.m_AllowsRecording = DoesTrackAllowsRecording(track); + m_TrackDrawData.m_TrackIcon = m_TrackDrawOptions.icon; + if (m_TrackDrawData.m_TrackIcon == null) + m_TrackDrawData.m_TrackIcon = m_DefaultTrackIcon.image; + + // track height has changed. need to update gui + if (!Mathf.Approximately(lastHeight, m_TrackDrawOptions.minimumHeight)) + state.Refresh(); + } + } + + public override void Draw(Rect headerRect, Rect contentRect, WindowState state) + { + DetectTrackChanged(); + UpdateDrawData(state); + + UpdateInfiniteClipEditor(state.GetWindow()); + + var trackHeaderRect = headerRect; + var trackContentRect = contentRect; + + float inlineCurveHeight = contentRect.height - GetTrackContentHeight(state); + bool hasInlineCurve = inlineCurveHeight > 0.0f; + + if (hasInlineCurve) + { + trackHeaderRect.height -= inlineCurveHeight; + trackContentRect.height -= inlineCurveHeight; + } + + if (Event.current.type == EventType.Repaint) + { + m_TreeViewRect = trackContentRect; + } + + if (s_ArmForRecordContentOn == null) + s_ArmForRecordContentOn = new GUIContent(DirectorStyles.GetBackgroundImage(DirectorStyles.Instance.autoKey, StyleState.active)); + + if (s_ArmForRecordContentOff == null) + s_ArmForRecordContentOff = new GUIContent(DirectorStyles.GetBackgroundImage(DirectorStyles.Instance.autoKey)); + + if (s_ArmForRecordDisabled == null) + s_ArmForRecordDisabled = new GUIContent(DirectorStyles.GetBackgroundImage(DirectorStyles.Instance.autoKey), Styles.kArmForRecordDisabled); + + track.SetCollapsed(!isExpanded); + + RebuildGUICacheIfNecessary(); + + // Prevents from drawing outside of bounds, but does not effect layout or markers + bool isOwnerDrawSucceed = false; + + Vector2 visibleTime = state.timeAreaShownRange; + + if (drawer != null) + isOwnerDrawSucceed = drawer.DrawTrack(trackContentRect, track, visibleTime, state); + + if (!isOwnerDrawSucceed) + { + using (new GUIViewportScope(trackContentRect)) + DrawBackground(trackContentRect, track, visibleTime, state); + + if (m_InfiniteTrackDrawer != null) + m_InfiniteTrackDrawer.DrawTrack(trackContentRect, track, visibleTime, state); + + // draw after user customization so overlay text shows up + using (new GUIViewportScope(trackContentRect)) + m_ItemsDrawer.Draw(trackContentRect, state); + } + + DrawTrackHeader(trackHeaderRect, state); + + if (hasInlineCurve) + { + var curvesHeaderRect = headerRect; + curvesHeaderRect.yMin = trackHeaderRect.yMax; + + var curvesContentRect = contentRect; + curvesContentRect.yMin = trackContentRect.yMax; + + DrawInlineCurves(curvesHeaderRect, curvesContentRect, state); + } + + DrawTrackColorKind(headerRect); + DrawTrackState(contentRect, contentRect, track); + } + + void DrawInlineCurves(Rect curvesHeaderRect, Rect curvesContentRect, WindowState state) + { + if (!track.GetShowInlineCurves()) + return; + + // Inline curves are not within the editor window -- case 952571 + if (!IsInlineCurvesEditorInBounds(ToWindowSpace(curvesHeaderRect), curvesContentRect.height, state)) + { + m_InlineCurvesSkipped = true; + return; + } + + // If inline curves were skipped during the last event; we want to avoid rendering them until + // the next Layout event. Otherwise, we still get the RTE prevented above when the user resizes + // the timeline window very fast. -- case 952571 + if (m_InlineCurvesSkipped && Event.current.type != EventType.Layout) + return; + + m_InlineCurvesSkipped = false; + + if (inlineCurveEditor == null) + inlineCurveEditor = new InlineCurveEditor(this); + + + curvesHeaderRect.x += DirectorStyles.kBaseIndent; + curvesHeaderRect.width -= DirectorStyles.kBaseIndent; + + inlineCurveEditor.Draw(curvesHeaderRect, curvesContentRect, state); + } + + static bool IsInlineCurvesEditorInBounds(Rect windowSpaceTrackRect, float inlineCurveHeight, WindowState state) + { + var legalHeight = state.windowHeight; + var trackTop = windowSpaceTrackRect.y; + var inlineCurveOffset = windowSpaceTrackRect.height - inlineCurveHeight; + return legalHeight - trackTop - inlineCurveOffset > 0; + } + + void DrawErrorIcon(Rect position, WindowState state) + { + Rect bindingLabel = position; + bindingLabel.x = position.xMax + 3; + bindingLabel.width = state.bindingAreaWidth; + EditorGUI.LabelField(position, m_ProblemIcon); + } + + void DrawBackground(Rect trackRect, TrackAsset trackAsset, Vector2 visibleTime, WindowState state) + { + bool canDrawRecordBackground = IsRecording(state); + if (canDrawRecordBackground) + { + DrawRecordingTrackBackground(trackRect, trackAsset, visibleTime, state); + } + else + { + Color trackBackgroundColor; + + if (SelectionManager.Contains(track)) + { + trackBackgroundColor = state.IsEditingASubTimeline() ? + DirectorStyles.Instance.customSkin.colorTrackSubSequenceBackgroundSelected : + DirectorStyles.Instance.customSkin.colorTrackBackgroundSelected; + } + else + { + trackBackgroundColor = state.IsEditingASubTimeline() ? + DirectorStyles.Instance.customSkin.colorTrackSubSequenceBackground : + DirectorStyles.Instance.customSkin.colorTrackBackground; + } + + EditorGUI.DrawRect(trackRect, trackBackgroundColor); + } + } + + float InlineCurveHeight() + { + return track.GetShowInlineCurves() && CanDrawInlineCurve() + ? TimelineWindowViewPrefs.GetInlineCurveHeight(track) + : 0.0f; + } + + public override float GetHeight(WindowState state) + { + var height = GetTrackContentHeight(state); + + if (CanDrawInlineCurve()) + height += InlineCurveHeight(); + + return height; + } + + float GetTrackContentHeight(WindowState state) + { + float height = m_TrackDrawOptions.minimumHeight; + if (height <= 0.0f) + height = TrackEditor.DefaultTrackHeight; + height = Mathf.Clamp(height, TrackEditor.MinimumTrackHeight, TrackEditor.MaximumTrackHeight); + + return height * state.trackScale; + } + + static bool CanDrawIcon(GUIContent icon) + { + return icon != null && icon != GUIContent.none && icon.image != null; + } + + bool showSceneReference + { + get + { + return track != null && + m_TrackDrawData.m_HasBinding && + !m_TrackDrawData.m_IsSubTrack && + m_TrackDrawData.m_Binding.sourceObject != null && + m_TrackDrawData.m_Binding.outputTargetType != null && + typeof(Object).IsAssignableFrom(m_TrackDrawData.m_Binding.outputTargetType); + } + } + + void DrawTrackHeader(Rect trackHeaderRect, WindowState state) + { + using (new GUIViewportScope(trackHeaderRect)) + { + Rect rect = trackHeaderRect; + + DrawHeaderBackground(trackHeaderRect); + rect.x += m_Styles.trackSwatchStyle.fixedWidth; + + const float buttonSize = WindowConstants.trackHeaderButtonSize; + const float padding = WindowConstants.trackHeaderButtonPadding; + var buttonRect = new Rect(trackHeaderRect.xMax - buttonSize - padding, rect.y + ((rect.height - buttonSize) / 2f), buttonSize, buttonSize); + + rect.x += DrawTrackIconKind(rect, state); + DrawTrackBinding(rect, trackHeaderRect); + + if (track is GroupTrack) + return; + + buttonRect.x -= Spaced(DrawTrackDropDownMenu(buttonRect)); + buttonRect.x -= Spaced(DrawLockMarkersButton(buttonRect, state)); + buttonRect.x -= Spaced(DrawInlineCurveButton(buttonRect, state)); + buttonRect.x -= Spaced(DrawMuteButton(buttonRect, state)); + buttonRect.x -= Spaced(DrawLockButton(buttonRect, state)); + buttonRect.x -= Spaced(DrawRecordButton(buttonRect, state)); + buttonRect.x -= Spaced(DrawCustomTrackButton(buttonRect, state)); + } + } + + void DrawHeaderBackground(Rect headerRect) + { + Color backgroundColor = SelectionManager.Contains(track) + ? DirectorStyles.Instance.customSkin.colorSelection + : DirectorStyles.Instance.customSkin.colorTrackHeaderBackground; + + var bgRect = headerRect; + bgRect.x += m_Styles.trackSwatchStyle.fixedWidth; + bgRect.width -= m_Styles.trackSwatchStyle.fixedWidth; + + EditorGUI.DrawRect(bgRect, backgroundColor); + } + + void DrawTrackColorKind(Rect rect) + { + // subtracks don't draw the color, the parent does that. + if (track != null && track.isSubTrack) + return; + + if (rect.width <= 0) return; + + using (new GUIColorOverride(m_TrackDrawOptions.trackColor)) + { + rect.width = m_Styles.trackSwatchStyle.fixedWidth; + GUI.Label(rect, GUIContent.none, m_Styles.trackSwatchStyle); + } + } + + float DrawTrackIconKind(Rect rect, WindowState state) + { + // no icons on subtracks + if (track != null && track.isSubTrack) + return 0.0f; + + rect.yMin += (rect.height - 16f) / 2f; + rect.width = 16.0f; + rect.height = 16.0f; + + if (!string.IsNullOrEmpty(m_TrackDrawOptions.errorText)) + { + m_ProblemIcon.image = Styles.kProblemIcon; + m_ProblemIcon.tooltip = m_TrackDrawOptions.errorText; + + if (CanDrawIcon(m_ProblemIcon)) + DrawErrorIcon(rect, state); + } + else + { + var content = GUIContent.Temp(m_TrackDrawData.m_TrackIcon, m_DefaultTrackIcon.tooltip); + if (CanDrawIcon(content)) + GUI.Box(rect, content, GUIStyle.none); + } + + return rect.width; + } + + void DrawTrackBinding(Rect rect, Rect headerRect) + { + if (m_TrackDrawData.m_ShowTrackBindings) + { + DoTrackBindingGUI(rect, headerRect); + return; + } + + var textStyle = m_Styles.trackHeaderFont; + textStyle.normal.textColor = SelectionManager.Contains(track) ? Color.white : m_Styles.customSkin.colorTrackFont; + + string trackName = track.name; + + EditorGUI.BeginChangeCheck(); + + // by default the size is just the width of the string (for selection purposes) + rect.width = m_Styles.trackHeaderFont.CalcSize(new GUIContent(trackName)).x; + + // if we are editing, supply the entire width of the header + if (GUIUtility.keyboardControl == track.GetInstanceID()) + rect.width = (headerRect.xMax - rect.xMin) - (5 * WindowConstants.trackHeaderButtonSize); + + trackName = EditorGUI.DelayedTextField(rect, GUIContent.none, track.GetInstanceID(), track.name, textStyle); + + if (EditorGUI.EndChangeCheck()) + { + TimelineUndo.PushUndo(track, "Rename Track"); + track.name = trackName; + } + } + + float DrawTrackDropDownMenu(Rect rect) + { + rect.y += WindowConstants.trackOptionButtonVerticalPadding; + + if (GUI.Button(rect, GUIContent.none, m_Styles.trackOptions)) + { + // the drop down will apply to all selected tracks + if (!SelectionManager.Contains(track)) + { + SelectionManager.Clear(); + SelectionManager.Add(track); + } + + SequencerContextMenu.ShowTrackContextMenu(SelectionManager.SelectedTracks().ToArray(), null); + } + + return WindowConstants.trackHeaderButtonSize; + } + + bool CanDrawInlineCurve() + { + // Note: A track with animatable parameters always has inline curves. + return trackHasAnimatableParameters || TimelineUtility.TrackHasAnimationCurves(track); + } + + float DrawInlineCurveButton(Rect rect, WindowState state) + { + if (!CanDrawInlineCurve()) + { + return 0.0f; + } + + // Override enable state to display "Show Inline Curves" button in disabled state. + bool prevEnabledState = GUI.enabled; + GUI.enabled = true; + var newValue = GUI.Toggle(rect, track.GetShowInlineCurves(), GUIContent.none, DirectorStyles.Instance.curves); + GUI.enabled = prevEnabledState; + + if (newValue != track.GetShowInlineCurves()) + { + track.SetShowInlineCurves(newValue); + state.GetWindow().treeView.CalculateRowRects(); + } + + return WindowConstants.trackHeaderButtonSize; + } + + float DrawRecordButton(Rect rect, WindowState state) + { + if (m_TrackDrawData.m_AllowsRecording) + { + bool isPlayerDisabled = state.editSequence.director != null && !state.editSequence.director.isActiveAndEnabled; + + GameObject goBinding = m_TrackDrawData.m_TrackBinding as GameObject; + if (goBinding == null) + { + Component c = m_TrackDrawData.m_TrackBinding as Component; + if (c != null) + goBinding = c.gameObject; + } + + if (goBinding == null && m_TrackDrawData.m_IsSubTrack) + { + goBinding = ParentTrack().GetGameObjectBinding(state.editSequence.director); + } + + bool isTrackBindingValid = goBinding != null; + bool trackErrorDisableButton = !string.IsNullOrEmpty(m_TrackDrawOptions.errorText) && isTrackBindingValid && goBinding.activeInHierarchy; + bool disableButton = track.lockedInHierarchy || isPlayerDisabled || trackErrorDisableButton || !isTrackBindingValid; + using (new EditorGUI.DisabledScope(disableButton)) + { + if (IsRecording(state)) + { + state.editorWindow.Repaint(); + float remainder = Time.realtimeSinceStartup % 1; + + var animatedContent = s_ArmForRecordContentOn; + if (remainder < 0.22f) + { + animatedContent = GUIContent.none; + } + if (GUI.Button(rect, animatedContent, GUIStyle.none) || isPlayerDisabled || !isTrackBindingValid) + { + state.UnarmForRecord(track); + } + } + else + { + if (GUI.Button(rect, s_ArmForRecordContentOff, GUIStyle.none)) + { + state.ArmForRecord(track); + } + } + return WindowConstants.trackHeaderButtonSize; + } + } + + if (showTrackRecordingDisabled) + { + using (new EditorGUI.DisabledScope(true)) + GUI.Button(rect, s_ArmForRecordDisabled, GUIStyle.none); + return k_ButtonSize; + } + + return 0.0f; + } + + float DrawCustomTrackButton(Rect rect, WindowState state) + { + if (drawer.DrawTrackHeaderButton(rect, track, state)) + { + return WindowConstants.trackHeaderButtonSize; + } + return 0.0f; + } + + float DrawLockMarkersButton(Rect rect, WindowState state) + { + if (track.GetMarkerCount() == 0) + return 0.0f; + + var markersShown = showMarkers; + var style = TimelineWindow.styles.collapseMarkers; + if (Event.current.type == EventType.Repaint) + style.Draw(rect, GUIContent.none, false, false, markersShown, false); + + // Override enable state to display "Show Marker" button in disabled state. + bool prevEnabledState = GUI.enabled; + GUI.enabled = true; + if (GUI.Button(rect, DirectorStyles.markerCollapseButton, GUIStyle.none)) + { + state.GetWindow().SetShowTrackMarkers(track, !markersShown); + } + GUI.enabled = prevEnabledState; + return WindowConstants.trackHeaderButtonSize; + } + + static void ObjectBindingField(Rect position, Object obj, PlayableBinding binding) + { + bool allowScene = + typeof(GameObject).IsAssignableFrom(binding.outputTargetType) || + typeof(Component).IsAssignableFrom(binding.outputTargetType); + + using (var check = new EditorGUI.ChangeCheckScope()) + { + // FocusType.Passive so it never gets focused when pressing tab + int controlId = GUIUtility.GetControlID("s_ObjectFieldHash".GetHashCode(), FocusType.Passive, position); + var newObject = UnityEditorInternals.DoObjectField(EditorGUI.IndentedRect(position), obj, binding.outputTargetType, controlId, allowScene); + if (check.changed) + { + BindingUtility.Bind(TimelineEditor.inspectedDirector, binding.sourceObject as TrackAsset, newObject); + } + } + } + + void DoTrackBindingGUI(Rect rect, Rect headerRect) + { + var bindingRect = new Rect( + rect.xMin, + rect.y + (rect.height - WindowConstants.trackHeaderButtonSize) / 2f, + headerRect.xMax - WindowConstants.trackHeaderMaxButtonsWidth - rect.xMin, + WindowConstants.trackHeaderButtonSize); + + if (bindingRect.Contains(Event.current.mousePosition) && TimelineDragging.IsDraggingEvent() && DragAndDrop.objectReferences.Length == 1) + { + TimelineDragging.HandleBindingDragAndDrop(track, BindingUtility.GetRequiredBindingType(m_TrackDrawData.m_Binding)); + Event.current.Use(); + } + else + { + if (m_TrackDrawData.m_Binding.outputTargetType != null && typeof(Object).IsAssignableFrom(m_TrackDrawData.m_Binding.outputTargetType)) + { + ObjectBindingField(bindingRect, m_TrackDrawData.m_TrackBinding, m_TrackDrawData.m_Binding); + } + } + } + + bool IsRecording(WindowState state) + { + return state.recording && state.IsArmedForRecord(track); + } + + // background to draw during recording + void DrawRecordingTrackBackground(Rect trackRect, TrackAsset trackAsset, Vector2 visibleTime, WindowState state) + { + if (drawer != null) + drawer.DrawRecordingBackground(trackRect, trackAsset, visibleTime, state); + } + + void UpdateClipOverlaps() + { + TrackExtensions.ComputeBlendsFromOverlaps(track.clips); + } + + internal void RebuildGUICacheIfNecessary() + { + if (m_TrackHash == track.Hash()) + return; + + m_ItemsDrawer = new TrackItemsDrawer(this); + m_TrackHash = track.Hash(); + } + + int BlendHash() + { + var hash = 0; + foreach (var clip in track.clips) + { + hash = HashUtility.CombineHash(hash, + (clip.duration - clip.start).GetHashCode(), + ((int)clip.blendInCurveMode).GetHashCode(), + ((int)clip.blendOutCurveMode).GetHashCode()); + } + return hash; + } + + // callback when the corresponding graph is rebuilt. This can happen, but not have the GUI rebuilt. + public override void OnGraphRebuilt() + { + RefreshCurveEditor(); + } + + void RefreshCurveEditor() + { + var window = TimelineWindow.instance; + if (track != null && window != null && window.state != null) + { + bool hasEditor = clipCurveEditor != null; + bool shouldHaveEditor = track.ShouldShowInfiniteClipEditor(); + if (hasEditor != shouldHaveEditor) + window.state.AddEndFrameDelegate((x, currentEvent) => + { + x.Refresh(); + return true; + }); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackGUI.cs.meta new file mode 100644 index 0000000..bff54b9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTrackGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 468e1bfc887161e4196f33e942fc3199 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeView.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeView.cs new file mode 100644 index 0000000..9345d9a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeView.cs @@ -0,0 +1,439 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEngine; + +namespace UnityEditor.Timeline +{ + class TimelineTreeView : ITreeViewGUI + { + float m_FoldoutWidth; + Rect m_DraggingInsertionMarkerRect; + readonly TreeViewController m_TreeView; + + List m_RowRects = new List(); + List m_ExpandedRowRects = new List(); + + float m_MaxWidthOfRows; + readonly WindowState m_State; + + static readonly float kMinTrackHeight = 25.0f; + static readonly float kFoldOutOffset = 14.0f; + + static DirectorStyles m_Styles; + + public bool showInsertionMarker { get; set; } + public virtual float topRowMargin { get; private set; } + public virtual float bottomRowMargin { get; private set; } + + public TimelineTreeView(TimelineWindow sequencerWindow, TreeViewController treeView) + { + m_TreeView = treeView; + m_TreeView.useExpansionAnimation = true; + + m_TreeView.selectionChangedCallback += SelectionChangedCallback; + m_TreeView.contextClickOutsideItemsCallback += ContextClickOutsideItemsCallback; + m_TreeView.itemDoubleClickedCallback += ItemDoubleClickedCallback; + m_TreeView.contextClickItemCallback += ContextClickItemCallback; + + m_TreeView.SetConsumeKeyDownEvents(false); + m_Styles = DirectorStyles.Instance; + m_State = sequencerWindow.state; + + m_FoldoutWidth = DirectorStyles.Instance.foldout.fixedWidth; + } + + void ItemDoubleClickedCallback(int id) + { + var trackGUI = m_TreeView.FindItem(id) as TimelineTrackGUI; + if (trackGUI == null) + return; + + if (trackGUI.track == null || trackGUI.track.lockedInHierarchy) + return; + + var selection = SelectionManager.SelectedItems().ToList(); + var items = ItemsUtils.GetItems(trackGUI.track).ToList(); + var addToSelection = !selection.SequenceEqual(items); + + foreach (var i in items) + { + if (addToSelection) + SelectionManager.Add(i); + else + SelectionManager.Remove(i); + } + } + + void ContextClickOutsideItemsCallback() + { + SequencerContextMenu.ShowNewTracksContextMenu(null, m_State); + Event.current.Use(); + } + + void ContextClickItemCallback(int id) + { + // may not occur if another menu is active + if (!m_TreeView.IsSelected(id)) + SelectionChangedCallback(new[] {id}); + + SequencerContextMenu.ShowTrackContextMenu(SelectionManager.SelectedTracks().ToArray(), Event.current.mousePosition); + + Event.current.Use(); + } + + void SelectionChangedCallback(int[] ids) + { + if (Event.current.button == 1 && PickerUtils.PickedLayerableOfType() != null) + return; + + if (Event.current.command || Event.current.control || Event.current.shift) + SelectionManager.UnSelectTracks(); + else + SelectionManager.Clear(); + + foreach (var id in ids) + { + var trackGUI = (TimelineTrackBaseGUI)m_TreeView.FindItem(id); + SelectionManager.Add(trackGUI.track); + } + + m_State.GetWindow().Repaint(); + } + + public void OnInitialize() {} + + public Rect GetRectForFraming(int row) + { + return GetRowRect(row, 1); // We ignore width by default when framing (only y scroll is affected) + } + + protected virtual Vector2 GetSizeOfRow(TreeViewItem item) + { + if (item.displayName == "root") + return new Vector2(m_TreeView.GetTotalRect().width, 0.0f); + + var trackGroupGui = item as TimelineGroupGUI; + if (trackGroupGui != null) + { + return new Vector2(m_TreeView.GetTotalRect().width, trackGroupGui.GetHeight(m_State)); + } + + float height = TrackEditor.DefaultTrackHeight; + if (item.hasChildren && m_TreeView.data.IsExpanded(item)) + { + height = Mathf.Min(TrackEditor.DefaultTrackHeight, kMinTrackHeight); + } + + return new Vector2(m_TreeView.GetTotalRect().width, height); + } + + public virtual void BeginRowGUI() + { + if (m_TreeView.GetTotalRect().width != GetRowRect(0).width) + { + CalculateRowRects(); + } + + m_DraggingInsertionMarkerRect.x = -1; + + m_TreeView.SetSelection(SelectionManager.SelectedTrackGUI().Select(t => t.id).ToArray(), false); + } + + public virtual void EndRowGUI() + { + // Draw row marker when dragging + if (m_DraggingInsertionMarkerRect.x >= 0 && Event.current.type == EventType.Repaint) + { + Rect insertionRect = m_DraggingInsertionMarkerRect; + const float insertionHeight = 1.0f; + insertionRect.height = insertionHeight; + + if (m_TreeView.dragging.drawRowMarkerAbove) + insertionRect.y -= insertionHeight * 0.5f + 2.0f; + else + insertionRect.y += m_DraggingInsertionMarkerRect.height - insertionHeight * 0.5f + 1.0f; + + EditorGUI.DrawRect(insertionRect, Color.white); + } + } + + public virtual void OnRowGUI(Rect rowRect, TreeViewItem item, int row, bool selected, bool focused) + { + using (new EditorGUI.DisabledScope(TimelineWindow.instance.currentMode.TrackState(TimelineWindow.instance.state) == TimelineModeGUIState.Disabled)) + { + var sqvi = (TimelineTrackBaseGUI)item; + sqvi.treeViewToWindowTransformation = m_TreeView.GetTotalRect().position - m_TreeView.state.scrollPos; + + // this may be called because an encompassing parent is visible + if (!sqvi.visibleExpanded) + return; + + Rect headerRect = rowRect; + Rect contentRect = rowRect; + + headerRect.width = m_State.sequencerHeaderWidth - 2.0f; + contentRect.xMin += m_State.sequencerHeaderWidth; + contentRect.width = rowRect.width - m_State.sequencerHeaderWidth - 1.0f; + + Rect foldoutRect = rowRect; + + var indent = GetFoldoutIndent(item); + var headerRectWithIndent = headerRect; + headerRectWithIndent.xMin = indent; + var rowRectWithIndent = new Rect(rowRect.x + indent, rowRect.y, rowRect.width - indent, rowRect.height); + sqvi.Draw(headerRectWithIndent, contentRect, m_State); + sqvi.DrawInsertionMarkers(rowRectWithIndent); + + if (Event.current.type == EventType.Repaint) + { + m_State.spacePartitioner.AddBounds(sqvi); + + // Show marker below this Item + if (showInsertionMarker) + { + if (m_TreeView.dragging != null && m_TreeView.dragging.GetRowMarkerControlID() == TreeViewController.GetItemControlID(item)) + m_DraggingInsertionMarkerRect = rowRectWithIndent; + } + } + + // Draw foldout (after text content above to ensure drop down icon is rendered above selection highlight) + DrawFoldout(item, foldoutRect, indent); + + sqvi.ClearDrawFlags(); + } + } + + void DrawFoldout(TreeViewItem item, Rect foldoutRect, float indent) + { + var showFoldout = m_TreeView.data.IsExpandable(item); + if (showFoldout) + { + foldoutRect.x = indent - kFoldOutOffset; + foldoutRect.width = m_FoldoutWidth; + EditorGUI.BeginChangeCheck(); + float foldoutIconHeight = DirectorStyles.Instance.foldout.fixedHeight; + foldoutRect.y += foldoutIconHeight / 2.0f; + foldoutRect.height = foldoutIconHeight; + + if (foldoutRect.xMax > m_State.sequencerHeaderWidth) + return; + + //Override Disable state for TrakGroup toggle button to expand/collapse group. + bool previousEnableState = GUI.enabled; + GUI.enabled = true; + bool newExpandedValue = GUI.Toggle(foldoutRect, m_TreeView.data.IsExpanded(item), GUIContent.none, m_Styles.foldout); + GUI.enabled = previousEnableState; + + if (EditorGUI.EndChangeCheck()) + { + if (Event.current.alt) + m_TreeView.data.SetExpandedWithChildren(item, newExpandedValue); + else + m_TreeView.data.SetExpanded(item, newExpandedValue); + } + } + } + + public Rect GetRenameRect(Rect rowRect, int row, TreeViewItem item) + { + return rowRect; + } + + public void BeginPingItem(TreeViewItem item, float topPixelOfRow, float availableWidth) {} + public void EndPingItem() {} + + public Rect GetRowRect(int row, float rowWidth) + { + return GetRowRect(row); + } + + public Rect GetRowRect(int row) + { + if (m_RowRects.Count == 0) + return new Rect(); + + if (row >= m_RowRects.Count) + return new Rect(); + + return m_RowRects[row]; + } + + static float GetSpacing(TreeViewItem item) + { + var trackBase = item as TimelineTrackBaseGUI; + if (trackBase != null) + return trackBase.GetVerticalSpacingBetweenTracks(); + + return 3.0f; + } + + public void CalculateRowRects() + { + if (m_TreeView.isSearching) + return; + + const float startY = 6.0f; + IList rows = m_TreeView.data.GetRows(); + m_RowRects = new List(rows.Count); + m_ExpandedRowRects = new List(rows.Count); + + float curY = startY; + m_MaxWidthOfRows = 1f; + + // first pass compute the row rects + for (int i = 0; i < rows.Count; ++i) + { + var item = rows[i]; + + if (i != 0) + curY += GetSpacing(item); + + Vector2 rowSize = GetSizeOfRow(item); + m_RowRects.Add(new Rect(0, curY, rowSize.x, rowSize.y)); + m_ExpandedRowRects.Add(m_RowRects[i]); + + curY += rowSize.y; + + if (rowSize.x > m_MaxWidthOfRows) + m_MaxWidthOfRows = rowSize.x; + + // updated the expanded state + var groupGUI = item as TimelineGroupGUI; + if (groupGUI != null) + groupGUI.SetExpanded(m_TreeView.data.IsExpanded(item)); + } + + float halfHeight = halfDropBetweenHeight; + const float kGroupPad = 1.0f; + const float kSkinPadding = 5.0f * 0.6f; + // work bottom up and compute visible regions for groups + for (int i = rows.Count - 1; i > 0; i--) + { + float height = 0; + TimelineTrackBaseGUI item = (TimelineTrackBaseGUI)rows[i]; + if (item.isExpanded && item.children != null && item.children.Count > 0) + { + for (var j = 0; j < item.children.Count; j++) + { + var child = item.children[j]; + int index = rows.IndexOf(child); + if (index > i) + height += m_ExpandedRowRects[index].height + kSkinPadding; + } + + height += kGroupPad; + } + m_ExpandedRowRects[i] = new Rect(m_RowRects[i].x, m_RowRects[i].y, m_RowRects[i].width, m_RowRects[i].height + height); + + var groupGUI = item as TimelineGroupGUI; + if (groupGUI != null) + { + var spacing = GetSpacing(item) + 1; + groupGUI.expandedRect = m_ExpandedRowRects[i]; + groupGUI.rowRect = m_RowRects[i]; + groupGUI.dropRect = new Rect(m_RowRects[i].x, m_RowRects[i].y - spacing, m_RowRects[i].width, m_RowRects[i].height + Mathf.Max(halfHeight, spacing)); + } + } + } + + public virtual bool BeginRename(TreeViewItem item, float delay) + { + return false; + } + + public virtual void EndRename() {} + + protected virtual float GetFoldoutIndent(TreeViewItem item) + { + // Ignore depth when showing search results + if (item.depth <= 1 || m_TreeView.isSearching) + return DirectorStyles.kBaseIndent; + + int depth = item.depth; + var trackGUI = item as TimelineTrackGUI; + + // first level subtracks are not indented + if (trackGUI != null && trackGUI.track != null && trackGUI.track.isSubTrack) + depth--; + + return depth * DirectorStyles.kBaseIndent; + } + + public virtual float GetContentIndent(TreeViewItem item) + { + return GetFoldoutIndent(item); + } + + public int GetNumRowsOnPageUpDown(TreeViewItem fromItem, bool pageUp, float heightOfTreeView) + { + return (int)Mathf.Floor(heightOfTreeView / 30); // return something + } + + // Should return the row number of the first and last row thats fits in the pixel rect defined by top and height + public void GetFirstAndLastRowVisible(out int firstRowVisible, out int lastRowVisible) + { + int rowCount = m_TreeView.data.rowCount; + if (rowCount == 0) + { + firstRowVisible = lastRowVisible = -1; + return; + } + + if (rowCount != m_ExpandedRowRects.Count) + { + Debug.LogError("Mismatch in state: rows vs cached rects. Did you remember to hook up: dataSource.onVisibleRowsChanged += gui.CalculateRowRects ?"); + CalculateRowRects(); + } + + float topPixel = m_TreeView.state.scrollPos.y; + float heightInPixels = m_TreeView.GetTotalRect().height; + + int firstVisible = -1; + int lastVisible = -1; + + Rect visibleRect = new Rect(0, topPixel, m_ExpandedRowRects[0].width, heightInPixels); + for (int i = 0; i < m_ExpandedRowRects.Count; ++i) + { + bool visible = visibleRect.Overlaps(m_ExpandedRowRects[i]); + if (visible) + { + if (firstVisible == -1) + firstVisible = i; + lastVisible = i; + } + + TimelineTrackBaseGUI gui = m_TreeView.data.GetItem(i) as TimelineTrackBaseGUI; + if (gui != null) + { + gui.visibleExpanded = visible; + gui.visibleRow = visibleRect.Overlaps(m_RowRects[i]); + } + } + + if (firstVisible != -1 && lastVisible != -1) + { + firstRowVisible = firstVisible; + lastRowVisible = lastVisible; + } + else + { + firstRowVisible = 0; + lastRowVisible = rowCount - 1; + } + } + + public Vector2 GetTotalSize() + { + if (m_RowRects.Count == 0) + return new Vector2(0, 0); + + return new Vector2(m_MaxWidthOfRows, m_RowRects[m_RowRects.Count - 1].yMax); + } + + public virtual float halfDropBetweenHeight + { + get { return 8f; } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeView.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeView.cs.meta new file mode 100644 index 0000000..a555d92 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 82a8ce43816925d4b971951094cb755c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeViewGUI.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeViewGUI.cs new file mode 100644 index 0000000..6160a35 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeViewGUI.cs @@ -0,0 +1,182 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor.IMGUI.Controls; +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TimelineTreeViewGUI + { + readonly TimelineAsset m_Timeline; + readonly TreeViewController m_TreeView; + readonly TimelineTreeView m_TimelineTreeView; + readonly TimelineWindow m_Window; + readonly TimelineDataSource m_DataSource; + + TreeViewItem root + { + get { return m_DataSource.root; } + } + + TimelineTrackBaseGUI[] visibleTrackGuis + { + get + { + int firstRow; + int lastRow; + var visibleRows = new List(); + m_TreeView.gui.GetFirstAndLastRowVisible(out firstRow, out lastRow); + + for (int r = firstRow; r <= lastRow; r++) + { + var track = m_TreeView.data.GetItem(r) as TimelineTrackBaseGUI; + if (track != null && track != root) + { + AddVisibleTrackRecursive(ref visibleRows, track); + } + } + return visibleRows.ToArray(); + } + } + + public TrackAsset[] visibleTracks + { + get { return visibleTrackGuis.Select(x => x.track).ToArray(); } + } + + public List allClipGuis + { + get + { + TimelineDataSource dataSource = m_TreeView.data as TimelineDataSource; + if (dataSource != null && dataSource.allTrackGuis != null) + return dataSource.allTrackGuis.OfType().SelectMany(x => x.clips).ToList(); + + return null; + } + } + + public List allTrackGuis + { + get + { + var dataSource = m_TreeView.data as TimelineDataSource; + if (dataSource != null) + return dataSource.allTrackGuis; + return null; + } + } + + public Vector2 contentSize + { + get { return m_TreeView.GetContentSize(); } + } + + public Vector2 scrollPosition + { + get { return m_TreeView.state.scrollPos; } + set + { + Rect r = m_TreeView.GetTotalRect(); + Vector2 visibleContent = m_TreeView.GetContentSize(); + m_TreeView.state.scrollPos = new Vector2(value.x, Mathf.Clamp(value.y, 0, Mathf.Max(0, visibleContent.y - r.height))); + } + } + + public bool showingVerticalScrollBar + { + get { return m_TreeView.showingVerticalScrollBar; } + } + + public void FrameItem(TreeViewItem item) + { + m_TreeView.Frame(item.id, true, false, true); + } + + public TimelineDragging timelineDragging { get {return m_TreeView.dragging as TimelineDragging; }} + + public TimelineTreeViewGUI(TimelineWindow sequencerWindow, TimelineAsset timeline, Rect rect) + { + m_Timeline = timeline; + m_Window = sequencerWindow; + + var treeviewState = new TreeViewState(); + treeviewState.scrollPos = new Vector2(treeviewState.scrollPos.x, TimelineWindowViewPrefs.GetOrCreateViewModel(m_Timeline).verticalScroll); + + m_TreeView = new TreeViewController(sequencerWindow, treeviewState); + m_TreeView.horizontalScrollbarStyle = GUIStyle.none; + m_TreeView.scrollViewStyle = GUI.skin.scrollView; + m_TreeView.keyboardInputCallback = sequencerWindow.TreeViewKeyboardCallback; + + + m_TimelineTreeView = new TimelineTreeView(sequencerWindow, m_TreeView); + var dragging = new TimelineDragging(m_TreeView, m_Window, m_Timeline); + m_DataSource = new TimelineDataSource(this, m_TreeView, sequencerWindow); + + m_DataSource.onVisibleRowsChanged += m_TimelineTreeView.CalculateRowRects; + m_TreeView.Init(rect, m_DataSource, m_TimelineTreeView, dragging); + + m_DataSource.ExpandItems(m_DataSource.root); + } + + public ITreeViewGUI gui + { + get { return m_TimelineTreeView; } + } + public ITreeViewDataSource data + { + get { return m_TreeView == null ? null : m_TreeView.data; } + } + + public TimelineWindow TimelineWindow + { + get { return m_Window; } + } + + public void CalculateRowRects() + { + m_TimelineTreeView.CalculateRowRects(); + } + + public void Reload() + { + AnimationClipCurveCache.Instance.ClearCachedProxyClips(); + + m_TreeView.ReloadData(); + m_DataSource.ExpandItems(m_DataSource.root); + m_TimelineTreeView.CalculateRowRects(); + } + + public void OnGUI(Rect rect) + { + int keyboardControl = GUIUtility.GetControlID(FocusType.Passive, rect); + m_TreeView.OnGUI(rect, keyboardControl); + TimelineWindowViewPrefs.GetOrCreateViewModel(m_Timeline).verticalScroll = m_TreeView.state.scrollPos.y; + } + + public Rect GetRowRect(int row) + { + return m_TimelineTreeView.GetRowRect(row); + } + + static void AddVisibleTrackRecursive(ref List list, TimelineTrackBaseGUI track) + { + if (track == null) + return; + + list.Add(track); + + if (!track.isExpanded) + return; + + if (track.children != null) + { + foreach (var c in track.children) + { + AddVisibleTrackRecursive(ref list, c as TimelineTrackBaseGUI); + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeViewGUI.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeViewGUI.cs.meta new file mode 100644 index 0000000..7363134 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TimelineTreeViewGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f9d8c8b21846a654092a24f25aa41421 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TrackPropertyCurvesDataSource.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TrackPropertyCurvesDataSource.cs new file mode 100644 index 0000000..4b808ea --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TrackPropertyCurvesDataSource.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using UnityEngine.Timeline; + +namespace UnityEditor.Timeline +{ + class TrackPropertyCurvesDataSource : BasePropertyKeyDataSource + { + protected override AnimationClip animationClip { get; } + + public TrackPropertyCurvesDataSource(TrackAsset track) + { + animationClip = track != null ? track.curves : null; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TrackPropertyCurvesDataSource.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TrackPropertyCurvesDataSource.cs.meta new file mode 100644 index 0000000..fc351b4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/treeview/TrackPropertyCurvesDataSource.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f8964ef46e1d446dc9eb17a36a3e1f14 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/LICENSE.md b/Library/PackageCache/com.unity.timeline@1.2.13/LICENSE.md new file mode 100644 index 0000000..37b8550 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/LICENSE.md @@ -0,0 +1,5 @@ +Timeline copyright © 2020 Unity Technologies ApS + +Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). + +Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/LICENSE.md.meta b/Library/PackageCache/com.unity.timeline@1.2.13/LICENSE.md.meta new file mode 100644 index 0000000..5123f39 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6ecb9e17e44feb84cb80451fa27b09fe +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/README.md b/Library/PackageCache/com.unity.timeline@1.2.13/README.md new file mode 100644 index 0000000..754714b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/README.md @@ -0,0 +1,37 @@ +![ReleaseBadge](https://badges.cds.internal.unity3d.com/packages/com.unity.timeline/release-badge.svg) +![ReleaseBadge](https://badges.cds.internal.unity3d.com/packages/com.unity.timeline/candidates-badge.svg) + +# About Timeline + +Use Unity’s Timeline to create cinematic content, game-play sequences, audio sequences, and complex particle effects. + +# Installing Timeline + +To install this package, follow the instructions in the [Package Manager documentation](https://docs.unity3d.com/Packages/com.unity.package-manager-ui@latest/index.html). + +# Using Timeline + +The Timeline Manual can be found [here](http://docs.hq.unity3d.com/2018.1/Documentation/Manual/TimelineSection.html) + +# Technical details +## Requirements + +This version of Timeline is compatible with the following versions of the Unity Editor: + +* 2019.3 and later (recommended) + +# How to format your code for the repo + +Clone https://github.cds.internal.unity3d.com/unity/git-hgmeta-format/tree/csharp-format (the branch is important): +```bash +git clone --single-branch --branch csharp-format git@github.cds.internal.unity3d.com:unity/git-hgmeta-format.git +``` +go in your repo clone and run +```bash +perl /hooks/install-hooks.pl +``` +If you have things already committed without the formatting, run +```bash +perl /format.pl branch +``` +where `branch` is litteraly `branch` and not `$BRANCHNAME` diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/README.md.meta b/Library/PackageCache/com.unity.timeline@1.2.13/README.md.meta new file mode 100644 index 0000000..32d6a2e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f66454863bc106549a6b53849ee63b41 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime.meta new file mode 100644 index 0000000..ea2c13a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: efcf753a96a07b24dbe5f23a8ad5963d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation.meta new file mode 100644 index 0000000..ed3ac63 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d0cd29fb1ad218b48b814bc3e6d8ac0e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationMixerPlayable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationMixerPlayable.cs new file mode 100644 index 0000000..61054f7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationMixerPlayable.cs @@ -0,0 +1,71 @@ +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + class ActivationMixerPlayable : PlayableBehaviour + { + ActivationTrack.PostPlaybackState m_PostPlaybackState; + bool m_BoundGameObjectInitialStateIsActive; + + private GameObject m_BoundGameObject; + + + public static ScriptPlayable Create(PlayableGraph graph, int inputCount) + { + return ScriptPlayable.Create(graph, inputCount); + } + + public ActivationTrack.PostPlaybackState postPlaybackState + { + get { return m_PostPlaybackState; } + set { m_PostPlaybackState = value; } + } + + public override void OnPlayableDestroy(Playable playable) + { + if (m_BoundGameObject == null) + return; + + switch (m_PostPlaybackState) + { + case ActivationTrack.PostPlaybackState.Active: + m_BoundGameObject.SetActive(true); + break; + case ActivationTrack.PostPlaybackState.Inactive: + m_BoundGameObject.SetActive(false); + break; + case ActivationTrack.PostPlaybackState.Revert: + m_BoundGameObject.SetActive(m_BoundGameObjectInitialStateIsActive); + break; + case ActivationTrack.PostPlaybackState.LeaveAsIs: + default: + break; + } + } + + public override void ProcessFrame(Playable playable, FrameData info, object playerData) + { + if (m_BoundGameObject == null) + { + m_BoundGameObject = playerData as GameObject; + m_BoundGameObjectInitialStateIsActive = m_BoundGameObject != null && m_BoundGameObject.activeSelf; + } + + if (m_BoundGameObject == null) + return; + + int inputCount = playable.GetInputCount(); + bool hasInput = false; + for (int i = 0; i < inputCount; i++) + { + if (playable.GetInputWeight(i) > 0) + { + hasInput = true; + break; + } + } + + m_BoundGameObject.SetActive(hasInput); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationMixerPlayable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationMixerPlayable.cs.meta new file mode 100644 index 0000000..7ce2073 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationMixerPlayable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e165a99d845c10e4ea0f546e542e8684 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationPlayableAsset.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationPlayableAsset.cs new file mode 100644 index 0000000..7304741 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationPlayableAsset.cs @@ -0,0 +1,29 @@ +#if UNITY_EDITOR +using System.ComponentModel; +#endif +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Playable Asset class for Activation Tracks + /// +#if UNITY_EDITOR + [DisplayName("Activation Clip")] +#endif + class ActivationPlayableAsset : PlayableAsset, ITimelineClipAsset + { + /// + /// Returns a description of the features supported by activation clips + /// + public ClipCaps clipCaps { get { return ClipCaps.None; } } + + /// + /// Overrides PlayableAsset.CreatePlayable() to inject needed Playables for an activation asset + /// + public override Playable CreatePlayable(PlayableGraph graph, GameObject go) + { + return Playable.Create(graph); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationPlayableAsset.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationPlayableAsset.cs.meta new file mode 100644 index 0000000..e22155a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationPlayableAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fde0d25a170598d46a0b9dc16b4527a5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationTrack.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationTrack.cs new file mode 100644 index 0000000..8e06ddb --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationTrack.cs @@ -0,0 +1,93 @@ +using System; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Track that can be used to control the active state of a GameObject. + /// + [Serializable] + [TrackClipType(typeof(ActivationPlayableAsset))] + [TrackBindingType(typeof(GameObject))] + [ExcludeFromPreset] + public class ActivationTrack : TrackAsset + { + [SerializeField] + PostPlaybackState m_PostPlaybackState = PostPlaybackState.LeaveAsIs; + ActivationMixerPlayable m_ActivationMixer; + + /// + /// Specify what state to leave the GameObject in after the Timeline has finished playing. + /// + public enum PostPlaybackState + { + /// + /// Set the GameObject to active. + /// + Active, + + /// + /// Set the GameObject to Inactive. + /// + Inactive, + + /// + /// Revert the GameObject to the state in was in before the Timeline was playing. + /// + Revert, + + /// + /// Leave the GameObject in the state it was when the Timeline was stopped. + /// + LeaveAsIs + } + + internal override bool CanCompileClips() + { + return !hasClips || base.CanCompileClips(); + } + + /// + /// Specifies what state to leave the GameObject in after the Timeline has finished playing. + /// + public PostPlaybackState postPlaybackState + { + get { return m_PostPlaybackState; } + set { m_PostPlaybackState = value; UpdateTrackMode(); } + } + + /// + public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount) + { + var mixer = ActivationMixerPlayable.Create(graph, inputCount); + m_ActivationMixer = mixer.GetBehaviour(); + + UpdateTrackMode(); + + return mixer; + } + + internal void UpdateTrackMode() + { + if (m_ActivationMixer != null) + m_ActivationMixer.postPlaybackState = m_PostPlaybackState; + } + + /// + public override void GatherProperties(PlayableDirector director, IPropertyCollector driver) + { + var gameObject = GetGameObjectBinding(director); + if (gameObject != null) + { + driver.AddFromName(gameObject, "m_IsActive"); + } + } + + /// + protected override void OnCreateClip(TimelineClip clip) + { + clip.displayName = "Active"; + base.OnCreateClip(clip); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationTrack.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationTrack.cs.meta new file mode 100644 index 0000000..82ab218 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Activation/ActivationTrack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 21bf7f712d84d26478ebe6a299f21738 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation.meta new file mode 100644 index 0000000..7fa19e2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: de9eb5e2046ffc9448f07e495c436506 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationOutputWeightProcessor.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationOutputWeightProcessor.cs new file mode 100644 index 0000000..ae190e3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationOutputWeightProcessor.cs @@ -0,0 +1,93 @@ +using System.Collections.Generic; +using UnityEngine.Animations; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + // Does a post processing of the weights on an animation track to properly normalize + // the mixer weights so that blending does not bring default poses and subtracks, layers and + // layer graphs blend correctly + class AnimationOutputWeightProcessor : ITimelineEvaluateCallback + { + struct WeightInfo + { + public Playable mixer; + public Playable parentMixer; + public int port; + } + + AnimationPlayableOutput m_Output; + AnimationMotionXToDeltaPlayable m_MotionXPlayable; + readonly List m_Mixers = new List(); + + public AnimationOutputWeightProcessor(AnimationPlayableOutput output) + { + m_Output = output; + output.SetWeight(0); + FindMixers(); + } + + void FindMixers() + { + var playable = m_Output.GetSourcePlayable(); + var outputPort = m_Output.GetSourceOutputPort(); + + m_Mixers.Clear(); + // only write the final output in playmode. it should always be 1 in editor because we blend to the defaults + FindMixers(playable, outputPort, playable.GetInput(outputPort)); + } + + // Recursively accumulates mixers. + void FindMixers(Playable parent, int port, Playable node) + { + if (!node.IsValid()) + return; + + var type = node.GetPlayableType(); + if (type == typeof(AnimationMixerPlayable) || type == typeof(AnimationLayerMixerPlayable)) + { + // use post fix traversal so children come before parents + int subCount = node.GetInputCount(); + for (int j = 0; j < subCount; j++) + { + FindMixers(node, j, node.GetInput(j)); + } + + // if we encounter a layer mixer, we assume there is nesting occuring + // and we modulate the weight instead of overwriting it. + var weightInfo = new WeightInfo + { + parentMixer = parent, + mixer = node, + port = port, + }; + m_Mixers.Add(weightInfo); + } + else + { + var count = node.GetInputCount(); + for (var i = 0; i < count; i++) + { + FindMixers(parent, port, node.GetInput(i)); + } + } + } + + public void Evaluate() + { + float weight = 1; + m_Output.SetWeight(1); + for (int i = 0; i < m_Mixers.Count; i++) + { + var mixInfo = m_Mixers[i]; + weight = WeightUtility.NormalizeMixer(mixInfo.mixer); + mixInfo.parentMixer.SetInputWeight(mixInfo.port, weight); + } + + // only write the final weight in player/playmode. In editor, we are blending to the appropriate defaults + // the last mixer in the list is the final blend, since the list is composed post-order. + if (Application.isPlaying) + m_Output.SetWeight(weight); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationOutputWeightProcessor.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationOutputWeightProcessor.cs.meta new file mode 100644 index 0000000..c487e39 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationOutputWeightProcessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a429b38ee9d48c7408c8870baf406034 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPlayableAsset.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPlayableAsset.cs new file mode 100644 index 0000000..68355c0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPlayableAsset.cs @@ -0,0 +1,326 @@ +using System.Collections.Generic; +using UnityEngine.Animations; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// A Playable Asset that represents a single AnimationClip clip. + /// + [System.Serializable, NotKeyable] + public partial class AnimationPlayableAsset : PlayableAsset, ITimelineClipAsset, IPropertyPreview + { + /// + /// Whether the source AnimationClip loops during playback. + /// + public enum LoopMode + { + /// + /// Use the loop time setting from the source AnimationClip. + /// + [Tooltip("Use the loop time setting from the source AnimationClip.")] + UseSourceAsset = 0, + + /// + /// The source AnimationClip loops during playback. + /// + [Tooltip("The source AnimationClip loops during playback.")] + On = 1, + + /// + /// The source AnimationClip does not loop during playback. + /// + [Tooltip("The source AnimationClip does not loop during playback.")] + Off = 2 + } + + + [SerializeField] private AnimationClip m_Clip; + [SerializeField] private Vector3 m_Position = Vector3.zero; + [SerializeField] private Vector3 m_EulerAngles = Vector3.zero; + [SerializeField] private bool m_UseTrackMatchFields = true; + [SerializeField] private MatchTargetFields m_MatchTargetFields = MatchTargetFieldConstants.All; + [SerializeField] private bool m_RemoveStartOffset = true; // set by animation track prior to compilation + [SerializeField] private bool m_ApplyFootIK = true; + [SerializeField] private LoopMode m_Loop = LoopMode.UseSourceAsset; + + +#if UNITY_EDITOR + private AnimationOffsetPlayable m_AnimationOffsetPlayable; +#endif + + /// + /// The translational offset of the clip + /// + public Vector3 position + { + get + { + return m_Position; + } + set + { + m_Position = value; +#if UNITY_EDITOR + if (m_AnimationOffsetPlayable.IsValid()) + m_AnimationOffsetPlayable.SetPosition(position); +#endif + } + } + + /// + /// The rotational offset of the clip, expressed as a Quaternion + /// + public Quaternion rotation + { + get + { + return Quaternion.Euler(m_EulerAngles); + } + + set + { + m_EulerAngles = value.eulerAngles; +#if UNITY_EDITOR + if (m_AnimationOffsetPlayable.IsValid()) + m_AnimationOffsetPlayable.SetRotation(value); +#endif + } + } + + /// + /// The rotational offset of the clip, expressed in Euler angles + /// + public Vector3 eulerAngles + { + get { return m_EulerAngles; } + set + { + m_EulerAngles = value; +#if UNITY_EDITOR + if (m_AnimationOffsetPlayable.IsValid()) + m_AnimationOffsetPlayable.SetRotation(rotation); +#endif + } + } + + /// + /// Specifies whether to use offset matching options as defined by the track. + /// + public bool useTrackMatchFields + { + get { return m_UseTrackMatchFields; } + set { m_UseTrackMatchFields = value; } + } + + /// + /// Specifies which fields should be matched when aligning offsets. + /// + public MatchTargetFields matchTargetFields + { + get { return m_MatchTargetFields; } + set { m_MatchTargetFields = value; } + } + + /// + /// Whether to make the animation clip play relative to its first keyframe. + /// + /// + /// This option only applies to animation clips that animate Transform components. + /// + public bool removeStartOffset + { + get { return m_RemoveStartOffset; } + set { m_RemoveStartOffset = value; } + } + + + /// + /// Enable to apply foot IK to the AnimationClip when the target is humanoid. + /// + public bool applyFootIK + { + get { return m_ApplyFootIK; } + set { m_ApplyFootIK = value; } + } + + /// + /// Whether the source AnimationClip loops during playback + /// + public LoopMode loop + { + get { return m_Loop; } + set { m_Loop = value; } + } + + + internal bool hasRootTransforms + { + get { return m_Clip != null && HasRootTransforms(m_Clip); } + } + + // used for legacy 'scene' mode. + internal AppliedOffsetMode appliedOffsetMode { get; set; } + + + /// + /// The source animation clip + /// + public AnimationClip clip + { + get { return m_Clip; } + set + { + if (value != null) + name = "AnimationPlayableAsset of " + value.name; + m_Clip = value; + } + } + + /// + /// Returns the duration required to play the animation clip exactly once + /// + public override double duration + { + get + { + double length = TimeUtility.GetAnimationClipLength(clip); + if (length < float.Epsilon) + return base.duration; + return length; + } + } + + /// + /// Returns a description of the PlayableOutputs that may be created for this asset. + /// + public override IEnumerable outputs + { + get { yield return AnimationPlayableBinding.Create(name, this); } + } + + /// + /// Creates the root of a Playable subgraph to play the animation clip. + /// + /// PlayableGraph that will own the playable + /// The gameobject that triggered the graph build + /// The root playable of the subgraph + public override Playable CreatePlayable(PlayableGraph graph, GameObject go) + { + Playable root = CreatePlayable(graph, m_Clip, position, eulerAngles, removeStartOffset, appliedOffsetMode, applyFootIK, m_Loop); + +#if UNITY_EDITOR + m_AnimationOffsetPlayable = AnimationOffsetPlayable.Null; + if (root.IsValid() && root.IsPlayableOfType()) + { + m_AnimationOffsetPlayable = (AnimationOffsetPlayable)root; + } + + LiveLink(); +#endif + + return root; + } + + internal static Playable CreatePlayable(PlayableGraph graph, AnimationClip clip, Vector3 positionOffset, Vector3 eulerOffset, bool removeStartOffset, AppliedOffsetMode mode, bool applyFootIK, LoopMode loop) + { + if (clip == null || clip.legacy) + return Playable.Null; + + + var clipPlayable = AnimationClipPlayable.Create(graph, clip); + clipPlayable.SetRemoveStartOffset(removeStartOffset); + clipPlayable.SetApplyFootIK(applyFootIK); + clipPlayable.SetOverrideLoopTime(loop != LoopMode.UseSourceAsset); + clipPlayable.SetLoopTime(loop == LoopMode.On); + + Playable root = clipPlayable; + + if (ShouldApplyScaleRemove(mode)) + { + var removeScale = AnimationRemoveScalePlayable.Create(graph, 1); + graph.Connect(root, 0, removeScale, 0); + removeScale.SetInputWeight(0, 1.0f); + root = removeScale; + } + + if (ShouldApplyOffset(mode, clip)) + { + var offsetPlayable = AnimationOffsetPlayable.Create(graph, positionOffset, Quaternion.Euler(eulerOffset), 1); + graph.Connect(root, 0, offsetPlayable, 0); + offsetPlayable.SetInputWeight(0, 1.0F); + root = offsetPlayable; + } + + return root; + } + + private static bool ShouldApplyOffset(AppliedOffsetMode mode, AnimationClip clip) + { + if (mode == AppliedOffsetMode.NoRootTransform || mode == AppliedOffsetMode.SceneOffsetLegacy) + return false; + + return HasRootTransforms(clip); + } + + private static bool ShouldApplyScaleRemove(AppliedOffsetMode mode) + { + return mode == AppliedOffsetMode.SceneOffsetLegacyEditor || mode == AppliedOffsetMode.SceneOffsetLegacy || mode == AppliedOffsetMode.TransformOffsetLegacy; + } + +#if UNITY_EDITOR + public void LiveLink() + { + if (m_AnimationOffsetPlayable.IsValid()) + { + m_AnimationOffsetPlayable.SetPosition(position); + m_AnimationOffsetPlayable.SetRotation(rotation); + } + } + +#endif + + /// + /// Returns the capabilities of TimelineClips that contain a AnimationPlayableAsset + /// + public ClipCaps clipCaps + { + get + { + var caps = ClipCaps.All; + if (m_Clip == null || (m_Loop == LoopMode.Off) || (m_Loop == LoopMode.UseSourceAsset && !m_Clip.isLooping)) + caps &= ~ClipCaps.Looping; + + // empty clips don't support clip in. This allows trim operations to simply become + // move operations + if (m_Clip == null || m_Clip.empty) + caps &= ~ClipCaps.ClipIn; + + return caps; + } + } + + /// + /// Resets the offsets to default values + /// + public void ResetOffsets() + { + position = Vector3.zero; + eulerAngles = Vector3.zero; + } + + /// + public void GatherProperties(PlayableDirector director, IPropertyCollector driver) + { + driver.AddFromClip(m_Clip); + } + + internal static bool HasRootTransforms(AnimationClip clip) + { + if (clip == null || clip.empty) + return false; + + return clip.hasRootMotion || clip.hasGenericRootTransform || clip.hasMotionCurves || clip.hasRootCurves; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPlayableAsset.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPlayableAsset.cs.meta new file mode 100644 index 0000000..698bcd5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPlayableAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 030f85c3f73729f4f976f66ffb23b875 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPreviewUpdateCallback.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPreviewUpdateCallback.cs new file mode 100644 index 0000000..560f900 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPreviewUpdateCallback.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using UnityEngine.Animations; +using UnityEngine.Experimental.Animations; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + class AnimationPreviewUpdateCallback : ITimelineEvaluateCallback + { + AnimationPlayableOutput m_Output; + PlayableGraph m_Graph; + List m_PreviewComponents; + + public AnimationPreviewUpdateCallback(AnimationPlayableOutput output) + { + m_Output = output; + + Playable playable = m_Output.GetSourcePlayable(); + if (playable.IsValid()) + { + m_Graph = playable.GetGraph(); + } + } + + public void Evaluate() + { + if (!m_Graph.IsValid()) + return; + + if (m_PreviewComponents == null) + FetchPreviewComponents(); + + foreach (var component in m_PreviewComponents) + { + if (component != null) + { + component.UpdatePreviewGraph(m_Graph); + } + } + } + + private void FetchPreviewComponents() + { + m_PreviewComponents = new List(); + + var animator = m_Output.GetTarget(); + if (animator == null) + return; + + var gameObject = animator.gameObject; + m_PreviewComponents.AddRange(gameObject.GetComponents()); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPreviewUpdateCallback.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPreviewUpdateCallback.cs.meta new file mode 100644 index 0000000..9d6167b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationPreviewUpdateCallback.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 755e3e942f7784d458bddba421c0bb72 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationTrack.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationTrack.cs new file mode 100644 index 0000000..21e811d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationTrack.cs @@ -0,0 +1,971 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Animations; +using UnityEngine.Experimental.Animations; +using UnityEngine.Playables; +using UnityEngine.Serialization; + +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace UnityEngine.Timeline +{ + /// + /// Flags specifying which offset fields to match + /// + [Flags] + public enum MatchTargetFields + { + /// + /// Translation X value + /// + PositionX = 1 << 0, + /// + /// Translation Y value + /// + PositionY = 1 << 1, + /// + /// Translation Z value + /// + PositionZ = 1 << 2, + /// + /// Rotation Euler Angle X value + /// + RotationX = 1 << 3, + /// + /// Rotation Euler Angle Y value + /// + RotationY = 1 << 4, + /// + /// Rotation Euler Angle Z value + /// + RotationZ = 1 << 5 + } + + /// + /// Describes what is used to set the starting position and orientation of each Animation Track. + /// + /// + /// By default, each Animation Track uses ApplyTransformOffsets to start from a set position and orientation. + /// To offset each Animation Track based on the current position and orientation in the scene, use ApplySceneOffsets. + /// + public enum TrackOffset + { + /// + /// Use this setting to offset each Animation Track based on a set position and orientation. + /// + ApplyTransformOffsets, + /// + /// Use this setting to offset each Animation Track based on the current position and orientation in the scene. + /// + ApplySceneOffsets, + /// + /// Use this setting to offset root transforms based on the state of the animator. + /// + /// + /// Only use this setting to support legacy Animation Tracks. This mode may be deprecated in a future release. + /// + /// In Auto mode, when the animator bound to the animation track contains an AnimatorController, it offsets all animations similar to ApplySceneOffsets. + /// If no controller is assigned, then all offsets are set to start from a fixed position and orientation, similar to ApplyTransformOffsets. + /// In Auto mode, in most cases, root transforms are not affected by local scale or Animator.humanScale, unless the animator has an AnimatorController and Animator.applyRootMotion is set to true. + /// + Auto + } + + + // offset mode + enum AppliedOffsetMode + { + NoRootTransform, + TransformOffset, + SceneOffset, + TransformOffsetLegacy, + SceneOffsetLegacy, + SceneOffsetEditor, // scene offset mode in editor + SceneOffsetLegacyEditor, + } + + + // separate from the enum to hide them from UI elements + static class MatchTargetFieldConstants + { + public static MatchTargetFields All = MatchTargetFields.PositionX | MatchTargetFields.PositionY | + MatchTargetFields.PositionZ | MatchTargetFields.RotationX | + MatchTargetFields.RotationY | MatchTargetFields.RotationZ; + + public static MatchTargetFields None = 0; + + public static MatchTargetFields Position = MatchTargetFields.PositionX | MatchTargetFields.PositionY | + MatchTargetFields.PositionZ; + + public static MatchTargetFields Rotation = MatchTargetFields.RotationX | MatchTargetFields.RotationY | + MatchTargetFields.RotationZ; + + public static bool HasAny(this MatchTargetFields me, MatchTargetFields fields) + { + return (me & fields) != None; + } + + public static MatchTargetFields Toggle(this MatchTargetFields me, MatchTargetFields flag) + { + return me ^ flag; + } + } + + + /// + /// A Timeline track used for playing back animations on an Animator. + /// + [Serializable] + [TrackClipType(typeof(AnimationPlayableAsset), false)] + [TrackBindingType(typeof(Animator))] + [ExcludeFromPreset] + public partial class AnimationTrack : TrackAsset, ILayerable + { + const string k_DefaultInfiniteClipName = "Recorded"; + const string k_DefaultRecordableClipName = "Recorded"; + + [SerializeField, FormerlySerializedAs("m_OpenClipPreExtrapolation")] + TimelineClip.ClipExtrapolation m_InfiniteClipPreExtrapolation = TimelineClip.ClipExtrapolation.None; + + [SerializeField, FormerlySerializedAs("m_OpenClipPostExtrapolation")] + TimelineClip.ClipExtrapolation m_InfiniteClipPostExtrapolation = TimelineClip.ClipExtrapolation.None; + + [SerializeField, FormerlySerializedAs("m_OpenClipOffsetPosition")] + Vector3 m_InfiniteClipOffsetPosition = Vector3.zero; + + [SerializeField, FormerlySerializedAs("m_OpenClipOffsetEulerAngles")] + Vector3 m_InfiniteClipOffsetEulerAngles = Vector3.zero; + + [SerializeField, FormerlySerializedAs("m_OpenClipTimeOffset")] + double m_InfiniteClipTimeOffset; + + [SerializeField, FormerlySerializedAs("m_OpenClipRemoveOffset")] + bool m_InfiniteClipRemoveOffset; // cached value for remove offset + + [SerializeField] + bool m_InfiniteClipApplyFootIK = true; + + [SerializeField, HideInInspector] + AnimationPlayableAsset.LoopMode mInfiniteClipLoop = AnimationPlayableAsset.LoopMode.UseSourceAsset; + + [SerializeField] + MatchTargetFields m_MatchTargetFields = MatchTargetFieldConstants.All; + [SerializeField] + Vector3 m_Position = Vector3.zero; + [SerializeField] + Vector3 m_EulerAngles = Vector3.zero; + + + [SerializeField] AvatarMask m_AvatarMask; + [SerializeField] bool m_ApplyAvatarMask = true; + + [SerializeField] TrackOffset m_TrackOffset = TrackOffset.ApplyTransformOffsets; + + [SerializeField, HideInInspector] AnimationClip m_InfiniteClip; + + +#if UNITY_EDITOR + private AnimationClip m_DefaultPoseClip; + private AnimationClip m_CachedPropertiesClip; + + AnimationOffsetPlayable m_ClipOffset; + + private Vector3 m_SceneOffsetPosition = Vector3.zero; + private Vector3 m_SceneOffsetRotation = Vector3.zero; + + private bool m_HasPreviewComponents = false; +#endif + + /// + /// The translation offset of the entire track. + /// + public Vector3 position + { + get { return m_Position; } + set { m_Position = value; } + } + + /// + /// The rotation offset of the entire track, expressed as a quaternion. + /// + public Quaternion rotation + { + get { return Quaternion.Euler(m_EulerAngles); } + set { m_EulerAngles = value.eulerAngles; } + } + + /// + /// The euler angle representation of the rotation offset of the entire track. + /// + public Vector3 eulerAngles + { + get { return m_EulerAngles; } + set { m_EulerAngles = value; } + } + + /// + /// Specifies whether to apply track offsets to all clips on the track. + /// + /// + /// This can be used to offset all clips on a track, in addition to the clips individual offsets. + /// + [Obsolete("applyOffset is deprecated. Use trackOffset instead", true)] + public bool applyOffsets + { + get { return false; } + set {} + } + + /// + /// Specifies what is used to set the starting position and orientation of an Animation Track. + /// + /// + /// Track Offset is only applied when the Animation Track contains animation that modifies the root Transform. + /// + public TrackOffset trackOffset + { + get { return m_TrackOffset; } + set { m_TrackOffset = value; } + } + + /// + /// Specifies which fields to match when aligning offsets of clips. + /// + public MatchTargetFields matchTargetFields + { + get { return m_MatchTargetFields; } + set { m_MatchTargetFields = value & MatchTargetFieldConstants.All; } + } + + /// + /// An AnimationClip storing the data for an infinite track. + /// + /// + /// The value of this property is null when the AnimationTrack is in Clip Mode. + /// + public AnimationClip infiniteClip + { + get { return m_InfiniteClip; } + internal set { m_InfiniteClip = value; } + } + + // saved value for converting to/from infinite mode + internal bool infiniteClipRemoveOffset + { + get { return m_InfiniteClipRemoveOffset; } + set { m_InfiniteClipRemoveOffset = value; } + } + + /// + /// Specifies the AvatarMask to be applied to all clips on the track. + /// + /// + /// Applying an AvatarMask to an animation track will allow discarding portions of the animation being applied on the track. + /// + public AvatarMask avatarMask + { + get { return m_AvatarMask; } + set { m_AvatarMask = value; } + } + + /// + /// Specifies whether to apply the AvatarMask to the track. + /// + public bool applyAvatarMask + { + get { return m_ApplyAvatarMask; } + set { m_ApplyAvatarMask = value; } + } + + // is this track compilable + + internal override bool CanCompileClips() + { + return !muted && (m_Clips.Count > 0 || (m_InfiniteClip != null && !m_InfiniteClip.empty)); + } + + /// + public override IEnumerable outputs + { + get { yield return AnimationPlayableBinding.Create(name, this); } + } + + + /// + /// Specifies whether the Animation Track has clips, or is in infinite mode. + /// + public bool inClipMode + { + get { return clips != null && clips.Length != 0; } + } + + /// + /// The translation offset of a track in infinite mode. + /// + public Vector3 infiniteClipOffsetPosition + { + get { return m_InfiniteClipOffsetPosition; } + set { m_InfiniteClipOffsetPosition = value; } + } + + /// + /// The rotation offset of a track in infinite mode. + /// + public Quaternion infiniteClipOffsetRotation + { + get { return Quaternion.Euler(m_InfiniteClipOffsetEulerAngles); } + set { m_InfiniteClipOffsetEulerAngles = value.eulerAngles; } + } + + /// + /// The euler angle representation of the rotation offset of the track when in infinite mode. + /// + public Vector3 infiniteClipOffsetEulerAngles + { + get { return m_InfiniteClipOffsetEulerAngles; } + set { m_InfiniteClipOffsetEulerAngles = value; } + } + + internal bool infiniteClipApplyFootIK + { + get { return m_InfiniteClipApplyFootIK; } + set { m_InfiniteClipApplyFootIK = value; } + } + + internal double infiniteClipTimeOffset + { + get { return m_InfiniteClipTimeOffset; } + set { m_InfiniteClipTimeOffset = value; } + } + + /// + /// The saved state of pre-extrapolation for clips converted to infinite mode. + /// + public TimelineClip.ClipExtrapolation infiniteClipPreExtrapolation + { + get { return m_InfiniteClipPreExtrapolation; } + set { m_InfiniteClipPreExtrapolation = value; } + } + + /// + /// The saved state of post-extrapolation for clips when converted to infinite mode. + /// + public TimelineClip.ClipExtrapolation infiniteClipPostExtrapolation + { + get { return m_InfiniteClipPostExtrapolation; } + set { m_InfiniteClipPostExtrapolation = value; } + } + + /// + /// The saved state of animation clip loop state when converted to infinite mode + /// + internal AnimationPlayableAsset.LoopMode infiniteClipLoop + { + get { return mInfiniteClipLoop; } + set { mInfiniteClipLoop = value; } + } + + [ContextMenu("Reset Offsets")] + void ResetOffsets() + { + m_Position = Vector3.zero; + m_EulerAngles = Vector3.zero; + UpdateClipOffsets(); + } + + /// + /// Creates a TimelineClip on this track that uses an AnimationClip. + /// + /// Source animation clip of the resulting TimelineClip. + /// A new TimelineClip which has an AnimationPlayableAsset asset attached. + public TimelineClip CreateClip(AnimationClip clip) + { + if (clip == null) + return null; + + var newClip = CreateClip(); + AssignAnimationClip(newClip, clip); + return newClip; + } + + /// + /// Creates an AnimationClip that stores the data for an infinite track. + /// + /// + /// If an infiniteClip already exists, this method produces no result, even if you provide a different value + /// for infiniteClipName. + /// + /// + /// This method can't create an infinite clip for an AnimationTrack that contains one or more Timeline clips. + /// Use AnimationTrack.inClipMode to determine whether it is possible to create an infinite clip on an AnimationTrack. + /// + /// + /// When used from the editor, this method attempts to save the created infinite clip to the TimelineAsset. + /// The TimelineAsset must already exist in the AssetDatabase to save the infinite clip. If the TimelineAsset + /// does not exist, the infinite clip is still created but it is not saved. + /// + /// + /// The name of the AnimationClip to create. + /// This method does not ensure unique names. If you want a unique clip name, you must provide one. + /// See ObjectNames.GetUniqueName for information on a method that creates unique names. + /// + public void CreateInfiniteClip(string infiniteClipName) + { + if (inClipMode) + { + Debug.LogWarning("CreateInfiniteClip cannot create an infinite clip for an AnimationTrack that contains one or more Timeline Clips."); + return; + } + + if (m_InfiniteClip != null) + return; + + m_InfiniteClip = TimelineCreateUtilities.CreateAnimationClipForTrack(string.IsNullOrEmpty(infiniteClipName) ? k_DefaultInfiniteClipName : infiniteClipName, this, false); + } + + /// + /// Creates a TimelineClip, AnimationPlayableAsset and an AnimationClip. Use this clip to record in a timeline. + /// + /// + /// When used from the editor, this method attempts to save the created recordable clip to the TimelineAsset. + /// The TimelineAsset must already exist in the AssetDatabase to save the recordable clip. If the TimelineAsset + /// does not exist, the recordable clip is still created but it is not saved. + /// + /// + /// The name of the AnimationClip to create. + /// This method does not ensure unique names. If you want a unique clip name, you must provide one. + /// See ObjectNames.GetUniqueName for information on a method that creates unique names. + /// + /// + /// Returns a new TimelineClip with an AnimationPlayableAsset asset attached. + /// + public TimelineClip CreateRecordableClip(string animClipName) + { + var clip = TimelineCreateUtilities.CreateAnimationClipForTrack(string.IsNullOrEmpty(animClipName) ? k_DefaultRecordableClipName : animClipName, this, false); + + var timelineClip = CreateClip(clip); + timelineClip.displayName = animClipName; + timelineClip.recordable = true; + timelineClip.start = 0; + timelineClip.duration = 1; + + var apa = timelineClip.asset as AnimationPlayableAsset; + if (apa != null) + apa.removeStartOffset = false; + + return timelineClip; + } + +#if UNITY_EDITOR + internal Vector3 sceneOffsetPosition + { + get { return m_SceneOffsetPosition; } + set { m_SceneOffsetPosition = value; } + } + + internal Vector3 sceneOffsetRotation + { + get { return m_SceneOffsetRotation; } + set { m_SceneOffsetRotation = value; } + } + + internal bool hasPreviewComponents + { + get + { + if (m_HasPreviewComponents) + return true; + + var parentTrack = parent as AnimationTrack; + if (parentTrack != null) + { + return parentTrack.hasPreviewComponents; + } + + return false; + } + } +#endif + + /// + /// Used to initialize default values on a newly created clip + /// + /// The clip added to the track + protected override void OnCreateClip(TimelineClip clip) + { + var extrapolation = TimelineClip.ClipExtrapolation.None; + if (!isSubTrack) + extrapolation = TimelineClip.ClipExtrapolation.Hold; + clip.preExtrapolationMode = extrapolation; + clip.postExtrapolationMode = extrapolation; + } + + protected internal override int CalculateItemsHash() + { + return GetAnimationClipHash(m_InfiniteClip).CombineHash(base.CalculateItemsHash()); + } + + internal void UpdateClipOffsets() + { +#if UNITY_EDITOR + if (m_ClipOffset.IsValid()) + { + m_ClipOffset.SetPosition(position); + m_ClipOffset.SetRotation(rotation); + } +#endif + } + + Playable CompileTrackPlayable(PlayableGraph graph, TrackAsset track, GameObject go, IntervalTree tree, AppliedOffsetMode mode) + { + var mixer = AnimationMixerPlayable.Create(graph, track.clips.Length); + for (int i = 0; i < track.clips.Length; i++) + { + var c = track.clips[i]; + var asset = c.asset as PlayableAsset; + if (asset == null) + continue; + + var animationAsset = asset as AnimationPlayableAsset; + if (animationAsset != null) + animationAsset.appliedOffsetMode = mode; + + var source = asset.CreatePlayable(graph, go); + if (source.IsValid()) + { + var clip = new RuntimeClip(c, source, mixer); + tree.Add(clip); + graph.Connect(source, 0, mixer, i); + mixer.SetInputWeight(i, 0.0f); + } + } + + return ApplyTrackOffset(graph, mixer, go, mode); + } + + Playable ILayerable.CreateLayerMixer(PlayableGraph graph, GameObject go, int inputCount) + { + return Playable.Null; + } + + internal override Playable OnCreateClipPlayableGraph(PlayableGraph graph, GameObject go, IntervalTree tree) + { + if (isSubTrack) + throw new InvalidOperationException("Nested animation tracks should never be asked to create a graph directly"); + + List flattenTracks = new List(); + if (CanCompileClips()) + flattenTracks.Add(this); + + + bool animatesRootTransform = AnimatesRootTransform(); + foreach (var subTrack in GetChildTracks()) + { + var child = subTrack as AnimationTrack; + if (child != null && child.CanCompileClips()) + { + animatesRootTransform |= child.AnimatesRootTransform(); + flattenTracks.Add(child); + } + } + + // figure out which mode to apply + AppliedOffsetMode mode = GetOffsetMode(go, animatesRootTransform); + var layerMixer = CreateGroupMixer(graph, go, flattenTracks.Count); + for (int c = 0; c < flattenTracks.Count; c++) + { + var compiledTrackPlayable = flattenTracks[c].inClipMode ? + CompileTrackPlayable(graph, flattenTracks[c], go, tree, mode) : + flattenTracks[c].CreateInfiniteTrackPlayable(graph, go, tree, mode); + graph.Connect(compiledTrackPlayable, 0, layerMixer, c); + layerMixer.SetInputWeight(c, flattenTracks[c].inClipMode ? 0 : 1); + if (flattenTracks[c].applyAvatarMask && flattenTracks[c].avatarMask != null) + { + layerMixer.SetLayerMaskFromAvatarMask((uint)c, flattenTracks[c].avatarMask); + } + } + + bool requiresMotionXPlayable = RequiresMotionXPlayable(mode, go); + + Playable mixer = layerMixer; + mixer = CreateDefaultBlend(graph, go, mixer, requiresMotionXPlayable); + + // motionX playable not required in scene offset mode, or root transform mode + if (requiresMotionXPlayable) + { + // If we are animating a root transform, add the motionX to delta playable as the root node + var motionXToDelta = AnimationMotionXToDeltaPlayable.Create(graph); + graph.Connect(mixer, 0, motionXToDelta, 0); + motionXToDelta.SetInputWeight(0, 1.0f); + motionXToDelta.SetAbsoluteMotion(UsesAbsoluteMotion(mode)); + mixer = (Playable)motionXToDelta; + } + + +#if UNITY_EDITOR + if (!Application.isPlaying) + { + var animator = GetBinding(go != null ? go.GetComponent() : null); + if (animator != null) + { + GameObject targetGO = animator.gameObject; + IAnimationWindowPreview[] previewComponents = targetGO.GetComponents(); + + m_HasPreviewComponents = previewComponents.Length > 0; + if (m_HasPreviewComponents) + { + foreach (var component in previewComponents) + { + mixer = component.BuildPreviewGraph(graph, mixer); + } + } + } + } +#endif + + return mixer; + } + + // Creates a layer mixer containing default blends + // the base layer is a default clip of all driven properties + // the next layer is optionally the desired default pose (in the case of humanoid, the tpose + private Playable CreateDefaultBlend(PlayableGraph graph, GameObject go, Playable mixer, bool requireOffset) + { +#if UNITY_EDITOR + if (Application.isPlaying) + return mixer; + + int inputs = 1 + ((m_CachedPropertiesClip != null) ? 1 : 0) + ((m_DefaultPoseClip != null) ? 1 : 0); + if (inputs == 1) + return mixer; + + var defaultPoseMixer = AnimationLayerMixerPlayable.Create(graph, inputs); + + int mixerInput = 0; + if (m_CachedPropertiesClip) + { + var cachedPropertiesClip = AnimationClipPlayable.Create(graph, m_CachedPropertiesClip); + cachedPropertiesClip.SetApplyFootIK(false); + var defaults = (Playable) cachedPropertiesClip; + if (requireOffset) + defaults = AttachOffsetPlayable(graph, defaults, m_SceneOffsetPosition, Quaternion.Euler(m_SceneOffsetRotation)); + graph.Connect(defaults, 0, defaultPoseMixer, mixerInput); + defaultPoseMixer.SetInputWeight(mixerInput, 1.0f); + mixerInput++; + } + + if (m_DefaultPoseClip) + { + var defaultPose = AnimationClipPlayable.Create(graph, m_DefaultPoseClip); + defaultPose.SetApplyFootIK(false); + var blendDefault = (Playable) defaultPose; + if (requireOffset) + blendDefault = AttachOffsetPlayable(graph, blendDefault, m_SceneOffsetPosition, Quaternion.Euler(m_SceneOffsetRotation)); + + graph.Connect(blendDefault, 0, defaultPoseMixer, mixerInput); + defaultPoseMixer.SetInputWeight(mixerInput, 1.0f); + mixerInput++; + } + + + graph.Connect(mixer, 0, defaultPoseMixer, mixerInput); + defaultPoseMixer.SetInputWeight(mixerInput, 1.0f); + + return defaultPoseMixer; +#else + return mixer; +#endif + } + + private Playable AttachOffsetPlayable(PlayableGraph graph, Playable playable, Vector3 pos, Quaternion rot) + { + var offsetPlayable = AnimationOffsetPlayable.Create(graph, pos, rot, 1); + offsetPlayable.SetInputWeight(0, 1.0f); + graph.Connect(playable, 0, offsetPlayable, 0); + return offsetPlayable; + } + +#if UNITY_EDITOR + private static string k_DefaultHumanoidClipPath = "Packages/com.unity.timeline/Editor/StyleSheets/res/HumanoidDefault.anim"; + private static AnimationClip s_DefaultHumanoidClip = null; + + AnimationClip GetDefaultHumanoidClip() + { + if (s_DefaultHumanoidClip == null) + { + s_DefaultHumanoidClip = EditorGUIUtility.LoadRequired(k_DefaultHumanoidClipPath) as AnimationClip; + if (s_DefaultHumanoidClip == null) + Debug.LogError("Could not load default humanoid animation clip for Timeline"); + } + + return s_DefaultHumanoidClip; + } + +#endif + + bool RequiresMotionXPlayable(AppliedOffsetMode mode, GameObject gameObject) + { + if (mode == AppliedOffsetMode.NoRootTransform) + return false; + if (mode == AppliedOffsetMode.SceneOffsetLegacy) + { + var animator = GetBinding(gameObject != null ? gameObject.GetComponent() : null); + return animator != null && animator.hasRootMotion; + } + return true; + } + + static bool UsesAbsoluteMotion(AppliedOffsetMode mode) + { +#if UNITY_EDITOR + // in editor, previewing is always done in absolute motion + if (!Application.isPlaying) + return true; +#endif + return mode != AppliedOffsetMode.SceneOffset && + mode != AppliedOffsetMode.SceneOffsetLegacy; + } + + bool HasController(GameObject gameObject) + { + var animator = GetBinding(gameObject != null ? gameObject.GetComponent() : null); + + return animator != null && animator.runtimeAnimatorController != null; + } + + internal Animator GetBinding(PlayableDirector director) + { + if (director == null) + return null; + + UnityEngine.Object key = this; + if (isSubTrack) + key = parent; + + UnityEngine.Object binding = null; + if (director != null) + binding = director.GetGenericBinding(key); + + Animator animator = null; + if (binding != null) // the binding can be an animator or game object + { + animator = binding as Animator; + var gameObject = binding as GameObject; + if (animator == null && gameObject != null) + animator = gameObject.GetComponent(); + } + + return animator; + } + + static AnimationLayerMixerPlayable CreateGroupMixer(PlayableGraph graph, GameObject go, int inputCount) + { + return AnimationLayerMixerPlayable.Create(graph, inputCount); + } + + Playable CreateInfiniteTrackPlayable(PlayableGraph graph, GameObject go, IntervalTree tree, AppliedOffsetMode mode) + { + if (m_InfiniteClip == null) + return Playable.Null; + + var mixer = AnimationMixerPlayable.Create(graph, 1); + + // In infinite mode, we always force the loop mode of the clip off because the clip keys are offset in infinite mode + // which causes loop to behave different. + // The inline curve editor never shows loops in infinite mode. + var playable = AnimationPlayableAsset.CreatePlayable(graph, m_InfiniteClip, m_InfiniteClipOffsetPosition, m_InfiniteClipOffsetEulerAngles, false, mode, infiniteClipApplyFootIK, AnimationPlayableAsset.LoopMode.Off); + if (playable.IsValid()) + { + tree.Add(new InfiniteRuntimeClip(playable)); + graph.Connect(playable, 0, mixer, 0); + mixer.SetInputWeight(0, 1.0f); + } + + return ApplyTrackOffset(graph, mixer, go, mode); + } + + Playable ApplyTrackOffset(PlayableGraph graph, Playable root, GameObject go, AppliedOffsetMode mode) + { +#if UNITY_EDITOR + m_ClipOffset = AnimationOffsetPlayable.Null; +#endif + + // offsets don't apply in scene offset, or if there is no root transform (globally or on this track) + if (mode == AppliedOffsetMode.SceneOffsetLegacy || + mode == AppliedOffsetMode.SceneOffset || + mode == AppliedOffsetMode.NoRootTransform || + !AnimatesRootTransform() + ) + return root; + + + var pos = position; + var rot = rotation; + +#if UNITY_EDITOR + // in the editor use the preview position to playback from if available + if (mode == AppliedOffsetMode.SceneOffsetEditor) + { + pos = m_SceneOffsetPosition; + rot = Quaternion.Euler(m_SceneOffsetRotation); + } +#endif + + var offsetPlayable = AnimationOffsetPlayable.Create(graph, pos, rot, 1); +#if UNITY_EDITOR + m_ClipOffset = offsetPlayable; +#endif + graph.Connect(root, 0, offsetPlayable, 0); + offsetPlayable.SetInputWeight(0, 1); + + return offsetPlayable; + } + + // the evaluation time is large so that the properties always get evaluated + internal override void GetEvaluationTime(out double outStart, out double outDuration) + { + if (inClipMode) + { + base.GetEvaluationTime(out outStart, out outDuration); + } + else + { + outStart = 0; + outDuration = TimelineClip.kMaxTimeValue; + } + } + + internal override void GetSequenceTime(out double outStart, out double outDuration) + { + if (inClipMode) + { + base.GetSequenceTime(out outStart, out outDuration); + } + else + { + outStart = 0; + outDuration = Math.Max(GetNotificationDuration(), TimeUtility.GetAnimationClipLength(m_InfiniteClip)); + } + } + + void AssignAnimationClip(TimelineClip clip, AnimationClip animClip) + { + if (clip == null || animClip == null) + return; + + if (animClip.legacy) + throw new InvalidOperationException("Legacy Animation Clips are not supported"); + + AnimationPlayableAsset asset = clip.asset as AnimationPlayableAsset; + if (asset != null) + { + asset.clip = animClip; + asset.name = animClip.name; + var duration = asset.duration; + if (!double.IsInfinity(duration) && duration >= TimelineClip.kMinDuration && duration < TimelineClip.kMaxTimeValue) + clip.duration = duration; + } + clip.displayName = animClip.name; + } + + /// + /// Called by the Timeline Editor to gather properties requiring preview. + /// + /// The PlayableDirector invoking the preview + /// PropertyCollector used to gather previewable properties + public override void GatherProperties(PlayableDirector director, IPropertyCollector driver) + { +#if UNITY_EDITOR + m_SceneOffsetPosition = Vector3.zero; + m_SceneOffsetRotation = Vector3.zero; + + var animator = GetBinding(director); + if (animator == null) + return; + + var animClips = new List(this.clips.Length + 2); + GetAnimationClips(animClips); + + var hasHumanMotion = animClips.Exists(clip => clip.humanMotion); + + m_SceneOffsetPosition = animator.transform.localPosition; + m_SceneOffsetRotation = animator.transform.localEulerAngles; + + // Create default pose clip from collected properties + if (hasHumanMotion) + animClips.Add(GetDefaultHumanoidClip()); + + var bindings = AnimationPreviewUtilities.GetBindings(animator.gameObject, animClips); + + m_CachedPropertiesClip = AnimationPreviewUtilities.CreateDefaultClip(animator.gameObject, bindings); + AnimationPreviewUtilities.PreviewFromCurves(animator.gameObject, bindings); // faster to preview from curves then an animation clip + m_DefaultPoseClip = hasHumanMotion ? GetDefaultHumanoidClip() : null; +#endif + } + + /// + /// Gather all the animation clips for this track + /// + /// + private void GetAnimationClips(List animClips) + { + foreach (var c in clips) + { + var a = c.asset as AnimationPlayableAsset; + if (a != null && a.clip != null) + animClips.Add(a.clip); + } + + if (m_InfiniteClip != null) + animClips.Add(m_InfiniteClip); + + foreach (var childTrack in GetChildTracks()) + { + var animChildTrack = childTrack as AnimationTrack; + if (animChildTrack != null) + animChildTrack.GetAnimationClips(animClips); + } + } + + // calculate which offset mode to apply + AppliedOffsetMode GetOffsetMode(GameObject go, bool animatesRootTransform) + { + if (!animatesRootTransform) + return AppliedOffsetMode.NoRootTransform; + + if (m_TrackOffset == TrackOffset.ApplyTransformOffsets) + return AppliedOffsetMode.TransformOffset; + + if (m_TrackOffset == TrackOffset.ApplySceneOffsets) + return (Application.isPlaying) ? AppliedOffsetMode.SceneOffset : AppliedOffsetMode.SceneOffsetEditor; + + if (HasController(go)) + { + if (!Application.isPlaying) + return AppliedOffsetMode.SceneOffsetLegacyEditor; + return AppliedOffsetMode.SceneOffsetLegacy; + } + + return AppliedOffsetMode.TransformOffsetLegacy; + } + + internal bool AnimatesRootTransform() + { + // infinite mode + if (AnimationPlayableAsset.HasRootTransforms(m_InfiniteClip)) + return true; + + // clip mode + foreach (var c in GetClips()) + { + var apa = c.asset as AnimationPlayableAsset; + if (apa != null && apa.hasRootTransforms) + return true; + } + + return false; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationTrack.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationTrack.cs.meta new file mode 100644 index 0000000..9ba4e15 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/AnimationTrack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d21dcc2386d650c4597f3633c75a1f98 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/ICurvesOwner.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/ICurvesOwner.cs new file mode 100644 index 0000000..8d61f57 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/ICurvesOwner.cs @@ -0,0 +1,15 @@ +namespace UnityEngine.Timeline +{ + interface ICurvesOwner + { + AnimationClip curves { get; } + bool hasCurves { get; } + double duration { get; } + void CreateCurves(string curvesClipName); + + string defaultCurvesName { get; } + Object asset { get; } + Object assetOwner { get; } + TrackAsset targetTrack { get; } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/ICurvesOwner.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/ICurvesOwner.cs.meta new file mode 100644 index 0000000..d5d95df --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Animation/ICurvesOwner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 89b31ff5ca0a5eb4797ac65d43949807 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade.meta new file mode 100644 index 0000000..f5aba63 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0c04c8cb23b78e04492e0f310cdee93e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationPlayableAssetUpgrade.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationPlayableAssetUpgrade.cs new file mode 100644 index 0000000..5ba31f6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationPlayableAssetUpgrade.cs @@ -0,0 +1,47 @@ +using System; + +namespace UnityEngine.Timeline +{ + partial class AnimationPlayableAsset : ISerializationCallbackReceiver + { + enum Versions + { + Initial = 0, + RotationAsEuler = 1, + } + static readonly int k_LatestVersion = (int)Versions.RotationAsEuler; + [SerializeField, HideInInspector] int m_Version; + + [SerializeField, Obsolete("Use m_RotationEuler Instead", false), HideInInspector] + private Quaternion m_Rotation = Quaternion.identity; // deprecated. now saves in euler angles + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + m_Version = k_LatestVersion; + } + + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + if (m_Version < k_LatestVersion) + { + OnUpgradeFromVersion(m_Version); //upgrade derived classes + } + } + + void OnUpgradeFromVersion(int oldVersion) + { + if (oldVersion < (int)Versions.RotationAsEuler) + AnimationPlayableAssetUpgrade.ConvertRotationToEuler(this); + } + + static class AnimationPlayableAssetUpgrade + { + public static void ConvertRotationToEuler(AnimationPlayableAsset asset) + { +#pragma warning disable 618 + asset.m_EulerAngles = asset.m_Rotation.eulerAngles; +#pragma warning restore 618 + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationPlayableAssetUpgrade.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationPlayableAssetUpgrade.cs.meta new file mode 100644 index 0000000..867be5e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationPlayableAssetUpgrade.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6773203120b27984d9a8572fa3564f03 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationTrackUpgrade.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationTrackUpgrade.cs new file mode 100644 index 0000000..94c5634 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationTrackUpgrade.cs @@ -0,0 +1,102 @@ +using System; +using System.ComponentModel; + +namespace UnityEngine.Timeline +{ + partial class AnimationTrack + { + // 649 is value is only assigned to. they can be updated from old files being serialized + #pragma warning disable 649 + //fields that are used for upgrading should be put here, ideally as read-only + [SerializeField, Obsolete("Use m_InfiniteClipOffsetEulerAngles Instead", false), HideInInspector] + Quaternion m_OpenClipOffsetRotation = Quaternion.identity; + + [SerializeField, Obsolete("Use m_RotationEuler Instead", false), HideInInspector] + Quaternion m_Rotation = Quaternion.identity; + + [SerializeField, Obsolete("Use m_RootTransformOffsetMode", false), HideInInspector] + bool m_ApplyOffsets; + #pragma warning restore 649 + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("openClipOffsetPosition has been deprecated. Use infiniteClipOffsetPosition instead. (UnityUpgradable) -> infiniteClipOffsetPosition", true)] + public Vector3 openClipOffsetPosition + { + get { return infiniteClipOffsetPosition; } + set { infiniteClipOffsetPosition = value; } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("openClipOffsetRotation has been deprecated. Use infiniteClipOffsetRotation instead. (UnityUpgradable) -> infiniteClipOffsetRotation", true)] + public Quaternion openClipOffsetRotation + { + get { return infiniteClipOffsetRotation; } + set { infiniteClipOffsetRotation = value; } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("openClipOffsetEulerAngles has been deprecated. Use infiniteClipOffsetEulerAngles instead. (UnityUpgradable) -> infiniteClipOffsetEulerAngles", true)] + public Vector3 openClipOffsetEulerAngles + { + get { return infiniteClipOffsetEulerAngles; } + set { infiniteClipOffsetEulerAngles = value; } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("openClipPreExtrapolation has been deprecated. Use infiniteClipPreExtrapolation instead. (UnityUpgradable) -> infiniteClipPreExtrapolation", true)] + public TimelineClip.ClipExtrapolation openClipPreExtrapolation + { + get { return infiniteClipPreExtrapolation; } + set { infiniteClipPreExtrapolation = value; } + } + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("openClipPostExtrapolation has been deprecated. Use infiniteClipPostExtrapolation instead. (UnityUpgradable) -> infiniteClipPostExtrapolation", true)] + public TimelineClip.ClipExtrapolation openClipPostExtrapolation + { + get { return infiniteClipPostExtrapolation; } + set { infiniteClipPostExtrapolation = value; } + } + + internal override void OnUpgradeFromVersion(int oldVersion) + { + if (oldVersion < (int)Versions.RotationAsEuler) + AnimationTrackUpgrade.ConvertRotationsToEuler(this); + if (oldVersion < (int)Versions.RootMotionUpgrade) + AnimationTrackUpgrade.ConvertRootMotion(this); + if (oldVersion < (int)Versions.AnimatedTrackProperties) + AnimationTrackUpgrade.ConvertInfiniteTrack(this); + } + +// 612 is Property is Obsolete +// 618 is Field is Obsolete +#pragma warning disable 612, 618 + static class AnimationTrackUpgrade + { + public static void ConvertRotationsToEuler(AnimationTrack track) + { + track.m_EulerAngles = track.m_Rotation.eulerAngles; + track.m_InfiniteClipOffsetEulerAngles = track.m_OpenClipOffsetRotation.eulerAngles; + } + + public static void ConvertRootMotion(AnimationTrack track) + { + track.m_TrackOffset = TrackOffset.Auto; // loaded tracks should use legacy mode + + // reset offsets if not applied + if (!track.m_ApplyOffsets) + { + track.m_Position = Vector3.zero; + track.m_EulerAngles = Vector3.zero; + } + } + + public static void ConvertInfiniteTrack(AnimationTrack track) + { + track.m_InfiniteClip = track.m_AnimClip; + track.m_AnimClip = null; + } + } +#pragma warning restore 612, 618 + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationTrackUpgrade.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationTrackUpgrade.cs.meta new file mode 100644 index 0000000..01b86a7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/AnimationTrackUpgrade.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3b0c53b13a1539949b3b212e049151d1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/ClipUpgrade.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/ClipUpgrade.cs new file mode 100644 index 0000000..20f3dfd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/ClipUpgrade.cs @@ -0,0 +1,34 @@ +namespace UnityEngine.Timeline +{ + partial class TimelineClip + { + enum Versions + { + Initial = 0, + ClipInFromGlobalToLocal = 1 + } + const int k_LatestVersion = (int)Versions.ClipInFromGlobalToLocal; + [SerializeField, HideInInspector] int m_Version; + + //fields that are used for upgrading should be put here, ideally as read-only + + void UpgradeToLatestVersion() + { + if (m_Version < (int)Versions.ClipInFromGlobalToLocal) + { + TimelineClipUpgrade.UpgradeClipInFromGlobalToLocal(this); + } + } + + static class TimelineClipUpgrade + { + // version 0->1, clipIn move from global to local + public static void UpgradeClipInFromGlobalToLocal(TimelineClip clip) + { + // case 936751 -- clipIn was serialized in global, not local offset + if (clip.m_ClipIn > 0 && clip.m_TimeScale > float.Epsilon) + clip.m_ClipIn *= clip.m_TimeScale; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/ClipUpgrade.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/ClipUpgrade.cs.meta new file mode 100644 index 0000000..0b27935 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/ClipUpgrade.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6a4f0c91a28ece04198b200dd55145d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TimelineUpgrade.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TimelineUpgrade.cs new file mode 100644 index 0000000..86135c6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TimelineUpgrade.cs @@ -0,0 +1,21 @@ +namespace UnityEngine.Timeline +{ + partial class TimelineAsset + { + enum Versions + { + Initial = 0 + } + const int k_LatestVersion = (int)Versions.Initial; + [SerializeField, HideInInspector] int m_Version; + + //fields that are used for upgrading should be put here, ideally as read-only + + void UpgradeToLatestVersion() + {} + + //upgrade code should go into this class + static class TimelineAssetUpgrade + {} + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TimelineUpgrade.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TimelineUpgrade.cs.meta new file mode 100644 index 0000000..6075bab --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TimelineUpgrade.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 95c91abdcc1ea03458c2ea4e9626a5d8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TrackUpgrade.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TrackUpgrade.cs new file mode 100644 index 0000000..6768199 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TrackUpgrade.cs @@ -0,0 +1,76 @@ +using System; +using UnityEngine.Serialization; + +namespace UnityEngine.Timeline +{ + partial class TrackAsset : ISerializationCallbackReceiver + { + internal enum Versions + { + Initial = 0, + RotationAsEuler = 1, + RootMotionUpgrade = 2, + AnimatedTrackProperties = 3 + } + + const int k_LatestVersion = (int)Versions.AnimatedTrackProperties; + + [SerializeField, HideInInspector] int m_Version; + + [Obsolete("Please use m_InfiniteClip (on AnimationTrack) instead.", false)] + [SerializeField, HideInInspector, FormerlySerializedAs("m_animClip")] + internal AnimationClip m_AnimClip; + + protected virtual void OnBeforeTrackSerialize() {} + protected virtual void OnAfterTrackDeserialize() {} + + internal virtual void OnUpgradeFromVersion(int oldVersion) {} + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + m_Version = k_LatestVersion; + + //make sure children are correctly parented + if (m_Children != null) + { + for (var i = m_Children.Count - 1; i >= 0; i--) + { + var asset = m_Children[i] as TrackAsset; + if (asset != null && asset.parent != this) + asset.parent = this; + } + } + + OnBeforeTrackSerialize(); + } + + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + // Clear the clip cache when a deserialize is performed, or + // we can get out of sync when performing Undo + m_ClipsCache = null; + Invalidate(); + + if (m_Version < k_LatestVersion) + { + UpgradeToLatestVersion(); //upgrade TrackAsset + OnUpgradeFromVersion(m_Version); //upgrade derived classes + } + + foreach (var marker in GetMarkers()) + { + marker.Initialize(this); + } + + OnAfterTrackDeserialize(); + } + + //fields that are used for upgrading should be put here, ideally as read-only + void UpgradeToLatestVersion() + {} + + //upgrade code should go into this class + static class TrackAssetUpgrade + {} + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TrackUpgrade.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TrackUpgrade.cs.meta new file mode 100644 index 0000000..bbe22f0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/AssetUpgrade/TrackUpgrade.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c68f34993bfe85e489158a29c99a20b5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes.meta new file mode 100644 index 0000000..d77a179 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec817e5e5781e0a4983a1dc8875d1974 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes/TrackColorAttribute.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes/TrackColorAttribute.cs new file mode 100644 index 0000000..a6abc20 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes/TrackColorAttribute.cs @@ -0,0 +1,33 @@ +using System; +using UnityEngine; + +namespace UnityEngine.Timeline +{ + /// + /// Attribute used to specify the color of the track and its clips inside the Timeline Editor. + /// + [AttributeUsage(AttributeTargets.Class)] + public class TrackColorAttribute : Attribute + { + Color m_Color; + + /// + /// + /// + public Color color + { + get { return m_Color; } + } + + /// + /// Specify the track color using [0-1] R,G,B values. + /// + /// Red value [0-1]. + /// Green value [0-1]. + /// Blue value [0-1]. + public TrackColorAttribute(float r, float g, float b) + { + m_Color = new Color(r, g, b); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes/TrackColorAttribute.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes/TrackColorAttribute.cs.meta new file mode 100644 index 0000000..80c61ba --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Attributes/TrackColorAttribute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6c3d52cc5c46d7946a920e21901ff38e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio.meta new file mode 100644 index 0000000..b3fd165 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d19b75372f4e44d4fa4b2cffbb54124b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioClipProperties.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioClipProperties.cs new file mode 100644 index 0000000..0c5894b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioClipProperties.cs @@ -0,0 +1,13 @@ +using System; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + [Serializable] + [NotKeyable] + class AudioClipProperties : PlayableBehaviour + { + [Range(0.0f, 1.0f)] + public float volume = 1.0f; + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioClipProperties.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioClipProperties.cs.meta new file mode 100644 index 0000000..a044757 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioClipProperties.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0d60a406ab64c434e9d731914e11a51e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioMixerProperties.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioMixerProperties.cs new file mode 100644 index 0000000..c5bdf8c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioMixerProperties.cs @@ -0,0 +1,45 @@ +using System; +using UnityEngine.Audio; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + [Serializable] + class AudioMixerProperties : PlayableBehaviour + { + [Range(0.0f, 1.0f)] + public float volume = 1.0f; + + [Range(-1.0f, 1.0f)] + public float stereoPan = 0.0f; + + [Range(0.0f, 1.0f)] + public float spatialBlend = 0.0f; + + public override void PrepareFrame(Playable playable, FrameData info) + { + if (!playable.IsValid() || !playable.IsPlayableOfType()) + return; + + var inputCount = playable.GetInputCount(); + + for (int i = 0; i < inputCount; ++i) + { + if (playable.GetInputWeight(i) > 0.0f) + { + var input = playable.GetInput(i); + + if (input.IsValid() && input.IsPlayableOfType()) + { + var audioClipPlayable = (AudioClipPlayable)input; + var audioClipProperties = input.GetHandle().GetObject(); + + audioClipPlayable.SetVolume(Mathf.Clamp01(volume * audioClipProperties.volume)); + audioClipPlayable.SetStereoPan(Mathf.Clamp(stereoPan, -1.0f, 1.0f)); + audioClipPlayable.SetSpatialBlend(Mathf.Clamp01(spatialBlend)); + } + } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioMixerProperties.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioMixerProperties.cs.meta new file mode 100644 index 0000000..fa975ef --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioMixerProperties.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d8c4a920f001ca64680ed6fdb52d1753 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioPlayableAsset.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioPlayableAsset.cs new file mode 100644 index 0000000..7ff40fc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioPlayableAsset.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Audio; +#if UNITY_EDITOR +using System.ComponentModel; +#endif +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// PlayableAsset wrapper for an AudioClip in Timeline. + /// + [Serializable] +#if UNITY_EDITOR + [DisplayName("Audio Clip")] +#endif + public class AudioPlayableAsset : PlayableAsset, ITimelineClipAsset + { + [SerializeField] AudioClip m_Clip; +#pragma warning disable 649 //Field is never assigned to and will always have its default value + [SerializeField] bool m_Loop; + [SerializeField, HideInInspector] float m_bufferingTime = 0.1f; + [SerializeField] AudioClipProperties m_ClipProperties = new AudioClipProperties(); + + // the amount of time to give the clip to load prior to it's start time + internal float bufferingTime + { + get { return m_bufferingTime; } + set { m_bufferingTime = value; } + } + +#if UNITY_EDITOR + Playable m_LiveClipPlayable = Playable.Null; + +#endif + + /// + /// The audio clip to be played + /// + public AudioClip clip + { + get { return m_Clip; } + set { m_Clip = value; } + } + + /// + /// Whether the audio clip loops. + /// + /// + /// Use this to loop the audio clip when the duration of the timeline clip exceeds that of the audio clip. + /// + public bool loop + { + get { return m_Loop; } + set { m_Loop = value; } + } + + /// + /// Returns the duration required to play the audio clip exactly once + /// + public override double duration + { + get + { + if (m_Clip == null) + return base.duration; + + // use this instead of length to avoid rounding precision errors, + return (double)m_Clip.samples / m_Clip.frequency; + } + } + + /// + /// Returns a description of the PlayableOutputs that may be created for this asset. + /// + public override IEnumerable outputs + { + get { yield return AudioPlayableBinding.Create(name, this); } + } + + /// + /// Creates the root of a Playable subgraph to play the audio clip. + /// + /// PlayableGraph that will own the playable + /// The GameObject that triggered the graph build + /// The root playable of the subgraph + public override Playable CreatePlayable(PlayableGraph graph, GameObject go) + { + if (m_Clip == null) + return Playable.Null; + + var audioClipPlayable = AudioClipPlayable.Create(graph, m_Clip, m_Loop); + audioClipPlayable.GetHandle().SetScriptInstance(m_ClipProperties.Clone()); + +#if UNITY_EDITOR + m_LiveClipPlayable = audioClipPlayable; +#endif + + return audioClipPlayable; + } + + /// + /// Returns the capabilities of TimelineClips that contain an AudioPlayableAsset + /// + public ClipCaps clipCaps + { + get + { + return ClipCaps.ClipIn | + ClipCaps.SpeedMultiplier | + ClipCaps.Blending | + (m_Loop ? ClipCaps.Looping : ClipCaps.None); + } + } + +#if UNITY_EDITOR + internal void LiveLink() + { + if (!m_LiveClipPlayable.IsValid()) + return; + + var audioMixerProperties = m_LiveClipPlayable.GetHandle().GetObject(); + + if (audioMixerProperties == null) + return; + + audioMixerProperties.volume = m_ClipProperties.volume; + } + +#endif + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioPlayableAsset.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioPlayableAsset.cs.meta new file mode 100644 index 0000000..1b64816 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioPlayableAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4f10dd60657c6004587f237a7e90f8e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioTrack.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioTrack.cs new file mode 100644 index 0000000..d35fac6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioTrack.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Audio; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// A Timeline track that can play AudioClips. + /// + [Serializable] + [TrackClipType(typeof(AudioPlayableAsset), false)] + [TrackBindingType(typeof(AudioSource))] + [ExcludeFromPreset] + public class AudioTrack : TrackAsset + { + [SerializeField] + AudioMixerProperties m_TrackProperties = new AudioMixerProperties(); + +#if UNITY_EDITOR + Playable m_LiveMixerPlayable = Playable.Null; + +#endif + + /// + /// Create an TimelineClip for playing an AudioClip on this track. + /// + /// The audio clip to play + /// A TimelineClip with an AudioPlayableAsset asset. + public TimelineClip CreateClip(AudioClip clip) + { + if (clip == null) + return null; + + var newClip = CreateDefaultClip(); + + var audioAsset = newClip.asset as AudioPlayableAsset; + if (audioAsset != null) + audioAsset.clip = clip; + + newClip.duration = clip.length; + newClip.displayName = clip.name; + + return newClip; + } + + internal override Playable CompileClips(PlayableGraph graph, GameObject go, IList timelineClips, IntervalTree tree) + { + var clipBlender = AudioMixerPlayable.Create(graph, timelineClips.Count); + +#if UNITY_EDITOR + clipBlender.GetHandle().SetScriptInstance(m_TrackProperties.Clone()); + m_LiveMixerPlayable = clipBlender; +#else + if (hasCurves) + clipBlender.GetHandle().SetScriptInstance(m_TrackProperties.Clone()); +#endif + + for (int i = 0; i < timelineClips.Count; i++) + { + var c = timelineClips[i]; + var asset = c.asset as PlayableAsset; + if (asset == null) + continue; + + var buffer = 0.1f; + var audioAsset = c.asset as AudioPlayableAsset; + if (audioAsset != null) + buffer = audioAsset.bufferingTime; + + var source = asset.CreatePlayable(graph, go); + if (!source.IsValid()) + continue; + + if (source.IsPlayableOfType()) + { + // Enforce initial values on all clips + var audioClipPlayable = (AudioClipPlayable)source; + var audioClipProperties = audioClipPlayable.GetHandle().GetObject(); + + audioClipPlayable.SetVolume(Mathf.Clamp01(m_TrackProperties.volume * audioClipProperties.volume)); + audioClipPlayable.SetStereoPan(Mathf.Clamp(m_TrackProperties.stereoPan, -1.0f, 1.0f)); + audioClipPlayable.SetSpatialBlend(Mathf.Clamp01(m_TrackProperties.spatialBlend)); + } + + tree.Add(new ScheduleRuntimeClip(c, source, clipBlender, buffer)); + graph.Connect(source, 0, clipBlender, i); + source.SetSpeed(c.timeScale); + source.SetDuration(c.extrapolatedDuration); + clipBlender.SetInputWeight(source, 1.0f); + } + + ConfigureTrackAnimation(tree, go, clipBlender); + + return clipBlender; + } + + /// + public override IEnumerable outputs + { + get { yield return AudioPlayableBinding.Create(name, this); } + } + +#if UNITY_EDITOR + internal void LiveLink() + { + if (!m_LiveMixerPlayable.IsValid()) + return; + + var audioMixerProperties = m_LiveMixerPlayable.GetHandle().GetObject(); + + if (audioMixerProperties == null) + return; + + audioMixerProperties.volume = m_TrackProperties.volume; + audioMixerProperties.stereoPan = m_TrackProperties.stereoPan; + audioMixerProperties.spatialBlend = m_TrackProperties.spatialBlend; + } + +#endif + + void OnValidate() + { + m_TrackProperties.volume = Mathf.Clamp01(m_TrackProperties.volume); + m_TrackProperties.stereoPan = Mathf.Clamp(m_TrackProperties.stereoPan, -1.0f, 1.0f); + m_TrackProperties.spatialBlend = Mathf.Clamp01(m_TrackProperties.spatialBlend); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioTrack.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioTrack.cs.meta new file mode 100644 index 0000000..2a826c9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Audio/AudioTrack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8b22792c3b570444eb18cb78c2af3a74 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ClipCaps.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ClipCaps.cs new file mode 100644 index 0000000..2a5efb6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ClipCaps.cs @@ -0,0 +1,85 @@ +using System; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Describes the timeline features supported by a clip + /// + [Flags] + public enum ClipCaps + { + /// + /// No features are supported. + /// + None = 0 , + + /// + /// The clip supports loops. + /// + Looping = 1 << 0, + + /// + /// The clip supports clip extrapolation. + /// + Extrapolation = 1 << 1, + + /// + /// The clip supports initial local times greater than zero. + /// + ClipIn = 1 << 2, + + /// + /// The clip supports time scaling. + /// + SpeedMultiplier = 1 << 3, + + /// + /// The clip supports blending between clips. + /// + Blending = 1 << 4, + + /// + /// All features are supported. + /// + All = ~None + } + + static class TimelineClipCapsExtensions + { + public static bool SupportsLooping(this TimelineClip clip) + { + return clip != null && (clip.clipCaps & ClipCaps.Looping) != ClipCaps.None; + } + + public static bool SupportsExtrapolation(this TimelineClip clip) + { + return clip != null && (clip.clipCaps & ClipCaps.Extrapolation) != ClipCaps.None; + } + + public static bool SupportsClipIn(this TimelineClip clip) + { + return clip != null && (clip.clipCaps & ClipCaps.ClipIn) != ClipCaps.None; + } + + public static bool SupportsSpeedMultiplier(this TimelineClip clip) + { + return clip != null && (clip.clipCaps & ClipCaps.SpeedMultiplier) != ClipCaps.None; + } + + public static bool SupportsBlending(this TimelineClip clip) + { + return clip != null && (clip.clipCaps & ClipCaps.Blending) != ClipCaps.None; + } + + public static bool HasAll(this ClipCaps caps, ClipCaps flags) + { + return (caps & flags) == flags; + } + + public static bool HasAny(this ClipCaps caps, ClipCaps flags) + { + return (caps & flags) != 0; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ClipCaps.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ClipCaps.cs.meta new file mode 100644 index 0000000..ba03648 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ClipCaps.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 667a99762bdf5484fbaa02573fd396e2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control.meta new file mode 100644 index 0000000..e4a557d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ea998292f45ea494d9e100f5f6362f91 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlPlayableAsset.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlPlayableAsset.cs new file mode 100644 index 0000000..fd806f6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlPlayableAsset.cs @@ -0,0 +1,406 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Playable Asset that generates playables for controlling time-related elements on a GameObject. + /// + [Serializable] + [NotKeyable] + public class ControlPlayableAsset : PlayableAsset, IPropertyPreview, ITimelineClipAsset + { + const int k_MaxRandInt = 10000; + static readonly List k_EmptyDirectorsList = new List(0); + static readonly List k_EmptyParticlesList = new List(0); + + /// + /// GameObject in the scene to control, or the parent of the instantiated prefab. + /// + [SerializeField] public ExposedReference sourceGameObject; + + /// + /// Prefab object that will be instantiated. + /// + [SerializeField] public GameObject prefabGameObject; + + /// + /// Indicates whether Particle Systems will be controlled. + /// + [SerializeField] public bool updateParticle = true; + + /// + /// Random seed to supply particle systems that are set to use autoRandomSeed + /// + /// + /// This is used to maintain determinism when playing back in timeline. Sub emitters will be assigned incrementing random seeds to maintain determinism and distinction. + /// + [SerializeField] public uint particleRandomSeed; + + /// + /// Indicates whether playableDirectors are controlled. + /// + [SerializeField] public bool updateDirector = true; + + /// + /// Indicates whether Monobehaviours implementing ITimeControl will be controlled. + /// + [SerializeField] public bool updateITimeControl = true; + + /// + /// Indicates whether to search the entire hierarchy for controllable components. + /// + [SerializeField] public bool searchHierarchy = false; + + /// + /// Indicate whether GameObject activation is controlled + /// + [SerializeField] public bool active = true; + + /// + /// Indicates the active state of the GameObject when Timeline is stopped. + /// + [SerializeField] public ActivationControlPlayable.PostPlaybackState postPlayback = ActivationControlPlayable.PostPlaybackState.Revert; + + PlayableAsset m_ControlDirectorAsset; + double m_Duration = PlayableBinding.DefaultDuration; + bool m_SupportLoop; + + private static HashSet s_ProcessedDirectors = new HashSet(); + private static HashSet s_CreatedPrefabs = new HashSet(); + + // does the last instance created control directors and/or particles + internal bool controllingDirectors { get; private set; } + internal bool controllingParticles { get; private set; } + + /// + /// This function is called when the object is loaded. + /// + public void OnEnable() + { + // can't be set in a constructor + if (particleRandomSeed == 0) + particleRandomSeed = (uint)Random.Range(1, k_MaxRandInt); + } + + /// + /// Returns the duration in seconds needed to play the underlying director or particle system exactly once. + /// + public override double duration { get { return m_Duration; } } + + /// + /// Returns the capabilities of TimelineClips that contain a ControlPlayableAsset + /// + public ClipCaps clipCaps + { + get { return ClipCaps.ClipIn | ClipCaps.SpeedMultiplier | (m_SupportLoop ? ClipCaps.Looping : ClipCaps.None); } + } + + /// + /// Creates the root of a Playable subgraph to control the contents of the game object. + /// + /// PlayableGraph that will own the playable + /// The GameObject that triggered the graph build + /// The root playable of the subgraph + public override Playable CreatePlayable(PlayableGraph graph, GameObject go) + { + // case 989856 + if (prefabGameObject != null) + { + if (s_CreatedPrefabs.Contains(prefabGameObject)) + { + Debug.LogWarningFormat("Control Track Clip ({0}) is causing a prefab to instantiate itself recursively. Aborting further instances.", name); + return Playable.Create(graph); + } + s_CreatedPrefabs.Add(prefabGameObject); + } + + Playable root = Playable.Null; + var playables = new List(); + + GameObject sourceObject = sourceGameObject.Resolve(graph.GetResolver()); + if (prefabGameObject != null) + { + Transform parenTransform = sourceObject != null ? sourceObject.transform : null; + var controlPlayable = PrefabControlPlayable.Create(graph, prefabGameObject, parenTransform); + + sourceObject = controlPlayable.GetBehaviour().prefabInstance; + playables.Add(controlPlayable); + } + + m_Duration = PlayableBinding.DefaultDuration; + m_SupportLoop = false; + + controllingParticles = false; + controllingDirectors = false; + + if (sourceObject != null) + { + var directors = updateDirector ? GetComponent(sourceObject) : k_EmptyDirectorsList; + var particleSystems = updateParticle ? GetParticleSystemRoots(sourceObject) : k_EmptyParticlesList; + + // update the duration and loop values (used for UI purposes) here + // so they are tied to the latest gameObject bound + UpdateDurationAndLoopFlag(directors, particleSystems); + + var director = go.GetComponent(); + if (director != null) + m_ControlDirectorAsset = director.playableAsset; + + if (go == sourceObject && prefabGameObject == null) + { + Debug.LogWarningFormat("Control Playable ({0}) is referencing the same PlayableDirector component than the one in which it is playing.", name); + active = false; + if (!searchHierarchy) + updateDirector = false; + } + + if (active) + CreateActivationPlayable(sourceObject, graph, playables); + + if (updateDirector) + SearchHierarchyAndConnectDirector(directors, graph, playables, prefabGameObject != null); + + if (updateParticle) + SearchHiearchyAndConnectParticleSystem(particleSystems, graph, playables); + + if (updateITimeControl) + SearchHierarchyAndConnectControlableScripts(GetControlableScripts(sourceObject), graph, playables); + + // Connect Playables to Generic to Mixer + root = ConnectPlayablesToMixer(graph, playables); + } + + if (prefabGameObject != null) + s_CreatedPrefabs.Remove(prefabGameObject); + + if (!root.IsValid()) + root = Playable.Create(graph); + + return root; + } + + static Playable ConnectPlayablesToMixer(PlayableGraph graph, List playables) + { + var mixer = Playable.Create(graph, playables.Count); + + for (int i = 0; i != playables.Count; ++i) + { + ConnectMixerAndPlayable(graph, mixer, playables[i], i); + } + + mixer.SetPropagateSetTime(true); + + return mixer; + } + + void CreateActivationPlayable(GameObject root, PlayableGraph graph, + List outplayables) + { + var activation = ActivationControlPlayable.Create(graph, root, postPlayback); + if (activation.IsValid()) + outplayables.Add(activation); + } + + void SearchHiearchyAndConnectParticleSystem(IEnumerable particleSystems, PlayableGraph graph, + List outplayables) + { + foreach (var particleSystem in particleSystems) + { + if (particleSystem != null) + { + controllingParticles = true; + outplayables.Add(ParticleControlPlayable.Create(graph, particleSystem, particleRandomSeed)); + } + } + } + + void SearchHierarchyAndConnectDirector(IEnumerable directors, PlayableGraph graph, + List outplayables, bool disableSelfReferences) + { + foreach (var director in directors) + { + if (director != null) + { + if (director.playableAsset != m_ControlDirectorAsset) + { + outplayables.Add(DirectorControlPlayable.Create(graph, director)); + controllingDirectors = true; + } + // if this self references, disable the director. + else if (disableSelfReferences) + { + director.enabled = false; + } + } + } + } + + static void SearchHierarchyAndConnectControlableScripts(IEnumerable controlableScripts, PlayableGraph graph, List outplayables) + { + foreach (var script in controlableScripts) + { + outplayables.Add(TimeControlPlayable.Create(graph, (ITimeControl)script)); + } + } + + static void ConnectMixerAndPlayable(PlayableGraph graph, Playable mixer, Playable playable, + int portIndex) + { + graph.Connect(playable, 0, mixer, portIndex); + mixer.SetInputWeight(playable, 1.0f); + } + + internal IList GetComponent(GameObject gameObject) + { + var components = new List(); + if (gameObject != null) + { + if (searchHierarchy) + { + gameObject.GetComponentsInChildren(true, components); + } + else + { + gameObject.GetComponents(components); + } + } + return components; + } + + static IEnumerable GetControlableScripts(GameObject root) + { + if (root == null) + yield break; + + foreach (var script in root.GetComponentsInChildren()) + { + if (script is ITimeControl) + yield return script; + } + } + + internal void UpdateDurationAndLoopFlag(IList directors, IList particleSystems) + { + if (directors.Count == 0 && particleSystems.Count == 0) + return; + + const double invalidDuration = double.NegativeInfinity; + + var maxDuration = invalidDuration; + var supportsLoop = false; + + foreach (var director in directors) + { + if (director.playableAsset != null) + { + var assetDuration = director.playableAsset.duration; + + if (director.playableAsset is TimelineAsset && assetDuration > 0.0) + // Timeline assets report being one tick shorter than they actually are, unless they are empty + assetDuration = (double)((DiscreteTime)assetDuration).OneTickAfter(); + + maxDuration = Math.Max(maxDuration, assetDuration); + supportsLoop = supportsLoop || director.extrapolationMode == DirectorWrapMode.Loop; + } + } + + foreach (var particleSystem in particleSystems) + { + maxDuration = Math.Max(maxDuration, particleSystem.main.duration); + supportsLoop = supportsLoop || particleSystem.main.loop; + } + + m_Duration = double.IsNegativeInfinity(maxDuration) ? PlayableBinding.DefaultDuration : maxDuration; + m_SupportLoop = supportsLoop; + } + + IList GetParticleSystemRoots(GameObject go) + { + if (searchHierarchy) + { + // We only want the parent systems as they will handle all the child systems. + var roots = new List(); + GetParticleSystemRoots(go.transform, roots); + return roots; + } + return GetComponent(go); + } + + static void GetParticleSystemRoots(Transform t, ICollection roots) + { + var ps = t.GetComponent(); + if (ps != null) + { + // its a root + roots.Add(ps); + return; + } + + for (int i = 0; i < t.childCount; ++i) + { + GetParticleSystemRoots(t.GetChild(i), roots); + } + } + + /// + public void GatherProperties(PlayableDirector director, IPropertyCollector driver) + { + if (director == null) + return; + + // prevent infinite recursion + if (s_ProcessedDirectors.Contains(director)) + return; + s_ProcessedDirectors.Add(director); + + var gameObject = sourceGameObject.Resolve(director); + if (gameObject != null) + { + if (updateParticle) + { + // case 1076850 -- drive all emitters, not just roots. + foreach (var ps in gameObject.GetComponentsInChildren(true)) + { + driver.AddFromName(ps.gameObject, "randomSeed"); + driver.AddFromName(ps.gameObject, "autoRandomSeed"); + } + } + + if (active) + { + driver.AddFromName(gameObject, "m_IsActive"); + } + + if (updateITimeControl) + { + foreach (var script in GetControlableScripts(gameObject)) + { + var propertyPreview = script as IPropertyPreview; + if (propertyPreview != null) + propertyPreview.GatherProperties(director, driver); + else + driver.AddFromComponent(script.gameObject, script); + } + } + + if (updateDirector) + { + foreach (var childDirector in GetComponent(gameObject)) + { + if (childDirector == null) + continue; + + var timeline = childDirector.playableAsset as TimelineAsset; + if (timeline == null) + continue; + + timeline.GatherProperties(childDirector, driver); + } + } + } + s_ProcessedDirectors.Remove(director); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlPlayableAsset.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlPlayableAsset.cs.meta new file mode 100644 index 0000000..3f4d090 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlPlayableAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 48853ae485fa386428341ac1ea122570 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlTrack.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlTrack.cs new file mode 100644 index 0000000..e42c9af --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlTrack.cs @@ -0,0 +1,14 @@ +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// A Track whose clips control time-related elements on a GameObject. + /// + [TrackClipType(typeof(ControlPlayableAsset), false)] + [ExcludeFromPreset] + public class ControlTrack : TrackAsset + { + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlTrack.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlTrack.cs.meta new file mode 100644 index 0000000..95582da --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Control/ControlTrack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 15e0374501f39d54eb30235764636e0e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/DiscreteTime.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/DiscreteTime.cs new file mode 100644 index 0000000..af68af8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/DiscreteTime.cs @@ -0,0 +1,226 @@ +using System; + +namespace UnityEngine.Timeline +{ + struct DiscreteTime : IComparable + { + const double k_Tick = 1e-12; + public static readonly DiscreteTime kMaxTime = new DiscreteTime(Int64.MaxValue); + + readonly Int64 m_DiscreteTime; + + public static double tickValue { get { return k_Tick; } } + + public DiscreteTime(DiscreteTime time) + { + m_DiscreteTime = time.m_DiscreteTime; + } + + DiscreteTime(Int64 time) + { + m_DiscreteTime = time; + } + + public DiscreteTime(double time) + { + m_DiscreteTime = DoubleToDiscreteTime(time); + } + + public DiscreteTime(float time) + { + m_DiscreteTime = FloatToDiscreteTime(time); + } + + public DiscreteTime(int time) + { + m_DiscreteTime = IntToDiscreteTime(time); + } + + public DiscreteTime(int frame, double fps) + { + m_DiscreteTime = DoubleToDiscreteTime(frame * fps); + } + + public DiscreteTime OneTickBefore() + { + return new DiscreteTime(m_DiscreteTime - 1); + } + + public DiscreteTime OneTickAfter() + { + return new DiscreteTime(m_DiscreteTime + 1); + } + + public Int64 GetTick() + { + return m_DiscreteTime; + } + + public static DiscreteTime FromTicks(Int64 ticks) + { + return new DiscreteTime(ticks); + } + + public int CompareTo(object obj) + { + if (obj is DiscreteTime) + return m_DiscreteTime.CompareTo(((DiscreteTime)obj).m_DiscreteTime); + return 1; + } + + public bool Equals(DiscreteTime other) + { + return m_DiscreteTime == other.m_DiscreteTime; + } + + public override bool Equals(object obj) + { + if (obj is DiscreteTime) + return Equals((DiscreteTime)obj); + return false; + } + + static Int64 DoubleToDiscreteTime(double time) + { + double number = (time / k_Tick) + 0.5; + if (number < Int64.MaxValue && number > Int64.MinValue) + return (Int64)number; + throw new ArgumentOutOfRangeException("Time is over the discrete range."); + } + + static Int64 FloatToDiscreteTime(float time) + { + float number = (time / (float)k_Tick) + 0.5f; + if (number < Int64.MaxValue && number > Int64.MinValue) + return (Int64)number; + throw new ArgumentOutOfRangeException("Time is over the discrete range."); + } + + static Int64 IntToDiscreteTime(int time) + { + return DoubleToDiscreteTime(time); + } + + static double ToDouble(Int64 time) + { + return time * k_Tick; + } + + static float ToFloat(Int64 time) + { + return (float)ToDouble(time); + } + + public static explicit operator double(DiscreteTime b) + { + return ToDouble(b.m_DiscreteTime); + } + + public static explicit operator float(DiscreteTime b) + { + return ToFloat(b.m_DiscreteTime); + } + + public static explicit operator Int64(DiscreteTime b) + { + return b.m_DiscreteTime; + } + + public static explicit operator DiscreteTime(double time) + { + return new DiscreteTime(time); + } + + public static explicit operator DiscreteTime(float time) + { + return new DiscreteTime(time); + } + + public static implicit operator DiscreteTime(Int32 time) + { + return new DiscreteTime(time); + } + + public static explicit operator DiscreteTime(Int64 time) + { + return new DiscreteTime(time); + } + + public static bool operator==(DiscreteTime lhs, DiscreteTime rhs) + { + return lhs.m_DiscreteTime == rhs.m_DiscreteTime; + } + + public static bool operator!=(DiscreteTime lhs, DiscreteTime rhs) + { + return !(lhs == rhs); + } + + public static bool operator>(DiscreteTime lhs, DiscreteTime rhs) + { + return lhs.m_DiscreteTime > rhs.m_DiscreteTime; + } + + public static bool operator<(DiscreteTime lhs, DiscreteTime rhs) + { + return lhs.m_DiscreteTime < rhs.m_DiscreteTime; + } + + public static bool operator<=(DiscreteTime lhs, DiscreteTime rhs) + { + return lhs.m_DiscreteTime <= rhs.m_DiscreteTime; + } + + public static bool operator>=(DiscreteTime lhs, DiscreteTime rhs) + { + return lhs.m_DiscreteTime >= rhs.m_DiscreteTime; + } + + public static DiscreteTime operator+(DiscreteTime lhs, DiscreteTime rhs) + { + return new DiscreteTime(lhs.m_DiscreteTime + rhs.m_DiscreteTime); + } + + public static DiscreteTime operator-(DiscreteTime lhs, DiscreteTime rhs) + { + return new DiscreteTime(lhs.m_DiscreteTime - rhs.m_DiscreteTime); + } + + public override string ToString() + { + return m_DiscreteTime.ToString(); + } + + public override int GetHashCode() + { + return m_DiscreteTime.GetHashCode(); + } + + public static DiscreteTime Min(DiscreteTime lhs, DiscreteTime rhs) + { + return new DiscreteTime(Math.Min(lhs.m_DiscreteTime, rhs.m_DiscreteTime)); + } + + public static DiscreteTime Max(DiscreteTime lhs, DiscreteTime rhs) + { + return new DiscreteTime(Math.Max(lhs.m_DiscreteTime, rhs.m_DiscreteTime)); + } + + public static double SnapToNearestTick(double time) + { + Int64 discreteTime = DoubleToDiscreteTime(time); + return ToDouble(discreteTime); + } + + public static float SnapToNearestTick(float time) + { + Int64 discreteTime = FloatToDiscreteTime(time); + return ToFloat(discreteTime); + } + + public static Int64 GetNearestTick(double time) + { + return DoubleToDiscreteTime(time); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/DiscreteTime.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/DiscreteTime.cs.meta new file mode 100644 index 0000000..e6d4977 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/DiscreteTime.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8beed9aab74505d488e6befe54c3f6ef +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation.meta new file mode 100644 index 0000000..433d36b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4c6f60d349ea37048af03504fc872f33 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/InfiniteRuntimeClip.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/InfiniteRuntimeClip.cs new file mode 100644 index 0000000..e833fd5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/InfiniteRuntimeClip.cs @@ -0,0 +1,46 @@ +using System; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Runtime clip customized for 'infinite' tracks playables. + /// Used for clips whose time needs to match the timelines exactly + /// + class InfiniteRuntimeClip : RuntimeElement + { + private Playable m_Playable; + private static readonly Int64 kIntervalEnd = DiscreteTime.GetNearestTick(TimelineClip.kMaxTimeValue); + + public InfiniteRuntimeClip(Playable playable) + { + m_Playable = playable; + } + + public override Int64 intervalStart + { + get { return 0; } + } + + public override Int64 intervalEnd + { + get { return kIntervalEnd; } + } + + public override bool enable + { + set + { + if (value) + m_Playable.Play(); + else + m_Playable.Pause(); + } + } + + public override void EvaluateAt(double localTime, FrameData frameData) + { + m_Playable.SetTime(localTime); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/InfiniteRuntimeClip.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/InfiniteRuntimeClip.cs.meta new file mode 100644 index 0000000..c0451a6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/InfiniteRuntimeClip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9b5abcb38bac0c54794ad732a3fa0de3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/IntervalTree.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/IntervalTree.cs new file mode 100644 index 0000000..691f477 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/IntervalTree.cs @@ -0,0 +1,271 @@ +using System; +using System.Collections.Generic; + +namespace UnityEngine.Timeline +{ + interface IInterval + { + Int64 intervalStart { get; } + Int64 intervalEnd { get; } + } + + struct IntervalTreeNode // interval node, + { + public Int64 center; // midpoint for this node + public int first; // index of first element of this node in m_Entries + public int last; // index of the last element of this node in m_Entries + public int left; // index in m_Nodes of the left subnode + public int right; // index in m_Nodes of the right subnode + } + + class IntervalTree where T : IInterval + { + internal struct Entry + { + public Int64 intervalStart; + public Int64 intervalEnd; + public T item; + } + + const int kMinNodeSize = 10; // the minimum number of entries to have subnodes + const int kInvalidNode = -1; + const Int64 kCenterUnknown = Int64.MaxValue; // center hasn't been calculated. indicates no children + + readonly List m_Entries = new List(); + readonly List m_Nodes = new List(); + + /// + /// Whether the tree will be rebuilt on the next query + /// + public bool dirty { get; internal set; } + + /// + /// Add an IInterval to the tree + /// + public void Add(T item) + { + if (item == null) + return; + + m_Entries.Add( + new Entry() + { + intervalStart = item.intervalStart, + intervalEnd = item.intervalEnd, + item = item + } + ); + dirty = true; + } + + /// + /// Query the tree at a particular time + /// + /// + /// + public void IntersectsWith(Int64 value, List results) + { + if (m_Entries.Count == 0) + return; + + if (dirty) + { + Rebuild(); + dirty = false; + } + + if (m_Nodes.Count > 0) + Query(m_Nodes[0], value, results); + } + + /// + /// Query the tree at a particular range of time + /// + /// + /// + /// + public void IntersectsWithRange(Int64 start, Int64 end, List results) + { + if (start > end) + return; + + if (m_Entries.Count == 0) + return; + + if (dirty) + { + Rebuild(); + dirty = false; + } + + if (m_Nodes.Count > 0) + QueryRange(m_Nodes[0], start, end, results); + } + + /// + /// Updates the intervals from their source. Use this to detect if the data in the tree + /// has changed. + /// + public void UpdateIntervals() + { + bool isDirty = false; + for (int i = 0; i < m_Entries.Count; i++) + { + var n = m_Entries[i]; + var s = n.item.intervalStart; + var e = n.item.intervalEnd; + + isDirty |= n.intervalStart != s; + isDirty |= n.intervalEnd != e; + + m_Entries[i] = new Entry() + { + intervalStart = s, + intervalEnd = e, + item = n.item + }; + } + + dirty |= isDirty; + } + + private void Query(IntervalTreeNode intervalTreeNode, Int64 value, List results) + { + for (int i = intervalTreeNode.first; i <= intervalTreeNode.last; i++) + { + var entry = m_Entries[i]; + if (value >= entry.intervalStart && value < entry.intervalEnd) + { + results.Add(entry.item); + } + } + + if (intervalTreeNode.center == kCenterUnknown) + return; + if (intervalTreeNode.left != kInvalidNode && value < intervalTreeNode.center) + Query(m_Nodes[intervalTreeNode.left], value, results); + if (intervalTreeNode.right != kInvalidNode && value > intervalTreeNode.center) + Query(m_Nodes[intervalTreeNode.right], value, results); + } + + private void QueryRange(IntervalTreeNode intervalTreeNode, Int64 start, Int64 end, List results) + { + for (int i = intervalTreeNode.first; i <= intervalTreeNode.last; i++) + { + var entry = m_Entries[i]; + if (end >= entry.intervalStart && start < entry.intervalEnd) + { + results.Add(entry.item); + } + } + + if (intervalTreeNode.center == kCenterUnknown) + return; + if (intervalTreeNode.left != kInvalidNode && start < intervalTreeNode.center) + QueryRange(m_Nodes[intervalTreeNode.left], start, end, results); + if (intervalTreeNode.right != kInvalidNode && end > intervalTreeNode.center) + QueryRange(m_Nodes[intervalTreeNode.right], start, end, results); + } + + private void Rebuild() + { + m_Nodes.Clear(); + m_Nodes.Capacity = m_Entries.Capacity; + Rebuild(0, m_Entries.Count - 1); + } + + private int Rebuild(int start, int end) + { + IntervalTreeNode intervalTreeNode = new IntervalTreeNode(); + + // minimum size, don't subdivide + int count = end - start + 1; + if (count < kMinNodeSize) + { + intervalTreeNode = new IntervalTreeNode() {center = kCenterUnknown, first = start, last = end, left = kInvalidNode, right = kInvalidNode}; + m_Nodes.Add(intervalTreeNode); + return m_Nodes.Count - 1; + } + + var min = Int64.MaxValue; + var max = Int64.MinValue; + + for (int i = start; i <= end; i++) + { + var o = m_Entries[i]; + min = Math.Min(min, o.intervalStart); + max = Math.Max(max, o.intervalEnd); + } + + var center = (max + min) / 2; + intervalTreeNode.center = center; + + // first pass, put every thing left of center, left + int x = start; + int y = end; + while (true) + { + while (x <= end && m_Entries[x].intervalEnd < center) + x++; + + while (y >= start && m_Entries[y].intervalEnd >= center) + y--; + + if (x > y) + break; + + var nodeX = m_Entries[x]; + var nodeY = m_Entries[y]; + + m_Entries[y] = nodeX; + m_Entries[x] = nodeY; + } + + intervalTreeNode.first = x; + + // second pass, put every start passed the center right + y = end; + while (true) + { + while (x <= end && m_Entries[x].intervalStart <= center) + x++; + + while (y >= start && m_Entries[y].intervalStart > center) + y--; + + if (x > y) + break; + + var nodeX = m_Entries[x]; + var nodeY = m_Entries[y]; + + m_Entries[y] = nodeX; + m_Entries[x] = nodeY; + } + + intervalTreeNode.last = y; + + // reserve a place + m_Nodes.Add(new IntervalTreeNode()); + int index = m_Nodes.Count - 1; + + intervalTreeNode.left = kInvalidNode; + intervalTreeNode.right = kInvalidNode; + + if (start < intervalTreeNode.first) + intervalTreeNode.left = Rebuild(start, intervalTreeNode.first - 1); + + if (end > intervalTreeNode.last) + intervalTreeNode.right = Rebuild(intervalTreeNode.last + 1, end); + + m_Nodes[index] = intervalTreeNode; + return index; + } + + public void Clear() + { + m_Entries.Clear(); + m_Nodes.Clear(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/IntervalTree.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/IntervalTree.cs.meta new file mode 100644 index 0000000..cf954ab --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/IntervalTree.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8f74c99a65464bb4b86ccb314ee95a7f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClip.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClip.cs new file mode 100644 index 0000000..9b260cd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClip.cs @@ -0,0 +1,110 @@ +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + // The RuntimeClip wraps a single clip in an instantiated sequence. + // It supports the IInterval interface so that it can be stored in the interval tree + // It is this class that is returned by an interval tree query. + class RuntimeClip : RuntimeClipBase + { + TimelineClip m_Clip; + Playable m_Playable; + Playable m_ParentMixer; + + public override double start + { + get { return m_Clip.extrapolatedStart; } + } + + public override double duration + { + get { return m_Clip.extrapolatedDuration; } + } + + public RuntimeClip(TimelineClip clip, Playable clipPlayable, Playable parentMixer) + { + Create(clip, clipPlayable, parentMixer); + } + + void Create(TimelineClip clip, Playable clipPlayable, Playable parentMixer) + { + m_Clip = clip; + m_Playable = clipPlayable; + m_ParentMixer = parentMixer; + clipPlayable.Pause(); + } + + public TimelineClip clip + { + get { return m_Clip; } + } + + public Playable mixer + { + get { return m_ParentMixer; } + } + + public Playable playable + { + get { return m_Playable; } + } + + public override bool enable + { + set + { + if (value && m_Playable.GetPlayState() != PlayState.Playing) + { + m_Playable.Play(); + SetTime(m_Clip.clipIn); + } + else if (!value && m_Playable.GetPlayState() != PlayState.Paused) + { + m_Playable.Pause(); + if (m_ParentMixer.IsValid()) + m_ParentMixer.SetInputWeight(m_Playable, 0.0f); + } + } + } + + public void SetTime(double time) + { + m_Playable.SetTime(time); + } + + public void SetDuration(double duration) + { + m_Playable.SetDuration(duration); + } + + public override void EvaluateAt(double localTime, FrameData frameData) + { + enable = true; + + float weight = 1.0f; + if (clip.IsPreExtrapolatedTime(localTime)) + weight = clip.EvaluateMixIn((float)clip.start); + else if (clip.IsPostExtrapolatedTime(localTime)) + weight = clip.EvaluateMixOut((float)clip.end); + else + weight = clip.EvaluateMixIn(localTime) * clip.EvaluateMixOut(localTime); + + if (mixer.IsValid()) + mixer.SetInputWeight(playable, weight); + + // localTime of the sequence to localtime of the clip + double clipTime = clip.ToLocalTime(localTime); + if (clipTime.CompareTo(0.0) >= 0) + { + SetTime(clipTime); + } + SetDuration(clip.extrapolatedDuration); + } + + public override void Reset() + { + SetTime(m_Clip.clipIn); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClip.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClip.cs.meta new file mode 100644 index 0000000..3ae5d53 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70a190a1b304d1e43995af35d09231d6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClipBase.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClipBase.cs new file mode 100644 index 0000000..f6a178a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClipBase.cs @@ -0,0 +1,21 @@ +using System; +using UnityEngine; + +namespace UnityEngine.Timeline +{ + internal abstract class RuntimeClipBase : RuntimeElement + { + public abstract double start { get; } + public abstract double duration { get; } + + public override Int64 intervalStart + { + get { return DiscreteTime.GetNearestTick(start); } + } + + public override Int64 intervalEnd + { + get { return DiscreteTime.GetNearestTick(start + duration); } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClipBase.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClipBase.cs.meta new file mode 100644 index 0000000..49f3b62 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeClipBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70f955bbb437a494888ef54d97abb474 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeElement.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeElement.cs new file mode 100644 index 0000000..bdd7f11 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeElement.cs @@ -0,0 +1,17 @@ +using System; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + abstract class RuntimeElement : IInterval + { + public abstract Int64 intervalStart { get; } + public abstract Int64 intervalEnd { get; } + public int intervalBit { get; set; } + + public abstract bool enable { set; } + public abstract void EvaluateAt(double localTime, FrameData frameData); + + public virtual void Reset() {} + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeElement.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeElement.cs.meta new file mode 100644 index 0000000..03b8737 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/RuntimeElement.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 76b6bf32a6fcf934aab8c529bddccc81 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/ScheduleRuntimeClip.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/ScheduleRuntimeClip.cs new file mode 100644 index 0000000..4831cc4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/ScheduleRuntimeClip.cs @@ -0,0 +1,111 @@ +using System; +using UnityEngine; +using UnityEngine.Audio; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + // Special runtime clip implementation that handles playables that use a scheduling system + // such as Audio + internal class ScheduleRuntimeClip : RuntimeClipBase + { + private TimelineClip m_Clip; + private Playable m_Playable; + private Playable m_ParentMixer; + private double m_StartDelay; + private double m_FinishTail; + private bool m_Started = false; + + // represents the start point when we want to start getting updated + public override double start + { + get { return Math.Max(0, m_Clip.start - m_StartDelay); } + } + + public override double duration + { + get { return m_Clip.duration + m_FinishTail + m_Clip.start - start; } + } + + public void SetTime(double time) + { + m_Playable.SetTime(time); + } + + public TimelineClip clip { get { return m_Clip; } } + public Playable mixer { get { return m_ParentMixer; } } + public Playable playable { get { return m_Playable; } } + + public ScheduleRuntimeClip(TimelineClip clip, Playable clipPlayable, + Playable parentMixer, double startDelay = 0.2, double finishTail = 0.1) + { + Create(clip, clipPlayable, parentMixer, startDelay, finishTail); + } + + private void Create(TimelineClip clip, Playable clipPlayable, Playable parentMixer, + double startDelay, double finishTail) + { + m_Clip = clip; + m_Playable = clipPlayable; + m_ParentMixer = parentMixer; + m_StartDelay = startDelay; + m_FinishTail = finishTail; + clipPlayable.Pause(); + } + + public override bool enable + { + set + { + if (value && m_Playable.GetPlayState() != PlayState.Playing) + { + m_Playable.Play(); + } + else if (!value && m_Playable.GetPlayState() != PlayState.Paused) + { + m_Playable.Pause(); + if (m_ParentMixer.IsValid()) + m_ParentMixer.SetInputWeight(m_Playable, 0.0f); + } + + m_Started &= value; + } + } + + public override void EvaluateAt(double localTime, FrameData frameData) + { + if (frameData.timeHeld) + { + enable = false; + return; + } + + + bool forceSeek = frameData.seekOccurred || frameData.timeLooped || frameData.evaluationType == FrameData.EvaluationType.Evaluate; + + // If we are in the tail region of the clip, then dont do anything + if (localTime > start + duration - m_FinishTail) + return; + + // this may set the weight to 1 in a delay, but it will avoid missing the start + float weight = clip.EvaluateMixIn(localTime) * clip.EvaluateMixOut(localTime); + if (mixer.IsValid()) + mixer.SetInputWeight(playable, weight); + + // localTime of the sequence to localtime of the clip + if (!m_Started || forceSeek) + { + // accounts for clip in and speed + double clipTime = clip.ToLocalTime(Math.Max(localTime, clip.start)); + // multiply by the time scale so the delay is local to the clip + // Audio will rescale based on it's effective time scale (which includes the parent) + double startDelay = Math.Max(clip.start - localTime, 0) * clip.timeScale; + double durationLocal = m_Clip.duration * clip.timeScale; + if (m_Playable.IsPlayableOfType()) + ((AudioClipPlayable)m_Playable).Seek(clipTime, startDelay, durationLocal); + + m_Started = true; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/ScheduleRuntimeClip.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/ScheduleRuntimeClip.cs.meta new file mode 100644 index 0000000..b3ea114 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Evaluation/ScheduleRuntimeClip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b250be9db55288b48ac121c074d795e6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events.meta new file mode 100644 index 0000000..847f9d1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b8c5993172f27e4419d7d4ed5ef77840 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/IMarker.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/IMarker.cs new file mode 100644 index 0000000..2595cdf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/IMarker.cs @@ -0,0 +1,31 @@ +namespace UnityEngine.Timeline +{ + /// + /// Interface implemented by markers. + /// + /// + /// A marker is a point in time. + /// + /// + public interface IMarker + { + /// + /// The time set for the marker, in seconds. + /// + double time { get; set; } + + /// + /// The track that contains the marker. + /// + TrackAsset parent { get; } + + /// + /// This method is called when the marker is initialized. + /// + /// The track that contains the marker. + /// + /// This method is called after each deserialization of the Timeline Asset. + /// + void Initialize(TrackAsset parent); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/IMarker.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/IMarker.cs.meta new file mode 100644 index 0000000..3869cbc --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/IMarker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4cb169caa67eddf4d83b39fd0917a945 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/INotificationOptionProvider.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/INotificationOptionProvider.cs new file mode 100644 index 0000000..7a23d7d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/INotificationOptionProvider.cs @@ -0,0 +1,15 @@ +namespace UnityEngine.Timeline +{ + /// + /// Implement this interface to change the behaviour of an INotification. + /// + /// This interface must be implemented along with to modify the default behaviour of a notification. + /// + public interface INotificationOptionProvider + { + /// + /// The flags that change the triggering behaviour. + /// + NotificationFlags flags { get; } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/INotificationOptionProvider.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/INotificationOptionProvider.cs.meta new file mode 100644 index 0000000..3e59b72 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/INotificationOptionProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5082cb99a8f99b84d84dd8b4c5233a9e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Marker.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Marker.cs new file mode 100644 index 0000000..2f12cd7 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Marker.cs @@ -0,0 +1,53 @@ +using System; + +namespace UnityEngine.Timeline +{ + /// + /// Use Marker as a base class when creating a custom marker. + /// + /// + /// A marker is a point in time. + /// + public abstract class Marker : ScriptableObject, IMarker + { + [SerializeField, TimeField, Tooltip("Time for the marker")] double m_Time; + + /// + public TrackAsset parent { get; private set; } + + /// + /// + /// The marker time cannot be negative. + /// + public double time + { + get { return m_Time; } + set { m_Time = Math.Max(value, 0); } + } + + void IMarker.Initialize(TrackAsset parentTrack) + { + // We only really want to update the parent when the object is first deserialized + // If not a cloned track would "steal" the source's markers + if (parent == null) + { + parent = parentTrack; + try + { + OnInitialize(parentTrack); + } + catch (Exception e) + { + Debug.LogError(e.Message, this); + } + } + } + + /// + /// Override this method to receive a callback when the marker is initialized. + /// + public virtual void OnInitialize(TrackAsset aPent) + { + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Marker.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Marker.cs.meta new file mode 100644 index 0000000..2bb36b5 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Marker.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 89b48a03f6f43e94e87cc8d2104d3d4d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerList.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerList.cs new file mode 100644 index 0000000..4be4fc2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerList.cs @@ -0,0 +1,168 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + [Serializable] + struct MarkerList : ISerializationCallbackReceiver + { + [SerializeField, HideInInspector] List m_Objects; + + [HideInInspector, NonSerialized] List m_Cache; + bool m_CacheDirty; + bool m_HasNotifications; + public List markers + { + get + { + BuildCache(); + return m_Cache; + } + } + + public MarkerList(int capacity) + { + m_Objects = new List(capacity); + m_Cache = new List(capacity); + m_CacheDirty = true; + m_HasNotifications = false; + } + + public void Add(ScriptableObject item) + { + if (item == null) + return; + + m_Objects.Add(item); + m_CacheDirty = true; + } + + public bool Remove(IMarker item) + { + if (!(item is ScriptableObject)) + throw new InvalidOperationException("Supplied type must be a ScriptableObject"); + return Remove((ScriptableObject)item, item.parent.timelineAsset, item.parent); + } + + public bool Remove(ScriptableObject item, TimelineAsset timelineAsset, PlayableAsset thingToDirty) + { + if (!m_Objects.Contains(item)) return false; + + TimelineUndo.PushUndo(thingToDirty, "Delete Marker"); + m_Objects.Remove(item); + m_CacheDirty = true; + TimelineUndo.PushDestroyUndo(timelineAsset, thingToDirty, item, "Delete Marker"); + return true; + } + + public void Clear() + { + m_Objects.Clear(); + m_CacheDirty = true; + } + + public bool Contains(ScriptableObject item) + { + return m_Objects.Contains(item); + } + + public IEnumerable GetMarkers() + { + return markers; + } + + public int Count + { + get { return markers.Count; } + } + + public IMarker this[int idx] + { + get + { + return markers[idx]; + } + } + + public List GetRawMarkerList() + { + return m_Objects; + } + + public IMarker CreateMarker(Type type, double time, TrackAsset owner) + { + if (!typeof(ScriptableObject).IsAssignableFrom(type) || !typeof(IMarker).IsAssignableFrom(type)) + { + throw new InvalidOperationException( + "The requested type needs to inherit from ScriptableObject and implement IMarker"); + } + if (!owner.supportsNotifications && typeof(INotification).IsAssignableFrom(type)) + { + throw new InvalidOperationException( + "Markers implementing the INotification interface cannot be added on tracks that do not support notifications"); + } + + var markerSO = ScriptableObject.CreateInstance(type); + var marker = (IMarker)markerSO; + marker.time = time; + + TimelineCreateUtilities.SaveAssetIntoObject(markerSO, owner); + TimelineUndo.RegisterCreatedObjectUndo(markerSO, "Create " + type.Name); + TimelineUndo.PushUndo(owner, "Create " + type.Name); + + Add(markerSO); + marker.Initialize(owner); + + return marker; + } + + public bool HasNotifications() + { + BuildCache(); + return m_HasNotifications; + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + } + + void ISerializationCallbackReceiver.OnAfterDeserialize() + { +#if UNITY_EDITOR + for (int i = m_Objects.Count - 1; i >= 0; i--) + { + object o = m_Objects[i]; + if (o == null) + { + Debug.LogWarning("Empty marker found while loading timeline. It will be removed."); + m_Objects.RemoveAt(i); + } + } +#endif + m_CacheDirty = true; + } + + void BuildCache() + { + if (m_CacheDirty) + { + m_Cache = new List(m_Objects.Count); + m_HasNotifications = false; + foreach (var o in m_Objects) + { + if (o != null) + { + m_Cache.Add(o as IMarker); + if (o is INotification) + { + m_HasNotifications = true; + } + } + } + + m_CacheDirty = false; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerList.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerList.cs.meta new file mode 100644 index 0000000..1875712 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4335a164bb763104c8805212c23d795f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerTrack.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerTrack.cs new file mode 100644 index 0000000..f64b483 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerTrack.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// + /// Use this track to add Markers bound to a GameObject. + /// + [Serializable] + [TrackBindingType(typeof(GameObject))] + [HideInMenu] + [ExcludeFromPreset] + public class MarkerTrack : TrackAsset + { + /// + public override IEnumerable outputs + { + get + { + return this == timelineAsset.markerTrack ? + new List {ScriptPlayableBinding.Create(name, null, typeof(GameObject))} : + base.outputs; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerTrack.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerTrack.cs.meta new file mode 100644 index 0000000..37ca389 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/MarkerTrack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2a16748d9461eae46a725db9776d5390 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/SignalTrack.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/SignalTrack.cs new file mode 100644 index 0000000..7c7bc4e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/SignalTrack.cs @@ -0,0 +1,19 @@ +using System; + +namespace UnityEngine.Timeline +{ + /// + /// Use this track to emit signals to a bound SignalReceiver. + /// + /// + /// This track cannot contain clips. + /// + /// + /// + /// + [Serializable] + [TrackBindingType(typeof(SignalReceiver))] + [TrackColor(0.25f, 0.25f, 0.25f)] + [ExcludeFromPreset] + public class SignalTrack : MarkerTrack {} +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/SignalTrack.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/SignalTrack.cs.meta new file mode 100644 index 0000000..3343f84 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/SignalTrack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b46e36075dd1c124a8422c228e75e1fb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals.meta new file mode 100644 index 0000000..aa956e4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5b00473355622524394628f7ec51808d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/CustomSignalEventDrawer.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/CustomSignalEventDrawer.cs new file mode 100644 index 0000000..49df674 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/CustomSignalEventDrawer.cs @@ -0,0 +1,5 @@ +namespace UnityEngine.Timeline +{ + //used to tell Signal Handler inspector to use a special drawer for UnityEvent + class CustomSignalEventDrawer : PropertyAttribute {} +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/CustomSignalEventDrawer.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/CustomSignalEventDrawer.cs.meta new file mode 100644 index 0000000..c7c813f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/CustomSignalEventDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a7ebd1239373d5f41af65ef32d67f445 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalAsset.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalAsset.cs new file mode 100644 index 0000000..d605588 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalAsset.cs @@ -0,0 +1,22 @@ +using System; +using UnityEngine; + +namespace UnityEngine.Timeline +{ + /// + /// An asset representing an emitted signal. A SignalAsset connects a SignalEmitter with a SignalReceiver. + /// + /// + /// + [AssetFileNameExtension("signal")] + public class SignalAsset : ScriptableObject + { + internal static event Action OnEnableCallback; + + void OnEnable() + { + if (OnEnableCallback != null) + OnEnableCallback(this); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalAsset.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalAsset.cs.meta new file mode 100644 index 0000000..437f4d3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d6fa2d92fc1b3f34da284357edf89c3b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalEmitter.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalEmitter.cs new file mode 100644 index 0000000..d4d4ca9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalEmitter.cs @@ -0,0 +1,72 @@ +using System; +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// + /// Marker that emits a signal to a SignalReceiver. + /// + /// A SignalEmitter emits a notification through the playable system. A SignalEmitter is used with a SignalReceiver and a SignalAsset. + /// + /// + [Serializable] + [CustomStyle("SignalEmitter")] + [ExcludeFromPreset] + public class SignalEmitter : Marker, INotification, INotificationOptionProvider + { + [SerializeField] bool m_Retroactive; + [SerializeField] bool m_EmitOnce; + [SerializeField] SignalAsset m_Asset; + + /// + /// Use retroactive to emit the signal if playback starts after the SignalEmitter time. + /// + public bool retroactive + { + get { return m_Retroactive; } + set { m_Retroactive = value; } + } + + /// + /// Use emitOnce to emit this signal once during loops. + /// + public bool emitOnce + { + get { return m_EmitOnce; } + set { m_EmitOnce = value; } + } + + /// + /// Asset representing the signal being emitted. + /// + public SignalAsset asset + { + get { return m_Asset; } + set { m_Asset = value; } + } + + PropertyName INotification.id + { + get + { + if (m_Asset != null) + { + return new PropertyName(m_Asset.name); + } + return new PropertyName(string.Empty); + } + } + + NotificationFlags INotificationOptionProvider.flags + { + get + { + return (retroactive ? NotificationFlags.Retroactive : default(NotificationFlags)) | + (emitOnce ? NotificationFlags.TriggerOnce : default(NotificationFlags)) | + NotificationFlags.TriggerInEditMode; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalEmitter.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalEmitter.cs.meta new file mode 100644 index 0000000..f14c8a3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalEmitter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 15c38f6fa1940124db1ab7f6fe7268d1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalReceiver.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalReceiver.cs new file mode 100644 index 0000000..4e7564a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalReceiver.cs @@ -0,0 +1,248 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Listens for emitted signals and reacts depending on its defined reactions. + /// + /// A SignalReceiver contains a list of reactions. Each reaction is bound to a SignalAsset. + /// When a SignalEmitter emits a signal, the SignalReceiver invokes the corresponding reaction. + /// + /// + public class SignalReceiver : MonoBehaviour, INotificationReceiver + { + [SerializeField] + EventKeyValue m_Events = new EventKeyValue(); + + /// + /// Called when a notification is sent. + /// + public void OnNotify(Playable origin, INotification notification, object context) + { + var signal = notification as SignalEmitter; + if (signal != null && signal.asset != null) + { + UnityEvent evt; + if (m_Events.TryGetValue(signal.asset, out evt) && evt != null) + { + evt.Invoke(); + } + } + } + + /// + /// Defines a new reaction for a SignalAsset. + /// + /// The SignalAsset for which the reaction is being defined. + /// The UnityEvent that describes the reaction. + /// Thrown when the asset is null. + /// Thrown when the SignalAsset is already registered with this receiver. + public void AddReaction(SignalAsset asset, UnityEvent reaction) + { + if (asset == null) + throw new ArgumentNullException("asset"); + + if (m_Events.signals.Contains(asset)) + throw new ArgumentException("SignalAsset already used."); + m_Events.Append(asset, reaction); + } + + /// + /// Appends a null SignalAsset with a reaction specified by the UnityEvent. + /// + /// The new reaction to be appended. + /// The index of the appended reaction. + /// Multiple null assets are valid. + public int AddEmptyReaction(UnityEvent reaction) + { + m_Events.Append(null, reaction); + return m_Events.events.Count - 1; + } + + /// + /// Removes the first occurrence of a SignalAsset. + /// + /// The SignalAsset to be removed. + public void Remove(SignalAsset asset) + { + if (!m_Events.signals.Contains(asset)) + { + throw new ArgumentException("The SignalAsset is not registered with this receiver."); + } + + m_Events.Remove(asset); + } + + /// + /// Gets a list of all registered SignalAssets. + /// + /// Returns a list of SignalAssets. + public IEnumerable GetRegisteredSignals() + { + return m_Events.signals; + } + + /// + /// Gets the first UnityEvent associated with a SignalAsset. + /// + /// A SignalAsset defining the signal. + /// Returns the reaction associated with a SignalAsset. Returns null if the signal asset does not exist. + public UnityEvent GetReaction(SignalAsset key) + { + UnityEvent ret; + if (m_Events.TryGetValue(key, out ret)) + { + return ret; + } + + return null; + } + + /// + /// Returns the count of registered SignalAssets. + /// + /// + public int Count() + { + return m_Events.signals.Count; + } + + /// + /// Replaces the SignalAsset associated with a reaction at a specific index. + /// + /// The index of the reaction. + /// The replacement SignalAsset. + /// Thrown when the replacement SignalAsset is already registered to this SignalReceiver. + /// The new SignalAsset can be null. + public void ChangeSignalAtIndex(int idx, SignalAsset newKey) + { + if (idx < 0 || idx > m_Events.signals.Count - 1) + throw new IndexOutOfRangeException(); + + if (m_Events.signals[idx] == newKey) + return; + var alreadyUsed = m_Events.signals.Contains(newKey); + if (newKey == null || m_Events.signals[idx] == null || !alreadyUsed) + m_Events.signals[idx] = newKey; + + if (newKey != null && alreadyUsed) + throw new ArgumentException("SignalAsset already used."); + } + + /// + /// Removes the SignalAsset and reaction at a specific index. + /// + /// The index of the SignalAsset to be removed. + public void RemoveAtIndex(int idx) + { + if (idx < 0 || idx > m_Events.signals.Count - 1) + throw new IndexOutOfRangeException(); + m_Events.Remove(idx); + } + + /// + /// Replaces the reaction at a specific index with a new UnityEvent. + /// + /// The index of the reaction to be replaced. + /// The replacement reaction. + /// Thrown when the replacement reaction is null. + public void ChangeReactionAtIndex(int idx, UnityEvent reaction) + { + if (idx < 0 || idx > m_Events.events.Count - 1) + throw new IndexOutOfRangeException(); + + m_Events.events[idx] = reaction; + } + + /// + /// Gets the reaction at a specific index. + /// + /// The index of the reaction. + /// Returns a reaction. + public UnityEvent GetReactionAtIndex(int idx) + { + if (idx < 0 || idx > m_Events.events.Count - 1) + throw new IndexOutOfRangeException(); + return m_Events.events[idx]; + } + + /// + /// Gets the SignalAsset at a specific index + /// + /// The index of the SignalAsset. + /// Returns a SignalAsset. + public SignalAsset GetSignalAssetAtIndex(int idx) + { + if (idx < 0 || idx > m_Events.signals.Count - 1) + throw new IndexOutOfRangeException(); + return m_Events.signals[idx]; + } + + // Required by Unity for the MonoBehaviour to have an enabled state + private void OnEnable() + { + } + + [Serializable] + class EventKeyValue + { + [SerializeField] + List m_Signals = new List(); + + [SerializeField, CustomSignalEventDrawer] + List m_Events = new List(); + + public bool TryGetValue(SignalAsset key, out UnityEvent value) + { + var index = m_Signals.IndexOf(key); + if (index != -1) + { + value = m_Events[index]; + return true; + } + + value = null; + return false; + } + + public void Append(SignalAsset key, UnityEvent value) + { + m_Signals.Add(key); + m_Events.Add(value); + } + + public void Remove(int idx) + { + if (idx != -1) + { + m_Signals.RemoveAt(idx); + m_Events.RemoveAt(idx); + } + } + + public void Remove(SignalAsset key) + { + var idx = m_Signals.IndexOf(key); + if (idx != -1) + { + m_Signals.RemoveAt(idx); + m_Events.RemoveAt(idx); + } + } + + public List signals + { + get { return m_Signals; } + } + + public List events + { + get { return m_Events; } + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalReceiver.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalReceiver.cs.meta new file mode 100644 index 0000000..8d08ff6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Events/Signals/SignalReceiver.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e52de21a22b6dd44c9cc19f810c65059 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions.meta new file mode 100644 index 0000000..d78ad19 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6c61ba0c209bcc74f83e3650039ebdf9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs new file mode 100644 index 0000000..87eec1b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs @@ -0,0 +1,76 @@ +using System; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Extension methods for TrackAssets + /// + public static class TrackAssetExtensions + { + /// + /// Gets the GroupTrack this track belongs to. + /// + /// The track asset to find the group of + /// The parent GroupTrack or null if the Track is an override track, or root track. + public static GroupTrack GetGroup(this TrackAsset asset) + { + if (asset == null) + return null; + + return asset.parent as GroupTrack; + } + + /// + /// Assigns the track to the specified group track. + /// + /// The track to assign. + /// The GroupTrack to assign the track to. + /// + /// Does not support assigning to a group in a different timeline. + /// + public static void SetGroup(this TrackAsset asset, GroupTrack group) + { + const string undoString = "Reparent"; + + if (asset == null || asset == group || asset.parent == group) + return; + + if (group != null && asset.timelineAsset != group.timelineAsset) + throw new InvalidOperationException("Cannot assign to a group in a different timeline"); + + + TimelineUndo.PushUndo(asset, undoString); + + var timeline = asset.timelineAsset; + var parentTrack = asset.parent as TrackAsset; + var parentTimeline = asset.parent as TimelineAsset; + if (parentTrack != null || parentTimeline != null) + { + TimelineUndo.PushUndo(asset.parent, undoString); + if (parentTimeline != null) + { + parentTimeline.RemoveTrack(asset); + } + else + { + parentTrack.RemoveSubTrack(asset); + } + } + + if (group == null) + { + TimelineUndo.PushUndo(timeline, undoString); + asset.parent = asset.timelineAsset; + timeline.AddTrackInternal(asset); + } + else + { + TimelineUndo.PushUndo(group, undoString); + group.AddChild(asset); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs.meta new file mode 100644 index 0000000..823e94a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Extensions/TrackExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d3721d5c6afa8e545995dfaada328476 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/GroupTrack.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/GroupTrack.cs new file mode 100644 index 0000000..a6d8a7d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/GroupTrack.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// A group track is a container that allows tracks to be arranged in a hierarchical manner. + /// + [Serializable] + [TrackClipType(typeof(TrackAsset))] + [SupportsChildTracks] + public class GroupTrack : TrackAsset + { + internal override bool CanCompileClips() + { + return false; + } + + /// + public override IEnumerable outputs + { + get { return PlayableBinding.None; } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/GroupTrack.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/GroupTrack.cs.meta new file mode 100644 index 0000000..89aac74 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/GroupTrack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d0fc6f5187a81dc47999eefade6f0935 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ILayerable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ILayerable.cs new file mode 100644 index 0000000..ff7d0e4 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ILayerable.cs @@ -0,0 +1,20 @@ +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Implement this interface on a TrackAsset derived class to support layers + /// + public interface ILayerable + { + /// + /// Creates a mixer that blends track mixers. + /// + /// The graph where the mixer playable will be added. + /// The GameObject that requested the graph. + /// The number of inputs on the mixer. There should be an input for each playable from each clip. + /// Returns a playable that is used as a mixer. If this method returns Playable.Null, it indicates that a layer mixer is not needed. In this case, a single track mixer blends all playables generated from all layers. + Playable CreateLayerMixer(PlayableGraph graph, GameObject go, int inputCount); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ILayerable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ILayerable.cs.meta new file mode 100644 index 0000000..b585e7e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/ILayerable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1dc9fdfe61a6a8749a0f6b89b45e887d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables.meta new file mode 100644 index 0000000..a162894 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8b7d06780fca6fc4384580d3ebed9219 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ActivationControlPlayable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ActivationControlPlayable.cs new file mode 100644 index 0000000..3efb818 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ActivationControlPlayable.cs @@ -0,0 +1,140 @@ +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Playable that controls the active state of a GameObject. + /// + public class ActivationControlPlayable : PlayableBehaviour + { + /// + /// The state of a GameObject's activeness when a PlayableGraph stops. + /// + public enum PostPlaybackState + { + /// + /// Set the GameObject to active when the PlayableGraph stops. + /// + Active, + + /// + /// Set the GameObject to inactive when the [[PlayableGraph]] stops. + /// + Inactive, + + /// + /// Revert the GameObject to the active state it was before the [[PlayableGraph]] started. + /// + Revert + } + + enum InitialState + { + Unset, + Active, + Inactive + } + + public GameObject gameObject = null; + public PostPlaybackState postPlayback = PostPlaybackState.Revert; + InitialState m_InitialState; + + /// + /// Creates a ScriptPlayable with an ActivationControlPlayable behaviour attached + /// + /// PlayableGraph that will own the playable + /// The GameObject that triggered the graph build + /// The state to leave the gameObject after the graph is stopped + /// Returns a playable that controls activation of a game object + public static ScriptPlayable Create(PlayableGraph graph, GameObject gameObject, ActivationControlPlayable.PostPlaybackState postPlaybackState) + { + if (gameObject == null) + return ScriptPlayable.Null; + + var handle = ScriptPlayable.Create(graph); + var playable = handle.GetBehaviour(); + playable.gameObject = gameObject; + playable.postPlayback = postPlaybackState; + + return handle; + } + + /// + /// This function is called when the Playable play state is changed to Playables.PlayState.Playing. + /// + /// The playable this behaviour is attached to. + /// The information about this frame + public override void OnBehaviourPlay(Playable playable, FrameData info) + { + if (gameObject == null) + return; + + gameObject.SetActive(true); + } + + /// + /// This function is called when the Playable play state is changed to PlayState.Paused. + /// + /// The playable this behaviour is attached to. + /// The information about this frame + public override void OnBehaviourPause(Playable playable, FrameData info) + { + // OnBehaviourPause can be called if the graph is stopped for a variety of reasons + // the effectivePlayState will test if the pause is due to the clip being out of bounds + if (gameObject != null && info.effectivePlayState == PlayState.Paused) + { + gameObject.SetActive(false); + } + } + + /// + /// This function is called during the ProcessFrame phase of the PlayableGraph. + /// + /// The playable this behaviour is attached to. + /// A FrameData structure that contains information about the current frame context. + /// unused + public override void ProcessFrame(Playable playable, FrameData info, object userData) + { + if (gameObject != null)// && !gameObject.activeSelf) + gameObject.SetActive(true); + } + + /// + /// This function is called when the PlayableGraph that owns this PlayableBehaviour starts. + /// + /// The playable this behaviour is attached to. + public override void OnGraphStart(Playable playable) + { + if (gameObject != null) + { + if (m_InitialState == InitialState.Unset) + m_InitialState = gameObject.activeSelf ? InitialState.Active : InitialState.Inactive; + } + } + + /// + /// This function is called when the Playable that owns the PlayableBehaviour is destroyed. + /// + /// The playable this behaviour is attached to. + public override void OnPlayableDestroy(Playable playable) + { + if (gameObject == null || m_InitialState == InitialState.Unset) + return; + + switch (postPlayback) + { + case PostPlaybackState.Active: + gameObject.SetActive(true); + break; + + case PostPlaybackState.Inactive: + gameObject.SetActive(false); + break; + + case PostPlaybackState.Revert: + gameObject.SetActive(m_InitialState == InitialState.Active); + break; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ActivationControlPlayable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ActivationControlPlayable.cs.meta new file mode 100644 index 0000000..a7763a6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ActivationControlPlayable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d20e4e177b86a2843805dd3894f41b42 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs new file mode 100644 index 0000000..0157958 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs @@ -0,0 +1,91 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// This class is deprecated. It is recommended to use Playable Asset and Playable Behaviour derived classes instead. + /// + [Serializable] + [Obsolete("For best performance use PlayableAsset and PlayableBehaviour.")] + public class BasicPlayableBehaviour : ScriptableObject, IPlayableAsset, IPlayableBehaviour + { + public BasicPlayableBehaviour() {} + + /// + /// The playback duration in seconds of the instantiated Playable. + /// + public virtual double duration { get { return PlayableBinding.DefaultDuration; } } + + /// + ///A description of the outputs of the instantiated Playable. + /// + public virtual IEnumerable outputs { get { return PlayableBinding.None; } } + + /// + /// This function is called when the PlayableGraph that owns this PlayableBehaviour starts. + /// + /// The Playable that owns the current PlayableBehaviour. + public virtual void OnGraphStart(Playable playable) {} + + /// + /// This function is called when the PlayableGraph that owns this PlayableBehaviour stops. + /// + /// The Playable that owns the current PlayableBehaviour. + public virtual void OnGraphStop(Playable playable) {} + + /// + /// This function is called when the Playable that owns the PlayableBehaviour is created. + /// + /// The Playable that owns the current PlayableBehaviour. + public virtual void OnPlayableCreate(Playable playable) {} + + /// + /// This function is called when the Playable that owns the PlayableBehaviour is destroyed. + /// + /// The Playable that owns the current PlayableBehaviour. + public virtual void OnPlayableDestroy(Playable playable) {} + + /// + /// This function is called when the Playable play state is changed to Playables.PlayState.Playing. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public virtual void OnBehaviourPlay(Playable playable, FrameData info) {} + + /// + /// This function is called when the Playable play state is changed to Playables.PlayState.Paused. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public virtual void OnBehaviourPause(Playable playable, FrameData info) {} + + /// + /// This function is called during the PrepareFrame phase of the PlayableGraph. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public virtual void PrepareFrame(Playable playable, FrameData info) {} + + /// + /// This function is called during the ProcessFrame phase of the PlayableGraph. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + /// The user data of the ScriptPlayableOutput that initiated the process pass. + public virtual void ProcessFrame(Playable playable, FrameData info, object playerData) {} + + /// + /// Implement this method to have your asset inject playables into the given graph. + /// + /// The graph to inject playables into. + /// The game object which initiated the build. + /// The playable injected into the graph, or the root playable if multiple playables are injected. + public virtual Playable CreatePlayable(PlayableGraph graph, GameObject owner) + { + return ScriptPlayable.Create(graph, this); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs.meta new file mode 100644 index 0000000..414366e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/BasicScriptPlayable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fe03a7b0ba57a4d488b6c327ae16c335 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/DirectorControlPlayable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/DirectorControlPlayable.cs new file mode 100644 index 0000000..e619617 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/DirectorControlPlayable.cs @@ -0,0 +1,206 @@ +using System; +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Playable Behaviour used to control a PlayableDirector. + /// + /// + /// This playable is used to control other PlayableDirector components from a Timeline sequence. + /// + public class DirectorControlPlayable : PlayableBehaviour + { + /// + /// The PlayableDirector being controlled by this PlayableBehaviour + /// + public PlayableDirector director; + + private bool m_SyncTime = false; + + private double m_AssetDuration = double.MaxValue; + + /// + /// Creates a Playable with a DirectorControlPlayable attached + /// + /// The graph to inject the playable into + /// The director to control + /// Returns a Playable with a DirectorControlPlayable attached + public static ScriptPlayable Create(PlayableGraph graph, PlayableDirector director) + { + if (director == null) + return ScriptPlayable.Null; + + var handle = ScriptPlayable.Create(graph); + handle.GetBehaviour().director = director; + +#if UNITY_EDITOR + if (!Application.isPlaying && UnityEditor.PrefabUtility.IsPartOfPrefabInstance(director)) + UnityEditor.PrefabUtility.prefabInstanceUpdated += handle.GetBehaviour().OnPrefabUpdated; +#endif + + return handle; + } + + public override void OnPlayableDestroy(Playable playable) + { +#if UNITY_EDITOR + if (!Application.isPlaying) + UnityEditor.PrefabUtility.prefabInstanceUpdated -= OnPrefabUpdated; +#endif + if (director != null && director.playableAsset != null) + director.Stop(); + } + + /// + /// This function is called during the PrepareFrame phase of the PlayableGraph. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public override void PrepareFrame(Playable playable, FrameData info) + { + if (director == null || !director.isActiveAndEnabled || director.playableAsset == null) + return; + + // resync the time on an evaluate or a time jump (caused by loops, or some setTime calls) + m_SyncTime |= (info.evaluationType == FrameData.EvaluationType.Evaluate) || + DetectDiscontinuity(playable, info); + + SyncSpeed(info.effectiveSpeed); + SyncPlayState(playable.GetGraph(), playable.GetTime()); + } + + /// + /// This function is called when the Playable play state is changed to Playables.PlayState.Playing. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public override void OnBehaviourPlay(Playable playable, FrameData info) + { + m_SyncTime = true; + + if (director != null && director.playableAsset != null) + m_AssetDuration = director.playableAsset.duration; + } + + /// + /// This function is called when the Playable play state is changed to PlayState.Paused. + /// + /// The playable this behaviour is attached to. + /// A FrameData structure that contains information about the current frame context. + public override void OnBehaviourPause(Playable playable, FrameData info) + { + if (director != null && director.playableAsset != null) + { + if (info.effectivePlayState == PlayState.Playing) // graph was paused + director.Pause(); + else + director.Stop(); + } + } + + /// + /// This function is called during the ProcessFrame phase of the PlayableGraph. + /// + /// The playable this behaviour is attached to. + /// A FrameData structure that contains information about the current frame context. + /// unused + public override void ProcessFrame(Playable playable, FrameData info, object playerData) + { + if (director == null || !director.isActiveAndEnabled || director.playableAsset == null) + return; + + if (m_SyncTime || DetectOutOfSync(playable)) + { + UpdateTime(playable); + director.Evaluate(); + } + + m_SyncTime = false; + } + +#if UNITY_EDITOR + void OnPrefabUpdated(GameObject go) + { + // When the prefab asset is updated, we rebuild the graph to reflect the changes in editor + if (UnityEditor.PrefabUtility.GetRootGameObject(director) == go) + director.RebuildGraph(); + } + +#endif + + void SyncSpeed(double speed) + { + if (director.playableGraph.IsValid()) + { + int roots = director.playableGraph.GetRootPlayableCount(); + for (int i = 0; i < roots; i++) + { + var rootPlayable = director.playableGraph.GetRootPlayable(i); + if (rootPlayable.IsValid()) + { + rootPlayable.SetSpeed(speed); + } + } + } + } + + void SyncPlayState(PlayableGraph graph, double playableTime) + { + bool expectedFinished = (playableTime >= m_AssetDuration) && director.extrapolationMode == DirectorWrapMode.None; + if (graph.IsPlaying() && !expectedFinished) + director.Play(); + else + director.Pause(); + } + + bool DetectDiscontinuity(Playable playable, FrameData info) + { + return Math.Abs(playable.GetTime() - playable.GetPreviousTime() - info.m_DeltaTime * info.m_EffectiveSpeed) > DiscreteTime.tickValue; + } + + bool DetectOutOfSync(Playable playable) + { + double expectedTime = playable.GetTime(); + if (playable.GetTime() >= m_AssetDuration) + { + if (director.extrapolationMode == DirectorWrapMode.None) + return false; + else if (director.extrapolationMode == DirectorWrapMode.Hold) + expectedTime = m_AssetDuration; + else if (m_AssetDuration > float.Epsilon) // loop + expectedTime = expectedTime % m_AssetDuration; + } + + if (!Mathf.Approximately((float)expectedTime, (float)director.time)) + { +#if UNITY_EDITOR + double lastDelta = playable.GetTime() - playable.GetPreviousTime(); + if (UnityEditor.Unsupported.IsDeveloperBuild()) + Debug.LogWarningFormat("Internal Warning - Control track desync detected on {2} ({0:F10} vs {1:F10} with delta {3:F10}). Time will be resynchronized. Known to happen with nested control tracks", playable.GetTime(), director.time, director.name, lastDelta); +#endif + return true; + } + return false; + } + + // We need to handle loop modes explicitly since we are setting the time directly + void UpdateTime(Playable playable) + { + double duration = Math.Max(0.1, director.playableAsset.duration); + switch (director.extrapolationMode) + { + case DirectorWrapMode.Hold: + director.time = Math.Min(duration, Math.Max(0, playable.GetTime())); + break; + case DirectorWrapMode.Loop: + director.time = Math.Max(0, playable.GetTime() % duration); + break; + case DirectorWrapMode.None: + director.time = playable.GetTime(); + break; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/DirectorControlPlayable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/DirectorControlPlayable.cs.meta new file mode 100644 index 0000000..5f71a6f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/DirectorControlPlayable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: be156cc527d606b4aaac403e9843186e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ITimeControl.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ITimeControl.cs new file mode 100644 index 0000000..5d986ae --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ITimeControl.cs @@ -0,0 +1,27 @@ +namespace UnityEngine.Timeline +{ + /// + /// Interface that can be implemented by MonoBehaviours indicating that they receive time-related control calls from a PlayableGraph. + /// + /// + /// Implementing this interface on MonoBehaviours attached to GameObjects under control by control-tracks will cause them to be notified when associated Timeline clips are active. + /// + public interface ITimeControl + { + /// + /// Called each frame the Timeline clip is active. + /// + /// The local time of the associated Timeline clip. + void SetTime(double time); + + /// + /// Called when the associated Timeline clip becomes active. + /// + void OnControlTimeStart(); + + /// + /// Called when the associated Timeline clip becomes deactivated. + /// + void OnControlTimeStop(); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ITimeControl.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ITimeControl.cs.meta new file mode 100644 index 0000000..8d4a953 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ITimeControl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5415c904c4fbc3e498253bc2866b37cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/NotificationFlags.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/NotificationFlags.cs new file mode 100644 index 0000000..a83fc8b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/NotificationFlags.cs @@ -0,0 +1,31 @@ +using System; + +namespace UnityEngine.Timeline +{ + /// + /// Use these flags to specify the notification behaviour. + /// + /// + [Flags] + [Serializable] + public enum NotificationFlags : short + { + /// + /// Use this flag to send the notification in Edit Mode. + /// + /// + /// Sent on discontinuous jumps in time. + /// + TriggerInEditMode = 1 << 0, + + /// + /// Use this flag to send the notification if playback starts after the notification time. + /// + Retroactive = 1 << 1, + + /// + /// Use this flag to send the notification only once when looping. + /// + TriggerOnce = 1 << 2, + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/NotificationFlags.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/NotificationFlags.cs.meta new file mode 100644 index 0000000..4eae696 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/NotificationFlags.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 983c76d87fb6f4f4597a526a4b2b5fd7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ParticleControlPlayable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ParticleControlPlayable.cs new file mode 100644 index 0000000..a513d7c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ParticleControlPlayable.cs @@ -0,0 +1,177 @@ +using System; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Playable that synchronizes a particle system simulation. + /// + public class ParticleControlPlayable : PlayableBehaviour + { + const float kUnsetTime = -1; + float m_LastTime = kUnsetTime; + uint m_RandomSeed = 1; + + // particleSystem.time can not be relied on for an accurate time. It does not advance until a delta threshold is reached(fixedUpdate) and until the start delay has elapsed. + float m_SystemTime; + + /// + /// Creates a Playable with a ParticleControlPlayable behaviour attached + /// + /// The PlayableGraph to inject the Playable into. + /// The particle systtem to control + /// A random seed to use for particle simulation + /// Returns the created Playable. + public static ScriptPlayable Create(PlayableGraph graph, ParticleSystem component, uint randomSeed) + { + if (component == null) + return ScriptPlayable.Null; + + var handle = ScriptPlayable.Create(graph); + handle.GetBehaviour().Initialize(component, randomSeed); + return handle; + } + + /// + /// The particle system to control + /// + public ParticleSystem particleSystem { get; private set; } + + /// + /// Initializes the behaviour with a particle system and random seed. + /// + /// + /// + public void Initialize(ParticleSystem ps, uint randomSeed) + { + m_RandomSeed = Math.Max(1, randomSeed); + particleSystem = ps; + m_SystemTime = 0; + SetRandomSeed(); + + #if UNITY_EDITOR + if (!Application.isPlaying && UnityEditor.PrefabUtility.IsPartOfPrefabInstance(ps)) + UnityEditor.PrefabUtility.prefabInstanceUpdated += OnPrefabUpdated; + #endif + } + + #if UNITY_EDITOR + /// + /// This function is called when the Playable that owns the PlayableBehaviour is destroyed. + /// + /// The playable this behaviour is attached to. + public override void OnPlayableDestroy(Playable playable) + { + if (!Application.isPlaying) + UnityEditor.PrefabUtility.prefabInstanceUpdated -= OnPrefabUpdated; + } + + void OnPrefabUpdated(GameObject go) + { + // When the instance is updated from, this will cause the next evaluate to resimulate. + if (UnityEditor.PrefabUtility.GetRootGameObject(particleSystem) == go) + m_LastTime = kUnsetTime; + } + + #endif + + void SetRandomSeed() + { + particleSystem.Stop(true, ParticleSystemStopBehavior.StopEmittingAndClear); + var systems = particleSystem.gameObject.GetComponentsInChildren(); + uint seed = m_RandomSeed; + foreach (var ps in systems) + { + // don't overwrite user set random seeds + if (ps.useAutoRandomSeed) + { + ps.useAutoRandomSeed = false; + ps.randomSeed = seed; + seed++; + } + } + } + + /// + /// This function is called during the PrepareFrame phase of the PlayableGraph. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public override void PrepareFrame(Playable playable, FrameData data) + { + if (particleSystem == null || !particleSystem.gameObject.activeInHierarchy) + return; + + float localTime = (float)playable.GetTime(); + bool shouldUpdate = Mathf.Approximately(m_LastTime, kUnsetTime) || + !Mathf.Approximately(m_LastTime, localTime); + if (shouldUpdate) + { + float epsilon = Time.fixedDeltaTime * 0.5f; + float simTime = localTime; + float expectedDelta = simTime - m_LastTime; + + // The first iteration includes the start delay. Evaluate(particleSystem.randomSeed) is how the particle system generates the random value internally. + float startDelay = particleSystem.main.startDelay.Evaluate(particleSystem.randomSeed); + float particleSystemDurationLoop0 = particleSystem.main.duration + startDelay; + + // The particle system time does not include the start delay so we need to remove this for our own system time. + float expectedSystemTime = simTime > particleSystemDurationLoop0 ? m_SystemTime : m_SystemTime - startDelay; + + // if it's not looping, then the system time won't advance past the end of the duration + if (!particleSystem.main.loop) + expectedSystemTime = Math.Min(expectedSystemTime, particleSystem.main.duration); + + + // conditions for restart + bool restart = (simTime < m_LastTime) || // time went backwards + (simTime < epsilon) || // time is set to 0 + Mathf.Approximately(m_LastTime, kUnsetTime) || // object disabled + (expectedDelta > particleSystem.main.duration) || // large jump (bug workaround) + !(Mathf.Abs(expectedSystemTime - particleSystem.time) < Time.maximumParticleDeltaTime); // particle system isn't where we left it + if (restart) + { + // work around for a bug where simulate(simTime, true, true) doesn't work on loops + particleSystem.Simulate(0, true, true); + particleSystem.Simulate(simTime, true, false); + m_SystemTime = simTime; + } + else + { + // ps.time will wrap, so we need to account for that in computing delta time + float particleSystemDuration = simTime > particleSystemDurationLoop0 ? particleSystem.main.duration : particleSystemDurationLoop0; + float fracTime = simTime % particleSystemDuration; + float deltaTime = fracTime - m_SystemTime; + + if (deltaTime < -epsilon) // detect wrapping of ps.time + deltaTime = fracTime + particleSystemDurationLoop0 - m_SystemTime; + + particleSystem.Simulate(deltaTime, true, false); + m_SystemTime += deltaTime; + } + + m_LastTime = localTime; + } + } + + /// + /// This function is called when the Playable play state is changed to Playables.PlayState.Playing. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public override void OnBehaviourPlay(Playable playable, FrameData info) + { + m_LastTime = kUnsetTime; + } + + /// + /// This function is called when the Playable play state is changed to PlayState.Paused. + /// + /// The playable this behaviour is attached to. + /// A FrameData structure that contains information about the current frame context. + public override void OnBehaviourPause(Playable playable, FrameData info) + { + m_LastTime = kUnsetTime; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ParticleControlPlayable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ParticleControlPlayable.cs.meta new file mode 100644 index 0000000..33db5b9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/ParticleControlPlayable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f603edd7163537f44927ad2808147a25 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/PrefabControlPlayable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/PrefabControlPlayable.cs new file mode 100644 index 0000000..f84c9ff --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/PrefabControlPlayable.cs @@ -0,0 +1,158 @@ +using System; +using UnityEngine.Playables; +using UnityEngine.SceneManagement; + +namespace UnityEngine.Timeline +{ + /// + /// Playable that controls and instantiates a Prefab. + /// + public class PrefabControlPlayable : PlayableBehaviour + { + GameObject m_Instance; + +#if UNITY_EDITOR + private bool m_IsActiveCached; +#endif + + /// + /// Creates a Playable with a PrefabControlPlayable behaviour attached + /// + /// The PlayableGraph to inject the Playable into. + /// The prefab to instantiate from + /// Transform to parent instance to. Can be null. + /// Returns a Playabe with PrefabControlPlayable behaviour attached. + public static ScriptPlayable Create(PlayableGraph graph, GameObject prefabGameObject, Transform parentTransform) + { + if (prefabGameObject == null) + return ScriptPlayable.Null; + + var handle = ScriptPlayable.Create(graph); + handle.GetBehaviour().Initialize(prefabGameObject, parentTransform); + return handle; + } + + /// + /// The instance of the prefab created by this behaviour + /// + public GameObject prefabInstance + { + get { return m_Instance; } + } + + /// + /// Initializes the behaviour with a prefab and parent transform + /// + /// The prefab to instantiate from + /// Transform to parent instance to. Can be null. + /// The created instance + public GameObject Initialize(GameObject prefabGameObject, Transform parentTransform) + { + if (prefabGameObject == null) + throw new ArgumentNullException("Prefab cannot be null"); + + if (m_Instance != null) + { + Debug.LogWarningFormat("Prefab Control Playable ({0}) has already been initialized with a Prefab ({1}).", prefabGameObject.name, m_Instance.name); + } + else + { + #if UNITY_EDITOR + if (!Application.isPlaying) + { + m_Instance = (GameObject)UnityEditor.PrefabUtility.InstantiatePrefab(prefabGameObject, parentTransform); + UnityEditor.PrefabUtility.prefabInstanceUpdated += OnPrefabUpdated; + } + else + #endif + { + m_Instance = Object.Instantiate(prefabGameObject, parentTransform, false); + } + m_Instance.name = prefabGameObject.name + " [Timeline]"; + m_Instance.SetActive(false); + SetHideFlagsRecursive(m_Instance); + } + return m_Instance; + } + + /// + /// This function is called when the Playable that owns the PlayableBehaviour is destroyed. + /// + /// The playable this behaviour is attached to. + public override void OnPlayableDestroy(Playable playable) + { + if (m_Instance) + { + if (Application.isPlaying) + Object.Destroy(m_Instance); + else + Object.DestroyImmediate(m_Instance); + } + +#if UNITY_EDITOR + UnityEditor.PrefabUtility.prefabInstanceUpdated -= OnPrefabUpdated; +#endif + } + + /// + /// This function is called when the Playable play state is changed to Playables.PlayState.Playing. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public override void OnBehaviourPlay(Playable playable, FrameData info) + { + if (m_Instance == null) + return; + + m_Instance.SetActive(true); + +#if UNITY_EDITOR + m_IsActiveCached = true; +#endif + } + + /// + /// This function is called when the Playable play state is changed to PlayState.Paused. + /// + /// The playable this behaviour is attached to. + /// A FrameData structure that contains information about the current frame context. + public override void OnBehaviourPause(Playable playable, FrameData info) + { + // OnBehaviourPause can be called if the graph is stopped for a variety of reasons + // the effectivePlayState will test if the pause is due to the clip being out of bounds + if (m_Instance != null && info.effectivePlayState == PlayState.Paused) + { + m_Instance.SetActive(false); +#if UNITY_EDITOR + m_IsActiveCached = false; +#endif + } + } + +#if UNITY_EDITOR + void OnPrefabUpdated(GameObject go) + { + if (go == m_Instance) + { + SetHideFlagsRecursive(go); + go.SetActive(m_IsActiveCached); + } + } + +#endif + + static void SetHideFlagsRecursive(GameObject gameObject) + { + if (gameObject == null) + return; + + gameObject.hideFlags = HideFlags.DontSaveInBuild | HideFlags.DontSaveInEditor; + if (!Application.isPlaying) + gameObject.hideFlags |= HideFlags.HideInHierarchy; + foreach (Transform child in gameObject.transform) + { + SetHideFlagsRecursive(child.gameObject); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/PrefabControlPlayable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/PrefabControlPlayable.cs.meta new file mode 100644 index 0000000..c148dc2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/PrefabControlPlayable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 439c018cf4619e94d9a92110ce0aa188 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeControlPlayable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeControlPlayable.cs new file mode 100644 index 0000000..68ec80d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeControlPlayable.cs @@ -0,0 +1,85 @@ +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// A PlayableBehaviour that manages a component that implements the ITimeControl interface + /// + public class TimeControlPlayable : PlayableBehaviour + { + ITimeControl m_timeControl; + + bool m_started; + + /// + /// Creates a Playable with a TimeControlPlayable behaviour attached + /// + /// The PlayableGraph to inject the Playable into. + /// + /// + public static ScriptPlayable Create(PlayableGraph graph, ITimeControl timeControl) + { + if (timeControl == null) + return ScriptPlayable.Null; + + var handle = ScriptPlayable.Create(graph); + handle.GetBehaviour().Initialize(timeControl); + return handle; + } + + /// + /// Initializes the behaviour + /// + /// Component that implements the ITimeControl interface + public void Initialize(ITimeControl timeControl) + { + m_timeControl = timeControl; + } + + /// + /// This function is called during the PrepareFrame phase of the PlayableGraph. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public override void PrepareFrame(Playable playable, FrameData info) + { + Debug.Assert(m_started, "PrepareFrame has been called without OnControlTimeStart being called first."); + if (m_timeControl != null) + m_timeControl.SetTime(playable.GetTime()); + } + + /// + /// This function is called when the Playable play state is changed to Playables.PlayState.Playing. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public override void OnBehaviourPlay(Playable playable, FrameData info) + { + if (m_timeControl == null) + return; + + if (!m_started) + { + m_timeControl.OnControlTimeStart(); + m_started = true; + } + } + + /// + /// This function is called when the Playable play state is changed to PlayState.Paused. + /// + /// The playable this behaviour is attached to. + /// A FrameData structure that contains information about the current frame context. + public override void OnBehaviourPause(Playable playable, FrameData info) + { + if (m_timeControl == null) + return; + + if (m_started) + { + m_timeControl.OnControlTimeStop(); + m_started = false; + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeControlPlayable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeControlPlayable.cs.meta new file mode 100644 index 0000000..5ce09ad --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeControlPlayable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1db879070d9a45f4c86cdf5e59616df5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeNotificationBehaviour.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeNotificationBehaviour.cs new file mode 100644 index 0000000..66a31d1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeNotificationBehaviour.cs @@ -0,0 +1,254 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Use this PlayableBehaviour to send notifications at a given time. + /// + /// + public class TimeNotificationBehaviour : PlayableBehaviour + { + struct NotificationEntry + { + public double time; + public INotification payload; + public bool notificationFired; + public NotificationFlags flags; + + public bool triggerInEditor + { + get { return (flags & NotificationFlags.TriggerInEditMode) != 0; } + } + public bool prewarm + { + get { return (flags & NotificationFlags.Retroactive) != 0; } + } + public bool triggerOnce + { + get { return (flags & NotificationFlags.TriggerOnce) != 0; } + } + } + + readonly List m_Notifications = new List(); + double m_PreviousTime; + bool m_NeedSortNotifications; + + Playable m_TimeSource; + + /// + /// Sets an optional Playable that provides duration and Wrap mode information. + /// + /// + /// timeSource is optional. By default, the duration and Wrap mode will come from the current Playable. + /// + public Playable timeSource + { + set { m_TimeSource = value; } + } + + /// + /// Creates and initializes a ScriptPlayable with a TimeNotificationBehaviour. + /// + /// The playable graph. + /// The duration of the playable. + /// The loop mode of the playable. + /// A new TimeNotificationBehaviour linked to the PlayableGraph. + public static ScriptPlayable Create(PlayableGraph graph, double duration, DirectorWrapMode loopMode) + { + var notificationsPlayable = ScriptPlayable.Create(graph); + notificationsPlayable.SetDuration(duration); + notificationsPlayable.SetTimeWrapMode(loopMode); + notificationsPlayable.SetPropagateSetTime(true); + return notificationsPlayable; + } + + /// + /// Adds a notification to be sent with flags, at a specific time. + /// + /// The time to send the notification. + /// The notification. + /// The notification flags that determine the notification behaviour. This parameter is set to Retroactive by default. + /// + public void AddNotification(double time, INotification payload, NotificationFlags flags = NotificationFlags.Retroactive) + { + m_Notifications.Add(new NotificationEntry + { + time = time, + payload = payload, + flags = flags + }); + m_NeedSortNotifications = true; + } + + /// + /// This method is called when the PlayableGraph that owns this PlayableBehaviour starts. + /// + /// The reference to the playable associated with this PlayableBehaviour. + public override void OnGraphStart(Playable playable) + { + SortNotifications(); + for (var i = 0; i < m_Notifications.Count; i++) + { + var notification = m_Notifications[i]; + notification.notificationFired = false; + m_Notifications[i] = notification; + } + + m_PreviousTime = playable.GetTime(); + } + + /// + /// This method is called when the Playable play state is changed to PlayState.Paused + /// + /// The reference to the playable associated with this PlayableBehaviour. + /// Playable context information such as weight, evaluationType, and so on. + public override void OnBehaviourPause(Playable playable, FrameData info) + { + if (playable.IsDone()) + { + SortNotifications(); + for (var i = 0; i < m_Notifications.Count; i++) + { + var e = m_Notifications[i]; + if (!e.notificationFired) + { + var duration = playable.GetDuration(); + var canTrigger = m_PreviousTime <= e.time && e.time <= duration; + if (canTrigger) + { + Trigger_internal(playable, info.output, ref e); + m_Notifications[i] = e; + } + } + } + } + } + + /// + /// This method is called during the PrepareFrame phase of the PlayableGraph. + /// + /// + /// Called once before processing starts. + /// + /// The reference to the playable associated with this PlayableBehaviour. + /// Playable context information such as weight, evaluationType, and so on. + public override void PrepareFrame(Playable playable, FrameData info) + { + // Never trigger on scrub + if (info.evaluationType == FrameData.EvaluationType.Evaluate) + { + return; + } + + SyncDurationWithExternalSource(playable); + SortNotifications(); + var currentTime = playable.GetTime(); + + // Fire notifications from previousTime till the end + if (info.timeLooped) + { + var duration = playable.GetDuration(); + TriggerNotificationsInRange(m_PreviousTime, duration, info, playable, true); + var dx = playable.GetDuration() - m_PreviousTime; + var nFullTimelines = (int)((info.deltaTime * info.effectiveSpeed - dx) / playable.GetDuration()); + for (var i = 0; i < nFullTimelines; i++) + { + TriggerNotificationsInRange(0, duration, info, playable, false); + } + TriggerNotificationsInRange(0, currentTime, info, playable, false); + } + else + { + var pt = playable.GetTime(); + TriggerNotificationsInRange(m_PreviousTime, pt, info, + playable, true); + } + + for (var i = 0; i < m_Notifications.Count; ++i) + { + var e = m_Notifications[i]; + if (e.notificationFired && CanRestoreNotification(e, info, currentTime, m_PreviousTime)) + { + Restore_internal(ref e); + m_Notifications[i] = e; + } + } + + m_PreviousTime = playable.GetTime(); + } + + void SortNotifications() + { + if (m_NeedSortNotifications) + { + m_Notifications.Sort((x, y) => x.time.CompareTo(y.time)); + m_NeedSortNotifications = false; + } + } + + static bool CanRestoreNotification(NotificationEntry e, FrameData info, double currentTime, double previousTime) + { + if (e.triggerOnce) + return false; + if (info.timeLooped) + return true; + + //case 1111595: restore the notification if the time is manually set before it + return previousTime > currentTime && currentTime <= e.time; + } + + void TriggerNotificationsInRange(double start, double end, FrameData info, Playable playable, bool checkState) + { + if (start <= end) + { + var playMode = Application.isPlaying; + for (var i = 0; i < m_Notifications.Count; i++) + { + var e = m_Notifications[i]; + if (e.notificationFired && (checkState || e.triggerOnce)) + continue; + + var notificationTime = e.time; + if (e.prewarm && notificationTime < end && (e.triggerInEditor || playMode)) + { + Trigger_internal(playable, info.output, ref e); + m_Notifications[i] = e; + } + else + { + if (notificationTime < start || notificationTime > end) + continue; + + if (e.triggerInEditor || playMode) + { + Trigger_internal(playable, info.output, ref e); + m_Notifications[i] = e; + } + } + } + } + } + + void SyncDurationWithExternalSource(Playable playable) + { + if (m_TimeSource.IsValid()) + { + playable.SetDuration(m_TimeSource.GetDuration()); + playable.SetTimeWrapMode(m_TimeSource.GetTimeWrapMode()); + } + } + + static void Trigger_internal(Playable playable, PlayableOutput output, ref NotificationEntry e) + { + output.PushNotification(playable, e.payload); + e.notificationFired = true; + } + + static void Restore_internal(ref NotificationEntry e) + { + e.notificationFired = false; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeNotificationBehaviour.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeNotificationBehaviour.cs.meta new file mode 100644 index 0000000..593b6c2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Playables/TimeNotificationBehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: afeb55855d7a63b45ba6f8bd97599202 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties.meta new file mode 100644 index 0000000..d06db75 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ff97302ee78d6ad478b433ec557ee303 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties/AssemblyInfo.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1eaacad --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("UnityEngine.Timeline")] +[assembly: AssemblyDescription("Unity Timeline")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Unity Technologies")] +[assembly: AssemblyProduct("UnityEngine.Timeline")] +[assembly: AssemblyCopyright("Copyright � 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: InternalsVisibleTo("Unity.Timeline.Editor")] +[assembly: ComVisible(false)] +#if UNITY_EDITOR // RuntimeEditor version +[assembly: Guid("844F8153-91DB-42D4-9455-CBF1A7BFC434")] +#else // Runtime version +[assembly: Guid("6A10B290-9283-487F-913B-00D94CD3FAF5")] +#endif +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: InternalsVisibleTo("Assembly-CSharp-testable")] +[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")] +[assembly: InternalsVisibleTo("Unity.Timeline.EditorTests")] +[assembly: InternalsVisibleTo("Unity.Timeline.Tests")] +[assembly: InternalsVisibleTo("Unity.Timeline.Tests.Common")] +[assembly: InternalsVisibleTo("Unity.Timeline.Tests.Performance")] +[assembly: InternalsVisibleTo("Unity.Timeline.Tests.Performance.Editor")] diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties/AssemblyInfo.cs.meta new file mode 100644 index 0000000..01b8128 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Properties/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0bb74b1c097396c49b1691e6a938f814 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting.meta new file mode 100644 index 0000000..fe679ff --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bdb4f6935641b574b984da8dc27cab45 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting/PlayableTrack.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting/PlayableTrack.cs new file mode 100644 index 0000000..e785cbf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting/PlayableTrack.cs @@ -0,0 +1,23 @@ +using System; +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// A PlayableTrack is a track whose clips are custom playables. + /// + /// + /// This is a track that can contain PlayableAssets that are found in the project and do not have their own specified track type. + /// + [Serializable] + public class PlayableTrack : TrackAsset + { + /// + protected override void OnCreateClip(TimelineClip clip) + { + if (clip.asset != null) + clip.displayName = clip.asset.GetType().Name; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting/PlayableTrack.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting/PlayableTrack.cs.meta new file mode 100644 index 0000000..0129ea2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Scripting/PlayableTrack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 82cd92ffc29383742932b27ca414c80f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Timeline.deprecated.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Timeline.deprecated.cs new file mode 100644 index 0000000..ac2b4c2 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Timeline.deprecated.cs @@ -0,0 +1,34 @@ +using System; +using UnityEngine; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + public partial class TimelineAsset + { + [Obsolete("MediaType has been deprecated. It is no longer required, and will be removed in a future release.", false)] + public enum MediaType + { + Animation, + Audio, + Texture = 2, + [Obsolete("Use Texture MediaType instead. (UnityUpgradable) -> UnityEngine.Timeline.TimelineAsset/MediaType.Texture", false)] Video = 2, + Script, + Hybrid, + Group + } + } + + // Defines the type of a track + [AttributeUsage(AttributeTargets.Class)] + [Obsolete("TrackMediaType has been deprecated. It is no longer required, and will be removed in a future release.", false)] + public class TrackMediaType : Attribute + { + public readonly TimelineAsset.MediaType m_MediaType; + + public TrackMediaType(TimelineAsset.MediaType mt) + { + m_MediaType = mt; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Timeline.deprecated.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Timeline.deprecated.cs.meta new file mode 100644 index 0000000..cd16af0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Timeline.deprecated.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7748a1d3701ac824ea7f366ba0388f5d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset.cs new file mode 100644 index 0000000..ca2572e --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset.cs @@ -0,0 +1,455 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// A PlayableAsset that represents a timeline. + /// + [ExcludeFromPreset] + [Serializable] + public partial class TimelineAsset : PlayableAsset, ISerializationCallbackReceiver, ITimelineClipAsset, IPropertyPreview + { + /// + /// How the duration of the timeline is determined. + /// + public enum DurationMode + { + /// + /// The duration of the timeline is determined based on the clips present. + /// + BasedOnClips, + /// + /// The duration of the timeline is a fixed length. + /// + FixedLength + } + + /// + /// Properties of the timeline that are used by the editor + /// + [Serializable] + public class EditorSettings + { + internal static readonly float kMinFps = (float)TimeUtility.kFrameRateEpsilon; + internal static readonly float kMaxFps = 1000.0f; + internal static readonly float kDefaultFps = 60.0f; + [HideInInspector, SerializeField] float m_Framerate = kDefaultFps; + + /// + /// The frames per second used for snapping and time ruler display + /// + public float fps + { + get + { + return m_Framerate; + } + set + { + m_Framerate = GetValidFramerate(value); + } + } + } + + [HideInInspector, SerializeField] List m_Tracks; + [HideInInspector, SerializeField] double m_FixedDuration; // only applied if duration mode is Fixed + [HideInInspector, NonSerialized] TrackAsset[] m_CacheOutputTracks; + [HideInInspector, NonSerialized] List m_CacheRootTracks; + [HideInInspector, NonSerialized] List m_CacheFlattenedTracks; + [HideInInspector, SerializeField] EditorSettings m_EditorSettings = new EditorSettings(); + [SerializeField] DurationMode m_DurationMode; + + [HideInInspector, SerializeField] MarkerTrack m_MarkerTrack; + + /// + /// Settings used by timeline for editing purposes + /// + public EditorSettings editorSettings + { + get { return m_EditorSettings; } + } + + /// + /// The length, in seconds, of the timeline + /// + public override double duration + { + get + { + // @todo cache this value when rebuilt + if (m_DurationMode == DurationMode.BasedOnClips) + return CalculateDuration(); + + return m_FixedDuration; + } + } + + /// + /// The length of the timeline when durationMode is set to fixed length. + /// + public double fixedDuration + { + get + { + DiscreteTime discreteDuration = (DiscreteTime)m_FixedDuration; + if (discreteDuration <= 0) + return 0.0; + + //avoid having no clip evaluated at the end by removing a tick from the total duration + return (double)discreteDuration.OneTickBefore(); + } + set { m_FixedDuration = Math.Max(0.0, value); } + } + + /// + /// The mode used to determine the duration of the Timeline + /// + public DurationMode durationMode + { + get { return m_DurationMode; } + set { m_DurationMode = value; } + } + + /// + /// A description of the PlayableOutputs that will be created by the timeline when instantiated. + /// + /// + /// Each track will create an PlayableOutput + /// + public override IEnumerable outputs + { + get + { + foreach (var outputTracks in GetOutputTracks()) + foreach (var output in outputTracks.outputs) + yield return output; + } + } + + public ClipCaps clipCaps + { + get + { + var caps = ClipCaps.All; + foreach (var track in GetRootTracks()) + { + foreach (var clip in track.clips) + caps &= clip.clipCaps; + } + return caps; + } + } + + /// + /// Returns the the number of output tracks in the Timeline. + /// + /// + /// An output track is a track the generates a PlayableOutput. In general, an output track is any track that is not a GroupTrack, a subtrack, or override track. + /// + public int outputTrackCount + { + get + { + UpdateOutputTrackCache(); // updates the cache if necessary + return m_CacheOutputTracks.Length; + } + } + + /// + /// Returns the number of tracks at the root level of the timeline. + /// + /// + /// A root track refers to all tracks that occur at the root of the timeline. These are the outmost level GroupTracks, and output tracks that do not belong to any group + /// + public int rootTrackCount + { + get + { + UpdateRootTrackCache(); + return m_CacheRootTracks.Count; + } + } + + void OnValidate() + { + editorSettings.fps = GetValidFramerate(editorSettings.fps); + } + + static float GetValidFramerate(float framerate) + { + return Mathf.Clamp(framerate, EditorSettings.kMinFps, EditorSettings.kMaxFps); + } + + /// + /// Retrieves at root track at the specified index. + /// + /// Index of the root track to get. Must be between 0 and rootTrackCount + /// + /// A root track refers to all tracks that occur at the root of the timeline. These are the outmost level GroupTracks, and output tracks that do not belong to any group. + /// + public TrackAsset GetRootTrack(int index) + { + UpdateRootTrackCache(); + return m_CacheRootTracks[index]; + } + + /// + /// Get an enumerable list of all root tracks. + /// + /// An IEnumerable of all root tracks. + /// A root track refers to all tracks that occur at the root of the timeline. These are the outmost level GroupTracks, and output tracks that do not belong to any group. + public IEnumerable GetRootTracks() + { + UpdateRootTrackCache(); + return m_CacheRootTracks; + } + + /// + /// Retrives the output track from the given index. + /// + /// Index of the output track to retrieve. Must be between 0 and outputTrackCount + /// The output track from the given index + public TrackAsset GetOutputTrack(int index) + { + UpdateOutputTrackCache(); + return m_CacheOutputTracks[index]; + } + + /// + /// Gets a list of all output tracks in the Timeline. + /// + /// An IEnumerable of all output tracks + /// + /// An output track is a track the generates a PlayableOutput. In general, an output track is any track that is not a GroupTrack or subtrack. + /// + public IEnumerable GetOutputTracks() + { + UpdateOutputTrackCache(); + return m_CacheOutputTracks; + } + + void UpdateRootTrackCache() + { + if (m_CacheRootTracks == null) + { + if (m_Tracks == null) + m_CacheRootTracks = new List(); + else + { + m_CacheRootTracks = new List(m_Tracks.Count); + if (markerTrack != null) + { + m_CacheRootTracks.Add(markerTrack); + } + + foreach (var t in m_Tracks) + { + var trackAsset = t as TrackAsset; + if (trackAsset != null) + m_CacheRootTracks.Add(trackAsset); + } + } + } + } + + void UpdateOutputTrackCache() + { + if (m_CacheOutputTracks == null) + { + var outputTracks = new List(); + foreach (var flattenedTrack in flattenedTracks) + { + if (flattenedTrack != null && flattenedTrack.GetType() != typeof(GroupTrack) && !flattenedTrack.isSubTrack) + outputTracks.Add(flattenedTrack); + } + m_CacheOutputTracks = outputTracks.ToArray(); + } + } + + internal IEnumerable flattenedTracks + { + get + { + if (m_CacheFlattenedTracks == null) + { + m_CacheFlattenedTracks = new List(m_Tracks.Count * 2); + UpdateRootTrackCache(); + + m_CacheFlattenedTracks.AddRange(m_CacheRootTracks); + for (int i = 0; i < m_CacheRootTracks.Count; i++) + { + AddSubTracksRecursive(m_CacheRootTracks[i], ref m_CacheFlattenedTracks); + } + } + return m_CacheFlattenedTracks; + } + } + + /// + /// Gets the marker track for this TimelineAsset. + /// + /// Returns the marker track. + /// + /// Use to get a list of the markers on the returned track. + /// + public MarkerTrack markerTrack + { + get { return m_MarkerTrack; } + } + + // access to the track list as scriptable object + internal List trackObjects + { + get { return m_Tracks; } + } + + internal void AddTrackInternal(TrackAsset track) + { + m_Tracks.Add(track); + track.parent = this; + Invalidate(); + } + + internal void RemoveTrack(TrackAsset track) + { + m_Tracks.Remove(track); + Invalidate(); + var parentTrack = track.parent as TrackAsset; + if (parentTrack != null) + { + parentTrack.RemoveSubTrack(track); + } + } + + /// + /// Creates an instance of the timeline + /// + /// PlayableGraph that will own the playable + /// The gameobject that triggered the graph build + /// The Root Playable of the Timeline + public override Playable CreatePlayable(PlayableGraph graph, GameObject go) + { + bool autoRebalanceTree = false; + #if UNITY_EDITOR + autoRebalanceTree = true; + #endif + + // only create outputs if we are not nested + bool createOutputs = graph.GetPlayableCount() == 0; + var timeline = TimelinePlayable.Create(graph, GetOutputTracks(), go, autoRebalanceTree, createOutputs); + timeline.SetPropagateSetTime(true); + return timeline.IsValid() ? timeline : Playable.Null; + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + m_Version = k_LatestVersion; + } + + // resets cache on an Undo + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + Invalidate(); // resets cache on an Undo + if (m_Version < k_LatestVersion) + { + UpgradeToLatestVersion(); + } + } + + void __internalAwake() + { + if (m_Tracks == null) + m_Tracks = new List(); + + // validate the array. DON'T remove Unity null objects, just actual null objects + for (int i = m_Tracks.Count - 1; i >= 0; i--) + { + TrackAsset asset = m_Tracks[i] as TrackAsset; + if (asset != null) + asset.parent = this; +#if UNITY_EDITOR + object o = m_Tracks[i]; + if (o == null) + { + Debug.LogWarning("Empty track found while loading timeline. It will be removed."); + m_Tracks.RemoveAt(i); + } +#endif + } + } + + /// + /// Called by the Timeline Editor to gather properties requiring preview. + /// + /// The PlayableDirector invoking the preview + /// PropertyCollector used to gather previewable properties + public void GatherProperties(PlayableDirector director, IPropertyCollector driver) + { + var outputTracks = GetOutputTracks(); + foreach (var track in outputTracks) + { + track.GatherProperties(director, driver); + } + } + + /// + /// Creates a marker track for the TimelineAsset. + /// + /// In the editor, the marker track appears under the Timeline ruler. + /// + /// This track is always bound to the GameObject that contains the PlayableDirector component for the current timeline. + /// The marker track is created the first time this method is called. If the marker track is already created, this method does nothing. + /// + public void CreateMarkerTrack() + { + if (m_MarkerTrack == null) + { + m_MarkerTrack = CreateInstance(); + TimelineCreateUtilities.SaveAssetIntoObject(m_MarkerTrack, this); + m_MarkerTrack.parent = this; + m_MarkerTrack.name = "Markers"; // This name will show up in the bindings list if it contains signals + Invalidate(); + } + } + + // Invalidates the asset, call this if changing the asset data + internal void Invalidate() + { + m_CacheRootTracks = null; + m_CacheOutputTracks = null; + m_CacheFlattenedTracks = null; + } + + double CalculateDuration() + { + var discreteDuration = new DiscreteTime(0); + foreach (var track in flattenedTracks) + { + if (track.muted) + continue; + + discreteDuration = DiscreteTime.Max(discreteDuration, (DiscreteTime)track.end); + } + + if (discreteDuration <= 0) + return 0.0; + + //avoid having no clip evaluated at the end by removing a tick from the total duration + return (double)discreteDuration.OneTickBefore(); + } + + static void AddSubTracksRecursive(TrackAsset track, ref List allTracks) + { + if (track == null) + return; + + allTracks.AddRange(track.GetChildTracks()); + foreach (TrackAsset subTrack in track.GetChildTracks()) + { + AddSubTracksRecursive(subTrack, ref allTracks); + } + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset.cs.meta new file mode 100644 index 0000000..d4c4836 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bfda56da833e2384a9677cd3c976a436 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset_CreateRemove.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset_CreateRemove.cs new file mode 100644 index 0000000..8727eae --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset_CreateRemove.cs @@ -0,0 +1,255 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Timeline; +using UnityEngine.Playables; +using UnityEngineInternal; // for metro type extensions + +namespace UnityEngine.Timeline +{ + public partial class TimelineAsset + { + /// + /// Allows you to create a track and add it to the Timeline. + /// + /// The type of track to create. Must derive from TrackAsset. + /// Track to parent to. This can be null. + /// Name to give the track. + /// The created track. + /// + /// This method will throw an InvalidOperationException if the parent is not valid. The parent can be any GroupTrack, or a supported parent type of track. For example, this can be used to create override tracks in AnimationTracks. + /// + public TrackAsset CreateTrack(Type type, TrackAsset parent, string name) + { + if (parent != null && parent.timelineAsset != this) + throw new InvalidOperationException("Addtrack cannot parent to a track not in the Timeline"); + + if (!typeof(TrackAsset).IsAssignableFrom(type)) + throw new InvalidOperationException("Supplied type must be a track asset"); + + if (parent != null) + { + if (!TimelineCreateUtilities.ValidateParentTrack(parent, type)) + throw new InvalidOperationException("Cannot assign a child of type " + type.Name + " to a parent of type " + parent.GetType().Name); + } + + + var actualParent = parent != null ? parent as PlayableAsset : this; + TimelineUndo.PushUndo(actualParent, "Create Track"); + + var baseName = name; + if (string.IsNullOrEmpty(baseName)) + { + baseName = type.Name; +#if UNITY_EDITOR + baseName = UnityEditor.ObjectNames.NicifyVariableName(baseName); +#endif + } + + var trackName = baseName; + if (parent != null) + trackName = TimelineCreateUtilities.GenerateUniqueActorName(parent.subTracksObjects, baseName); + else + trackName = TimelineCreateUtilities.GenerateUniqueActorName(trackObjects, baseName); + + TrackAsset newTrack = AllocateTrack(parent, trackName, type); + if (newTrack != null) + { + newTrack.name = trackName; + TimelineCreateUtilities.SaveAssetIntoObject(newTrack, actualParent); + } + return newTrack; + } + + /// + /// Creates a track and adds it to the Timeline Asset. + /// + /// Track to parent to. This can be null. + /// The name of the track being created. + /// The type of track being created. The track type must be derived from TrackAsset. + /// Returns the created track. + /// + /// This method will throw an InvalidOperationException if the parent is not valid. The parent can be any GroupTrack, or a supported parent type of track. For example, this can be used to create override tracks in AnimationTracks. + /// + public T CreateTrack(TrackAsset parent, string trackName) where T : TrackAsset, new() + { + return (T)CreateTrack(typeof(T), parent, trackName); + } + + /// + /// Creates a track and adds it to the Timeline Asset. + /// + /// The name of the track being created. + /// The type of track being created. The track type must be derived from TrackAsset. + /// Returns the created track. + public T CreateTrack(string trackName) where T : TrackAsset, new() + { + return (T)CreateTrack(typeof(T), null, trackName); + } + + /// + /// Creates a track and adds it to the Timeline Asset. + /// + /// The type of track being created. The track type must be derived from TrackAsset. + /// Returns the created track. + public T CreateTrack() where T : TrackAsset, new() + { + return (T)CreateTrack(typeof(T), null, null); + } + + /// + /// Delete a clip from this timeline. + /// + /// The clip to delete. + /// Returns true if the removal was successful + /// + /// This method will delete a clip and any assets owned by the clip. + /// + public bool DeleteClip(TimelineClip clip) + { + if (clip == null || clip.parentTrack == null) + { + return false; + } + if (this != clip.parentTrack.timelineAsset) + { + Debug.LogError("Cannot delete a clip from this timeline"); + return false; + } + + TimelineUndo.PushUndo(clip.parentTrack, "Delete Clip"); + if (clip.curves != null) + { + TimelineUndo.PushDestroyUndo(this, clip.parentTrack, clip.curves, "Delete Curves"); + } + + // handle wrapped assets + if (clip.asset != null) + { + DeleteRecordedAnimation(clip); + + // TODO -- we should flag assets and owned, instead of this check... +#if UNITY_EDITOR + string path = UnityEditor.AssetDatabase.GetAssetPath(clip.asset); + if (path == UnityEditor.AssetDatabase.GetAssetPath(this)) +#endif + { + TimelineUndo.PushDestroyUndo(this, clip.parentTrack, clip.asset, "Delete Clip Asset"); + } + } + + var clipParentTrack = clip.parentTrack; + clipParentTrack.RemoveClip(clip); + clipParentTrack.CalculateExtrapolationTimes(); + + return true; + } + + /// + /// Deletes a track from a timeline, including all clips and subtracks. + /// + /// The track to delete. It must be owned by this Timeline. + /// True if the track was deleted successfully. + public bool DeleteTrack(TrackAsset track) + { + if (track.timelineAsset != this) + return false; + + // push before we modify properties + TimelineUndo.PushUndo(track, "Delete Track"); + TimelineUndo.PushUndo(this, "Delete Track"); + + TrackAsset parent = track.parent as TrackAsset; + if (parent != null) + TimelineUndo.PushUndo(parent, "Delete Track"); + + var children = track.GetChildTracks(); + foreach (var child in children) + { + DeleteTrack(child); + } + + DeleteRecordedAnimation(track); + + var clipsToDelete = new List(track.clips); + foreach (var clip in clipsToDelete) + { + DeleteClip(clip); + } + RemoveTrack(track); + + TimelineUndo.PushDestroyUndo(this, this, track, "Delete Track"); + + return true; + } + + internal void MoveLastTrackBefore(TrackAsset asset) + { + if (m_Tracks == null || m_Tracks.Count < 2 || asset == null) + return; + + var lastTrack = m_Tracks[m_Tracks.Count - 1]; + if (lastTrack == asset) + return; + + for (int i = 0; i < m_Tracks.Count - 1; i++) + { + if (m_Tracks[i] == asset) + { + for (int j = m_Tracks.Count - 1; j > i; j--) + m_Tracks[j] = m_Tracks[j - 1]; + m_Tracks[i] = lastTrack; + Invalidate(); + break; + } + } + } + + internal TrackAsset AllocateTrack(TrackAsset trackAssetParent, string trackName, Type trackType) + { + if (trackAssetParent != null && trackAssetParent.timelineAsset != this) + throw new InvalidOperationException("Addtrack cannot parent to a track not in the Timeline"); + + if (!typeof(TrackAsset).IsAssignableFrom(trackType)) + throw new InvalidOperationException("Supplied type must be a track asset"); + + var asset = (TrackAsset)CreateInstance(trackType); + asset.name = trackName; + + if (trackAssetParent != null) + trackAssetParent.AddChild(asset); + else + AddTrackInternal(asset); + + return asset; + } + + void DeleteRecordedAnimation(TrackAsset track) + { + var animTrack = track as AnimationTrack; + if (animTrack != null && animTrack.infiniteClip != null) + TimelineUndo.PushDestroyUndo(this, track, animTrack.infiniteClip, "Delete Track"); + + if (track.curves != null) + TimelineUndo.PushDestroyUndo(this, track, track.curves, "Delete Track Parameters"); + } + + void DeleteRecordedAnimation(TimelineClip clip) + { + if (clip == null) + return; + + if (clip.curves != null) + TimelineUndo.PushDestroyUndo(this, clip.parentTrack, clip.curves, "Delete Clip Parameters"); + + if (!clip.recordable) + return; + + AnimationPlayableAsset asset = clip.asset as AnimationPlayableAsset; + if (asset == null || asset.clip == null) + return; + + TimelineUndo.PushDestroyUndo(this, asset, asset.clip, "Delete Recording"); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset_CreateRemove.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset_CreateRemove.cs.meta new file mode 100644 index 0000000..76d1df6 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAsset_CreateRemove.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 93665e8b67658804d99c4487228cc050 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAttributes.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAttributes.cs new file mode 100644 index 0000000..69409fd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAttributes.cs @@ -0,0 +1,222 @@ +using System; +using UnityEngine; + +namespace UnityEngine.Timeline +{ + /// + /// Specifies the type of PlayableAsset that a TrackAsset derived class can create clips of. + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] + public class TrackClipTypeAttribute : Attribute + { + /// + /// The type of the clip class associate with this track + /// + public readonly Type inspectedType; + + /// + /// Whether to allow automatic creation of these types. + /// + public readonly bool allowAutoCreate; // true will make it show up in menus + + /// + /// + /// The type of the clip class to associate with this track. Must derive from PlayableAsset. + public TrackClipTypeAttribute(Type clipClass) + { + inspectedType = clipClass; + allowAutoCreate = true; + } + + /// + /// + /// The type of the clip class to associate with this track. Must derive from PlayableAsset. + /// Whether to allow automatic creation of these types. Default value is true. + /// Setting allowAutoCreate to false will cause Timeline to not show menu items for creating clips of this type. + public TrackClipTypeAttribute(Type clipClass, bool allowAutoCreate) + { + inspectedType = clipClass; + allowAutoCreate = false; + } + } + + /// + /// Apply this to a PlayableBehaviour class or field to indicate that it is not animatable. + /// + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Class)] + public class NotKeyableAttribute : Attribute + { + } + + + /// + /// Options for track binding + /// + [Flags] + public enum TrackBindingFlags + { + /// + /// No options specified + /// + None = 0, + + /// + /// Allow automatic creating of component during gameObject drag and drop + /// + AllowCreateComponent = 1, + + /// + /// All options specified + /// + All = AllowCreateComponent + } + + /// + /// Specifies the type of object that should be bound to a TrackAsset. + /// + /// + /// + /// using UnityEngine; + /// using UnityEngine.Timeline; + /// [TrackBindingType(typeof(Light), TrackBindingFlags.AllowCreateComponent)] + /// public class LightTrack : TrackAsset + /// { + /// } + /// + /// + /// + /// Use this attribute when creating Custom Tracks to specify the type of object the track requires a binding to. + /// + [AttributeUsage(AttributeTargets.Class)] + public class TrackBindingTypeAttribute : Attribute + { + /// + /// The type of binding for the associate track + /// + public readonly Type type; + + /// + /// Options for the the track binding + /// + public readonly TrackBindingFlags flags; + + public TrackBindingTypeAttribute(Type type) + { + this.type = type; + this.flags = TrackBindingFlags.All; + } + + public TrackBindingTypeAttribute(Type type, TrackBindingFlags flags) + { + this.type = type; + this.flags = flags; + } + } + + // indicates that child tracks are permitted on a track + // internal because not fully supported on custom classes yet + [AttributeUsage(AttributeTargets.Class, Inherited = false)] + class SupportsChildTracksAttribute : Attribute + { + public readonly Type childType; + public readonly int levels; + + public SupportsChildTracksAttribute(Type childType = null, int levels = Int32.MaxValue) + { + this.childType = childType; + this.levels = levels; + } + } + + // indicates that the type should not be put on a PlayableTrack + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] + class IgnoreOnPlayableTrackAttribute : System.Attribute {} + + // used to flag properties as using a time field (second/frames) display + class TimeFieldAttribute : PropertyAttribute + { + public enum UseEditMode + { + None, + ApplyEditMode + } + public UseEditMode useEditMode { get; } + + public TimeFieldAttribute(UseEditMode useEditMode = UseEditMode.ApplyEditMode) + { + this.useEditMode = useEditMode; + } + } + + /// + /// Use this attribute to hide a class from Timeline menus. + /// + [AttributeUsage(AttributeTargets.Class, Inherited = false)] + public class HideInMenuAttribute : Attribute {} + + /// + /// Use this attribute to customize the appearance of a Marker. + /// + /// Specify the style to use to draw a Marker. + /// + /// [CustomStyle("MyStyle")] + /// public class MyMarker : UnityEngine.Timeline.Marker {} + /// + /// How to create a custom style rule: + /// 1) Create a 'common.uss' USS file in an Editor folder in a StyleSheets/Extensions folder hierarchy. + /// Example of valid folder paths: + /// - Assets/Editor/StyleSheets/Extensions + /// - Assets/Editor/Markers/StyleSheets/Extensions + /// - Assets/Timeline/Editor/MyMarkers/StyleSheets/Extensions + /// Rules in 'dark.uss' are used if you use the Pro Skin and rules in 'light.uss' are used otherwise. + /// + /// 2)In the USS file, create a styling rule to customize the appearance of the marker. + /// + /// MyStyle + /// { + /// /* Specify the appearance of the marker in the collapsed state here. */ + /// } + /// + /// MyStyle:checked + /// { + /// /* Specify the appearance of the marker in the expanded state here. */ + /// } + /// + /// MyStyle:focused:checked + /// { + /// /* Specify the appearance of the marker in the selected state here. */ + /// } + /// + /// + [AttributeUsage(AttributeTargets.Class)] + public class CustomStyleAttribute : Attribute + { + /// + /// The name of the USS style. + /// + public readonly string ussStyle; + + /// The name of the USS style. + public CustomStyleAttribute(string ussStyle) + { + this.ussStyle = ussStyle; + } + } + + /// + /// Use this attribute to assign a clip, marker or track to a category in a submenu + /// + [AttributeUsage(AttributeTargets.Class)] + internal class MenuCategoryAttribute : Attribute + { + /// + /// The menu name of the category + /// + public readonly string category; + + public MenuCategoryAttribute(string category) + { + this.category = category ?? string.Empty; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAttributes.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAttributes.cs.meta new file mode 100644 index 0000000..ae5547d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineAttributes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3e99141cd5dbef844a4338bb87930b89 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineClip.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineClip.cs new file mode 100644 index 0000000..f1aa05b --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineClip.cs @@ -0,0 +1,821 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Playables; +using UnityEngine.Serialization; + +namespace UnityEngine.Timeline +{ + /// + /// Implement this interface to support advanced features of timeline clips. + /// + public interface ITimelineClipAsset + { + /// + /// Returns a description of the features supported by clips with PlayableAssets implementing this interface. + /// + ClipCaps clipCaps { get; } + } + + /// + /// Represents a clip on the timeline. + /// + [Serializable] + public partial class TimelineClip : ICurvesOwner, ISerializationCallbackReceiver + { + /// + /// The default capabilities for a clip + /// + public static readonly ClipCaps kDefaultClipCaps = ClipCaps.Blending; + + /// + /// The default length of a clip in seconds. + /// + public static readonly float kDefaultClipDurationInSeconds = 5; + + /// + /// The minimum timescale allowed on a clip + /// + public static readonly double kTimeScaleMin = 1.0 / 1000; + + /// + /// The maximum timescale allowed on a clip + /// + public static readonly double kTimeScaleMax = 1000; + + internal static readonly string kDefaultCurvesName = "Clip Parameters"; + + internal static readonly double kMinDuration = 1 / 60.0; + + // constant representing the longest possible sequence duration + internal static readonly double kMaxTimeValue = 1000000; // more than a week's time, and within numerical precision boundaries + + /// + /// How the clip handles time outside its start and end range. + /// + public enum ClipExtrapolation + { + /// + /// No extrapolation is applied. + /// + None, + + /// + /// Hold the time at the end value of the clip. + /// + Hold, + + /// + /// Repeat time values outside the start/end range. + /// + Loop, + + /// + /// Repeat time values outside the start/end range, reversing direction at each loop + /// + PingPong, + + /// + /// Time values are passed in without modification, extending beyond the clips range + /// + Continue + }; + + /// + /// How blend curves are treated in an overlap + /// + public enum BlendCurveMode + { + /// + /// The curve is normalized against the opposing clip + /// + Auto, + + /// + /// The blend curve is fixed. + /// + Manual + }; + + internal TimelineClip(TrackAsset parent) + { + // parent clip into track + parentTrack = parent; + } + + [SerializeField] double m_Start; + [SerializeField] double m_ClipIn; + [SerializeField] Object m_Asset; + [SerializeField][FormerlySerializedAs("m_HackDuration")] double m_Duration; + [SerializeField] double m_TimeScale = 1.0; + [SerializeField] TrackAsset m_ParentTrack; + + // for mixing out scripts - default is no mix out (i.e. flat) + [SerializeField] double m_EaseInDuration; + [SerializeField] double m_EaseOutDuration; + + // the blend durations override ease in / out durations + [SerializeField] double m_BlendInDuration = -1.0f; + [SerializeField] double m_BlendOutDuration = -1.0f; + + // doubles as ease in/out and blend in/out curves + [SerializeField] AnimationCurve m_MixInCurve; + [SerializeField] AnimationCurve m_MixOutCurve; + + [SerializeField] BlendCurveMode m_BlendInCurveMode = BlendCurveMode.Auto; + [SerializeField] BlendCurveMode m_BlendOutCurveMode = BlendCurveMode.Auto; + + [SerializeField] List m_ExposedParameterNames; + [SerializeField] AnimationClip m_AnimationCurves; + + [SerializeField] bool m_Recordable; + + // extrapolation + [SerializeField] ClipExtrapolation m_PostExtrapolationMode; + [SerializeField] ClipExtrapolation m_PreExtrapolationMode; + [SerializeField] double m_PostExtrapolationTime; + [SerializeField] double m_PreExtrapolationTime; + + [SerializeField] string m_DisplayName; + + /// + /// Is the clip being extrapolated before its start time? + /// + public bool hasPreExtrapolation + { + get { return m_PreExtrapolationMode != ClipExtrapolation.None && m_PreExtrapolationTime > 0; } + } + + /// + /// Is the clip being extrapolated past its end time? + /// + public bool hasPostExtrapolation + { + get { return m_PostExtrapolationMode != ClipExtrapolation.None && m_PostExtrapolationTime > 0; } + } + + /// + /// A speed multiplier for the clip; + /// + public double timeScale + { + get { return clipCaps.HasAny(ClipCaps.SpeedMultiplier) ? Math.Max(kTimeScaleMin, Math.Min(m_TimeScale, kTimeScaleMax)) : 1.0; } + set + { + UpdateDirty(m_TimeScale, value); + m_TimeScale = clipCaps.HasAny(ClipCaps.SpeedMultiplier) ? Math.Max(kTimeScaleMin, Math.Min(value, kTimeScaleMax)) : 1.0; + } + } + + /// + /// The start time, in seconds, of the clip + /// + public double start + { + get { return m_Start; } + set + { + UpdateDirty(value, m_Start); + var newValue = Math.Max(SanitizeTimeValue(value, m_Start), 0); + if (m_ParentTrack != null && m_Start != newValue) + { + m_ParentTrack.OnClipMove(); + } + m_Start = newValue; + } + } + + /// + /// The length, in seconds, of the clip + /// + public double duration + { + get { return m_Duration; } + set + { + UpdateDirty(m_Duration, value); + m_Duration = Math.Max(SanitizeTimeValue(value, m_Duration), double.Epsilon); + } + } + + /// + /// The end time, in seconds of the clip + /// + public double end + { + get { return m_Start + m_Duration; } + } + + /// + /// Local offset time of the clip. + /// + public double clipIn + { + get { return clipCaps.HasAny(ClipCaps.ClipIn) ? m_ClipIn : 0; } + set + { + UpdateDirty(m_ClipIn, value); + m_ClipIn = clipCaps.HasAny(ClipCaps.ClipIn) ? Math.Max(Math.Min(SanitizeTimeValue(value, m_ClipIn), kMaxTimeValue), 0.0) : 0; + } + } + + /// + /// The name displayed on the clip + /// + public string displayName + { + get { return m_DisplayName; } + set { m_DisplayName = value; } + } + + + /// + /// The length, in seconds, of the PlayableAsset attached to the clip. + /// + public double clipAssetDuration + { + get + { + var playableAsset = m_Asset as IPlayableAsset; + return playableAsset != null ? playableAsset.duration : double.MaxValue; + } + } + + /// + /// An animation clip containing animated properties of the attached PlayableAsset + /// + /// + /// This is where animated clip properties are stored. + /// + public AnimationClip curves + { + get { return m_AnimationCurves; } + internal set { m_AnimationCurves = value; } + } + + string ICurvesOwner.defaultCurvesName + { + get { return kDefaultCurvesName; } + } + + /// + /// Whether this clip contains animated properties for the attached PlayableAsset. + /// + /// + /// This property is false if the curves property is null or if it contains no information. + /// + public bool hasCurves + { + get { return m_AnimationCurves != null && !m_AnimationCurves.empty; } + } + + /// + /// The PlayableAsset attached to the clip. + /// + public Object asset + { + get { return m_Asset; } + set { m_Asset = value; } + } + + Object ICurvesOwner.assetOwner + { + get { return parentTrack; } + } + + TrackAsset ICurvesOwner.targetTrack + { + get { return parentTrack; } + } + + [Obsolete("underlyingAsset property is obsolete. Use asset property instead", true)] + public Object underlyingAsset + { + get { return null; } + set {} + } + + /// + /// Returns the TrackAsset to which this clip is attached. + /// + public TrackAsset parentTrack + { + get { return m_ParentTrack; } + set + { + if (m_ParentTrack == value) + return; + + if (m_ParentTrack != null) + m_ParentTrack.RemoveClip(this); + + m_ParentTrack = value; + + if (m_ParentTrack != null) + m_ParentTrack.AddClip(this); + } + } + + /// + /// The ease in duration of the timeline clip in seconds. This only applies if the start of the clip is not overlapping. + /// + public double easeInDuration + { + get { return clipCaps.HasAny(ClipCaps.Blending) ? Math.Min(Math.Max(m_EaseInDuration, 0), duration * 0.49) : 0; } + set { m_EaseInDuration = clipCaps.HasAny(ClipCaps.Blending) ? Math.Max(0, Math.Min(SanitizeTimeValue(value, m_EaseInDuration), duration * 0.49)) : 0; } + } + + /// + /// The ease out duration of the timeline clip in seconds. This only applies if the end of the clip is not overlapping. + /// + public double easeOutDuration + { + get { return clipCaps.HasAny(ClipCaps.Blending) ? Math.Min(Math.Max(m_EaseOutDuration, 0), duration * 0.49) : 0; } + set { m_EaseOutDuration = clipCaps.HasAny(ClipCaps.Blending) ? Math.Max(0, Math.Min(SanitizeTimeValue(value, m_EaseOutDuration), duration * 0.49)) : 0; } + } + + [Obsolete("Use easeOutTime instead (UnityUpgradable) -> easeOutTime", true)] + public double eastOutTime + { + get { return duration - easeOutDuration + m_Start; } + } + + /// + /// The time in seconds that the ease out begins + /// + public double easeOutTime + { + get { return duration - easeOutDuration + m_Start; } + } + + /// + /// The amount of overlap in seconds on the start of a clip. + /// + public double blendInDuration + { + get { return clipCaps.HasAny(ClipCaps.Blending) ? m_BlendInDuration : 0; } + set { m_BlendInDuration = clipCaps.HasAny(ClipCaps.Blending) ? SanitizeTimeValue(value, m_BlendInDuration) : 0; } + } + + /// + /// The amount of overlap in seconds at the end of a clip. + /// + public double blendOutDuration + { + get { return clipCaps.HasAny(ClipCaps.Blending) ? m_BlendOutDuration : 0; } + set { m_BlendOutDuration = clipCaps.HasAny(ClipCaps.Blending) ? SanitizeTimeValue(value, m_BlendOutDuration) : 0; } + } + + /// + /// The mode for calculating the blend curve of the overlap at the start of the clip + /// + public BlendCurveMode blendInCurveMode + { + get { return m_BlendInCurveMode; } + set { m_BlendInCurveMode = value; } + } + + /// + /// The mode for calculating the blend curve of the overlap at the end of the clip + /// + public BlendCurveMode blendOutCurveMode + { + get { return m_BlendOutCurveMode; } + set { m_BlendOutCurveMode = value; } + } + + /// + /// Returns whether the clip is blending in + /// + public bool hasBlendIn { get { return clipCaps.HasAny(ClipCaps.Blending) && m_BlendInDuration > 0; } } + + /// + /// Returns whether the clip is blending out + /// + public bool hasBlendOut { get { return clipCaps.HasAny(ClipCaps.Blending) && m_BlendOutDuration > 0; } } + + /// + /// The animation curve used for calculating weights during an ease in or a blend in. + /// + public AnimationCurve mixInCurve + { + get + { + // auto fix broken curves + if (m_MixInCurve == null || m_MixInCurve.length < 2) + m_MixInCurve = GetDefaultMixInCurve(); + + return m_MixInCurve; + } + set { m_MixInCurve = value; } + } + + /// + /// The amount of the clip being used for ease or blend in as a percentage + /// + public float mixInPercentage + { + get { return (float)(mixInDuration / duration); } + } + + /// + /// The amount of the clip blending or easing in, in seconds + /// + public double mixInDuration + { + get { return hasBlendIn ? blendInDuration : easeInDuration; } + } + + /// + /// The animation curve used for calculating weights during an ease out or a blend out. + /// + public AnimationCurve mixOutCurve + { + get + { + if (m_MixOutCurve == null || m_MixOutCurve.length < 2) + m_MixOutCurve = GetDefaultMixOutCurve(); + return m_MixOutCurve; + } + set { m_MixOutCurve = value; } + } + + /// + /// The time in seconds that an ease out or blend out starts + /// + public double mixOutTime + { + get { return duration - mixOutDuration + m_Start; } + } + + /// + /// The amount of the clip blending or easing out, in seconds + /// + public double mixOutDuration + { + get { return hasBlendOut ? blendOutDuration : easeOutDuration; } + } + + /// + /// The amount of the clip being used for ease or blend out as a percentage + /// + public float mixOutPercentage + { + get { return (float)(mixOutDuration / duration); } + } + + /// + /// Returns whether this clip is recordable in editor + /// + public bool recordable + { + get { return m_Recordable; } + internal set { m_Recordable = value; } + } + + [Obsolete("exposedParameter is deprecated and will be removed in a future release", true)] + public List exposedParameters + { + get { return m_ExposedParameterNames ?? (m_ExposedParameterNames = new List()); } + } + + /// + /// Returns the capabilities supported by this clip. + /// + public ClipCaps clipCaps + { + get + { + var clipAsset = asset as ITimelineClipAsset; + return (clipAsset != null) ? clipAsset.clipCaps : kDefaultClipCaps; + } + } + + internal int Hash() + { + return HashUtility.CombineHash(m_Start.GetHashCode(), + m_Duration.GetHashCode(), + m_TimeScale.GetHashCode(), + m_ClipIn.GetHashCode(), + ((int)m_PreExtrapolationMode).GetHashCode(), + ((int)m_PostExtrapolationMode).GetHashCode()); + } + + /// + /// Given a time, returns the weight from the mix out + /// + /// Time (relative to the timeline) + /// + public float EvaluateMixOut(double time) + { + if (!clipCaps.HasAny(ClipCaps.Blending)) + return 1.0f; + + if (mixOutDuration > Mathf.Epsilon) + { + var perc = (float)(time - mixOutTime) / (float)mixOutDuration; + perc = Mathf.Clamp01(mixOutCurve.Evaluate(perc)); + return perc; + } + return 1.0f; + } + + /// + /// Given a time, returns the weight from the mix in + /// + /// Time (relative to the timeline) + /// + public float EvaluateMixIn(double time) + { + if (!clipCaps.HasAny(ClipCaps.Blending)) + return 1.0f; + + if (mixInDuration > Mathf.Epsilon) + { + var perc = (float)(time - m_Start) / (float)mixInDuration; + perc = Mathf.Clamp01(mixInCurve.Evaluate(perc)); + return perc; + } + return 1.0f; + } + + static AnimationCurve GetDefaultMixInCurve() + { + return AnimationCurve.EaseInOut(0, 0, 1, 1); + } + + static AnimationCurve GetDefaultMixOutCurve() + { + return AnimationCurve.EaseInOut(0, 1, 1, 0); + } + + /// + /// Converts from global time to a clips local time. + /// + /// time relative to the timeline + /// + /// The local time with extrapolation applied + /// + public double ToLocalTime(double time) + { + if (time < 0) + return time; + + // handle Extrapolation + if (IsPreExtrapolatedTime(time)) + time = GetExtrapolatedTime(time - m_Start, m_PreExtrapolationMode, m_Duration); + else if (IsPostExtrapolatedTime(time)) + time = GetExtrapolatedTime(time - m_Start, m_PostExtrapolationMode, m_Duration); + else + time -= m_Start; + + // handle looping and time scale within the clip + time *= timeScale; + time += clipIn; + + return time; + } + + /// + /// Converts from global time to local time of the clip + /// + /// The time relative to the timeline + /// The local time, ignoring any extrapolation or bounds + public double ToLocalTimeUnbound(double time) + { + return (time - m_Start) * timeScale + clipIn; + } + + /// + /// Converts from local time of the clip to global time + /// + /// Time relative to the clip + /// The time relative to the timeline + internal double FromLocalTimeUnbound(double time) + { + return (time - clipIn) / timeScale + m_Start; + } + + /// + /// If this contains an animation asset, returns the animation clip attached. Otherwise returns null. + /// + public AnimationClip animationClip + { + get + { + if (m_Asset == null) + return null; + + var playableAsset = m_Asset as AnimationPlayableAsset; + return playableAsset != null ? playableAsset.clip : null; + } + } + + static double SanitizeTimeValue(double value, double defaultValue) + { + if (double.IsInfinity(value) || double.IsNaN(value)) + { + Debug.LogError("Invalid time value assigned"); + return defaultValue; + } + + return Math.Max(-kMaxTimeValue, Math.Min(kMaxTimeValue, value)); + } + + /// + /// Returns whether the clip is being extrapolated past the end time. + /// + public ClipExtrapolation postExtrapolationMode + { + get { return clipCaps.HasAny(ClipCaps.Extrapolation) ? m_PostExtrapolationMode : ClipExtrapolation.None; } + internal set { m_PostExtrapolationMode = clipCaps.HasAny(ClipCaps.Extrapolation) ? value : ClipExtrapolation.None; } + } + + /// + /// Returns whether the clip is being extrapolated before the start time. + /// + public ClipExtrapolation preExtrapolationMode + { + get { return clipCaps.HasAny(ClipCaps.Extrapolation) ? m_PreExtrapolationMode : ClipExtrapolation.None; } + internal set { m_PreExtrapolationMode = clipCaps.HasAny(ClipCaps.Extrapolation) ? value : ClipExtrapolation.None; } + } + + internal void SetPostExtrapolationTime(double time) + { + m_PostExtrapolationTime = time; + } + + internal void SetPreExtrapolationTime(double time) + { + m_PreExtrapolationTime = time; + } + + /// + /// Given a time, returns whether it falls within the clips extrapolation + /// + /// The time relative to the timeline + public bool IsExtrapolatedTime(double sequenceTime) + { + return IsPreExtrapolatedTime(sequenceTime) || IsPostExtrapolatedTime(sequenceTime); + } + + /// + /// Given a time, returns whether it falls within the clip pre-extrapolation + /// + /// The time relative to the timeline + public bool IsPreExtrapolatedTime(double sequenceTime) + { + return preExtrapolationMode != ClipExtrapolation.None && + sequenceTime < m_Start && sequenceTime >= m_Start - m_PreExtrapolationTime; + } + + /// + /// Given a time, returns whether it falls within the clip post-extrapolation + /// + /// The time relative to the timeline + public bool IsPostExtrapolatedTime(double sequenceTime) + { + return postExtrapolationMode != ClipExtrapolation.None && + (sequenceTime > end) && (sequenceTime - end < m_PostExtrapolationTime); + } + + /// + /// The start time of the clip, accounting for pre-extrapolation + /// + public double extrapolatedStart + { + get + { + if (m_PreExtrapolationMode != ClipExtrapolation.None) + return m_Start - m_PreExtrapolationTime; + + return m_Start; + } + } + + /// + /// The length of the clip in seconds, including extrapolation. + /// + public double extrapolatedDuration + { + get + { + double length = m_Duration; + + if (m_PostExtrapolationMode != ClipExtrapolation.None) + length += Math.Min(m_PostExtrapolationTime, kMaxTimeValue); + + if (m_PreExtrapolationMode != ClipExtrapolation.None) + length += m_PreExtrapolationTime; + + return length; + } + } + + static double GetExtrapolatedTime(double time, ClipExtrapolation mode, double duration) + { + if (duration == 0) + return 0; + + switch (mode) + { + case ClipExtrapolation.None: + break; + + case ClipExtrapolation.Loop: + if (time < 0) + time = duration - (-time % duration); + else if (time > duration) + time %= duration; + break; + + case ClipExtrapolation.Hold: + if (time < 0) + return 0; + if (time > duration) + return duration; + break; + + case ClipExtrapolation.PingPong: + if (time < 0) + { + time = duration * 2 - (-time % (duration * 2)); + time = duration - Math.Abs(time - duration); + } + else + { + time = time % (duration * 2.0); + time = duration - Math.Abs(time - duration); + } + break; + + case ClipExtrapolation.Continue: + break; + } + return time; + } + + /// + /// Creates an AnimationClip to store animated properties for the attached PlayableAsset. + /// + /// + /// If curves already exists for this clip, this method produces no result regardless of the + /// value specified for curvesClipName. + /// + /// + /// When used from the editor, this method attempts to save the created curves clip to the TimelineAsset. + /// The TimelineAsset must already exist in the AssetDatabase to save the curves clip. If the TimelineAsset + /// does not exist, the curves clip is still created but it is not saved. + /// + /// + /// The name of the AnimationClip to create. + /// This method does not ensure unique names. If you want a unique clip name, you must provide one. + /// See ObjectNames.GetUniqueName for information on a method that creates unique names. + /// + public void CreateCurves(string curvesClipName) + { + if (m_AnimationCurves != null) + return; + + m_AnimationCurves = TimelineCreateUtilities.CreateAnimationClipForTrack(string.IsNullOrEmpty(curvesClipName) ? kDefaultCurvesName : curvesClipName, parentTrack, true); + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + m_Version = k_LatestVersion; + } + + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + if (m_Version < k_LatestVersion) + { + UpgradeToLatestVersion(); + } + } + + /// + /// Outputs a more readable representation of the timeline clip as a string + /// + /// + public override string ToString() + { + return UnityString.Format("{0} ({1:F2}, {2:F2}):{3:F2} | {4}", displayName, start, end, clipIn, parentTrack); + } + +#if UNITY_EDITOR + internal int DirtyIndex { get; private set; } + internal void MarkDirty() + { + DirtyIndex++; + } + + void UpdateDirty(double oldValue, double newValue) + { + if (oldValue != newValue) + DirtyIndex++; + } + +#else + void UpdateDirty(double oldValue, double newValue) {} +#endif + }; +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineClip.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineClip.cs.meta new file mode 100644 index 0000000..ded129f --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelineClip.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 65f3a4c67e4927a478b7036bae1da0e3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelinePlayable.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelinePlayable.cs new file mode 100644 index 0000000..f028a7a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelinePlayable.cs @@ -0,0 +1,310 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Animations; +using UnityEngine.Audio; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + // Generic evaluation callback called after all the clips have been processed + internal interface ITimelineEvaluateCallback + { + void Evaluate(); + } + + +#if UNITY_EDITOR + /// + /// This Rebalancer class ensures that the interval tree structures stays balance regardless of whether the intervals inside change. + /// + class IntervalTreeRebalancer + { + private IntervalTree m_Tree; + public IntervalTreeRebalancer(IntervalTree tree) + { + m_Tree = tree; + } + + public bool Rebalance() + { + m_Tree.UpdateIntervals(); + return m_Tree.dirty; + } + } +#endif + + // The TimelinePlayable Playable + // This is the actual runtime playable that gets evaluated as part of a playable graph. + // It "compiles" a list of tracks into an IntervalTree of Runtime clips. + // At each frame, it advances time, then fetches the "intersection: of various time interval + // using the interval tree. + // Finally, on each intersecting clip, it will calculate each clips' local time, as well as + // blend weight and set them accordingly + + + /// + /// The root Playable generated by timeline. + /// + public class TimelinePlayable : PlayableBehaviour + { + private IntervalTree m_IntervalTree = new IntervalTree(); + private List m_ActiveClips = new List(); + private List m_CurrentListOfActiveClips; + private int m_ActiveBit = 0; + + private List m_EvaluateCallbacks = new List(); + + private Dictionary m_PlayableCache = new Dictionary(); + + internal static bool muteAudioScrubbing = true; + +#if UNITY_EDITOR + private IntervalTreeRebalancer m_Rebalancer; +#endif + /// + /// Creates an instance of a Timeline + /// + /// The playable graph to inject the timeline. + /// The list of tracks to compile + /// The GameObject that initiated the compilation + /// In the editor, whether the graph should account for the possibility of changing clip times + /// Whether to create PlayableOutputs in the graph + /// A subgraph with the playable containing a TimelinePlayable behaviour as the root + public static ScriptPlayable Create(PlayableGraph graph, IEnumerable tracks, GameObject go, bool autoRebalance, bool createOutputs) + { + if (tracks == null) + throw new ArgumentNullException("Tracks list is null", "tracks"); + + if (go == null) + throw new ArgumentNullException("GameObject parameter is null", "go"); + + var playable = ScriptPlayable.Create(graph); + playable.SetTraversalMode(PlayableTraversalMode.Passthrough); + var sequence = playable.GetBehaviour(); + sequence.Compile(graph, playable, tracks, go, autoRebalance, createOutputs); + return playable; + } + + /// + /// Compiles the subgraph of this timeline + /// + /// The playable graph to inject the timeline. + /// + /// The list of tracks to compile + /// The GameObject that initiated the compilation + /// In the editor, whether the graph should account for the possibility of changing clip times + /// Whether to create PlayableOutputs in the graph + public void Compile(PlayableGraph graph, Playable timelinePlayable, IEnumerable tracks, GameObject go, bool autoRebalance, bool createOutputs) + { + if (tracks == null) + throw new ArgumentNullException("Tracks list is null", "tracks"); + + if (go == null) + throw new ArgumentNullException("GameObject parameter is null", "go"); + + var outputTrackList = new List(tracks); + var maximumNumberOfIntersections = outputTrackList.Count * 2 + outputTrackList.Count; // worse case: 2 overlapping clips per track + each track + m_CurrentListOfActiveClips = new List(maximumNumberOfIntersections); + m_ActiveClips = new List(maximumNumberOfIntersections); + + m_EvaluateCallbacks.Clear(); + m_PlayableCache.Clear(); + + CompileTrackList(graph, timelinePlayable, outputTrackList, go, createOutputs); + +#if UNITY_EDITOR + if (autoRebalance) + { + m_Rebalancer = new IntervalTreeRebalancer(m_IntervalTree); + } +#endif + } + + private void CompileTrackList(PlayableGraph graph, Playable timelinePlayable, IEnumerable tracks, GameObject go, bool createOutputs) + { + foreach (var track in tracks) + { + if (!track.IsCompilable()) + continue; + + if (!m_PlayableCache.ContainsKey(track)) + { + track.SortClips(); + CreateTrackPlayable(graph, timelinePlayable, track, go, createOutputs); + } + } + } + + void CreateTrackOutput(PlayableGraph graph, TrackAsset track, GameObject go, Playable playable, int port) + { + if (track.isSubTrack) + return; + + var bindings = track.outputs; + foreach (var binding in bindings) + { + var playableOutput = binding.CreateOutput(graph); + playableOutput.SetReferenceObject(binding.sourceObject); + playableOutput.SetSourcePlayable(playable, port); + playableOutput.SetWeight(1.0f); + + // only apply this on our animation track + if (track as AnimationTrack != null) + { + EvaluateWeightsForAnimationPlayableOutput(track, (AnimationPlayableOutput)playableOutput); +#if UNITY_EDITOR + if (!Application.isPlaying) + EvaluateAnimationPreviewUpdateCallback(track, (AnimationPlayableOutput)playableOutput); +#endif + } + if (playableOutput.IsPlayableOutputOfType()) + ((AudioPlayableOutput)playableOutput).SetEvaluateOnSeek(!muteAudioScrubbing); + + // If the track is the timeline marker track, assume binding is the PlayableDirector + if (track.timelineAsset.markerTrack == track) + { + var director = go.GetComponent(); + playableOutput.SetUserData(director); + foreach (var c in go.GetComponents()) + { + playableOutput.AddNotificationReceiver(c); + } + } + } + } + + void EvaluateWeightsForAnimationPlayableOutput(TrackAsset track, AnimationPlayableOutput animOutput) + { + m_EvaluateCallbacks.Add(new AnimationOutputWeightProcessor(animOutput)); + } + + void EvaluateAnimationPreviewUpdateCallback(TrackAsset track, AnimationPlayableOutput animOutput) + { + m_EvaluateCallbacks.Add(new AnimationPreviewUpdateCallback(animOutput)); + } + + private static Playable CreatePlayableGraph(PlayableGraph graph, TrackAsset asset, GameObject go, IntervalTree tree, Playable timelinePlayable) + { + return asset.CreatePlayableGraph(graph, go, tree, timelinePlayable); + } + + private Playable CreateTrackPlayable(PlayableGraph graph, Playable timelinePlayable, TrackAsset track, GameObject go, bool createOutputs) + { + if (!track.IsCompilable()) // where parents are not compilable (group tracks) + return timelinePlayable; + + Playable playable; + if (m_PlayableCache.TryGetValue(track, out playable)) + return playable; + + if (track.name == "root") + return timelinePlayable; + + TrackAsset parentActor = track.parent as TrackAsset; + var parentPlayable = parentActor != null ? CreateTrackPlayable(graph, timelinePlayable, parentActor, go, createOutputs) : timelinePlayable; + var actorPlayable = CreatePlayableGraph(graph, track, go, m_IntervalTree, timelinePlayable); + bool connected = false; + + if (!actorPlayable.IsValid()) + { + // if a track says it's compilable, but returns Playable.Null, that can screw up the whole graph. + throw new InvalidOperationException(track.name + "(" + track.GetType() + ") did not produce a valid playable. Use the compilable property to indicate whether the track is valid for processing"); + } + + + // Special case for animation tracks + if (parentPlayable.IsValid() && actorPlayable.IsValid()) + { + int port = parentPlayable.GetInputCount(); + parentPlayable.SetInputCount(port + 1); + connected = graph.Connect(actorPlayable, 0, parentPlayable, port); + parentPlayable.SetInputWeight(port, 1.0f); + } + + if (createOutputs && connected) + { + CreateTrackOutput(graph, track, go, parentPlayable, parentPlayable.GetInputCount() - 1); + } + + CacheTrack(track, actorPlayable, connected ? (parentPlayable.GetInputCount() - 1) : -1, parentPlayable); + return actorPlayable; + } + + /// + /// Overridden to handle synchronizing time on the timeline instance. + /// + /// The Playable that owns the current PlayableBehaviour. + /// A FrameData structure that contains information about the current frame context. + public override void PrepareFrame(Playable playable, FrameData info) + { +#if UNITY_EDITOR + if (m_Rebalancer != null) + m_Rebalancer.Rebalance(); +#endif + + // force seek if we are being evaluated + // or if our time has jumped. This is used to + // resynchronize + Evaluate(playable, info); + } + + private void Evaluate(Playable playable, FrameData frameData) + { + if (m_IntervalTree == null) + return; + + double localTime = playable.GetTime(); + m_ActiveBit = m_ActiveBit == 0 ? 1 : 0; + + m_CurrentListOfActiveClips.Clear(); + m_IntervalTree.IntersectsWith(DiscreteTime.GetNearestTick(localTime), m_CurrentListOfActiveClips); + + foreach (var c in m_CurrentListOfActiveClips) + { + c.intervalBit = m_ActiveBit; + if (frameData.timeLooped) + c.Reset(); + } + + // all previously active clips having a different intervalBit flag are not + // in the current intersection, therefore are considered becoming disabled at this frame + var timelineEnd = playable.GetDuration(); + foreach (var c in m_ActiveClips) + { + if (c.intervalBit != m_ActiveBit) + { + var clipEnd = (double)DiscreteTime.FromTicks(c.intervalEnd); + var time = frameData.timeLooped ? Math.Min(clipEnd, timelineEnd) : Math.Min(localTime, clipEnd); + c.EvaluateAt(time, frameData); + c.enable = false; + } + } + + m_ActiveClips.Clear(); + // case 998642 - don't use m_ActiveClips.AddRange, as in 4.6 .Net scripting it causes GC allocs + for (var a = 0; a < m_CurrentListOfActiveClips.Count; a++) + { + m_CurrentListOfActiveClips[a].EvaluateAt(localTime, frameData); + m_ActiveClips.Add(m_CurrentListOfActiveClips[a]); + } + + int count = m_EvaluateCallbacks.Count; + for (int i = 0; i < count; i++) + { + m_EvaluateCallbacks[i].Evaluate(); + } + } + + private void CacheTrack(TrackAsset track, Playable playable, int port, Playable parent) + { + m_PlayableCache[track] = playable; + } + + //necessary to build on AOT platforms + static void ForAOTCompilationOnly() + { + new List.Entry>(); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelinePlayable.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelinePlayable.cs.meta new file mode 100644 index 0000000..cb373dd --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TimelinePlayable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 80b10e1c58509a449a3c5aecc07d4455 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TrackAsset.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TrackAsset.cs new file mode 100644 index 0000000..cc0f607 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TrackAsset.cs @@ -0,0 +1,1264 @@ +using System; +using System.Collections.Generic; +using System.IO; +using UnityEngine.Animations; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// A PlayableAsset representing a track inside a timeline. + /// + [Serializable] + [IgnoreOnPlayableTrack] + public abstract partial class TrackAsset : PlayableAsset, IPropertyPreview, ICurvesOwner + { + // Internal caches used to avoid memory allocation during graph construction + private struct TransientBuildData + { + public List trackList; + public List clipList; + public List markerList; + + public static TransientBuildData Create() + { + return new TransientBuildData() + { + trackList = new List(20), + clipList = new List(500), + markerList = new List(100), + }; + } + + public void Clear() + { + trackList.Clear(); + clipList.Clear(); + markerList.Clear(); + } + } + + private static TransientBuildData s_BuildData = TransientBuildData.Create(); + + internal const string kDefaultCurvesName = "Track Parameters"; + + internal static event Action OnClipPlayableCreate; + internal static event Action OnTrackAnimationPlayableCreate; + + [SerializeField, HideInInspector] bool m_Locked; + [SerializeField, HideInInspector] bool m_Muted; + [SerializeField, HideInInspector] string m_CustomPlayableFullTypename = string.Empty; + [SerializeField, HideInInspector] AnimationClip m_Curves; + [SerializeField, HideInInspector] PlayableAsset m_Parent; + [SerializeField, HideInInspector] List m_Children; + + [NonSerialized] int m_ItemsHash; + [NonSerialized] TimelineClip[] m_ClipsCache; + + DiscreteTime m_Start; + DiscreteTime m_End; + bool m_CacheSorted; + bool? m_SupportsNotifications; + + static TrackAsset[] s_EmptyCache = new TrackAsset[0]; + IEnumerable m_ChildTrackCache; + + static Dictionary s_TrackBindingTypeAttributeCache = new Dictionary(); + + [SerializeField, HideInInspector] protected internal List m_Clips = new List(); + + [SerializeField, HideInInspector] MarkerList m_Markers = new MarkerList(0); + +#if UNITY_EDITOR + internal int DirtyIndex { get; private set; } + internal void MarkDirty() + { + DirtyIndex++; + foreach (var clip in GetClips()) + { + if (clip != null) + clip.MarkDirty(); + } + } + +#endif + + /// + /// The start time, in seconds, of this track + /// + public double start + { + get + { + UpdateDuration(); + return (double)m_Start; + } + } + + /// + /// The end time, in seconds, of this track + /// + public double end + { + get + { + UpdateDuration(); + return (double)m_End; + } + } + + /// + /// The length, in seconds, of this track + /// + public sealed override double duration + { + get + { + UpdateDuration(); + return (double)(m_End - m_Start); + } + } + + /// + /// Whether the track is muted or not. + /// + /// + /// A muted track is excluded from the generated PlayableGraph + /// + public bool muted + { + get { return m_Muted; } + set { m_Muted = value; } + } + + /// + /// The muted state of a track. + /// + /// + /// A track is also muted when one of its parent tracks are muted. + /// + public bool mutedInHierarchy + { + get + { + if (muted) + return true; + + TrackAsset p = this; + while (p.parent as TrackAsset != null) + { + p = (TrackAsset)p.parent; + if (p as GroupTrack != null) + return p.mutedInHierarchy; + } + + return false; + } + } + + /// + /// The TimelineAsset that this track belongs to. + /// + public TimelineAsset timelineAsset + { + get + { + var node = this; + while (node != null) + { + if (node.parent == null) + return null; + + var seq = node.parent as TimelineAsset; + if (seq != null) + return seq; + + node = node.parent as TrackAsset; + } + return null; + } + } + + /// + /// The owner of this track. + /// + /// + /// If this track is a subtrack, the parent is a TrackAsset. Otherwise the parent is a TimelineAsset. + /// + public PlayableAsset parent + { + get { return m_Parent; } + internal set { m_Parent = value; } + } + + /// + /// A list of clips owned by this track + /// + /// Returns an enumerable list of clips owned by the track. + public IEnumerable GetClips() + { + return clips; + } + + internal TimelineClip[] clips + { + get + { + if (m_Clips == null) + m_Clips = new List(); + + if (m_ClipsCache == null) + { + m_CacheSorted = false; + m_ClipsCache = m_Clips.ToArray(); + } + + return m_ClipsCache; + } + } + + /// + /// Whether this track is considered empty. + /// + /// + /// A track is considered empty when it does not contain a TimelineClip, Marker, or Curve. + /// + /// + /// Empty tracks are not included in the playable graph. + /// + public virtual bool isEmpty + { + get { return !hasClips && !hasCurves && GetMarkerCount() == 0; } + } + + /// + /// Whether this track contains any TimelineClip. + /// + public bool hasClips + { + get { return m_Clips != null && m_Clips.Count != 0; } + } + + /// + /// Whether this track contains animated properties for the attached PlayableAsset. + /// + /// + /// This property is false if the curves property is null or if it contains no information. + /// + public bool hasCurves + { + get { return m_Curves != null && !m_Curves.empty; } + } + + /// + /// Returns whether this track is a subtrack + /// + public bool isSubTrack + { + get + { + var owner = parent as TrackAsset; + return owner != null && owner.GetType() == GetType(); + } + } + + + /// + /// Returns a description of the PlayableOutputs that will be created by this track. + /// + public override IEnumerable outputs + { + get + { + TrackBindingTypeAttribute attribute; + if (!s_TrackBindingTypeAttributeCache.TryGetValue(GetType(), out attribute)) + { + attribute = (TrackBindingTypeAttribute)Attribute.GetCustomAttribute(GetType(), typeof(TrackBindingTypeAttribute)); + s_TrackBindingTypeAttributeCache.Add(GetType(), attribute); + } + + var trackBindingType = attribute != null ? attribute.type : null; + yield return ScriptPlayableBinding.Create(name, this, trackBindingType); + } + } + + /// + /// The list of subtracks or child tracks attached to this track. + /// + /// Returns an enumerable list of child tracks owned directly by this track. + /// + /// In the case of GroupTracks, this returns all tracks contained in the group. This will return the all subtracks or override tracks, if supported by the track. + /// + public IEnumerable GetChildTracks() + { + UpdateChildTrackCache(); + return m_ChildTrackCache; + } + + internal string customPlayableTypename + { + get { return m_CustomPlayableFullTypename; } + set { m_CustomPlayableFullTypename = value; } + } + + /// + /// An animation clip storing animated properties of the attached PlayableAsset + /// + public AnimationClip curves + { + get { return m_Curves; } + internal set { m_Curves = value; } + } + + string ICurvesOwner.defaultCurvesName + { + get { return kDefaultCurvesName; } + } + + Object ICurvesOwner.asset + { + get { return this; } + } + + Object ICurvesOwner.assetOwner + { + get { return timelineAsset; } + } + + TrackAsset ICurvesOwner.targetTrack + { + get { return this; } + } + + // for UI where we need to detect 'null' objects + internal List subTracksObjects + { + get { return m_Children; } + } + + /// + /// The local locked state of the track. + /// + /// + /// Note that locking a track only affects operations in the Timeline Editor. It does not prevent other API calls from changing a track or it's clips. + /// + /// This returns or sets the local locked state of the track. A track may still be locked for editing because one or more of it's parent tracks in the hierarchy is locked. Use lockedInHierarchy to test if a track is locked because of it's own locked state or because of a parent tracks locked state. + /// + public bool locked + { + get { return m_Locked; } + set { m_Locked = value; } + } + + /// + /// The locked state of a track. (RO) + /// + /// + /// Note that locking a track only affects operations in the Timeline Editor. It does not prevent other API calls from changing a track or it's clips. + /// + /// This indicates whether a track is locked in the Timeline Editor because either it's locked property is enabled or a parent track is locked. + /// + public bool lockedInHierarchy + { + get + { + if (locked) + return true; + + TrackAsset p = this; + while (p.parent as TrackAsset != null) + { + p = (TrackAsset)p.parent; + if (p as GroupTrack != null) + return p.lockedInHierarchy; + } + + return false; + } + } + + /// + /// Indicates if a track accepts markers that implement . + /// + /// + /// Only tracks with a bound object of type or can accept notifications. + /// + public bool supportsNotifications + { + get + { + if (!m_SupportsNotifications.HasValue) + { + m_SupportsNotifications = NotificationUtilities.TrackTypeSupportsNotifications(GetType()); + } + + return m_SupportsNotifications.Value; + } + } + + void __internalAwake() //do not use OnEnable, since users will want it to initialize their class + { + if (m_Clips == null) + m_Clips = new List(); + + m_ChildTrackCache = null; + if (m_Children == null) + m_Children = new List(); +#if UNITY_EDITOR + // validate the array. DON'T remove Unity null objects, just actual null objects + for (int i = m_Children.Count - 1; i >= 0; i--) + { + object o = m_Children[i]; + if (o == null) + { + Debug.LogWarning("Empty child track found while loading timeline. It will be removed."); + m_Children.RemoveAt(i); + } + } +#endif + } + + /// + /// Creates an AnimationClip to store animated properties for the attached PlayableAsset. + /// + /// + /// If curves already exists for this track, this method produces no result regardless of + /// the value specified for curvesClipName. + /// + /// + /// When used from the editor, this method attempts to save the created curves clip to the TimelineAsset. + /// The TimelineAsset must already exist in the AssetDatabase to save the curves clip. If the TimelineAsset + /// does not exist, the curves clip is still created but it is not saved. + /// + /// + /// The name of the AnimationClip to create. + /// This method does not ensure unique names. If you want a unique clip name, you must provide one. + /// See ObjectNames.GetUniqueName for information on a method that creates unique names. + /// + public void CreateCurves(string curvesClipName) + { + if (m_Curves != null) + return; + + m_Curves = TimelineCreateUtilities.CreateAnimationClipForTrack(string.IsNullOrEmpty(curvesClipName) ? kDefaultCurvesName : curvesClipName, this, true); + } + + /// + /// Creates a mixer used to blend playables generated by clips on the track. + /// + /// The graph to inject playables into + /// The GameObject that requested the graph. + /// The number of playables from clips that will be inputs to the returned mixer + /// A handle to the [[Playable]] representing the mixer. + /// + /// Override this method to provide a custom playable for mixing clips on a graph. + /// + public virtual Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount) + { + return Playable.Create(graph, inputCount); + } + + /// + /// Overrides PlayableAsset.CreatePlayable(). Not used in Timeline. + /// + public sealed override Playable CreatePlayable(PlayableGraph graph, GameObject go) + { + return Playable.Null; + } + + /// + /// Creates a TimelineClip on this track. + /// + /// Returns a new TimelineClip that is attached to the track. + /// + /// The type of the playable asset attached to the clip is determined by TrackClip attributes that decorate the TrackAsset derived class + /// + public TimelineClip CreateDefaultClip() + { + var trackClipTypeAttributes = GetType().GetCustomAttributes(typeof(TrackClipTypeAttribute), true); + Type playableAssetType = null; + foreach (var trackClipTypeAttribute in trackClipTypeAttributes) + { + var attribute = trackClipTypeAttribute as TrackClipTypeAttribute; + if (attribute != null && typeof(IPlayableAsset).IsAssignableFrom(attribute.inspectedType) && typeof(ScriptableObject).IsAssignableFrom(attribute.inspectedType)) + { + playableAssetType = attribute.inspectedType; + break; + } + } + + if (playableAssetType == null) + { + Debug.LogWarning("Cannot create a default clip for type " + GetType()); + return null; + } + return CreateAndAddNewClipOfType(playableAssetType); + } + + /// + /// Creates a clip on the track with a playable asset attached, whose derived type is specified by T + /// + /// A PlayableAsset derived type + /// Returns a TimelineClip whose asset is of type T + /// + /// Throws an InvalidOperationException if the specified type is not supported by the track. + /// Supported types are determined by TrackClip attributes that decorate the TrackAsset derived class + /// + public TimelineClip CreateClip() where T : ScriptableObject, IPlayableAsset + { + return CreateClip(typeof(T)); + } + + /// + /// Creates a marker of the requested type, at a specific time, and adds the marker to the current asset. + /// + /// The type of marker. + /// The time where the marker is created. + /// Returns the instance of the created marker. + /// + /// All markers that implement IMarker and inherit from are supported. + /// Markers that implement the INotification interface cannot be added to tracks that do not support notifications. + /// CreateMarker will throw an InvalidOperationException with tracks that do not support notifications if type implements the INotification interface. + /// + /// + /// + public IMarker CreateMarker(Type type, double time) + { + return m_Markers.CreateMarker(type, time, this); + } + + /// + /// Creates a marker of the requested type, at a specific time, and adds the marker to the current asset. + /// + /// The time where the marker is created. + /// Returns the instance of the created marker. + /// + /// All markers that implement IMarker and inherit from are supported. + /// CreateMarker will throw an InvalidOperationException with tracks that do not support notifications if T implements the INotification interface. + /// + /// + /// + public T CreateMarker(double time) where T : ScriptableObject, IMarker + { + return (T)CreateMarker(typeof(T), time); + } + + /// + /// Removes a marker from the current asset. + /// + /// The marker instance to be removed. + /// Returns true if the marker instance was successfully removed. Returns false otherwise. + public bool DeleteMarker(IMarker marker) + { + return m_Markers.Remove(marker); + } + + /// + /// Returns an enumerable list of markers on the current asset. + /// + /// The list of markers on the asset. + /// + public IEnumerable GetMarkers() + { + return m_Markers.GetMarkers(); + } + + /// + /// Returns the number of markers on the current asset. + /// + /// The number of markers. + public int GetMarkerCount() + { + return m_Markers.Count; + } + + /// + /// Returns the marker at a given position, on the current asset. + /// + /// The index of the marker to be returned. + /// The marker. + /// The ordering of the markers is not guaranteed. + /// + public IMarker GetMarker(int idx) + { + return m_Markers[idx]; + } + + internal TimelineClip CreateClip(System.Type requestedType) + { + if (ValidateClipType(requestedType)) + return CreateAndAddNewClipOfType(requestedType); + + throw new InvalidOperationException("Clips of type " + requestedType + " are not permitted on tracks of type " + GetType()); + } + + internal TimelineClip CreateAndAddNewClipOfType(Type requestedType) + { + var newClip = CreateClipOfType(requestedType); + AddClip(newClip); + return newClip; + } + + internal TimelineClip CreateClipOfType(Type requestedType) + { + if (!ValidateClipType(requestedType)) + throw new System.InvalidOperationException("Clips of type " + requestedType + " are not permitted on tracks of type " + GetType()); + + var playableAsset = CreateInstance(requestedType); + if (playableAsset == null) + { + throw new System.InvalidOperationException("Could not create an instance of the ScriptableObject type " + requestedType.Name); + } + playableAsset.name = requestedType.Name; + TimelineCreateUtilities.SaveAssetIntoObject(playableAsset, this); + TimelineUndo.RegisterCreatedObjectUndo(playableAsset, "Create Clip"); + + return CreateClipFromAsset(playableAsset); + } + + /// + /// Creates a timeline clip from an existing playable asset. + /// + /// + /// + internal TimelineClip CreateClipFromPlayableAsset(IPlayableAsset asset) + { + if (asset == null) + throw new ArgumentNullException("asset"); + + if ((asset as ScriptableObject) == null) + throw new System.ArgumentException("CreateClipFromPlayableAsset " + " only supports ScriptableObject-derived Types"); + + if (!ValidateClipType(asset.GetType())) + throw new System.InvalidOperationException("Clips of type " + asset.GetType() + " are not permitted on tracks of type " + GetType()); + + return CreateClipFromAsset(asset as ScriptableObject); + } + + private TimelineClip CreateClipFromAsset(ScriptableObject playableAsset) + { + TimelineUndo.PushUndo(this, "Create Clip"); + + var newClip = CreateNewClipContainerInternal(); + newClip.displayName = playableAsset.name; + newClip.asset = playableAsset; + + IPlayableAsset iPlayableAsset = playableAsset as IPlayableAsset; + if (iPlayableAsset != null) + { + var candidateDuration = iPlayableAsset.duration; + + if (!double.IsInfinity(candidateDuration) && candidateDuration > 0) + newClip.duration = Math.Min(Math.Max(candidateDuration, TimelineClip.kMinDuration), TimelineClip.kMaxTimeValue); + } + + try + { + OnCreateClip(newClip); + } + catch (Exception e) + { + Debug.LogError(e.Message, playableAsset); + return null; + } + + return newClip; + } + + internal IEnumerable GetMarkersRaw() + { + return m_Markers.GetRawMarkerList(); + } + + internal void ClearMarkers() + { + m_Markers.Clear(); + } + + internal void AddMarker(ScriptableObject e) + { + m_Markers.Add(e); + } + + internal bool DeleteMarkerRaw(ScriptableObject marker) + { + return m_Markers.Remove(marker, timelineAsset, this); + } + + int GetTimeRangeHash() + { + double start = double.MaxValue, end = double.MinValue; + foreach (var marker in GetMarkers()) + { + if (!(marker is INotification)) + { + continue; + } + + if (marker.time < start) + start = marker.time; + if (marker.time > end) + end = marker.time; + } + + return start.GetHashCode().CombineHash(end.GetHashCode()); + } + + internal void AddClip(TimelineClip newClip) + { + if (!m_Clips.Contains(newClip)) + { + m_Clips.Add(newClip); + m_ClipsCache = null; + } + } + + Playable CreateNotificationsPlayable(PlayableGraph graph, Playable mixerPlayable, GameObject go, Playable timelinePlayable) + { + s_BuildData.markerList.Clear(); + GatherNotificiations(s_BuildData.markerList); + var notificationPlayable = NotificationUtilities.CreateNotificationsPlayable(graph, s_BuildData.markerList, go); + if (notificationPlayable.IsValid()) + { + notificationPlayable.GetBehaviour().timeSource = timelinePlayable; + if (mixerPlayable.IsValid()) + { + notificationPlayable.SetInputCount(1); + graph.Connect(mixerPlayable, 0, notificationPlayable, 0); + notificationPlayable.SetInputWeight(mixerPlayable, 1); + } + } + + return notificationPlayable; + } + + internal Playable CreatePlayableGraph(PlayableGraph graph, GameObject go, IntervalTree tree, Playable timelinePlayable) + { + UpdateDuration(); + var mixerPlayable = Playable.Null; + if (CanCompileClipsRecursive()) + mixerPlayable = OnCreateClipPlayableGraph(graph, go, tree); + + var notificationsPlayable = CreateNotificationsPlayable(graph, mixerPlayable, go, timelinePlayable); + if (!notificationsPlayable.IsValid() && !mixerPlayable.IsValid()) + { + Debug.LogErrorFormat("Track {0} of type {1} has no notifications and returns an invalid mixer Playable", name, + GetType().FullName); + + return Playable.Create(graph); + } + + return notificationsPlayable.IsValid() ? notificationsPlayable : mixerPlayable; + } + + internal virtual Playable CompileClips(PlayableGraph graph, GameObject go, IList timelineClips, IntervalTree tree) + { + var blend = CreateTrackMixer(graph, go, timelineClips.Count); + for (var c = 0; c < timelineClips.Count; c++) + { + var source = CreatePlayable(graph, go, timelineClips[c]); + if (source.IsValid()) + { + source.SetDuration(timelineClips[c].duration); + var clip = new RuntimeClip(timelineClips[c], source, blend); + tree.Add(clip); + graph.Connect(source, 0, blend, c); + blend.SetInputWeight(c, 0.0f); + } + } + ConfigureTrackAnimation(tree, go, blend); + return blend; + } + + void GatherCompilableTracks(IList tracks) + { + if (!muted && CanCompileClips()) + tracks.Add(this); + + foreach (var c in GetChildTracks()) + { + if (c != null) + c.GatherCompilableTracks(tracks); + } + } + + void GatherNotificiations(List markers) + { + if (!muted && CanCompileNotifications()) + markers.AddRange(GetMarkers()); + foreach (var c in GetChildTracks()) + { + if (c != null) + c.GatherNotificiations(markers); + } + } + + internal virtual Playable OnCreateClipPlayableGraph(PlayableGraph graph, GameObject go, IntervalTree tree) + { + if (tree == null) + throw new ArgumentException("IntervalTree argument cannot be null", "tree"); + + if (go == null) + throw new ArgumentException("GameObject argument cannot be null", "go"); + + s_BuildData.Clear(); + GatherCompilableTracks(s_BuildData.trackList); + + // nothing to compile + if (s_BuildData.trackList.Count == 0) + return Playable.Null; + + // check if layers are supported + Playable layerMixer = Playable.Null; + ILayerable layerable = this as ILayerable; + if (layerable != null) + layerMixer = layerable.CreateLayerMixer(graph, go, s_BuildData.trackList.Count); + + if (layerMixer.IsValid()) + { + for (int i = 0; i < s_BuildData.trackList.Count; i++) + { + var mixer = s_BuildData.trackList[i].CompileClips(graph, go, s_BuildData.trackList[i].clips, tree); + if (mixer.IsValid()) + { + graph.Connect(mixer, 0, layerMixer, i); + layerMixer.SetInputWeight(i, 1.0f); + } + } + return layerMixer; + } + + // one track compiles. Add track mixer and clips + if (s_BuildData.trackList.Count == 1) + return s_BuildData.trackList[0].CompileClips(graph, go, s_BuildData.trackList[0].clips, tree); + + // no layer mixer provided. merge down all clips. + for (int i = 0; i < s_BuildData.trackList.Count; i++) + s_BuildData.clipList.AddRange(s_BuildData.trackList[i].clips); + +#if UNITY_EDITOR + bool applyWarning = false; + for (int i = 0; i < s_BuildData.trackList.Count; i++) + applyWarning |= i > 0 && s_BuildData.trackList[i].hasCurves; + + if (applyWarning) + Debug.LogWarning("A layered track contains animated fields, but no layer mixer has been provided. Animated fields on layers will be ignored. Override CreateLayerMixer in " + s_BuildData.trackList[0].GetType().Name + " and return a valid playable to support animated fields on layered tracks."); +#endif + // compile all the clips into a single mixer + return CompileClips(graph, go, s_BuildData.clipList, tree); + } + + internal void ConfigureTrackAnimation(IntervalTree tree, GameObject go, Playable blend) + { + if (!hasCurves) + return; + + blend.SetAnimatedProperties(m_Curves); + tree.Add(new InfiniteRuntimeClip(blend)); + + if (OnTrackAnimationPlayableCreate != null) + OnTrackAnimationPlayableCreate.Invoke(this, go, blend); + } + + // sorts clips by start time + internal void SortClips() + { + var clipsAsArray = clips; // will alloc + if (!m_CacheSorted) + { + Array.Sort(clips, (clip1, clip2) => clip1.start.CompareTo(clip2.start)); + m_CacheSorted = true; + } + } + + // clears the clips after a clone + internal void ClearClipsInternal() + { + m_Clips = new List(); + m_ClipsCache = null; + } + + internal void ClearSubTracksInternal() + { + m_Children = new List(); + Invalidate(); + } + + // called by an owned clip when it moves + internal void OnClipMove() + { + m_CacheSorted = false; + } + + internal TimelineClip CreateNewClipContainerInternal() + { + var clipContainer = new TimelineClip(this); + clipContainer.asset = null; + + // position clip at end of sequence + var newClipStart = 0.0; + for (var a = 0; a < m_Clips.Count - 1; a++) + { + var clipDuration = m_Clips[a].duration; + if (double.IsInfinity(clipDuration)) + clipDuration = TimelineClip.kDefaultClipDurationInSeconds; + newClipStart = Math.Max(newClipStart, m_Clips[a].start + clipDuration); + } + + clipContainer.mixInCurve = AnimationCurve.EaseInOut(0, 0, 1, 1); + clipContainer.mixOutCurve = AnimationCurve.EaseInOut(0, 1, 1, 0); + clipContainer.start = newClipStart; + clipContainer.duration = TimelineClip.kDefaultClipDurationInSeconds; + clipContainer.displayName = "untitled"; + return clipContainer; + } + + internal void AddChild(TrackAsset child) + { + if (child == null) + return; + + m_Children.Add(child); + child.parent = this; + Invalidate(); + } + + internal void MoveLastTrackBefore(TrackAsset asset) + { + if (m_Children == null || m_Children.Count < 2 || asset == null) + return; + + var lastTrack = m_Children[m_Children.Count - 1]; + if (lastTrack == asset) + return; + + for (int i = 0; i < m_Children.Count - 1; i++) + { + if (m_Children[i] == asset) + { + for (int j = m_Children.Count - 1; j > i; j--) + m_Children[j] = m_Children[j - 1]; + m_Children[i] = lastTrack; + Invalidate(); + break; + } + } + } + + internal bool RemoveSubTrack(TrackAsset child) + { + if (m_Children.Remove(child)) + { + Invalidate(); + child.parent = null; + return true; + } + return false; + } + + internal void RemoveClip(TimelineClip clip) + { + m_Clips.Remove(clip); + m_ClipsCache = null; + } + + // Is this track compilable for the sequence + // calculate the time interval that this track will be evaluated in. + internal virtual void GetEvaluationTime(out double outStart, out double outDuration) + { + outStart = double.PositiveInfinity; + var outEnd = double.NegativeInfinity; + + if (hasCurves) + { + outStart = 0.0; + outEnd = TimeUtility.GetAnimationClipLength(curves); + } + + foreach (var clip in clips) + { + outStart = Math.Min(clip.start, outStart); + outEnd = Math.Max(clip.end, outEnd); + } + + if (HasNotifications()) + { + var notificationDuration = GetNotificationDuration(); + outStart = Math.Min(notificationDuration, outStart); + outEnd = Math.Max(notificationDuration, outEnd); + } + + if (double.IsInfinity(outStart) || double.IsInfinity(outEnd)) + outStart = outDuration = 0.0; + else + outDuration = outEnd - outStart; + } + + // calculate the time interval that the sequence will use to determine length. + // by default this is the same as the evaluation, but subclasses can have different + // behaviour + internal virtual void GetSequenceTime(out double outStart, out double outDuration) + { + GetEvaluationTime(out outStart, out outDuration); + } + + /// + /// Called by the Timeline Editor to gather properties requiring preview. + /// + /// The PlayableDirector invoking the preview + /// PropertyCollector used to gather previewable properties + public virtual void GatherProperties(PlayableDirector director, IPropertyCollector driver) + { + // only push on game objects if there is a binding. Subtracks + // will use objects on the stack + var gameObject = GetGameObjectBinding(director); + if (gameObject != null) + driver.PushActiveGameObject(gameObject); + + if (hasCurves) + driver.AddObjectProperties(this, m_Curves); + + foreach (var clip in clips) + { + if (clip.curves != null && clip.asset != null) + driver.AddObjectProperties(clip.asset, clip.curves); + + IPropertyPreview modifier = clip.asset as IPropertyPreview; + if (modifier != null) + modifier.GatherProperties(director, driver); + } + + foreach (var subtrack in GetChildTracks()) + { + if (subtrack != null) + subtrack.GatherProperties(director, driver); + } + + if (gameObject != null) + driver.PopActiveGameObject(); + } + + internal GameObject GetGameObjectBinding(PlayableDirector director) + { + if (director == null) + return null; + + var binding = director.GetGenericBinding(this); + + var gameObject = binding as GameObject; + if (gameObject != null) + return gameObject; + + var comp = binding as Component; + if (comp != null) + return comp.gameObject; + + return null; + } + + internal bool ValidateClipType(Type clipType) + { + var attrs = GetType().GetCustomAttributes(typeof(TrackClipTypeAttribute), true); + for (var c = 0; c < attrs.Length; ++c) + { + var attr = (TrackClipTypeAttribute)attrs[c]; + if (attr.inspectedType.IsAssignableFrom(clipType)) + return true; + } + + // special case for playable tracks, they accept all clips (in the runtime) + return typeof(PlayableTrack).IsAssignableFrom(GetType()) && + typeof(IPlayableAsset).IsAssignableFrom(clipType) && + typeof(ScriptableObject).IsAssignableFrom(clipType); + } + + /// + /// Called when a clip is created on a track. + /// + /// The timeline clip added to this track + /// Use this method to set default values on a timeline clip, or it's PlayableAsset. + protected virtual void OnCreateClip(TimelineClip clip) {} + + void UpdateDuration() + { + // check if something changed in the clips that require a re-calculation of the evaluation times. + var itemsHash = CalculateItemsHash(); + if (itemsHash == m_ItemsHash) + return; + m_ItemsHash = itemsHash; + + double trackStart, trackDuration; + GetSequenceTime(out trackStart, out trackDuration); + + m_Start = (DiscreteTime)trackStart; + m_End = (DiscreteTime)(trackStart + trackDuration); + + // calculate the extrapolations time. + // TODO Extrapolation time should probably be extracted from the SequenceClip so only a track is aware of it. + this.CalculateExtrapolationTimes(); + } + + protected internal virtual int CalculateItemsHash() + { + return HashUtility.CombineHash(GetClipsHash(), GetAnimationClipHash(m_Curves), GetTimeRangeHash()); + } + + /// + /// Constructs a Playable from a TimelineClip. + /// + /// PlayableGraph that will own the playable. + /// The GameObject that builds the PlayableGraph. + /// The TimelineClip to construct a playable for. + /// A playable that will be set as an input to the Track Mixer playable, or Playable.Null if the clip does not have a valid PlayableAsset + /// Thrown if the specified PlayableGraph is not valid. + /// Thrown if the specified TimelineClip is not valid. + /// + /// By default, this method invokes Playable.CreatePlayable, sets animated properties, and sets the speed of the created playable. Override this method to change this default implementation. + /// + protected virtual Playable CreatePlayable(PlayableGraph graph, GameObject gameObject, TimelineClip clip) + { + if (!graph.IsValid()) + throw new ArgumentException("graph must be a valid PlayableGraph"); + if (clip == null) + throw new ArgumentNullException("clip"); + + var asset = clip.asset as IPlayableAsset; + if (asset != null) + { + var handle = asset.CreatePlayable(graph, gameObject); + if (handle.IsValid()) + { + handle.SetAnimatedProperties(clip.curves); + handle.SetSpeed(clip.timeScale); + if (OnClipPlayableCreate != null) + OnClipPlayableCreate(clip, gameObject, handle); + } + return handle; + } + return Playable.Null; + } + + internal void Invalidate() + { + m_ChildTrackCache = null; + var timeline = timelineAsset; + if (timeline != null) + { + timeline.Invalidate(); + } + } + + internal double GetNotificationDuration() + { + if (!supportsNotifications) + { + return 0; + } + + var maxTime = 0.0; + foreach (var marker in GetMarkers()) + { + if (!(marker is INotification)) + { + continue; + } + maxTime = Math.Max(maxTime, marker.time); + } + + return maxTime; + } + + internal virtual bool CanCompileClips() + { + return hasClips || hasCurves; + } + + internal bool IsCompilable() + { + var isContainer = typeof(GroupTrack).IsAssignableFrom(GetType()); + + if (isContainer) + return false; + + var ret = !mutedInHierarchy && (CanCompileClips() || CanCompileNotifications()); + if (!ret) + { + foreach (var t in GetChildTracks()) + { + if (t.IsCompilable()) + return true; + } + } + + return ret; + } + + private void UpdateChildTrackCache() + { + if (m_ChildTrackCache == null) + { + if (m_Children == null || m_Children.Count == 0) + m_ChildTrackCache = s_EmptyCache; + else + { + var childTracks = new List(m_Children.Count); + for (int i = 0; i < m_Children.Count; i++) + { + var subTrack = m_Children[i] as TrackAsset; + if (subTrack != null) + childTracks.Add(subTrack); + } + m_ChildTrackCache = childTracks; + } + } + } + + internal virtual int Hash() + { + return clips.Length + (m_Markers.Count << 16); + } + + int GetClipsHash() + { + var hash = 0; + foreach (var clip in m_Clips) + { + hash = hash.CombineHash(clip.Hash()); + } + return hash; + } + + protected static int GetAnimationClipHash(AnimationClip clip) + { + var hash = 0; + if (clip != null && !clip.empty) + hash = hash.CombineHash(clip.frameRate.GetHashCode()) + .CombineHash(clip.length.GetHashCode()); + + return hash; + } + + bool HasNotifications() + { + return m_Markers.HasNotifications(); + } + + bool CanCompileNotifications() + { + return supportsNotifications && m_Markers.HasNotifications(); + } + + bool CanCompileClipsRecursive() + { + if (CanCompileClips()) + return true; + foreach (var track in GetChildTracks()) + { + if (track.CanCompileClipsRecursive()) + return true; + } + + return false; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TrackAsset.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TrackAsset.cs.meta new file mode 100644 index 0000000..06213be --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/TrackAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3ad53269c7421084ab67f804591994e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Unity.Timeline.asmdef b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Unity.Timeline.asmdef new file mode 100644 index 0000000..d4d4bbe --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Unity.Timeline.asmdef @@ -0,0 +1,6 @@ +{ + "name": "Unity.Timeline", + "references": [], + "includePlatforms": [], + "excludePlatforms": [] +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Unity.Timeline.asmdef.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Unity.Timeline.asmdef.meta new file mode 100644 index 0000000..454c5db --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Unity.Timeline.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f06555f75b070af458a003d92f9efb00 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities.meta new file mode 100644 index 0000000..b9c8db0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f8730045d7da0f84cb11c0d868899577 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimationPreviewUtilities.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimationPreviewUtilities.cs new file mode 100644 index 0000000..b8ab669 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimationPreviewUtilities.cs @@ -0,0 +1,266 @@ +#if UNITY_EDITOR +using System.Collections.Generic; +using UnityEditor; + + +namespace UnityEngine.Timeline +{ + static class AnimationPreviewUtilities + { + private const string k_PosX = "m_LocalPosition.x"; + private const string k_PosY = "m_LocalPosition.y"; + private const string k_PosZ = "m_LocalPosition.z"; + private const string k_RotX = "m_LocalRotation.x"; + private const string k_RotY = "m_LocalRotation.y"; + private const string k_RotZ = "m_LocalRotation.z"; + private const string k_RotW = "m_LocalRotation.w"; + private const string k_ScaleX = "m_LocalScale.x"; + private const string k_ScaleY = "m_LocalScale.y"; + private const string k_ScaleZ = "m_LocalScale.z"; + private const string k_EulerAnglesRaw = "localEulerAnglesRaw"; + private const string k_EulerHint = "m_LocalEulerAnglesHint"; + private const string k_Pos = "m_LocalPosition"; + private const string k_Rot = "m_LocalRotation"; + private const string k_MotionT = "MotionT"; + private const string k_MotionQ = "MotionQ"; + private const string k_RootT = "RootT"; + private const string k_RootQ = "RootQ"; + + + internal class EditorCurveBindingComparer : IEqualityComparer + { + public bool Equals(EditorCurveBinding x, EditorCurveBinding y) { return x.path.Equals(y.path) && x.type == y.type && x.propertyName == y.propertyName; } + public int GetHashCode(EditorCurveBinding obj) + { + return obj.propertyName.GetHashCode() ^ obj.path.GetHashCode(); + } + + public static readonly EditorCurveBindingComparer Instance = new EditorCurveBindingComparer(); + } + + // a dictionary is faster than a hashset, because the capacity can be pre-set + private static readonly Dictionary s_CurveSet = new Dictionary(10000, EditorCurveBindingComparer.Instance); + private static readonly AnimatorBindingCache s_BindingCache = new AnimatorBindingCache(); + + public static void ClearCaches() + { + s_BindingCache.Clear(); + s_CurveSet.Clear(); + } + + public static EditorCurveBinding[] GetBindings(GameObject animatorRoot, IEnumerable clips) + { + s_CurveSet.Clear(); + foreach (var clip in clips) + { + AddBindings(s_BindingCache.GetCurveBindings(clip)); + } + + // if we have a transform binding, bind the entire skeleton + if (NeedsSkeletonBindings(s_CurveSet.Keys)) + AddBindings(s_BindingCache.GetAnimatorBindings(animatorRoot)); + + var bindings = new EditorCurveBinding[s_CurveSet.Keys.Count]; + s_CurveSet.Keys.CopyTo(bindings, 0); + return bindings; + } + + public static void PreviewFromCurves(GameObject animatorRoot, IEnumerable keys) + { + if (!AnimationMode.InAnimationMode()) + return; + + var avatarRoot = GetAvatarRoot(animatorRoot); + foreach (var binding in keys) + { + if (IsAvatarBinding(binding) || IsEuler(binding)) + continue; + + bool isTransform = typeof(Transform).IsAssignableFrom(binding.type); + if (isTransform && binding.propertyName == AnimatorBindingCache.TRPlaceHolder) + AddTRBinding(animatorRoot, binding); + else if (isTransform && binding.propertyName == AnimatorBindingCache.ScalePlaceholder) + AddScaleBinding(animatorRoot, binding); + else + AnimationMode.AddEditorCurveBinding(avatarRoot, binding); + } + } + + public static AnimationClip CreateDefaultClip(GameObject animatorRoot, IEnumerable keys) + { + AnimationClip animClip = new AnimationClip() { name = "DefaultPose" }; + var keyFrames = new[] {new Keyframe(0, 0)}; + var curve = new AnimationCurve(keyFrames); + bool rootMotion = false; + var avatarRoot = GetAvatarRoot(animatorRoot); + + foreach (var binding in keys) + { + if (IsRootMotion(binding)) + { + rootMotion = true; + continue; + } + + if (typeof(Transform).IsAssignableFrom(binding.type) && binding.propertyName == AnimatorBindingCache.TRPlaceHolder) + { + if (string.IsNullOrEmpty(binding.path)) + rootMotion = true; + else + { + var transform = animatorRoot.transform.Find(binding.path); + if (transform != null) + { + var pos = transform.localPosition; + var rot = transform.localRotation; + animClip.SetCurve(binding.path, typeof(Transform), k_PosX, SetZeroKey(curve, keyFrames, pos.x)); + animClip.SetCurve(binding.path, typeof(Transform), k_PosY, SetZeroKey(curve, keyFrames, pos.y)); + animClip.SetCurve(binding.path, typeof(Transform), k_PosZ, SetZeroKey(curve, keyFrames, pos.z)); + animClip.SetCurve(binding.path, typeof(Transform), k_RotX, SetZeroKey(curve, keyFrames, rot.x)); + animClip.SetCurve(binding.path, typeof(Transform), k_RotY, SetZeroKey(curve, keyFrames, rot.y)); + animClip.SetCurve(binding.path, typeof(Transform), k_RotZ, SetZeroKey(curve, keyFrames, rot.z)); + animClip.SetCurve(binding.path, typeof(Transform), k_RotW, SetZeroKey(curve, keyFrames, rot.w)); + } + } + + continue; + } + + if (typeof(Transform).IsAssignableFrom(binding.type) && binding.propertyName == AnimatorBindingCache.ScalePlaceholder) + { + var transform = animatorRoot.transform.Find(binding.path); + if (transform != null) + { + var scale = transform.localScale; + animClip.SetCurve(binding.path, typeof(Transform), k_ScaleX, SetZeroKey(curve, keyFrames, scale.x)); + animClip.SetCurve(binding.path, typeof(Transform), k_ScaleY, SetZeroKey(curve, keyFrames, scale.y)); + animClip.SetCurve(binding.path, typeof(Transform), k_ScaleZ, SetZeroKey(curve, keyFrames, scale.z)); + } + + continue; + } + + // Not setting curves through AnimationUtility.SetEditorCurve to avoid reentrant + // onCurveWasModified calls in timeline. This means we don't get sprite curves + // in the default clip right now. + if (IsAvatarBinding(binding) || IsEulerHint(binding) || binding.isPPtrCurve) + continue; + + float floatValue; + AnimationUtility.GetFloatValue(avatarRoot, binding, out floatValue); + animClip.SetCurve(binding.path, binding.type, binding.propertyName, SetZeroKey(curve, keyFrames, floatValue)); + } + + // add root motion explicitly. + if (rootMotion) + { + var pos = Vector3.zero; // the appropriate root motion offsets are applied by timeline + var rot = Quaternion.identity; + animClip.SetCurve(string.Empty, typeof(Transform), k_PosX, SetZeroKey(curve, keyFrames, pos.x)); + animClip.SetCurve(string.Empty, typeof(Transform), k_PosY, SetZeroKey(curve, keyFrames, pos.y)); + animClip.SetCurve(string.Empty, typeof(Transform), k_PosZ, SetZeroKey(curve, keyFrames, pos.z)); + animClip.SetCurve(string.Empty, typeof(Transform), k_RotX, SetZeroKey(curve, keyFrames, rot.x)); + animClip.SetCurve(string.Empty, typeof(Transform), k_RotY, SetZeroKey(curve, keyFrames, rot.y)); + animClip.SetCurve(string.Empty, typeof(Transform), k_RotZ, SetZeroKey(curve, keyFrames, rot.z)); + animClip.SetCurve(string.Empty, typeof(Transform), k_RotW, SetZeroKey(curve, keyFrames, rot.w)); + } + + return animClip; + } + + public static bool IsRootMotion(EditorCurveBinding binding) + { + // Root Transform TR. + if (typeof(Transform).IsAssignableFrom(binding.type) && string.IsNullOrEmpty(binding.path)) + { + return binding.propertyName.StartsWith(k_Pos) || binding.propertyName.StartsWith(k_Rot); + } + + // MotionCurves/RootCurves. + if (binding.type == typeof(Animator)) + { + return binding.propertyName.StartsWith(k_MotionT) || binding.propertyName.StartsWith(k_MotionQ) || + binding.propertyName.StartsWith(k_RootT) || binding.propertyName.StartsWith(k_RootQ); + } + + return false; + } + + private static bool NeedsSkeletonBindings(IEnumerable bindings) + { + foreach (var b in bindings) + { + if (IsSkeletalBinding(b)) + return true; + } + + return false; + } + + private static void AddBindings(IEnumerable bindings) + { + foreach (var b in bindings) + { + if (!s_CurveSet.ContainsKey(b)) + s_CurveSet[b] = 1; + } + } + + private static void AddTRBinding(GameObject root, EditorCurveBinding binding) + { + // This is faster than AnimationMode.AddTransformTR + binding.propertyName = k_PosX; AnimationMode.AddEditorCurveBinding(root, binding); + binding.propertyName = k_PosY; AnimationMode.AddEditorCurveBinding(root, binding); + binding.propertyName = k_PosZ; AnimationMode.AddEditorCurveBinding(root, binding); + binding.propertyName = k_RotX; AnimationMode.AddEditorCurveBinding(root, binding); + binding.propertyName = k_RotY; AnimationMode.AddEditorCurveBinding(root, binding); + binding.propertyName = k_RotZ; AnimationMode.AddEditorCurveBinding(root, binding); + binding.propertyName = k_RotW; AnimationMode.AddEditorCurveBinding(root, binding); + } + + private static void AddScaleBinding(GameObject root, EditorCurveBinding binding) + { + // AnimationMode.AddTransformTRS is slow + binding.propertyName = k_ScaleX; AnimationMode.AddEditorCurveBinding(root, binding); + binding.propertyName = k_ScaleY; AnimationMode.AddEditorCurveBinding(root, binding); + binding.propertyName = k_ScaleZ; AnimationMode.AddEditorCurveBinding(root, binding); + } + + private static bool IsEuler(EditorCurveBinding binding) + { + return typeof(Transform).IsAssignableFrom(binding.type) && binding.propertyName.StartsWith(k_EulerAnglesRaw); + } + + private static bool IsAvatarBinding(EditorCurveBinding binding) + { + return typeof(Animator).IsAssignableFrom(binding.type) && string.IsNullOrEmpty(binding.path); + } + + private static bool IsSkeletalBinding(EditorCurveBinding binding) + { + // skin mesh incorporates blend shapes + return typeof(Transform).IsAssignableFrom(binding.type) || typeof(SkinnedMeshRenderer).IsAssignableFrom(binding.type); + } + + private static AnimationCurve SetZeroKey(AnimationCurve curve, Keyframe[] keys, float val) + { + keys[0].value = val; + curve.keys = keys; + return curve; + } + + private static bool IsEulerHint(EditorCurveBinding binding) + { + return typeof(Transform).IsAssignableFrom(binding.type) && binding.propertyName.StartsWith(k_EulerHint); + } + + private static GameObject GetAvatarRoot(GameObject animatorRoot) + { + var animator = animatorRoot.GetComponent(); + if (animator != null && animator.avatarRoot != animatorRoot.transform) + return animator.avatarRoot.gameObject; + return animatorRoot; + } + } +} +#endif diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimationPreviewUtilities.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimationPreviewUtilities.cs.meta new file mode 100644 index 0000000..82e3768 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimationPreviewUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01da6c5b7c781174d818662ce6f39b8b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimatorBindingCache.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimatorBindingCache.cs new file mode 100644 index 0000000..53198ea --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimatorBindingCache.cs @@ -0,0 +1,133 @@ +#if UNITY_EDITOR +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Playables; +using UnityEngine.Timeline; +using UnityEditor; + +namespace UnityEngine.Timeline +{ + /// + /// Animator to Editor Curve Binding cache. Used to prevent frequent calls to GetAnimatorBindings which can be costly + /// + class AnimatorBindingCache + { + public const string TRPlaceHolder = "TransformTR"; + public const string ScalePlaceholder = "TransformScale"; + + struct AnimatorEntry + { + public int animatorID; + public bool applyRootMotion; + public bool humanoid; + } + + class AnimatorEntryComparer : IEqualityComparer + { + public bool Equals(AnimatorEntry x, AnimatorEntry y) { return x.animatorID == y.animatorID && x.applyRootMotion == y.applyRootMotion && x.humanoid == y.humanoid; } + public int GetHashCode(AnimatorEntry obj) { return HashUtility.CombineHash(obj.animatorID, obj.applyRootMotion.GetHashCode(), obj.humanoid.GetHashCode()); } + public static readonly AnimatorEntryComparer Instance = new AnimatorEntryComparer(); + } + + readonly Dictionary m_AnimatorCache = new Dictionary(AnimatorEntryComparer.Instance); + readonly Dictionary m_ClipCache = new Dictionary(); + + private static readonly EditorCurveBinding[] kEmptyArray = new EditorCurveBinding[0]; + private static readonly List s_BindingScratchPad = new List(1000); + + public AnimatorBindingCache() + { + AnimationUtility.onCurveWasModified += OnCurveWasModified; + } + + public EditorCurveBinding[] GetAnimatorBindings(GameObject gameObject) + { + if (gameObject == null) + return kEmptyArray; + + Animator animator = gameObject.GetComponent(); + if (animator == null) + return kEmptyArray; + + AnimatorEntry entry = new AnimatorEntry() + { + animatorID = animator.GetInstanceID(), + applyRootMotion = animator.applyRootMotion, + humanoid = animator.isHuman + }; + + EditorCurveBinding[] result = null; + if (m_AnimatorCache.TryGetValue(entry, out result)) + return result; + + s_BindingScratchPad.Clear(); + + // Replacement for AnimationMode.GetAnimatorBinding - this is faster and allocates kB instead of MB + var transforms = animator.GetComponentsInChildren(); + foreach (var t in transforms) + { + if (animator.IsBoneTransform(t)) + s_BindingScratchPad.Add(EditorCurveBinding.FloatCurve(AnimationUtility.CalculateTransformPath(t, animator.transform), typeof(Transform), TRPlaceHolder)); + } + + var streamBindings = AnimationUtility.GetAnimationStreamBindings(animator.gameObject); + UpdateTransformBindings(streamBindings); + s_BindingScratchPad.AddRange(streamBindings); + + result = new EditorCurveBinding[s_BindingScratchPad.Count]; + s_BindingScratchPad.CopyTo(result); + m_AnimatorCache[entry] = result; + return result; + } + + public EditorCurveBinding[] GetCurveBindings(AnimationClip clip) + { + if (clip == null) + return kEmptyArray; + + EditorCurveBinding[] result; + if (!m_ClipCache.TryGetValue(clip, out result)) + { + result = AnimationMode.GetCurveBindings(clip); + UpdateTransformBindings(result); + m_ClipCache[clip] = result; + } + + return result; + } + + private static void UpdateTransformBindings(EditorCurveBinding[] bindings) + { + for (int i = 0; i < bindings.Length; i++) + { + var binding = bindings[i]; + if (AnimationPreviewUtilities.IsRootMotion(binding)) + { + binding.type = typeof(Transform); + binding.propertyName = TRPlaceHolder; + } + else if (typeof(Transform).IsAssignableFrom(binding.type) && (binding.propertyName.StartsWith("m_LocalRotation.") || binding.propertyName.StartsWith("m_LocalPosition."))) + { + binding.propertyName = TRPlaceHolder; + } + else if (typeof(Transform).IsAssignableFrom(binding.type) && binding.propertyName.StartsWith("m_LocalScale.")) + { + binding.propertyName = ScalePlaceholder; + } + bindings[i] = binding; + } + } + + public void Clear() + { + m_AnimatorCache.Clear(); + m_ClipCache.Clear(); + } + + void OnCurveWasModified(AnimationClip clip, EditorCurveBinding binding, AnimationUtility.CurveModifiedType modification) + { + m_ClipCache.Remove(clip); + } + } +} +#endif diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimatorBindingCache.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimatorBindingCache.cs.meta new file mode 100644 index 0000000..dc6dc1d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/AnimatorBindingCache.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d0080567f62c3f94cb75b2927a349e22 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/Extrapolation.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/Extrapolation.cs new file mode 100644 index 0000000..34408c9 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/Extrapolation.cs @@ -0,0 +1,92 @@ +using System; +using UnityEngine; + +// Extension methods responsible for managing extrapolation time +namespace UnityEngine.Timeline +{ + static class Extrapolation + { + /// + /// The minimum amount of extrapolation time to apply + /// + internal static readonly double kMinExtrapolationTime = TimeUtility.kTimeEpsilon * 1000; + + // Calculates the extrapolation times + internal static void CalculateExtrapolationTimes(this TrackAsset asset) + { + TimelineClip[] clips = asset.clips; + if (clips == null || clips.Length == 0) + return; + + // extrapolation not supported + if (!clips[0].SupportsExtrapolation()) + return; + + var orderedClips = SortClipsByStartTime(clips); + if (orderedClips.Length > 0) + { + // post extrapolation is the minimum time to the next clip + for (int i = 0; i < orderedClips.Length; i++) + { + double minTime = double.PositiveInfinity; + for (int j = 0; j < orderedClips.Length; j++) + { + if (i == j) + continue; + + double deltaTime = orderedClips[j].start - orderedClips[i].end; + if (deltaTime >= -TimeUtility.kTimeEpsilon && deltaTime < minTime) + minTime = Math.Min(minTime, deltaTime); + // check for overlapped clips + if (orderedClips[j].start <= orderedClips[i].end && orderedClips[j].end > orderedClips[i].end) + minTime = 0; + } + minTime = minTime <= kMinExtrapolationTime ? 0 : minTime; + orderedClips[i].SetPostExtrapolationTime(minTime); + } + + // the first clip gets pre-extrapolation, then it's only respected if there is no post extrapolation + orderedClips[0].SetPreExtrapolationTime(Math.Max(0, orderedClips[0].start)); + for (int i = 1; i < orderedClips.Length; i++) + { + double preTime = 0; + int prevClip = -1; + for (int j = 0; j < i; j++) + { + // overlap, no pre-time + if (orderedClips[j].end > orderedClips[i].start) + { + prevClip = -1; + preTime = 0; + break; + } + + double gap = orderedClips[i].start - orderedClips[j].end; + if (prevClip == -1 || gap < preTime) + { + preTime = gap; + prevClip = j; + } + } + // check for a post extrapolation time + if (prevClip >= 0) + { + if (orderedClips[prevClip].postExtrapolationMode != TimelineClip.ClipExtrapolation.None) + preTime = 0; + } + + preTime = preTime <= kMinExtrapolationTime ? 0 : preTime; + orderedClips[i].SetPreExtrapolationTime(preTime); + } + } + } + + static TimelineClip[] SortClipsByStartTime(TimelineClip[] clips) + { + var orderedClips = new TimelineClip[clips.Length]; + Array.Copy(clips, orderedClips, clips.Length); + Array.Sort(orderedClips, (clip1, clip2) => clip1.start.CompareTo(clip2.start)); + return orderedClips; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/Extrapolation.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/Extrapolation.cs.meta new file mode 100644 index 0000000..69c90cf --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/Extrapolation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 32535dd294c621e4297fba34b15b1c52 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/HashUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/HashUtility.cs new file mode 100644 index 0000000..81fa940 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/HashUtility.cs @@ -0,0 +1,51 @@ +namespace UnityEngine.Timeline +{ + static class HashUtility + { + // Note. We could have used "params int[] hashes" but we want to avoid allocating. + + public static int CombineHash(this int h1, int h2) + { + return h1 ^ (int)(h2 + 0x9e3779b9 + (h1 << 6) + (h1 >> 2)); // Similar to c++ boost::hash_combine + } + + public static int CombineHash(int h1, int h2, int h3) + { + return CombineHash(h1, h2).CombineHash(h3); + } + + public static int CombineHash(int h1, int h2, int h3, int h4) + { + return CombineHash(h1, h2, h3).CombineHash(h4); + } + + public static int CombineHash(int h1, int h2, int h3, int h4, int h5) + { + return CombineHash(h1, h2, h3, h4).CombineHash(h5); + } + + public static int CombineHash(int h1, int h2, int h3, int h4, int h5, int h6) + { + return CombineHash(h1, h2, h3, h4, h5).CombineHash(h6); + } + + public static int CombineHash(int h1, int h2, int h3, int h4, int h5, int h6, int h7) + { + return CombineHash(h1, h2, h3, h4, h5, h6).CombineHash(h7); + } + + public static int CombineHash(int[] hashes) + { + if (hashes == null || hashes.Length == 0) + return 0; + + var h = hashes[0]; + for (int i = 1; i < hashes.Length; ++i) + { + h = CombineHash(h, hashes[i]); + } + + return h; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/HashUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/HashUtility.cs.meta new file mode 100644 index 0000000..fec5c19 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/HashUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d0ca7b2e84542bf4ab9987087e8d79ad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyCollector.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyCollector.cs new file mode 100644 index 0000000..08f991a --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyCollector.cs @@ -0,0 +1,102 @@ +using System.Collections.Generic; + +namespace UnityEngine.Timeline +{ + /// + /// Interface used to inform the Timeline Editor about potential property modifications that may occur while previewing. + /// + public interface IPropertyCollector + { + /// + /// Sets the active game object for subsequent property modifications. + /// + /// The GameObject to push. + void PushActiveGameObject(GameObject gameObject); + + /// + /// Removes the active GameObject from the modification stack, restoring the previous value. + /// + void PopActiveGameObject(); + + /// + /// Add properties modified by an animation clip. + /// + /// The animation clip that contains the properties + void AddFromClip(AnimationClip clip); + + /// + /// Add property modifications specified by a list of animation clips. + /// + /// The list of animation clips used to determine which property modifications to apply. + void AddFromClips(IEnumerable clips); + + /// + /// Add property modifications using the serialized property name. + /// + /// The name of the serialized property + /// The type of the component the property exists on + /// + /// This method uses the most recent gameObject from PushActiveGameObject + /// + void AddFromName(string name) where T : Component; + + /// + /// Add property modifications using the serialized property name. + /// + /// The name of the serialized property + /// + /// This method uses the most recent gameObject from PushActiveGameObject + /// + void AddFromName(string name); + + /// + /// Add property modifications modified by an animation clip. + /// + /// The GameObject where the properties exist + /// The animation clip that contains the properties + void AddFromClip(GameObject obj, AnimationClip clip); + + /// + /// Add property modifications specified by a list of animation clips. + /// + /// The gameObject that will be animated + /// The list of animation clips used to determine which property modifications to apply. + void AddFromClips(GameObject obj, IEnumerable clips); + + /// + /// Add property modifications using the serialized property name. + /// + /// The name of the serialized property + /// The gameObject where the properties exist + /// The type of the component the property exists on> + void AddFromName(GameObject obj, string name) where T : Component; + + /// + /// Add property modifications using the serialized property name. + /// + /// The gameObject where the properties exist + /// The name of the serialized property + void AddFromName(GameObject obj, string name); + + /// + /// Add property modifications using the serialized property name. + /// + /// The name of the serialized property + /// The component where the properties exist + void AddFromName(Component component, string name); + + /// + /// Set all serializable properties on a component to be under preview control. + /// + /// The gameObject where the properties exist + /// The component to set in preview mode + void AddFromComponent(GameObject obj, Component component); + + /// + /// Add property modifications modified by an animation clip. + /// + /// The Object where the properties exist + /// The animation clip that contains the properties + void AddObjectProperties(Object obj, AnimationClip clip); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyCollector.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyCollector.cs.meta new file mode 100644 index 0000000..05ecf1d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyCollector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 66b2b8fd1d9b4bc4c96b07335ad822f3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyPreview.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyPreview.cs new file mode 100644 index 0000000..b779f15 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyPreview.cs @@ -0,0 +1,17 @@ +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + /// + /// Implement this interface in a PlayableAsset to specify which properties will be modified when Timeline is in preview mode. + /// + public interface IPropertyPreview + { + /// + /// Called by the Timeline Editor to gather properties requiring preview. + /// + /// The PlayableDirector invoking the preview + /// PropertyCollector used to gather previewable properties + void GatherProperties(PlayableDirector director, IPropertyCollector driver); + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyPreview.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyPreview.cs.meta new file mode 100644 index 0000000..31806d8 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/IPropertyPreview.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b5f0881228e5827438f74e9b7b33c2dc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/NotificationUtilities.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/NotificationUtilities.cs new file mode 100644 index 0000000..41aabce --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/NotificationUtilities.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + static class NotificationUtilities + { + public static ScriptPlayable CreateNotificationsPlayable(PlayableGraph graph, IEnumerable markers, GameObject go) + { + var notificationPlayable = ScriptPlayable.Null; + var director = go.GetComponent(); + foreach (var e in markers) + { + var notif = e as INotification; + if (notif == null) + continue; + + if (notificationPlayable.Equals(ScriptPlayable.Null)) + { + notificationPlayable = TimeNotificationBehaviour.Create(graph, + director.playableAsset.duration, director.extrapolationMode); + } + + var time = (DiscreteTime)e.time; + var tlDuration = (DiscreteTime)director.playableAsset.duration; + if (time >= tlDuration && time <= tlDuration.OneTickAfter() && tlDuration != 0) + { + time = tlDuration.OneTickBefore(); + } + + var notificationOptionProvider = e as INotificationOptionProvider; + if (notificationOptionProvider != null) + { + notificationPlayable.GetBehaviour().AddNotification((double)time, notif, notificationOptionProvider.flags); + } + else + { + notificationPlayable.GetBehaviour().AddNotification((double)time, notif); + } + } + + return notificationPlayable; + } + + public static bool TrackTypeSupportsNotifications(Type type) + { + var binding = (TrackBindingTypeAttribute)Attribute.GetCustomAttribute(type, typeof(TrackBindingTypeAttribute)); + return binding != null && + (typeof(Component).IsAssignableFrom(binding.type) || + typeof(GameObject).IsAssignableFrom(binding.type)); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/NotificationUtilities.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/NotificationUtilities.cs.meta new file mode 100644 index 0000000..6e5c8c3 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/NotificationUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b90311a8f07b00f4bbeb2fff3b128d25 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimeUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimeUtility.cs new file mode 100644 index 0000000..549de4c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimeUtility.cs @@ -0,0 +1,212 @@ +using System; +using System.Text.RegularExpressions; + +namespace UnityEngine.Timeline +{ + // Sequence specific utilities for time manipulation + static class TimeUtility + { + // chosen because it will cause no rounding errors between time/frames for frames values up to at least 10 million + public static readonly double kTimeEpsilon = 1e-14; + public static readonly double kFrameRateEpsilon = 1e-6; + public static readonly double k_MaxTimelineDurationInSeconds = 9e6; //104 days of running time + + static void ValidateFrameRate(double frameRate) + { + if (frameRate <= kTimeEpsilon) + throw new ArgumentException("frame rate cannot be 0 or negative"); + } + + public static int ToFrames(double time, double frameRate) + { + ValidateFrameRate(frameRate); + time = Math.Min(Math.Max(time, -k_MaxTimelineDurationInSeconds), k_MaxTimelineDurationInSeconds); + // this matches OnFrameBoundary + double tolerance = GetEpsilon(time, frameRate) / 2.0; + if (time < 0) + { + return (int)Math.Ceiling(time * frameRate - tolerance); + } + return (int)Math.Floor(time * frameRate + tolerance); + } + + public static double ToExactFrames(double time, double frameRate) + { + ValidateFrameRate(frameRate); + return time * frameRate; + } + + public static double FromFrames(int frames, double frameRate) + { + ValidateFrameRate(frameRate); + return (frames / frameRate); + } + + public static double FromFrames(double frames, double frameRate) + { + ValidateFrameRate(frameRate); + return frames / frameRate; + } + + public static bool OnFrameBoundary(double time, double frameRate) + { + return OnFrameBoundary(time, frameRate, GetEpsilon(time, frameRate)); + } + + public static double GetEpsilon(double time, double frameRate) + { + return Math.Max(Math.Abs(time), 1) * frameRate * kTimeEpsilon; + } + + public static bool OnFrameBoundary(double time, double frameRate, double epsilon) + { + ValidateFrameRate(frameRate); + + double exact = ToExactFrames(time, frameRate); + double rounded = Math.Round(exact); + + return Math.Abs(exact - rounded) < epsilon; + } + + public static double RoundToFrame(double time, double frameRate) + { + ValidateFrameRate(frameRate); + + var frameBefore = (int)Math.Floor(time * frameRate) / frameRate; + var frameAfter = (int)Math.Ceiling(time * frameRate) / frameRate; + + return Math.Abs(time - frameBefore) < Math.Abs(time - frameAfter) ? frameBefore : frameAfter; + } + + public static string TimeAsFrames(double timeValue, double frameRate, string format = "F2") + { + if (OnFrameBoundary(timeValue, frameRate)) // make integral values when on time borders + return ToFrames(timeValue, frameRate).ToString(); + return ToExactFrames(timeValue, frameRate).ToString(format); + } + + public static string TimeAsTimeCode(double timeValue, double frameRate, string format = "F2") + { + ValidateFrameRate(frameRate); + + int intTime = (int)Math.Abs(timeValue); + + int hours = intTime / 3600; + int minutes = (intTime % 3600) / 60; + int seconds = intTime % 60; + + string result; + string sign = timeValue < 0 ? "-" : string.Empty; + if (hours > 0) + result = hours + ":" + minutes.ToString("D2") + ":" + seconds.ToString("D2"); + else if (minutes > 0) + result = minutes + ":" + seconds.ToString("D2"); + else + result = seconds.ToString(); + + int frameDigits = (int)Math.Floor(Math.Log10(frameRate) + 1); + + // Add partial digits on the frame if needed. + // we are testing the original value (not the truncated), because the truncation can cause rounding errors leading + // to invalid strings for items on frame boundaries + string frames = (ToFrames(timeValue, frameRate) - ToFrames(intTime, frameRate)).ToString().PadLeft(frameDigits, '0'); + if (!OnFrameBoundary(timeValue, frameRate)) + { + string decimals = ToExactFrames(timeValue, frameRate).ToString(format); + int decPlace = decimals.IndexOf('.'); + if (decPlace >= 0) + frames += " [" + decimals.Substring(decPlace) + "]"; + } + + return sign + result + ":" + frames; + } + + // Given a time code string, return the time in seconds + // 1.5 -> 1.5 seconds + // 1:1.5 -> 1 minute, 1.5 seconds + // 1:1[.5] -> 1 second, 1.5 frames + // 2:3:4 -> 2 minutes, 3 seconds, 4 frames + // 1[.6] -> 1.6 frames + public static double ParseTimeCode(string timeCode, double frameRate, double defaultValue) + { + timeCode = RemoveChar(timeCode, c => char.IsWhiteSpace(c)); + string[] sections = timeCode.Split(':'); + if (sections.Length == 0 || sections.Length > 4) + return defaultValue; + + int hours = 0; + int minutes = 0; + double seconds = 0; + double frames = 0; + + try + { + // depending on the format of the last numbers + // seconds format + string lastSection = sections[sections.Length - 1]; + if (Regex.Match(lastSection, @"^\d+\.\d+$").Success) + { + seconds = double.Parse(lastSection); + if (sections.Length > 3) return defaultValue; + if (sections.Length > 1) minutes = int.Parse(sections[sections.Length - 2]); + if (sections.Length > 2) hours = int.Parse(sections[sections.Length - 3]); + } + // frame formats + else + { + if (Regex.Match(lastSection, @"^\d+\[\.\d+\]$").Success) + { + string stripped = RemoveChar(lastSection, c => c == '[' || c == ']'); + frames = double.Parse(stripped); + } + else if (Regex.Match(lastSection, @"^\d*$").Success) + { + frames = int.Parse(lastSection); + } + else + { + return defaultValue; + } + + if (sections.Length > 1) seconds = int.Parse(sections[sections.Length - 2]); + if (sections.Length > 2) minutes = int.Parse(sections[sections.Length - 3]); + if (sections.Length > 3) hours = int.Parse(sections[sections.Length - 4]); + } + } + catch (FormatException) + { + return defaultValue; + } + + return frames / frameRate + seconds + minutes * 60 + hours * 3600; + } + + // fixes rounding errors from using single precision for length + public static double GetAnimationClipLength(AnimationClip clip) + { + if (clip == null || clip.empty) + return 0; + + double length = clip.length; + if (clip.frameRate > 0) + { + double frames = Mathf.Round(clip.length * clip.frameRate); + length = frames / clip.frameRate; + } + return length; + } + + static string RemoveChar(string str, Func charToRemoveFunc) + { + var len = str.Length; + var src = str.ToCharArray(); + var dstIdx = 0; + for (var i = 0; i < len; i++) + { + if (!charToRemoveFunc(src[i])) + src[dstIdx++] = src[i]; + } + return new string(src, 0, dstIdx); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimeUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimeUtility.cs.meta new file mode 100644 index 0000000..ff1d820 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimeUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f779e779d62b5ca49b658236c337845d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineCreateUtilities.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineCreateUtilities.cs new file mode 100644 index 0000000..0870e40 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineCreateUtilities.cs @@ -0,0 +1,131 @@ +using System; +using System.Collections.Generic; +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace UnityEngine.Timeline +{ + static class TimelineCreateUtilities + { + // based off of ObjectNames.GetUniqueName, but can exist in runtime + public static string GenerateUniqueActorName(List tracks, string name) + { + if (!tracks.Exists(x => ((object)x) != null && x.name == name)) + return name; + + int numberInParentheses = 0; + string baseName = name; + + if (!string.IsNullOrEmpty(name) && name[name.Length - 1] == ')') + { + int index = name.LastIndexOf('('); + if (index > 0) + { + string numberString = name.Substring(index + 1, name.Length - index - 2); + if (int.TryParse(numberString, out numberInParentheses)) + { + numberInParentheses++; + baseName = name.Substring(0, index); + } + } + } + + baseName = baseName.TrimEnd(); + + for (int i = numberInParentheses; i < numberInParentheses + 5000; i++) + { + if (i > 0) + { + string result = string.Format("{0} ({1})", baseName, i); + if (!tracks.Exists(x => ((object)x) != null && x.name == result)) + return result; + } + } + + // Fallback + return name; + } + + public static void SaveAssetIntoObject(Object childAsset, Object masterAsset) + { + if (childAsset == null || masterAsset == null) + return; + + if ((masterAsset.hideFlags & HideFlags.DontSave) != 0) + { + childAsset.hideFlags |= HideFlags.DontSave; + } + else + { + childAsset.hideFlags |= HideFlags.HideInHierarchy; +#if UNITY_EDITOR + if (!AssetDatabase.Contains(childAsset) && AssetDatabase.Contains(masterAsset)) + AssetDatabase.AddObjectToAsset(childAsset, masterAsset); +#endif + } + } + + public static AnimationClip CreateAnimationClipForTrack(string name, TrackAsset track, bool isLegacy) + { + var timelineAsset = track != null ? track.timelineAsset : null; + var trackFlags = track != null ? track.hideFlags : HideFlags.None; + + var curves = new AnimationClip + { + legacy = isLegacy, + + name = name, + + frameRate = timelineAsset == null + ? TimelineAsset.EditorSettings.kDefaultFps + : timelineAsset.editorSettings.fps + }; + + SaveAssetIntoObject(curves, timelineAsset); + curves.hideFlags = trackFlags & ~HideFlags.HideInHierarchy; // Never hide in hierarchy + + TimelineUndo.RegisterCreatedObjectUndo(curves, "Create Curves"); + + return curves; + } + + public static bool ValidateParentTrack(TrackAsset parent, Type childType) + { + if (childType == null || !typeof(TrackAsset).IsAssignableFrom(childType)) + return false; + + // no parent is valid for any type + if (parent == null) + return true; + + // A track supports layers if it implements ILayerable. Only supported for parents that are + // the same exact type as the child class, and 1 level of nesting only + if (parent is ILayerable && !parent.isSubTrack && parent.GetType() == childType) + return true; + + var attr = Attribute.GetCustomAttribute(parent.GetType(), typeof(SupportsChildTracksAttribute)) as SupportsChildTracksAttribute; + if (attr == null) + return false; + + // group track case, accepts all + if (attr.childType == null) + return true; + + // specific case. Specifies nesting level + if (childType == attr.childType) + { + int nestCount = 0; + var p = parent; + while (p != null && p.isSubTrack) + { + nestCount++; + p = p.parent as TrackAsset; + } + + return nestCount < attr.levels; + } + return false; + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineCreateUtilities.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineCreateUtilities.cs.meta new file mode 100644 index 0000000..f81aa91 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineCreateUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 40cb137d0e9816e48a4141ed13afedad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineUndo.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineUndo.cs new file mode 100644 index 0000000..b6392f0 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineUndo.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using UnityEngine.Playables; + +#if UNITY_EDITOR +using UnityEditor; +#endif + +namespace UnityEngine.Timeline +{ + static class TimelineUndo + { + public static void PushDestroyUndo(TimelineAsset timeline, Object thingToDirty, Object objectToDestroy, string operation) + { +#if UNITY_EDITOR + if (objectToDestroy == null || !DisableUndoGuard.enableUndo) + return; + + if (thingToDirty != null) + EditorUtility.SetDirty(thingToDirty); + + if (timeline != null) + EditorUtility.SetDirty(timeline); + + Undo.DestroyObjectImmediate(objectToDestroy); +#else + if (objectToDestroy != null) + Object.Destroy(objectToDestroy); +#endif + } + + [Conditional("UNITY_EDITOR")] + public static void PushUndo(Object thingToDirty, string operation) + { +#if UNITY_EDITOR + if (thingToDirty != null && DisableUndoGuard.enableUndo) + { + var track = thingToDirty as TrackAsset; + if (track != null) + track.MarkDirty(); + + EditorUtility.SetDirty(thingToDirty); + Undo.RegisterCompleteObjectUndo(thingToDirty, "Timeline " + operation); + } +#endif + } + + [Conditional("UNITY_EDITOR")] + public static void RegisterCreatedObjectUndo(Object thingCreated, string operation) + { +#if UNITY_EDITOR + if (DisableUndoGuard.enableUndo) + { + Undo.RegisterCreatedObjectUndo(thingCreated, "Timeline " + operation); + } +#endif + } + +#if UNITY_EDITOR + public struct DisableUndoGuard : IDisposable + { + internal static bool enableUndo = true; + static readonly Stack m_UndoStateStack = new Stack(); + bool m_Disposed; + public DisableUndoGuard(bool disable) + { + m_Disposed = false; + m_UndoStateStack.Push(enableUndo); + enableUndo = !disable; + } + + public void Dispose() + { + if (!m_Disposed) + { + if (m_UndoStateStack.Count == 0) + { + Debug.LogError("UnMatched DisableUndoGuard calls"); + enableUndo = true; + return; + } + enableUndo = m_UndoStateStack.Pop(); + m_Disposed = true; + } + } + } +#endif + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineUndo.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineUndo.cs.meta new file mode 100644 index 0000000..c62c751 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/TimelineUndo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f2a7e0d1b6bbba408a41e206945c23c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/WeightUtility.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/WeightUtility.cs new file mode 100644 index 0000000..22db909 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/WeightUtility.cs @@ -0,0 +1,30 @@ +using UnityEngine.Playables; + +namespace UnityEngine.Timeline +{ + static class WeightUtility + { + // Given a mixer, normalizes the mixer if required + // returns the output weight that should be applied to the mixer as input + public static float NormalizeMixer(Playable mixer) + { + if (!mixer.IsValid()) + return 0; + int count = mixer.GetInputCount(); + float weight = 0.0f; + for (int c = 0; c < count; c++) + { + weight += mixer.GetInputWeight(c); + } + + if (weight > Mathf.Epsilon && weight < 1) + { + for (int c = 0; c < count; c++) + { + mixer.SetInputWeight(c, mixer.GetInputWeight(c) / weight); + } + } + return Mathf.Clamp01(weight); + } + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/WeightUtility.cs.meta b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/WeightUtility.cs.meta new file mode 100644 index 0000000..bf2c55d --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/Runtime/Utilities/WeightUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e7a505b341283e14696e86433a5b1ae9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/package.json b/Library/PackageCache/com.unity.timeline@1.2.13/package.json new file mode 100644 index 0000000..695e8b1 --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/package.json @@ -0,0 +1,24 @@ +{ + "name": "com.unity.timeline", + "displayName": "Timeline", + "version": "1.2.13", + "unity": "2019.3", + "keywords": [ + "unity", + "animation", + "editor", + "timeline", + "tools" + ], + "description": "Use Unity Timeline to create cinematic content, game-play sequences, audio sequences, and complex particle effects.", + "dependencies": {}, + "relatedPackages": { + "com.unity.timeline.tests": "1.2.13" + }, + "repository": { + "footprint": "2ff9be2b1136b381ca7562e7c3b0c8d56b0521d1", + "type": "git", + "url": "https://github.cds.internal.unity3d.com/unity/com.unity.timeline.git", + "revision": "369ead3d734d36d836197081cc603211173c06b9" + } +} diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/package.json.meta b/Library/PackageCache/com.unity.timeline@1.2.13/package.json.meta new file mode 100644 index 0000000..4eca53c --- /dev/null +++ b/Library/PackageCache/com.unity.timeline@1.2.13/package.json.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 13a9c1b4df2e489e8eb9cacca7429596 +timeCreated: 0 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: -- cgit v1.2.3