Repository navigation
Expand file tree
/
Copy pathtemplate.html.j2
More file actions
657 lines (623 loc) · 37.6 KB
/
Copy pathtemplate.html.j2
File metadata and controls
657 lines (623 loc) · 37.6 KB
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
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{{ plugin.displayName }} — Blender Python that actually runs</title>
<meta name="description" content="{{ plugin.description }}" />
{% if site.canonical %}<link rel="canonical" href="{{ site.canonical }}" />{% endif %}
{% if site.favicon %}<link rel="icon" href="{{ site.favicon }}" />{% endif %}
<meta name="theme-color" content="#1a1b1e" />
<meta name="color-scheme" content="dark" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ plugin.displayName }} — Blender Python that actually runs" />
<meta property="og:description" content="{{ plugin.description }}" />
{% if site.canonical %}<meta property="og:url" content="{{ site.canonical }}" />{% endif %}
{% set og_image = site.ogImage | default('', true) %}
{% if og_image %}<meta property="og:image" content="{{ og_image }}" />
{% if site.ogImageWidth %}<meta property="og:image:width" content="{{ site.ogImageWidth }}" />
<meta property="og:image:height" content="{{ site.ogImageHeight }}" />{% endif %}
{% if site.ogImageAlt %}<meta property="og:image:alt" content="{{ site.ogImageAlt }}" />{% endif %}{% endif %}
<meta property="og:site_name" content="{{ plugin.displayName }}" />
<meta name="twitter:card" content="{{ 'summary_large_image' if og_image else 'summary' }}" />
<meta name="twitter:title" content="{{ plugin.displayName }} — Blender Python that actually runs" />
<meta name="twitter:description" content="{{ plugin.description }}" />
{% if og_image %}<meta name="twitter:image" content="{{ og_image }}" />
{% if site.ogImageAlt %}<meta name="twitter:image:alt" content="{{ site.ogImageAlt }}" />{% endif %}{% endif %}
<!-- the hero headline and body copy paint first -->
<link rel="preload" href="fonts/barlow-condensed-600.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="fonts/inter-regular.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="fonts/inter-medium.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="fonts/jetbrains-mono-regular.woff2" as="font" type="font/woff2" crossorigin />
<style>
/* ---- fonts (self-hosted, copied to docs/fonts/ by build_site.py) ----
Subset to the code points the built pages use plus Latin-1 and General
Punctuation (#216); a character outside that set falls back to the next
family in the stack. To re-subset after content adds new symbols, collect
the pages' characters into a U+XXXX list and run, per original font:
python -m fontTools.subset ORIG.woff2 --unicodes-file=LIST
--layout-features='*' --flavor=woff2 --output-file=fonts/NAME.woff2 */
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-display: swap;
src: url('fonts/barlow-condensed-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap;
src: url('fonts/barlow-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap;
src: url('fonts/inter-regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap;
src: url('fonts/inter-medium.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap;
src: url('fonts/inter-bold.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap;
src: url('fonts/jetbrains-mono-regular.woff2') format('woff2'); }
{% include "tokens.css" %}
:root { --maxw: 1060px; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 58px; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body);
line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-decoration: none; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; border-radius: 2px; }
::selection { background: color-mix(in srgb, var(--select) 40%, transparent); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--select); color: var(--on-select);
padding: 0.5rem 1rem; border-radius: 4px; z-index: 30; font-weight: 500; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
/* HUD vocabulary: small mono labels, everywhere */
.hud { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.04em;
color: var(--dim); text-transform: uppercase; }
{{ chrome_css | safe }}
/* ---- hero: the viewport ---- */
.stage { max-width: var(--maxw); margin: 1.25rem auto 0; padding: 0 1.25rem; }
.viewport { position: relative; border: 1px solid var(--border); border-radius: 6px;
background: linear-gradient(180deg, var(--vp-top) 0%, var(--vp-mid) 55%, var(--vp-bot) 100%);
overflow: hidden; min-height: 560px; display: flex; align-items: center; justify-content: center; }
.vp-floor { position: absolute; left: -25%; right: -25%; bottom: -12%; height: 62%;
perspective: 480px; pointer-events: none;
-webkit-mask-image: linear-gradient(180deg, transparent 0, #000 45%);
mask-image: linear-gradient(180deg, transparent 0, #000 45%); }
.vp-grid { position: absolute; inset: 0; transform: rotateX(62deg); transform-origin: 50% 100%;
background:
repeating-linear-gradient(90deg, color-mix(in srgb, var(--dim) 22%, transparent) 0 1px, transparent 1px 56px),
repeating-linear-gradient(0deg, color-mix(in srgb, var(--dim) 22%, transparent) 0 1px, transparent 1px 56px); }
/* Blender's viewport origin lines: X red, Y green */
.vp-grid::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
background: color-mix(in srgb, var(--ax-x) 55%, transparent); }
.vp-grid::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
background: color-mix(in srgb, var(--ax-y) 55%, transparent); }
.hud-corner { position: absolute; z-index: 2; }
.hud-tl { top: 0.9rem; left: 1.1rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.hud-tr { top: 0.9rem; right: 1.1rem; display: flex; gap: 0.55rem; align-items: center; }
.hud-bl { bottom: 0.9rem; left: 1.1rem; }
.hud-br { bottom: 0.9rem; right: 1.1rem; display: flex; align-items: center; gap: 0.45rem; }
.axis { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
border-radius: 50%; font-family: var(--font-mono); font-size: 0.625rem; color: var(--on-select); font-weight: 700; }
.axis-x { background: var(--ax-x); } .axis-y { background: var(--ax-y); } .axis-z { background: var(--ax-z); }
.stats-hud { display: grid; grid-template-columns: auto auto; gap: 0.1rem 0.8rem; align-items: center; }
.stats-hud a { color: var(--dim); transition: color 0.15s; display: inline-flex; align-items: center; min-height: 24px; } /* 24px target (WCAG 2.5.8) */
.stats-hud a:hover { color: var(--select); }
.stats-hud .v { color: var(--text); text-align: right; font-family: var(--font-mono); font-size: var(--fs-xs); }
.ok-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.vp-center { position: relative; z-index: 3; text-align: center; padding: 4.5rem 1.25rem;
width: 100%; max-width: 760px; }
.vp-center h1 { font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
font-size: clamp(2.3rem, 8.5vw, 5.6rem); line-height: 0.94; letter-spacing: 0.005em; }
.vp-center h1 .runs { color: var(--select); }
.vp-center .sub { color: var(--dim); font-size: var(--fs-body); max-width: 56ch; margin: 1.25rem auto 0; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.75rem; }
.btn-cta.btn-lg, .btn-ghost.btn-lg { font-size: var(--fs-body); line-height: 1.4; padding: 0.7rem 1.5rem; }
.btn-ghost { display: inline-block; font-weight: 500; color: var(--text); border: 1px solid var(--border);
border-radius: 4px; transition: color 0.15s, border-color 0.15s; }
.btn-ghost:hover { color: var(--select); border-color: var(--select); }
.clone-row { display: flex; justify-content: center; align-items: stretch; margin-top: 1.25rem; }
.clone-row pre { min-width: 0; background: var(--bg2); border: 1px solid var(--border); border-right: none;
border-radius: 4px 0 0 4px; padding: 0.6rem 0.9rem; font-family: var(--font-mono);
font-size: var(--fs-sm); line-height: 1.4; overflow-x: auto; color: var(--text); text-align: left; }
.clone-row pre .p { color: var(--dim); }
.copy-btn { background: var(--panel-2); border: 1px solid var(--border); border-radius: 0 4px 4px 0;
color: var(--dim); padding: 0 0.85rem; cursor: pointer; font-family: var(--font-mono);
font-size: var(--fs-xs); transition: color 0.15s, border-color 0.15s; }
.copy-btn:hover { color: var(--select); border-color: var(--select); }
.install-sponsor { margin-top: 1.25rem; line-height: 0; text-align: center; }
/* ---- sections as Blender panels ---- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem 2rem; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
margin-top: 1.25rem; overflow: hidden; }
.panel-head { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.55rem 1.1rem;
background: var(--panel-2); border-bottom: 1px solid var(--border); }
.panel-head .count { margin-left: auto; white-space: nowrap; }
/* Per-panel filter: rendered hidden, revealed by JS, so no-JS never sees
a box that does nothing. */
.panel-filter { background: var(--bg2); border: 1px solid var(--border); color: var(--text);
border-radius: 3px; padding: 0.18rem 0.55rem; font-family: var(--font-mono); font-size: var(--fs-xs);
width: 12rem; max-width: 45vw; align-self: center; }
.panel-filter:focus { border-color: var(--select); outline: 2px solid var(--select); outline-offset: 1px; }
.panel-filter::placeholder { color: var(--dim); }
.filter-empty { color: var(--dim); font-size: var(--fs-md); padding: 0.75rem 0; }
.is-filtered-out { display: none !important; }
.panel-body { padding: 1.5rem 1.75rem 1.75rem; }
/* Alignment: each section's heading block is centered under its panel
label; dense content (skills grid, rules table) stays left for
scanning, while visual and short content (renders, steps, chips) is
centered as a block. */
.panel-body > h2 { font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.02; margin-bottom: 0.4rem; text-align: center; }
.panel-body > .lede { color: var(--dim); max-width: 66ch; margin: 0 auto 1.5rem; text-align: center; }
.panel-body > .lede a { color: var(--select); }
.panel-body > .lede a:hover { text-decoration: underline; }
/* examples: selection-outline cards (Blender's selected-object orange) */
.render-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.render-card { display: block; border: 1px solid var(--border); border-radius: 4px; overflow: hidden;
background: var(--panel-2); transition: outline-color 0.12s, border-color 0.12s; outline: 2px solid transparent; outline-offset: -1px; }
.render-card:hover, .render-card:focus-visible { border-color: var(--select); outline-color: var(--select); }
.render-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.render-meta { display: flex; align-items: baseline; gap: 0.75rem; padding: 0.6rem 0.9rem; }
.render-meta .name { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text); white-space: nowrap; }
.render-meta .teach { color: var(--dim); font-size: var(--fs-sm); overflow: hidden;
display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.panel-cta { display: inline-block; margin-top: 1.25rem; font-weight: 500; font-size: var(--fs-md); color: var(--select); }
.panel-cta:hover { text-decoration: underline; }
/* featured subset: gallery link is the section's primary call to action */
.cta-row { margin: -0.25rem 0 1.5rem; text-align: center; }
.btn-cta { display: inline-block; background: var(--select); color: var(--on-select); font-weight: 500;
font-size: var(--fs-lg); border-radius: 4px; padding: 0.55rem 1.15rem; transition: filter 0.15s; }
.btn-cta:hover { filter: brightness(1.12); }
/* skills */
.skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 2.25rem; }
.skill-row { display: flex; flex-direction: column; padding: 0.55rem 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.skill-row .name { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--select); align-self: flex-start; }
.skill-row .name:hover, .rules-table .r-name a:hover { text-decoration: underline; }
.skill-row { min-width: 0; } /* a long `code` token must wrap, not widen the 1fr column */
.skill-row .desc, .skill-row details { overflow-wrap: anywhere; }
.skill-row .desc { color: var(--dim); font-size: var(--fs-md); margin-top: 0.15rem; }
.skill-row details { margin-top: 0.35rem; font-size: var(--fs-sm); color: var(--dim); }
.skill-row summary { cursor: pointer; font-family: var(--font-mono); font-size: var(--fs-xs);
text-transform: uppercase; letter-spacing: 0.04em; width: fit-content; padding: 0.25rem 0; }
.skill-row summary:hover { color: var(--select); }
.skill-row details ul { margin: 0.35rem 0 0 1.1rem; }
.skill-row details li { margin: 0.15rem 0; }
.skill-row details code { font-family: var(--font-mono); font-size: 0.85em; color: var(--text); }
.skill-row .desc code, .rules-table td code { font-family: var(--font-mono); font-size: 0.85em;
color: var(--text); }
/* rules */
.rules-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.rules-table th { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--border); }
.rules-table td { padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
vertical-align: top; color: var(--dim); }
.rules-table .r-name { color: var(--text); font-family: var(--font-mono); font-size: var(--fs-xs); }
.rules-table .r-name a { color: var(--text); }
.rules-table .r-name a:hover { color: var(--select); }
/* what's new */
.release-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0.4rem 1rem;
margin-bottom: 1.25rem; font-size: var(--fs-md); color: var(--dim); }
.release-line .ver { font-family: var(--font-mono); color: var(--text); font-size: var(--fs-md); }
.release-line a { color: var(--select); }
.release-line a:hover { text-decoration: underline; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.recent-grid .render-meta .name { overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-xs); }
.recent-grid .render-meta { flex-direction: column; gap: 0.1rem; padding: 0.5rem 0.75rem 0.6rem; }
.recent-grid .when-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.recent-grid .when { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--dim);
text-transform: uppercase; letter-spacing: 0.04em; }
.rules-table .r-scope { font-family: var(--font-mono); font-size: var(--fs-xs); white-space: nowrap; }
/* snippets */
.chip-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.chip-grid a { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--dim);
border: 1px solid var(--border); border-radius: 3px; padding: 0.28rem 0.6rem;
transition: color 0.12s, border-color 0.12s; }
.chip-grid a:hover { color: var(--select); border-color: var(--select); }
.tmpl-note { color: var(--dim); font-size: var(--fs-md); margin-top: 1.25rem; text-align: center; }
.tmpl-note a { color: var(--select); }
.tmpl-note a:hover { text-decoration: underline; }
/* install */
.steps { list-style: none; counter-reset: n; max-width: 72ch; margin: 0 auto; }
.steps li { counter-increment: n; display: flex; gap: 0.9rem; align-items: flex-start;
padding: 0.8rem 0; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); font-size: var(--fs-lg); }
.steps li::before { content: counter(n); flex-shrink: 0; width: 24px; height: 24px; border-radius: 3px;
background: var(--panel-2); border: 1px solid var(--border); color: var(--select);
font-family: var(--font-mono); font-size: var(--fs-xs); display: flex; align-items: center; justify-content: center; }
.steps code { background: var(--bg2); border: 1px solid var(--border); padding: 0.1rem 0.4rem;
border-radius: 3px; font-family: var(--font-mono); font-size: 0.8em; }
.steps strong { color: var(--text); }
.steps li span { color: var(--dim); }
.vp-center .sub code { font-family: var(--font-mono); font-size: 0.9em; }
/* boot sequence: HUD fades in, stats count up (JS adds .booted). Gated on
html.js so the corners never stay invisible when scripts don't run. */
@media (prefers-reduced-motion: no-preference) {
html.js .hud-corner { opacity: 0; transition: opacity 0.5s ease; }
html.js .booted .hud-corner { opacity: 1; }
.booted .hud-tl { transition-delay: 0.1s; } .booted .hud-tr { transition-delay: 0.25s; }
.booted .hud-bl { transition-delay: 0.4s; } .booted .hud-br { transition-delay: 0.55s; }
}
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
*, *::before, *::after { transition: none !important; }
}
@media (max-width: 820px) {
.skill-grid, .render-grid { grid-template-columns: 1fr; }
.recent-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
/* The gizmo would sit on the version label; the mode label goes. */
.hud-tl .mode { display: none; }
/* Stats stop being a corner overlay and become a 3x2 readout under the
headline, so phones still get the counts. */
.viewport { min-height: 0; flex-direction: column; padding-bottom: 2.6rem; }
.vp-center { padding: 3.5rem 1rem 1.25rem; }
.vp-center { order: 1; }
.hud-bl { order: 2; position: relative; left: auto; bottom: auto; z-index: 3; margin: 0 auto 0.75rem;
grid-template-columns: repeat(3, auto auto); gap: 0 0.7rem; align-items: center; }
/* 24px touch targets (WCAG 2.5.8) now that the stats are tappable on phones */
.hud-bl a { display: inline-flex; align-items: center; min-height: 24px; }
.clone-row pre { white-space: pre-wrap; overflow-wrap: break-word; }
.panel-body { padding: 1.1rem 1rem 1.25rem; }
.panel-head { flex-wrap: wrap; }
/* Rules: stacked rows instead of a three-column table that overflows. */
.rules-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden;
clip: rect(0 0 0 0); clip-path: inset(50%); }
.rules-table tr { display: block; padding: 0.65rem 0;
border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.rules-table td { display: block; border: 0; padding: 0.1rem 0; }
.rules-table .r-scope { white-space: normal; color: var(--select); }
}
@media (max-width: 420px) {
.hud-bl { grid-template-columns: repeat(2, auto auto); }
.hud-br { font-size: 0.6875rem; letter-spacing: 0.02em; } /* just under --fs-xs so the status line fits one row at 390px */
}
</style>
<script>document.documentElement.classList.add('js');</script>
</head>
<body>
{% set repo = site.links.github | default(plugin.repository) %}
{% set bl_primary = blender.primary | default('5.2 LTS') %}
{% set bl_fallback = blender.fallback | default('4.5 LTS') %}
<a class="skip" href="#main">Skip to content</a>
{{ chrome_header | safe }}
<!-- The viewport -->
<div class="stage">
<section class="viewport" id="viewport" aria-label="Overview">
<div class="vp-floor" aria-hidden="true"><div class="vp-grid"></div></div>
<div class="hud-corner hud-tl hud" aria-hidden="true">
<span class="mode">Object Mode</span><span>bpy {{ bl_primary }} · {{ bl_fallback }}</span>
</div>
<div class="hud-corner hud-tr" aria-hidden="true">
<span class="axis axis-x">x</span><span class="axis axis-y">y</span><span class="axis axis-z">z</span>
</div>
<div class="hud-corner hud-bl hud stats-hud">
{% if skill_count %}<a href="#skills">Skills</a><span class="v" data-count="{{ skill_count }}">{{ skill_count }}</span>{% endif %}
{% if rule_count %}<a href="#rules">Rules</a><span class="v" data-count="{{ rule_count }}">{{ rule_count }}</span>{% endif %}
{% if snippet_count %}<a href="#snippets">Snippets</a><span class="v" data-count="{{ snippet_count }}">{{ snippet_count }}</span>{% endif %}
{% if template_count %}<a href="#snippets">Templates</a><span class="v" data-count="{{ template_count }}">{{ template_count }}</span>{% endif %}
{% if example_count %}<a href="#examples">Examples</a><span class="v" data-count="{{ example_total }}">{{ example_total }}</span>{% endif %}
{% if showcase_count %}<a href="#showcase">Showcase</a><span class="v" data-count="{{ showcase_count }}">{{ showcase_count }}</span>{% endif %}
</div>
<div class="hud-corner hud-br hud">
<span class="ok-dot" aria-hidden="true"></span><span>smoke-gated on {{ bl_primary }} + {{ bl_fallback }} · exit 0</span>
</div>
<div class="vp-center">
<h1>Blender Python<br />that <span class="runs">actually runs</span>.</h1>
<p class="sub">Skills, rules, snippets, and starter templates that teach Cursor and Claude Code
the <code>bpy</code> that works —
backed by runnable examples asserted headless on Blender {{ bl_primary }} and {{ bl_fallback }} before they ship.</p>
<div class="hero-actions">
<a class="btn-cta btn-lg" href="#install">Get started</a>
<a class="btn-ghost btn-lg" href="gallery/">Browse the gallery</a>
</div>
<div class="clone-row">
{# site.heroCommand: the one command most visitors need (this repo: the
Claude Code marketplace add). <wbr> after each slash lets a phone
wrap there, not mid-word. #}
{% set hero_cmd = site.heroCommand or ('git clone ' ~ repo) %}
<pre id="cloneCmd"><span class="p">{{ site.heroPrompt or '$' }}</span> {% for part in hero_cmd.split('/') %}{{ part }}{% if not loop.last %}/<wbr>{% endif %}{% endfor %}</pre>
<button class="copy-btn" type="button" data-copy="{{ hero_cmd }}">copy</button>
</div>
</div>
</section>
</div>
<main id="main">
{% if examples %}
{% set shown = featured_examples if featured_examples else examples %}
<section class="panel" id="examples">
<div class="panel-head">
<span class="hud">Render Result</span>
<span class="hud count">{% if featured_examples %}{{ featured_count }} of {% endif %}{{ example_count }} frames</span>
</div>
<div class="panel-body">
<h2>Every render here is code that runs.</h2>
<p class="lede">These aren't mockups. Each example runs headless on Blender {{ bl_primary }} and {{ bl_fallback }} in the
smoke workflow, asserts its own correctness, and exits non-zero if the API drifted. Each still was
rendered by that same script.</p>
<p class="cta-row"><a class="btn-cta" href="gallery/">Open the full gallery →</a></p>
<div class="render-grid">
{% for ex in shown %}
<a class="render-card" href="gallery/{{ ex.name }}/">
<img src="{{ ex.heroSite }}" srcset="{{ ex.thumbSite }} 640w, {{ ex.heroSite }} 1280w" sizes="(min-width: 821px) 500px, calc(100vw - 4.5rem)" alt="{{ ex.alt | default(ex.name ~ ' render', true) }}" loading="lazy" decoding="async" width="1280" height="720" />
<div class="render-meta">
<span class="name">{{ ex.name }}</span>
<span class="teach">{{ ex.caption or ex.teaches }}</span>
</div>
</a>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% if site.installSteps %}
<section class="panel" id="install">
<div class="panel-head">
<span class="hud">Install</span>
</div>
<div class="panel-body">
<h2>{{ site.installHeading or 'Clone it. Point your AI at it.' }}</h2>
<ol class="steps">
{% for step in site.installSteps %}
<li><span>{{ step | safe }}</span></li>
{% endfor %}
</ol>
<div class="install-sponsor"><iframe src="https://github.com/sponsors/TMHSDigital/button" title="Sponsor TMHSDigital" height="32" width="114" style="border: 0; border-radius: 6px;" loading="lazy"></iframe></div>
</div>
</section>
{% endif %}
{% if showcase %}
{% set shown_showcase = featured_showcase if featured_showcase else showcase %}
<section class="panel" id="showcase">
<div class="panel-head">
<span class="hud">Showcase</span>
<span class="hud count">{% if featured_showcase %}{{ featured_showcase | length }} of {% endif %}{{ showcase_count }} pieces</span>
</div>
<div class="panel-body">
<h2>Budget-conformance props, not API contracts.</h2>
<p class="lede">Showcase pieces compose shipped skills into a recognizable asset and assert
declared budgets — triangle counts, materials, UVs, LODs, colliders, exports. They are not
examples. A still that merely rendered is not an assertion.</p>
<p class="cta-row"><a class="btn-cta" href="gallery/#k=showcase">See all {{ showcase_count }} showcase pieces in the gallery →</a></p>
<div class="render-grid">
{% for ex in shown_showcase %}
<a class="render-card" href="gallery/{{ ex.name }}/">
<img src="{{ ex.heroSite }}" srcset="{{ ex.thumbSite }} 640w, {{ ex.heroSite }} 1280w" sizes="(min-width: 821px) 500px, calc(100vw - 4.5rem)" alt="{{ ex.alt | default(ex.name ~ ' render', true) }}" loading="lazy" decoding="async" width="1280" height="720" />
<div class="render-meta">
<span class="name">{{ ex.name }}</span>
<span class="teach">{{ ex.caption or ex.teaches }}</span>
</div>
</a>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% if recent or latest_release %}
<section class="panel" id="new">
<div class="panel-head">
<span class="hud">What's new</span>
{% if latest_release %}<span class="hud count">v{{ latest_release.version }}</span>{% endif %}
</div>
<div class="panel-body">
<h2>Fresh off the render farm.</h2>
{% if latest_release %}
<p class="release-line">
<span>Latest release <span class="ver">v{{ latest_release.version }}</span>{% if latest_release.date %} · {{ latest_release.date }}{% endif %}</span>
<a href="{{ repo }}/releases/tag/v{{ latest_release.version }}">Release notes →</a>
<a href="{{ repo }}/blob/main/CHANGELOG.md">Changelog →</a>
</p>
{% endif %}
{% if recent %}
<div class="recent-grid">
{% for ex in recent %}
<a class="render-card" href="gallery/{{ ex.name }}/">
<img src="{{ ex.thumbSite }}" srcset="{{ ex.thumbSite }} 640w, {{ ex.heroSite }} 1280w" sizes="(min-width: 821px) 330px, 50vw" alt="{{ ex.alt | default(ex.name ~ ' render', true) }}" loading="lazy" decoding="async" width="1280" height="720" />
<div class="render-meta">
<span class="name">{{ ex.name }}</span>
<span class="when-row"><span class="when">{{ 'showcase' if ex.kind == 'showcase' else 'example' }}</span>
<span class="when">added {{ ex.added }}</span></span>
</div>
</a>
{% endfor %}
</div>
{% endif %}
</div>
</section>
{% endif %}
{% if skills %}
<section class="panel" id="skills">
<div class="panel-head">
<span class="hud">Skills</span>
<input class="panel-filter" type="search" name="filter-skills" id="filter-skills" data-filter="#skills .skill-row" placeholder="filter skills"
aria-label="Filter skills" autocomplete="off" spellcheck="false" hidden />
<span class="hud count" data-count-label="{{ skill_count }} loaded">{{ skill_count }} loaded</span>
</div>
<div class="panel-body">
<h2>Workflows the AI loads by name.</h2>
<p class="lede">Each skill is the canonical pattern for one job — operators, panels, bmesh,
geometry nodes, slotted actions — plus the mistakes AI assistants actually make there. Where
4.5 LTS and 5.x diverge, both code paths are shown.</p>
<div class="skill-grid">
{% for skill in skills %}
<div class="skill-row">
<a class="name" href="{{ repo }}/blob/main/skills/{{ skill.category }}/SKILL.md">{{ skill.category }}</a>
<span class="desc">{{ skill.description | inline_code }}</span>
{% if skill.triggers %}
<details>
<summary>When to use ({{ skill.triggers | length }})</summary>
<ul>{% for t in skill.triggers %}<li>{{ t | inline_code }}</li>{% endfor %}</ul>
</details>
{% endif %}
</div>
{% endfor %}
</div>
<p class="filter-empty" hidden>No skill matches that filter.</p>
</div>
</section>
{% endif %}
{% if rules %}
<section class="panel" id="rules">
<div class="panel-head">
<span class="hud">Rules</span>
<input class="panel-filter" type="search" name="filter-rules" id="filter-rules" data-filter="#rules tbody tr" placeholder="filter rules"
aria-label="Filter rules" autocomplete="off" spellcheck="false" hidden />
<span class="hud count" data-count-label="{{ rule_count }} active">{{ rule_count }} active</span>
</div>
<div class="panel-body">
<h2>Anti-patterns, caught before they ship.</h2>
<p class="lede">Guardrails that load whenever a matching file is open, for the failure modes that make
Blender Python look right and run wrong: ops in loops, leaked bmesh, deprecated context dicts, per-vertex Python loops.</p>
<table class="rules-table">
<thead><tr><th class="hud">Rule</th><th class="hud">Scope</th><th class="hud">Flags</th></tr></thead>
<tbody>
{% for rule in rules %}
<tr>
<td class="r-name">{% if rule.file %}<a href="{{ repo }}/blob/main/rules/{{ rule.file }}">{{ rule.slug | default(rule.name) }}</a>{% else %}{{ rule.slug | default(rule.name) }}{% endif %}</td>
<td class="r-scope">{{ rule.scope }}</td>
<td>{{ rule.description | inline_code }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<p class="filter-empty" hidden>No rule matches that filter.</p>
</div>
</section>
{% endif %}
{% if snippets %}
<section class="panel" id="snippets">
<div class="panel-head">
<span class="hud">Snippets</span>
<span class="hud count">{{ snippet_count }} patterns</span>
</div>
<div class="panel-body">
<h2>Canonical patterns, five to fifty lines.</h2>
<p class="lede">Standalone, paste-ready answers to the questions that come up every session:
the right way to create and delete objects, read bulk vertex data, bind properties, bridge
the 4.x/5.x API boundary.</p>
<div class="chip-grid">
{% for sn in snippets %}
<a href="{{ repo }}/blob/main/{{ sn.path }}">{{ sn.name }}</a>
{% endfor %}
</div>
{% if templates %}
<p class="tmpl-note">Plus {{ template_count }} starter templates:
{% for t in templates %}<a href="{{ repo }}/tree/main/{{ t.path }}">{{ t.name }}</a>{% if loop.revindex == 2 %}{{ ',' if loop.length > 2 }} and {% elif not loop.last %}, {% endif %}{% endfor %}.</p>
{% endif %}
</div>
</section>
{% endif %}
</main>
{{ chrome_footer | safe }}
<p class="sr-only" id="srStatus" role="status" aria-live="polite"></p>
<script>
{{ chrome_js | safe }}
(function () {
var srStatus = document.getElementById('srStatus');
function announce(msg) {
srStatus.textContent = '';
setTimeout(function () { srStatus.textContent = msg; }, 50);
}
// copy buttons: Clipboard API, else execCommand (non-secure origins)
function copyText(text) {
if (navigator.clipboard && window.isSecureContext) {
return navigator.clipboard.writeText(text);
}
return new Promise(function (resolve, reject) {
var ta = document.createElement('textarea');
ta.value = text; ta.setAttribute('readonly', '');
ta.style.position = 'fixed'; ta.style.opacity = '0';
document.body.appendChild(ta); ta.select();
var ok = false;
try { ok = document.execCommand('copy'); } catch (e) {}
document.body.removeChild(ta);
if (ok) { resolve(); } else { reject(); }
});
}
document.querySelectorAll('[data-copy]').forEach(function (btn) {
btn.addEventListener('click', function () {
copyText(btn.getAttribute('data-copy')).then(function () {
btn.textContent = 'copied'; announce('Copied to clipboard');
}, function () {
btn.textContent = 'copy failed'; announce('Copy failed');
}).then(function () {
setTimeout(function () { btn.textContent = 'copy'; }, 1500);
});
});
});
// panel filters: substring match over each row's text
document.querySelectorAll('.panel-filter').forEach(function (input) {
var panel = input.closest('.panel');
var rows = Array.prototype.slice.call(document.querySelectorAll(input.getAttribute('data-filter')));
var texts = rows.map(function (r) { return r.textContent.toLowerCase(); });
var count = panel.querySelector('[data-count-label]');
var empty = panel.querySelector('.filter-empty');
input.hidden = false;
input.addEventListener('input', function () {
var q = input.value.trim().toLowerCase();
var shown = 0;
rows.forEach(function (r, i) {
var on = !q || texts[i].indexOf(q) !== -1;
r.classList.toggle('is-filtered-out', !on);
if (on) shown++;
});
count.textContent = q ? shown + ' of ' + rows.length : count.getAttribute('data-count-label');
empty.hidden = shown !== 0;
clearTimeout(input._t);
input._t = setTimeout(function () {
announce(q ? shown + ' of ' + rows.length + ' match' : '');
}, 400);
});
});
// boot sequence: HUD fade-in + stats count-up (skipped for reduced motion)
var vp = document.getElementById('viewport');
var reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
var counters = document.querySelectorAll('.stats-hud .v');
function setFinal() {
counters.forEach(function (el) { el.textContent = el.getAttribute('data-count'); });
}
if (reduce) { setFinal(); } else {
requestAnimationFrame(function () { vp.classList.add('booted'); });
var t0 = null;
function tick(ts) {
if (t0 === null) t0 = ts;
var k = Math.min((ts - t0) / 900, 1);
var ease = 1 - Math.pow(1 - k, 3);
counters.forEach(function (el) {
el.textContent = Math.round(ease * parseInt(el.getAttribute('data-count'), 10));
});
if (k < 1) requestAnimationFrame(tick); else setFinal();
}
requestAnimationFrame(tick);
}
})();
// Scrollspy: mark the nav link of the section currently under the header.
// In-page anchors (#install, #new, ...) map to their section. The
// Examples and Showcase links go to the gallery (gallery/#k=examples),
// but this page also has #examples and #showcase sections, so they map
// by the filter key; otherwise scrolling through those sections left the
// previous link (Install) marked.
(function () {
var links = Array.prototype.slice.call(document.querySelectorAll('.site-nav a'));
var spy = links.map(function (a) {
var href = a.getAttribute('href') || '';
var m = href.charAt(0) === '#' ? [null, href.slice(1)] : href.match(/#k=([\w-]+)$/);
return { a: a, el: m ? document.getElementById(m[1]) : null };
}).filter(function (s) { return s.el; });
// document order, so "the last section above the threshold" is right
spy.sort(function (x, y) {
return x.el.compareDocumentPosition(y.el) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
});
if (!spy.length) return;
var queued = false;
function update() {
queued = false;
var cur = null;
spy.forEach(function (s) { if (s.el.getBoundingClientRect().top <= 120) cur = s; });
// The last section can be too short to ever reach the threshold.
if (window.innerHeight + window.scrollY >= document.documentElement.scrollHeight - 2) cur = spy[spy.length - 1];
spy.forEach(function (s) {
if (s === cur) s.a.setAttribute('aria-current', 'location');
else s.a.removeAttribute('aria-current');
});
}
window.addEventListener('scroll', function () {
if (!queued) { queued = true; requestAnimationFrame(update); }
}, { passive: true });
update();
})();
</script>
</body>
</html>