From 0e1a276f19ea70009c5a649e9667861d7c346a7e Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 6 Jun 2012 00:25:27 -0700 Subject: first iteration of adding serializable to ninja plus other changes to run the latest montage Signed-off-by: Valerio Virgillito --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 122 ++++++++++++++++++--- 1 file changed, 107 insertions(+), 15 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 6e9513f2..7af88662 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -10,10 +10,98 @@ var nj = require("js/lib/NJUtils").NJUtils; var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { - hasTemplate:{ - value:true + user_layers: { + value: null, + serializable: true + }, + + track_container: { + value: null, + serializable: true + }, + + timeline_leftpane: { + value: null, + serializable: true + }, + + layer_tracks: { + value: null, + serializable: true + }, + + master_track: { + value: null, + serializable: true + }, + + time_markers: { + value: null, + serializable: true + }, + + playhead: { + value: null, + serializable: true + }, + + playheadmarker: { + value: null, + serializable: true + }, + + timetext: { + value: null, + serializable: true + }, + + timebar: { + value: null, + serializable: true + }, + + container_tracks: { + value: null, + serializable: true }, + end_hottext: { + value: null, + serializable: true + }, + + container_layers: { + value: null, + serializable: true + }, + + timeline_disabler: { + value: null, + serializable: true + }, + + checkable_relative: { + value: null, + serializable: true + }, + + checkable_absolute: { + value: null, + serializable: true + }, + + checkable_animated: { + value: null, + serializable: true + }, + + tl_configbutton: { + value: null, + serializable: true + }, + + + /* === BEGIN: Models === */ _currentDocument: { value : null @@ -90,7 +178,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - } + }, + serializable: true }, // Set to false to skip array caching array sets in current document @@ -234,7 +323,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._trackRepetition = newVal; - } + }, + serializable: true }, _selectedKeyframes:{ @@ -488,11 +578,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Store the timeline data in currentDocument... if (this._boolCacheArrays) { // ... but only if we're supposed to. - this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; - this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + if(this.currentDocument) { + this.currentDocument.tlArrLayers = this.arrLayers; + this.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; + this.currentDocument.tllayerNumber = this.currentLayerNumber; + this.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; + this.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + } } } }, @@ -500,12 +592,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { initTimelineCache: { value: function() { // Initialize the currentDocument for a new set of timeline data. - this.application.ninja.currentDocument.isTimelineInitialized = true; - this.application.ninja.currentDocument.tlArrLayers = []; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = false; - this.application.ninja.currentDocument.tlCurrentLayersSelected = false; + this.currentDocument.isTimelineInitialized = true; + this.currentDocument.tlArrLayers = []; + this.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; + this.currentDocument.tllayerNumber = this.currentLayerNumber; + this.currentDocument.tlCurrentLayerSelected = false; + this.currentDocument.tlCurrentLayersSelected = false; } }, -- cgit v1.2.3 From 844d59d85a1881525c79a1f44a35a9ea59e70e4a Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 00:02:22 -0700 Subject: removing the serializable from the timeline repetition and fixing the panels currentDocument binding Signed-off-by: Valerio Virgillito --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 658ac043..36b868d0 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -221,8 +221,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - }, - serializable: true + }, }, // Set to false to skip array caching array sets in current document @@ -346,8 +345,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._trackRepetition = newVal; - }, - serializable: true + } }, _selectedKeyframes:{ @@ -603,11 +601,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Store the timeline data in currentDocument... if (this._boolCacheArrays) { // ... but only if we're supposed to. - this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; - this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; - this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; - this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; - this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + if(this.currentDocument) { + this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; + this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; + this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; + this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; + this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + } } } }, -- cgit v1.2.3 From 0a5ce26ee62b74261e1b00877b7e43af0e681856 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Tue, 12 Jun 2012 10:10:11 -0700 Subject: Timeline: Fix document switching under Montage v.10 --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 36b868d0..65476d6b 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -783,6 +783,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { var i = 0, tlArrLayersLength = this.application.ninja.currentDocument.tlArrLayers.length; + + this._ignoreNextContainerChange = true; + // We're reading from the cache, not writing to it. this._boolCacheArrays = false; for (i = 0; i < tlArrLayersLength; i++) { -- cgit v1.2.3 From a61713e5187e10cebf7984ced7a8443949c412b0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 12 Jun 2012 10:56:47 -0700 Subject: fix a typo Signed-off-by: Valerio Virgillito --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 65476d6b..cb8185e5 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -221,7 +221,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (newVal) { this._layerRepetition = newVal; - }, + } }, // Set to false to skip array caching array sets in current document -- cgit v1.2.3