-
Notifications
You must be signed in to change notification settings - Fork 0
/
scenepanelhelpwindow.html
478 lines (339 loc) · 13 KB
/
scenepanelhelpwindow.html
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<div id = "main">
<p class="headline">This looks complicated. What is it?</p>
So you're getting close to production? And you want to be your 1st AD's best friend?<br/>
Your producer keeps asking about how many shooting days is needed in a certain location?<br/>
Or, you're just about to submit your script and want to look good?<br/>
<strong>These are some of the things the scene manager can do for you:</strong><br/>
<br/>
<ul style="margin-top: -5px">
<li>Find and fix sceneheadings you've spelled differently in different places.</li>
If you have a location called <code>CHURCH</code> and another called <code>CHUNCH</code>, chances are one of them was misspelled. The scene manager will highlight both:<br/>
<span class="item minority">RED</span> locations are in minority, so probably the faulty spelling.<br/>
<span class="item majority">GREEN</span> are in majority, so most likely correct.<br/>
<span class="item equal">YELLOW</span> have equal amounts of both spellings.<br/>
<span class="item">BLUE</span> locations are not suspected to be typos at all. So all good.<br/>
To fix a typo, right-click a highlighted item to change it to the other detected variant!
<li>Make sure your scene-naming logic is consistent throughout.</li>
For your 1st AD, <code>INT. HOTEL/ROOM -- DAY</code> and <code>INT. THE HOTEL ROOM -- DAY</code> will sort as two different locations. The scene manager makes it easier to spot and avoid those almost-matches before they do.
<li>Group your locations based on their main location... </li>
See all your <code>HOTEL</code> scenes together, whether they are <code>HOTEL/ROOM</code>, <code>HOTEL/LOBBY</code>, <code>HOTEL/CORRIDOR</code> etc. The total number of pages for <code>HOTEL</code> will be displayed at the top of each group.
<li>...or based on their time-of-day.</li>
Most productions will schedule all scenes into one of four color-coded groups:<br/>
<span class="item intday">INTERIOR DAY</span> <span class="item intnight">INTERIOR NIGHT</span> <span class="item extday">EXTERIOR DAY</span> <span class="item extnight">EXTERIOR NIGHT</span><br/>
The scene manager can group your scenes by category, quickly letting you assess the number of pages in each.
</ul>
<br/>
<strong>So is there anything you have to think of?</strong><br/>
Well, the scene manager has some expectations to be able to parse your scene headings correctly. Chances are that your 1st AD will expect the same, so perhaps this is what you're already doing.<br/>
If not, here's a disclaimer: <i>Whatever production environment you're working in, their rules supersedes anything said in here</i>. But to make the best use of the scene manager (and quite likely your production office too), here are some guidelines:<br/>
<ul>
<li>Write your sceneheadings going from the "largest" location to the smallest.</li>
If you type out your scenes' locations in their entirety, keep a consistent order of things: <code>INT. PARIS/HOTEL/RESTAURANT/KITCHEN AREA -- DAY</code> will make it easier to sort the locations into meaningful groups.
<br/><span class="explanation"></span>Side note: This also helps if you want to exclude some part of the sceneheading when sorting — let's say you have so many scenes in <code>PARIS</code> that the Paris group becomes uninformatively big. Just right-click it to exclude from grouping, and the next word becomes the first considered.</span>
<li>Divide your locations/sublocations with a slash, dash, or even double-dash.</li>
Arguably, <code>CITY/HOUSE/ROOM</code> is the writing method most screenwriters adhere to. But if you prefer <code>CITY - HOUSE - ROOM</code>, that's fine too, as long too <i>as you put a space inbetween</i>. <br/>
We wouldn't want the scene manager to split <code>THE IN-LAW'S HOUSE</code> into two different sublocations, so the spaces are needed. The same goes for double dashes. <br/>
(Oh, and also: comma is <i>not</i> a very good delimiter though, since <code>THE OFFICES OF ALBERT, BODLEY & SONS</code> should not be split either. So let's stay away from those.)
</ul>
<br/>
Phew. That was a lot. But just start writing, and the scene manager will help you out when time comes to go into production.<br/>
Or, perhaps, not. If so, that is fine too. It'll always be here waiting for you when you need it.<br/>
</p>
<div style="height: 60px"></div>
</div>
<div class="dialogBottomButtonRow">
<!-- <button class="generalButtonStyle" onclick="for (butn of $$('#advancedSettings input')){if(butn.checked){butn.click()}}">Revert to defaults</button> -->
<button class="generalButtonStyle" onclick="Beat.call('Beat.custom.closeSecondWindow()')">Close</button>
</div>
<script>
//STARTUP SEQUENCE:
var userDefault = {}
var documentSetting = {}
Beat.callAndWait(() => {
let ftoutlinerObject = Beat.getUserDefault("ftoutlinerObject")
return(ftoutlinerObject)
})
.then(
response => { userDefault = JSON.parse(response)
//Apply the correct checkbox states on open:
for ([key, value] of Object.entries(userDefault)){
let button = document.getElementById("buttonFor-" + key)
if(button){
if(value == true) button.setAttribute("checked", true)
}
}
},
error => { console.log("Error retrieving userDefault") }
)
Beat.callAndWait(() => {
let ftoutlinerObject = Beat.getDocumentSetting("ftoutlinerObject")
return ftoutlinerObject
})
.then(
response => { documentSetting = JSON.parse(response)
//Apply the correct checkbox states on open:
for ([key, value] of Object.entries(documentSetting)){
let button = document.getElementById("buttonFor-" + key)
if(button){
if(value == true) button.setAttribute("checked", true)
}
}
},
error => { console.log("Error retrieving documentSetting") }
)
//FUNCTIONS:
function toggleThis(settingName, settingButton, invertSelection){
userDefault[settingName] = document.getElementById("buttonFor-" + settingName).checked
let valueAsJSON = JSON.stringify(userDefault[settingName])
Beat.call(` Beat.custom.sendToMain("${settingName}", ${valueAsJSON}, "userDefault") `)
}
function markupToHTML(text){
let html = document.createElement("div")
text.split("\n").forEach(line => {
line = line.replace(/\*(\S.+?)\*/g, "<strong>$1</strong>")
line = line.replace(/\_(.+?)\_/g, "<i>$1</i>")
// first line below: replaces all backticks, included escaped ones
// second line: uses negative lookbehind to only replace backticks that are not escaped
// //line = line.replaceAll(/\`(.+?)\`/g, "<code>$1</code>")
// line = line.replaceAll(/(?<!\\)\`(.+?)(?<!\\)\`/g, "<code>$1</code>").replaceAll(/\\`/g, "`")
//the below replaces the negativ lookbehind in the commented out regex above bc not supported on older systems
line = line.replace(/\\\`/g, "€"); // Temporarily replaces escaped backticks to avoid conflict
line = line.replace(/\`(.+?)\`/g, "<code>$1</code>"); // Replaces backtick-surrounded text with <code> tags
line = line.replace(/€/g, "\`"); // Replaces back the escaped backticks
if(line.startsWith("#")){
let headline = document.createElement("p")
headline.classList.add("headline")
headline.innerHTML = line.replace("#", "")
html.appendChild(headline)
}else if(line.startsWith("* ")){
let listItem = document.createElement("li")
listItem.classList.add("changelogList")
listItem.innerHTML = line.replace("* ", "")
html.appendChild(listItem)
}else if(line.startsWith(" -")){
let listItem = document.createElement("li")
listItem.classList.add("changelogList")
listItem.classList.add("level2")
listItem.innerHTML = line.replace(" -", "")
html.appendChild(listItem)
}else{
let paragraph = document.createElement("p")
paragraph.innerHTML = line
html.appendChild(paragraph)
}
})
return(html.innerHTML)
}
</script>
<style>
:root{
--menu-background: hsla(25, 64%, 96%, 1.00);/* rgb(240, 240, 240); /*was 232*/
--menu-border-color: #c1c1c1;
--menu-color: black; /*rgb(233,233,233);*/
--menu-hover-color: #027aff;
--changelog-background: white
}
@media (prefers-color-scheme: dark) {
:root{
--menu-background: hsla(25, 10%, 24%, 1.00);
--menu-border-color: rgb(81,81,81);
--menu-color: rgb(233,233,233);
--inkOnPaper: 0, 0%, 100%;
--paperBehindInk: 0, 0%, 0%;
--changelog-background: #222;
}
}
body{
background-color: var(--menu-background);
color: var(--menu-color);
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 14px;
font-weight: normal;
line-height: 20px;
padding: 20px 40px 20px 40px;
overflow: auto;
}
#changelog-wrapper{
position: relative;
overflow: hidden;
width: auto;
height: auto;
margin: 20px 0px 20px 0px;
border-radius: 4px;
border: 1px solid transparent;
}
#changelog{
position: relative;
white-space: pre-wrap;
background-color: var(--changelog-background);
padding: 0px 30px 2px 30px;
border-radius: 4px;
border: 1px solid var(--menu-border-color);
height: 300px;
overflow-y: scroll;
}
#changelog-wrapper::after{
box-shadow: inset 3px 3px 3px rgba(0, 0, 0, 0.15);
content: "";
background-color: transparent;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 999;
pointer-events: none;
}
.headline {
font-size: 32px;
font-weight: 800;
line-height: 38px;
margin: 20px 0px 20px 0px;
display: block;
margin-bottom: 20px;
}
.versionnumber {
font-size: 10px;
font-weight: 300;
line-height: 14px;
opacity: 60%;
vertical-align:top;
border-top: 5px solid transparent;
box-sizing: border-box;
padding-left: 8px;
display: inline-block;
}
#changelog .headline {
border-top: 16px solid var(--changelog-background);
font-size: 18px;
line-height: 22px;
margin: 0px 0 8px 0;
display: block;
background-color: color-mix(in oklab, var(--menu-background), white 20%) ;
position: sticky;
top: 0;
}
#changelog p:has(+ li) {
margin-bottom: 2px;
}
li {
/* list-style-type: none;
padding-top: 3px;
padding-left: 20px; */
list-style-type: disc;
padding-left: 0;
padding-top: 6px;
font-weight: bold;
}
li.changelogList{
list-style-type: disc;
padding-top: 0;
text-indent: -15px;
padding-left: 40px
}
li.changelogList.level2{
list-style-type: circle;
text-indent: -18px;
padding-left: 58px;
padding-top: 0;
}
.shortcut {
display: none;
}
.explanation {
font-size: 11px;
line-height: 14px;
margin-left: 21px;
margin-top: -2px;
display: block;
font-style: italic;
opacity: 60%;
}
label:hover .shortcut {
display: inline;
}
.dialogBottomButtonRow {
position: fixed;
bottom: 0px;
right: 0px;
width: 100%;
height: 100px;
background: linear-gradient(to top, var(--menu-background) 50px, transparent 100%);
}
button{
position: absolute;
font-size: 13px;
bottom: 20px;
right: 40px;
}
button:hover{
border: initial !important;
border-radius: 4px !important;
padding: 2px 8px 3px 8px;
border-radius: inherit !important;
background-color: var(--menu-hover-color);
color: white;
/* pointer-events: none; */
}
hr {
opacity: 50%;
margin: 0 40px;
mix-blend-mode: multiply;
}
ul {
margin-top: 0px;
margin-bottom: 0px;
}
code {
font-family: monospace;
background-color: color-mix(in oklab, var(--menu-background), black 5%) ;
/* border: 1px solid color-mix(in oklab, var(--menu-background), black 10%) ; */
/* color: white; */
padding: 0px 4px 1px 4px;
border-radius: 3px;
}
.item{
width: auto;
height: 15px;
line-height: 10px;
font-size: 11px;
font-weight: bold;
display: inline-block;
padding: 3px 6px 2px 6px;
box-shadow: inset 0.5px 0.5px 0px 0.5px rgba(255, 255, 255, 0.4),
inset -0.5px -0.5px 0px 0.5px rgba(0, 0, 0, 0.4);
border-radius: 10px;
border: none;
vertical-align: middle;
margin-top: -3px;
overflow: hidden;
opacity: 1;
background-color: hsl(200, 40%, 30%);
color: white;
}
.item.equal{
background-color: hsl(40, 70% , 40%);
}
.item.majority{
background-color: hsl(90, 40%, 30%);
}
.item.minority{
background-color: hsl(0, 60%, 30%);
}
.item.intday{
background-color: hsla(210, 100%, 100%, 1.00);
color: black;
}
.item.extday{
background-color: hsla(47, 60%, 80%, 1.00);
color: black;
}
.item.intnight{
background-color: hsla(210, 60%, 80%, 1.00);
color: black;
}
.item.extnight{
background-color: hsla(150, 60%, 80%, 1.00);
color: black;
}
</style>