-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLayerDown.jsfl
135 lines (101 loc) · 5.07 KB
/
LayerDown.jsfl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/*
TIMONOTE CONFIDENTIAL
Copyright 2014 Timonote Animation.All Rights Reserved.
NOTICE: All information contained herein is, and remains the
property of Timonote Animation , if any.
The intellectual and technical concepts contained
herein are proprietary to Timonote Animation and its
suppliers and may be covered by Japan and Foreign Patents,
patents in process, and are protected by trade secret or
copyright law. Dissemination of this information or
reproduction of this material is strictly forbidden unless
prior written permission is obtained from Timonote Animation.
¿à̂ƃRtBfV
ӁF·ׂẴvOîñ͉ºɏ©êĂ¢éʂèA
¿à̂ƃAj[V̒mIEZpIȊTOàY ª܂܂êĂ¢܂·B
±ê͂¿à̂ƃAj[VƎ©̂à̂ŁA»̒mIàYÍ
ú{ƊO̓Á̑ΏۂƂȂéꍇª èATvC[A
vZX̓Á́AcƔ閧yђ쌠@ɂæèی삳êĂ¢܂·B
±̏îñ̔MâvO̕¡»͌µ§ɋ֎~³êèèA
Oɏʂɂæ邿à̂ƃAj[V©ç̋ªKvł·B
*/
var myDoc = fl.getDocumentDOM();
var myTL = myDoc.getTimeline();
var NumLayer = myDoc.getTimeline().layerCount;
//imãC[ԍð擾
var kokoLayerNum = myDoc.getTimeline().currentLayer;
fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].locked = true;
//º̃C[ԍð擾
var nextLayerNum = myDoc.getTimeline().currentLayer + 1;
if(nextLayerNum == NumLayer){
//uẽC[Ɉړ®
myDoc.getTimeline().setSelectedLayers(0);//myDoc.getTimeline().setSelectedLayers(nextLayerNum - 1);
}else{
//º̃C[Ɉړ®
myDoc.getTimeline().setSelectedLayers(nextLayerNum);
}
//imãC[ԍð擾
var kokoLayerNum = myDoc.getTimeline().currentLayer;
fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].locked = false;
//Lname = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum];
fl.outputPanel.clear();
// IðȂµ
fl.getDocumentDOM().selectNone();
// t[Ið̃NA
fl.getDocumentDOM().getTimeline().setSelectedFrames([]);
var NumLayer = fl.getDocumentDOM().getTimeline().layerCount - 1;
//¥St[擾
var layerFrame = fl.getDocumentDOM().getTimeline().frameCount;
//¥t[擾
var frameCount = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].frameCount;
//C[̃^CvmF
var layerType = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].layerType;
var byou = ~~(layerFrame / 24);
var koma =layerFrame % 24;
layerFrame = String(byou) + "+" + String(koma);
//»݂̃^CC̖¼O擾µčm
var TLn = fl.getDocumentDOM().getTimeline().name +"(" + layerFrame + ")";
//»݂̍жwbḧʒu̒lð curFrame ϐɊi[µ܂·B
var curFrame = fl.getDocumentDOM().getTimeline().currentFrame;
//»݂̃C[̖¼O擾µčm
var kokoLayerNum = fl.getDocumentDOM().getTimeline().currentLayer;
if(curFrame <= frameCount && layerType != "folder"){//1
//L[t[̓ª̃t[擾
var stFrame = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].frames[curFrame].startFrame;
//t[V[PXà̃t[ð frameSpan ϐɊi[µ܂·BễL[t[̒·³
var FS = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].frames[curFrame].duration;
if(stFrame == curFrame){var keyF = "@";}else{
var keyF = "@";
for(i = 1;i < FS;i++){
if(curFrame == stFrame + i){keyF = keyF + "+";}else{keyF = keyF + "-";}
}
}curFrame = curFrame + 1;
var byou = ~~(curFrame / 24);
var koma =curFrame % 24;
curFrame = String(byou) + "+" + String(koma);
if(kokoLayerNum == 0){
if(kokoLayerNum == NumLayer){
//C[P¾¯
var cLayerN = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].name;
}else{
//C[êԏ㗈½
var cLayerN = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].name;
var cLayerNshita = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum + 1].name;
}
}else{
if(kokoLayerNum == NumLayer){
//C[êԉº½
var cLayerNue = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum - 1].name;
var cLayerN = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].name;
//alert("A");
}else{
if(kokoLayerNum <= NumLayer){
//C[r
var cLayerNue = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum - 1].name;
var cLayerN = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum].name;
var cLayerNshita = fl.getDocumentDOM().getTimeline().layers[kokoLayerNum + 1].name;
//alert("B");
}}
}
}//1
fl.getDocumentDOM().getTimeline().setLayerProperty('visible', !false);