Compare commits

...

26 Commits

Author SHA1 Message Date
95a19dceb3 npz to lfs 2025-11-27 13:01:31 -07:00
e8f66cd06f add unitypackage 2025-11-26 21:45:57 -07:00
c5a2463b91 specst 2025-11-26 18:43:40 -07:00
Nathan
1c86fa0c68 attr for flip fluids 2025-11-26 13:38:50 -07:00
Nathan
b67c2e7779 deploy zip&unzipseqs 2025-11-26 13:36:00 -07:00
Nathan
e1086312dd adjust gitattributes and ignore for physics and bakes 2025-11-26 13:00:35 -07:00
Nathan
ba46dce3a3 Merge remote-tracking branch 'HOME/main' 2025-11-26 10:00:38 -07:00
2238021885 specst 2025-11-26 01:04:33 -07:00
Nathan
c101fbb381 fix zipseq store not storing 2025-11-25 14:22:44 -07:00
Nathan
68330de0fb fix zipseq not clearing zips 2025-11-25 13:17:46 -07:00
Nathan
0cff26cb0d actual work config 2025-11-25 12:57:55 -07:00
75c2c1ed02 lfs webm webp 2025-11-18 21:43:50 -07:00
584f5135dd Merge branch 'main' into HOME 2025-11-18 21:37:45 -07:00
Nathan
bffbff528e overhaul gitattributes and add seq to ignore again 2025-11-17 12:33:56 -07:00
756e8168fb Merge branch 'main' into HOME 2025-11-15 10:07:23 -07:00
Nathan
fbc0f833dc swap back to LZMA for better multithreading 2025-11-13 14:22:16 -07:00
Nathan
06e8177f0b add USD to LFS 2025-11-13 10:56:28 -07:00
81ada88dc1 Merge remote-tracking branch 'origin/HOME' into HOME 2025-11-12 17:55:15 -07:00
Nathan
2fd5023816 7zinst fix bin-packing vs concurrent behavior for max CPU and RAM allocation 2025-11-12 10:10:31 -07:00
Nathan
6c20b2de52 work config 2025-11-12 09:49:40 -07:00
b7ae8880e7 more 7zinst behavior modification 2025-11-12 09:01:32 -07:00
0da1dbd09a HOME config 2025-11-11 18:09:35 -07:00
e1c1aacd0d HOME config 2025-11-11 17:57:28 -07:00
Nathan
6d4cdb0549 zipseq 7zinst of 0 bottleneck fix 2025-11-11 16:31:09 -07:00
Nathan
55a2074c62 fix zipseq ignoring zip metadata and not replacing with 7z 2025-11-11 12:45:44 -07:00
Nathan
a152d17136 work config 2025-11-11 10:27:48 -07:00
14 changed files with 10288 additions and 442 deletions

View File

@@ -1,4 +1,4 @@
<!-- Generated by SpecStory -->
<!-- Generated by SpecStory, Markdown v2.1.0 -->
<!-- cursor Session 22ad1b66-1412-4dc8-962e-ef2f925bebf4 (2025-10-30 00:40Z) -->
@@ -10,7 +10,7 @@ _**User (2025-10-30 00:28Z)**_
---
_**Assistant (gpt-5-codex)**_
_**Agent (model default, mode Plan)**_
@@ -22,19 +22,21 @@ Reviewing `components/gitignore` and scanning `R:\Creative\artsy\maya\` for YYYY
---
Tool use: **read_file**
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: components/gitignore</summary>
Read file: components/gitignore
</details>
</tool-use>
---
Tool use: **list_dir**
<tool-use data-tool-type="generic" data-tool-name="list_dir">
<details>
<summary>Listed directory undefined • **0** results</summary>
<summary>Tool use: **list_directory**Listed directory undefined • **0** results</summary>
No results found
</details>
</tool-use>
---
@@ -47,16 +49,17 @@ Checking a project directory to understand the structure:
---
Tool use: **read_file**
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: R:\Creative\artsy\maya\2025-08-02 Springtrap Prince of Egypt\.gitignore</summary>
Read file: R:\Creative\artsy\maya\2025-08-02 Springtrap Prince of Egypt\.gitignore
</details>
</tool-use>
---
Tool use: **codebase_search**
<tool-use data-tool-type="search" data-tool-name="codebase_search">
<details>
<summary>Searched codebase "How does UpgradeToGitProj merge gitignore files?" • **14** results</summary>
<summary>Tool use: **codebase_search**Searched codebase "How does UpgradeToGitProj merge gitignore files?" • **14** results</summary>
| File | Lines |
|------|-------|
@@ -76,6 +79,7 @@ Tool use: **codebase_search**
| `UpdateSequences.ps1` | L257-288 |
</details>
</tool-use>
---
@@ -88,10 +92,9 @@ Clarifying a few details before creating the plan:
---
Tool use: **grep**
<tool-use data-tool-type="search" data-tool-name="grep">
<details>
<summary>Grep for "^renders/|^Renders/" in "components/gitignore" • 1 match</summary>
<summary>Tool use: **grep**Grep for "^renders/|^Renders/" in "components/gitignore" • 1 match</summary>
Output mode: content
@@ -102,6 +105,7 @@ Output mode: content
</details>
</tool-use>
---
@@ -114,7 +118,44 @@ Creating the plan:
---
Tool use: **create_plan**
<tool-use data-tool-type="unknown" data-tool-name="create_plan">
<details>
<summary>Tool use: **create_plan**</summary>
Parameters:
```json
{
&quot;plan&quot;: &quot;# Sync gitignore across project repositories\n\n## Overview\nUpdate &#96;.gitignore&#96; files in all project repositories matching the YYYY-MM-DD pattern in &#96;R:\\Creative\\artsy\\maya\\&#96; by merging missing lines from &#96;components/gitignore&#96;, then commit each change.\n\n## Steps\n\n### 1. Discover project directories\n- Scan &#96;R:\\Creative\\artsy\\maya\\&#96; for directories matching pattern &#96;YYYY-MM-DD*&#96; (e.g., &#96;2025-08-02 Springtrap Prince of Egypt&#96;)\n- Filter to only directories that are git repositories (contain &#96;.git&#96; folder)\n\n### 2. For each project repository:\n - **Verify git repo**: Check if &#96;.git&#96; exists\n - **Merge .gitignore**: \n - Use the merge logic from &#96;UpgradeToGitProj.bat&#96; (&#96;:MergeTemplate&#96; function)\n - If &#96;.gitignore&#96; doesn Jones exist, copy from template\n - If it exists, fastr &#96;/x /c:\&quot;%%L\&quot; \&quot;%dst%\&quot; || (&gt;&gt;\&quot;%dst\&quot; echo %%L)&#96; to append only missing lines\n - Source: &#96;R:\\Creative\\artsy\\maya\\0 ProjectStructure\\components\\gitignore&#96;\n - Destination: &#96;{projectDir}\\.gitignore&#96;\n - **Stage changes**: Run &#96;git add .gitignore&#96; in each repo\n - **Commit**: Run &#96;git commit -m \&quot;prproj gzip to LFS\&quot;&#96; in each repo\n\n### 3. Report results\n- List which repos were updated\n- List which repos had no changes (already up to date)\n- List any repos that failed (not git repos, permission errors, etc.)\n\n## Implementation notes\n- Use the same merge logic as &#96;UpgradeToGitProj.bat&#96; lines 248-250\n- Only process directories that are git repositories\n- Handle cases where &#96;.gitignore&#96; doesn&#39;t exist (copy entire template)\n- Commit only if there are actual changes to &#96;.gitignore&#96;\n&quot;,
&quot;name&quot;: &quot;Sync gitignore across project repos&quot;,
&quot;overview&quot;: &quot;Find all YYYY-MM-DD project directories in R:\\Creative\\artsy\\maya\\, merge changes from components/gitignore into each repo&#39;s .gitignore (using append-missing-lines logic), and commit with the specified message.&quot;
}
```
Additional data:
```json
{
&quot;status&quot;: &quot;pending&quot;,
&quot;reviewData&quot;: {
&quot;status&quot;: &quot;Requested&quot;,
&quot;selectedOption&quot;: &quot;none&quot;,
&quot;isShowingInput&quot;: false
}
}
```
Result:
```json
{
&quot;rejected&quot;: {}
}
```
Status: **completed**
</details>
</tool-use>
---
@@ -124,13 +165,51 @@ Proofread the markdown, there seems to be some hallucinatory content in there.
---
_**Assistant (gpt-5-codex)**_
_**Agent (model gpt-5-codex, mode Plan)**_
<think><details><summary>Thought Process</summary>**Correcting hallucinations and typos in plan**</details></think>
<think><details><summary>Thought Process</summary>
**Correcting hallucinations and typos in plan**</details></think>
---
Tool use: **create_plan**
<tool-use data-tool-type="unknown" data-tool-name="create_plan">
<details>
<summary>Tool use: **create_plan**</summary>
Parameters:
```json
{
&quot;plan&quot;: &quot;# Sync gitignore across project repositories\n\n## Overview\n\nUpdate &#96;.gitignore&#96; files in all project repositories matching the YYYY-MM-DD pattern in &#96;R:\\Creative\\artsy\\maya\\&#96; by merging missing lines from &#96;components/gitignore&#96;, then commit each change.\n\n## Steps\n\n### 1. Discover project directories\n\n- Scan &#96;R:\\Creative\\artsy\\maya\\&#96; for directories matching pattern &#96;YYYY-MM-DD*&#96; (e.g., &#96;2025-08-02 Springtrap Prince of Egypt&#96;)\n- Filter to only directories that are git repositories (contain &#96;.git&#96; folder)\n\n### 2. For each project repository:\n\n- **Verify git repo**: Check if &#96;.git&#96; exists\n- **Merge .gitignore**: \n - Use the merge logic from &#96;UpgradeToGitProj.bat&#96; (&#96;:MergeTemplate&#96; function)\n - If &#96;.gitignore&#96; doesn&#39;t exist, copy the template file in full\n - If it already exists, iterate each template line and append only those lines not present (e.g., &#96;findstr /x /c:\&quot;%%L\&quot; \&quot;%dst%\&quot; || (&gt;&gt;\&quot;%dst%\&quot; echo %%L)&#96;)\n - Source: &#96;R:\\Creative\\artsy\\maya\\0 ProjectStructure\\components\\gitignore&#96;\n - Destination: &#96;{projectDir}\\.gitignore&#96;\n- **Stage changes**: Run &#96;git add .gitignore&#96; in each repo\n- **Commit**: Run &#96;git commit -m \&quot;prproj gzip to LFS\&quot;&#96; in each repo\n\n### 3. Report results\n\n- List which repos were updated\n- List which repos had no changes (already up to date)\n- List any repos that failed (not git repos, permission errors, etc.)\n\n## Implementation notes\n\n- Use the same merge logic as &#96;UpgradeToGitProj.bat&#96; lines 248-250\n- Only process directories that are git repositories\n- Handle cases where &#96;.gitignore&#96; doesn&#39;t exist (copy entire template)\n- Commit only if there are actual changes to &#96;.gitignore&#96;&quot;,
&quot;name&quot;: &quot;Sync gitignore across project repos&quot;,
&quot;overview&quot;: &quot;Find all YYYY-MM-DD project directories in R:\\Creative\\artsy\\maya\\, merge changes from components/gitignore into each repo&#39;s .gitignore (using append-missing-lines logic), and commit with the specified message.&quot;
}
```
Additional data:
```json
{
&quot;status&quot;: &quot;accepted&quot;,
&quot;reviewData&quot;: {
&quot;status&quot;: &quot;Done&quot;,
&quot;selectedOption&quot;: &quot;approve&quot;,
&quot;isShowingInput&quot;: false
}
}
```
Result:
```json
{
&quot;accepted&quot;: {}
}
```
Status: **completed**
</details>
</tool-use>
---
@@ -140,57 +219,66 @@ Implement the plan as specified. To-do's from the plan have already been created
---
_**Assistant (gpt-5-codex)**_
_**Agent (model gpt-5-codex, mode Agent)**_
<think><details><summary>Thought Process</summary>**Preparing to update gitignore files**</details></think>
<think><details><summary>Thought Process</summary>
**Preparing to update gitignore files**</details></think>
---
Tool use: **list_dir**
<tool-use data-tool-type="generic" data-tool-name="list_dir">
<details>
<summary>Listed directory undefined • **0** results</summary>
<summary>Tool use: **list_directory**Listed directory undefined • **0** results</summary>
No results found
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Identifying git repositories from dated directories**</details></think>
<think><details><summary>Thought Process</summary>
**Identifying git repositories from dated directories**</details></think>
---
Tool use: **list_dir**
<tool-use data-tool-type="generic" data-tool-name="list_dir">
<details>
<summary>Listed directory undefined • **0** results</summary>
<summary>Tool use: **list_directory**Listed directory undefined • **0** results</summary>
No results found
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Verifying Git repository presence**</details></think>
<think><details><summary>Thought Process</summary>
**Verifying Git repository presence**</details></think>
---
Tool use: **read_file**
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: R:\Creative\artsy\maya\2025-02 BondingArtifact\.git\config</summary>
Read file: R:\Creative\artsy\maya\2025-02 BondingArtifact\.git\config
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Checking and planning .gitignore update**</details></think>
<think><details><summary>Thought Process</summary>
**Checking and planning .gitignore update**</details></think>
---
Tool use: **read_file**
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: R:\Creative\artsy\maya\2025-02 BondingArtifact\.gitignore</summary>
Read file: R:\Creative\artsy\maya\2025-02 BondingArtifact\.gitignore
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Comparing and planning .gitignore updates**</details></think>
<think><details><summary>Thought Process</summary>
**Comparing and planning .gitignore updates**</details></think>
---
@@ -208,13 +296,16 @@ sorry, you got stuck.
---
_**Assistant (gpt-5-codex)**_
_**Agent (model gpt-5-codex, mode Agent)**_
<think><details><summary>Thought Process</summary>**Planning directory processing with PowerShell**</details></think>
<think><details><summary>Thought Process</summary>
**Planning directory processing with PowerShell**</details></think>
---
Tool use: **run_terminal_cmd**
<tool-use data-tool-type="shell" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: cd R:\Creative\artsy\maya
Get-ChildItem -Directory | Where-Object { $_.Name -match '^[0-9]{4}-[0-9]{2}-[0-9]{2}' -and (Test-Path (Join-Path $_.FullName '.git')) } | Select-Object -ExpandProperty FullName</summary>
```bash
cd R:\Creative\artsy\maya
@@ -229,16 +320,72 @@ R:\Creative\artsy\maya\2025-08-02 Springtrap Prince of Egypt
R:\Creative\artsy\maya\2025-08-17 DIE
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Automating .gitignore updates across repos**
<think><details><summary>Thought Process</summary>
**Automating .gitignore updates across repos**
I'm drafting a PowerShell script to sync a template `.gitignore` to multiple git repos, carefully adding missing lines without duplicates and preserving newlines. The script will stage and commit changes only when needed, handling edge cases like missing files, trailing spaces, and git errors. I'll also ensure repo paths with spaces are correctly quoted for smooth execution.</details></think>
---
Tool use: **run_terminal_cmd**
<tool-use data-tool-type="shell" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: cd R:\Creative\artsy\maya
$ErrorActionPreference = 'Stop'
$tplPath = 'R:\Creative\artsy\maya\0 ProjectStructure\components\gitignore'
$repos = @(
'R:\Creative\artsy\maya\2025-07-09 LolbitNSFW',
'R:\Creative\artsy\maya\2025-07-11 GothFexa',
'R:\Creative\artsy\maya\2025-07-29 Springtrap_Goopie',
'R:\Creative\artsy\maya\2025-08-02 Springtrap Prince of Egypt',
'R:\Creative\artsy\maya\2025-08-17 DIE'
)
$summary = @()
foreach ($repo in $repos) {
if (-not (Test-Path (Join-Path $repo '.git'))) {
$summary += [pscustomobject]@{Repo=$repo; Status='not-a-git-repo'}
continue
}
$dstPath = Join-Path $repo '.gitignore'
$changed = $false
if (-not (Test-Path $dstPath)) {
Copy-Item -LiteralPath $tplPath -Destination $dstPath -Force
$changed = $true
} else {
$tplLines = Get-Content -LiteralPath $tplPath
$dstLines = Get-Content -LiteralPath $dstPath
$missing = @()
foreach ($line in $tplLines) {
if ($dstLines -notcontains $line) { $missing += $line }
}
if ($missing.Count -gt 0) {
if ($dstLines.Count -gt 0 -and $dstLines[-1] -ne '') {
Add-Content -LiteralPath $dstPath -Value ''
}
Add-Content -LiteralPath $dstPath -Value $missing
$changed = $true
}
}
if ($changed) {
Push-Location $repo
git add .gitignore | Out-Null
$commitSucceeded = $true
try {
$commitOutput = git commit -m 'prproj gzip to LFS'
} catch {
$commitSucceeded = $false
$commitOutput = $_.Exception.Message
}
Pop-Location
$summary += [pscustomobject]@{Repo=$repo; Status=($(if ($commitSucceeded) {'updated'} else {'commit-failed'})); Output=$commitOutput}
} else {
$summary += [pscustomobject]@{Repo=$repo; Status='up-to-date'}
}
}
$summary</summary>
```bash
cd R:\Creative\artsy\maya
@@ -300,14 +447,33 @@ $summary
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Analyzing missing command output**</details></think>
<think><details><summary>Thought Process</summary>
**Analyzing missing command output**</details></think>
---
Tool use: **run_terminal_cmd**
<tool-use data-tool-type="shell" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: cd R:\Creative\artsy\maya
$repos = @(
'R:\Creative\artsy\maya\2025-07-09 LolbitNSFW',
'R:\Creative\artsy\maya\2025-07-11 GothFexa',
'R:\Creative\artsy\maya\2025-07-29 Springtrap_Goopie',
'R:\Creative\artsy\maya\2025-08-02 Springtrap Prince of Egypt',
'R:\Creative\artsy\maya\2025-08-17 DIE'
)
foreach ($repo in $repos) {
Write-Host "--- $repo ---"
if (-not (Test-Path (Join-Path $repo '.git'))) {
Write-Host 'not a git repo'
continue
}
git -C $repo status --short .gitignore
}</summary>
```bash
cd R:\Creative\artsy\maya
@@ -336,24 +502,32 @@ foreach ($repo in $repos) {
--- R:\Creative\artsy\maya\2025-08-17 DIE ---
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Verifying commits and changes**</details></think>
<think><details><summary>Thought Process</summary>
**Verifying commits and changes**</details></think>
---
Tool use: **read_file**
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: R:\Creative\artsy\maya\2025-07-29 Springtrap_Goopie\.gitignore</summary>
Read file: R:\Creative\artsy\maya\2025-07-29 Springtrap_Goopie\.gitignore
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Analyzing duplicate lines from template merge**</details></think>
<think><details><summary>Thought Process</summary>
**Analyzing duplicate lines from template merge**</details></think>
---
Tool use: **run_terminal_cmd**
<tool-use data-tool-type="shell" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: cd "R:\Creative\artsy\maya\2025-07-29 Springtrap_Goopie"
git log -1 --pretty=%s</summary>
```bash
cd "R:\Creative\artsy\maya\2025-07-29 Springtrap_Goopie"
@@ -364,16 +538,32 @@ git log -1 --pretty=%s
prproj gzip to LFS
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Summarizing repo commit statuses**
<think><details><summary>Thought Process</summary>
**Summarizing repo commit statuses**
Im figuring out how to identify which repos actually got updated by checking their latest commit messages and logs, aiming to differentiate repos with real changes from those without commits. I want to produce a concise table listing each repo alongside its HEAD commit message to clearly show which ones were modified.</details></think>
---
Tool use: **run_terminal_cmd**
<tool-use data-tool-type="shell" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: $repos = @(
'R:\Creative\artsy\maya\2025-07-09 LolbitNSFW',
'R:\Creative\artsy\maya\2025-07-11 GothFexa',
'R:\Creative\artsy\maya\2025-07-29 Springtrap_Goopie',
'R:\Creative\artsy\maya\2025-08-02 Springtrap Prince of Egypt',
'R:\Creative\artsy\maya\2025-08-17 DIE'
)
foreach ($repo in $repos) {
if (-not (Test-Path (Join-Path $repo '.git'))) { continue }
$subject = git -C $repo log -1 --pretty=%s
Write-Host "${repo}`n HEAD: $subject"
}
</summary>
```bash
$repos = @(
@@ -404,20 +594,26 @@ R:\Creative\artsy\maya\2025-08-17 DIE
HEAD: prproj gzip to LFS
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Verifying .gitignore entries**</details></think>
<think><details><summary>Thought Process</summary>
**Verifying .gitignore entries**</details></think>
---
Tool use: **read_file**
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: R:\Creative\artsy\maya\2025-08-02 Springtrap Prince of Egypt\.gitignore</summary>
Read file: R:\Creative\artsy\maya\2025-08-02 Springtrap Prince of Egypt\.gitignore
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Investigating case sensitivity in appended lines**</details></think>
<think><details><summary>Thought Process</summary>
**Investigating case sensitivity in appended lines**</details></think>
---
@@ -425,11 +621,25 @@ spawn c:\Users\Nathan\AppData\Local\Programs\cursor\resources\app\node_modules\@
---
<think><details><summary>Thought Process</summary>**Analyzing case sensitivity in line sync**</details></think>
<think><details><summary>Thought Process</summary>
**Analyzing case sensitivity in line sync**</details></think>
---
Tool use: **run_terminal_cmd**
<tool-use data-tool-type="shell" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: $repos = @(
'R:\Creative\artsy\maya\2025-07-09 LolbitNSFW',
'R:\Creative\artsy\maya\2025-07-11 GothFexa',
'R:\Creative\artsy\maya\2025-07-29 Springtrap_Goopie',
'R:\Creative\artsy\maya\2025-08-02 Springtrap Prince of Egypt',
'R:\Creative\artsy\maya\2025-08-17 DIE'
)
foreach ($repo in $repos) {
if (-not (Test-Path (Join-Path $repo '.git'))) { continue }
$hash = git -C $repo rev-parse --short HEAD
Write-Host "${repo}`n Commit: $hash"
}
</summary>
```bash
$repos = @(
@@ -460,10 +670,13 @@ R:\Creative\artsy\maya\2025-08-17 DIE
Commit: a403b76
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>**Preparing final summary message**</details></think>
<think><details><summary>Thought Process</summary>
**Preparing final summary message**</details></think>
---

View File

@@ -1,4 +1,4 @@
<!-- Generated by SpecStory, Markdown v2.0.0 -->
<!-- Generated by SpecStory, Markdown v2.1.0 -->
<!-- cursor Session 1aae6d70-0daa-49a8-b8f1-7e9d36a76a3b (2025-11-11 01:50Z) -->
@@ -988,7 +988,7 @@ Reviewing the current code structure, then implementing the plan step by step.
---
<tool-use data-tool-type="generic" data-tool-name="todo_write">
<tool-use data-tool-type="task" data-tool-name="todo_write">
<details><summary>Tool use: **todo_write** • Todo List</summary>
- [-] Add get_available_ram() function with psutil support and Windows fallback
@@ -1207,7 +1207,7 @@ Lines added: 38, lines removed: undefined
---
<tool-use data-tool-type="generic" data-tool-name="todo_write">
<tool-use data-tool-type="task" data-tool-name="todo_write">
<details><summary>Tool use: **todo_write** • Todo List</summary>
- [x] Add get_available_ram() function with psutil support and Windows fallback
@@ -1411,7 +1411,7 @@ Lines added: 73, lines removed: 4
---
<tool-use data-tool-type="generic" data-tool-name="todo_write">
<tool-use data-tool-type="task" data-tool-name="todo_write">
<details><summary>Tool use: **todo_write** • Todo List</summary>
- [x] Add get_available_ram() function with psutil support and Windows fallback
@@ -1472,7 +1472,7 @@ Lines added: 3, lines removed: undefined
---
<tool-use data-tool-type="generic" data-tool-name="todo_write">
<tool-use data-tool-type="task" data-tool-name="todo_write">
<details><summary>Tool use: **todo_write** • Todo List</summary>
- [x] Add get_available_ram() function with psutil support and Windows fallback
@@ -1528,7 +1528,7 @@ Lines added: 4, lines removed: 2
---
<tool-use data-tool-type="generic" data-tool-name="todo_write">
<tool-use data-tool-type="task" data-tool-name="todo_write">
<details><summary>Tool use: **todo_write** • Todo List</summary>
- [x] Add get_available_ram() function with psutil support and Windows fallback
@@ -4560,6 +4560,300 @@ Lines added: 1, lines removed: 1
---
<tool-use data-tool-type="generic" data-tool-name="read_lints">
<details>
<summary>Tool use: **read_lints** • Read lints for 1 file</summary>
Lint paths:
- `zip_sequences.py`
Lint results
Lint errors for `zip_sequences.py`
| Message | Range | Severity |
|-------|-------|----------|
| Variable "source" is not accessed | 73:9-73:15 | DIAGNOSTIC_SEVERITY_HINT |
| "seq_dir" is not accessed | 186:26-186:33 | DIAGNOSTIC_SEVERITY_HINT |
| Variable "zip_path" is not accessed | 326:18-326:26 | DIAGNOSTIC_SEVERITY_HINT |
| Variable "state_path" is not accessed | 326:28-326:38 | DIAGNOSTIC_SEVERITY_HINT |
</details>
</tool-use>
---
---
Updated the code to use `0` for auto-calculate instead of `null`:
1. **DEFAULT_CONFIG**: Changed from `None` to `0`
2. **Logic**: Treats `0` as `None` (auto-calculate), so `0` triggers RAM-based calculation
3. **config.json**: Set to `0`
Now:
- `"Max7zInst": 0` = auto-calculate based on RAM
- `"Max7zInst": 1` = limit to 1 instance
- `"Max7zInst": 2` = limit to 2 instances
- etc.
This makes the config clearer: `0` means automatic, and any positive number sets a hard limit.
---
_**User (2025-11-11 01:50Z)**_
I think we're just dealing with massive sequences. This is only 1 instance, so even if I had 2x the ram, I would only be able to afford 2!
---
_**Agent (model default, mode Agent)**_
---
Large sequences are using far more RAM than estimated. Making the dictionary size configurable and reducing the default to lower per-instance usage:
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: zip_sequences.py</summary>
</details>
</tool-use>
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: zip_sequences.py</summary>
</details>
</tool-use>
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: config.json</summary>
</details>
</tool-use>
---
---
_**User (2025-11-11 01:50Z)**_
Nope, we're keeping the dictsize as large as possible. I just need to keep in mind my limitations on a per-project basis.
---
_**Agent (model default, mode Agent)**_
---
The current setup supports this. Keep the dictionary size at 1GB for best compression, and set `Max7zInst` per project in `.config/config.json` to limit concurrent instances based on your RAM.
For example:
- `"Max7zInst": 1` - Only 1 concurrent 7z instance (safest for large sequences)
- `"Max7zInst": 2` - 2 concurrent instances (if you have more RAM)
- `"Max7zInst": 0` - Auto-calculate (may still hit limits with very large sequences)
The dictionary size stays at 1GB for maximum compression, and you control concurrency per project. This lets you tune each project based on sequence sizes and available RAM.
---
_**User (2025-11-11 06:13Z)**_
this is on another system. ignore the 7z PATH error. Are there any other relevant errors?
& "R:\Creative\artsy\maya\2025-02 BondingArtifact\Renders\ZipSeqArchv.bat"
[zip] RAM: 76.7GB available (80% of total), 30.7GB for compression (40%), 8.0GB per job (dict: 1024MB) → RAM limit: 3, requested: None, final: 3
[zip] Renders\0_GaslightRender\2024-11-23\GaslightRender_smol -> Renders\_zipped\0_GaslightRender\2024-11-23\GaslightRender_smol.7z
[zip] Renders\3_background\2025-01-13\background -> Renders\_zipped\3_background\2025-01-13\background.7z
[zip] Renders\3_background\2025-10-26\3_background_dark -> Renders\_zipped\3_background\2025-10-26\3_background_dark.7z
[zip] Renders\3_background\2025-10-30\3_background_dark -> Renders\_zipped\3_background\2025-10-30\3_background_dark.7z
[zip] Renders\4_StartupScreen\2025-02-05\4_StartupScreen_evensrenumbered -> Renders\_zipped\4_StartupScreen\2025-02-05\4_StartupScreen_evensrenumbered.7z
[zip] Renders\4_StartupScreen\2025-02-08\Shot2Redo_1024 -> Renders\_zipped\4_StartupScreen\2025-02-08\Shot2Redo_1024.7z
[zip] Renders\4_StartupScreen\2025-02-08\Shot3Redo_128 -> Renders\_zipped\4_StartupScreen\2025-02-08\Shot3Redo_128.7z
[zip] Renders\4_StartupScreen\2025-02-09\Shot1 -> Renders\_zipped\4_StartupScreen\2025-02-09\Shot1.7z
[zip] Renders\4_StartupScreen\2025-02-10\Shot2 -> Renders\_zipped\4_StartupScreen\2025-02-10\Shot2.7z
[zip] Renders\4_StartupScreen\2025-02-12\Shot3 -> Renders\_zipped\4_StartupScreen\2025-02-12\Shot3.7z
[zip] Renders\4_StartupScreen\2025-02-13\Shot6 -> Renders\_zipped\4_StartupScreen\2025-02-13\Shot6.7z
[zip] Renders\4_StartupScreen\2025-02-14\Shot8 -> Renders\_zipped\4_StartupScreen\2025-02-14\Shot8.7z
[zip] Renders\4_StartupScreen\2025-02-19\StartupScreen_finalfix -> Renders\_zipped\4_StartupScreen\2025-02-19\StartupScreen_finalfix.7z
[zip] Renders\4_StartupScreen\2025-10-21\Shot4 -> Renders\_zipped\4_StartupScreen\2025-10-21\Shot4.7z
[zip] Renders\4_StartupScreen\2025-10-24\4_StartupScreen_dark -> Renders\_zipped\4_StartupScreen\2025-10-24\4_StartupScreen_dark.7z
[zip] Renders\4_StartupScreen\2025-10-24\Shot1_dark -> Renders\_zipped\4_StartupScreen\2025-10-24\Shot1_dark.7z
[zip] Renders\4_StartupScreen\2025-10-24\Shot2_dark -> Renders\_zipped\4_StartupScreen\2025-10-24\Shot2_dark.7z
[zip] Renders\4_StartupScreen\2025-10-24\Shot3_dark -> Renders\_zipped\4_StartupScreen\2025-10-24\Shot3_dark.7z
[zip] Renders\4_StartupScreen\2025-10-25\Shot1_dark -> Renders\_zipped\4_StartupScreen\2025-10-25\Shot1_dark.7z
[zip] Renders\4_StartupScreen\2025-10-25\Shot3_dark -> Renders\_zipped\4_StartupScreen\2025-10-25\Shot3_dark.7z
[zip] Renders\4_StartupScreen\2025-11-02\Shot1_dark -> Renders\_zipped\4_StartupScreen\2025-11-02\Shot1_dark.7z
[zip] Renders\4_StartupScreen\2025-11-03\Shot1_dark -> Renders\_zipped\4_StartupScreen\2025-11-03\Shot1_dark.7z
[zip] Renders\4_StartupScreen\2025-11-04\4_StartupScreen_dark -> Renders\_zipped\4_StartupScreen\2025-11-04\4_StartupScreen_dark.7z
[zip] Renders\4_StartupScreen\2025-11-04\Shot2_dark -> Renders\_zipped\4_StartupScreen\2025-11-04\Shot2_dark.7z
[zip] Renders\4_StartupScreen\2025-11-04\Shot3_dark -> Renders\_zipped\4_StartupScreen\2025-11-04\Shot3_dark.7z
[zip] Renders\4_StartupScreen\2025-11-07\4_StartupScreen_dark -> Renders\_zipped\4_StartupScreen\2025-11-07\4_StartupScreen_dark.7z
[zip] Renders\4_StartupScreen\2025-11-07\Shot2_dark -> Renders\_zipped\4_StartupScreen\2025-11-07\Shot2_dark.7z
[zip] Renders\4_StartupScreen\2025-11-07\Shot3_dark -> Renders\_zipped\4_StartupScreen\2025-11-07\Shot3_dark.7z
[zip] Renders\5_goodbye\2025-02-23\219_goodbye_RR1 -> Renders\_zipped\5_goodbye\2025-02-23\219_goodbye_RR1.7z
[zip] Renders\5_goodbye\2025-02-23\219_goodbye_RR1_evensrenamed -> Renders\_zipped\5_goodbye\2025-02-23\219_goodbye_RR1_evensrenamed.7z
[zip] Renders\5_goodbye\2025-02-23\219_goodbye_RR2 -> Renders\_zipped\5_goodbye\2025-02-23\219_goodbye_RR2.7z
[zip] Renders\5_goodbye\2025-02-23\219_goodbye_RR2_evensrenamed -> Renders\_zipped\5_goodbye\2025-02-23\219_goodbye_RR2_evensrenamed.7z
[zip] Renders\5_goodbye\2025-02-23\219_goodbye_RR3 -> Renders\_zipped\5_goodbye\2025-02-23\219_goodbye_RR3.7z
[zip] Renders\5_goodbye\2025-02-23\goodbye -> Renders\_zipped\5_goodbye\2025-02-23\goodbye.7z
[zip] Renders\5_goodbye\2025-02-23\goodbye_test -> Renders\_zipped\5_goodbye\2025-02-23\goodbye_test.7z
[zip] Renders\4_StartupScreen\2025-02-08\Shot1Redo_1024 -> Renders\_zipped\4_StartupScreen\2025-02-08\Shot1Redo_1024.7z
Sequence sync failed: 7z compression requested but 7z executable not found in PATH. Please install 7z (e.g., via Chocolatey: choco install 7zip) or set zipper to 'zip' in config.json
Traceback (most recent call last):
File "R:\Creative\artsy\maya\0 ProjectStructure\zip_sequences.py", line 841, in <module>
raise SystemExit(main())
~~~~^^
File "R:\Creative\artsy\maya\0 ProjectStructure\zip_sequences.py", line 835, in main
updated = run_zip(args.jobs, verbose=args.verbose)
File "R:\Creative\artsy\maya\0 ProjectStructure\zip_sequences.py", line 719, in run_zip
updated_paths.extend(future.result())
~~~~~~~~~~~~~^^
File "C:\Python313\Lib\concurrent\futures\_base.py", line 449, in result
return self.__get_result()
~~~~~~~~~~~~~~~~~^^
File "C:\Python313\Lib\concurrent\futures\_base.py", line 401, in __get_result
raise self._exception
File "C:\Python313\Lib\concurrent\futures\thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "R:\Creative\artsy\maya\0 ProjectStructure\zip_sequences.py", line 628, in process_zip
zip_sequence(seq_dir, zip_path, per_job_memory_limit)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\Creative\artsy\maya\0 ProjectStructure\zip_sequences.py", line 444, in zip_sequence
raise RuntimeError(
...<3 lines>...
)
RuntimeError: 7z compression requested but 7z executable not found in PATH. Please install 7z (e.g., via Chocolatey: choco install 7zip) or set zipper to 'zip' in config.json
. was unexpected at this time.
---
_**Agent (model default, mode Agent)**_
---
The only other error is the batch file syntax error at the end: `. was unexpected at this time.`
This is a Windows batch file error, not from the Python script. It likely comes from the batch file that calls the Python script. Checking the batch file:
---
<tool-use data-tool-type="generic" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "ZipSeqArchv.bat" • **1** result in **1** directory</summary>
Directory: **d:\0 ProjectStructure** (1 file)
| File |
|------|
| `ZipSeqArchv.bat` |
</details>
</tool-use>
---
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: ZipSeqArchv.bat</summary>
</details>
</tool-use>
---
---
@@ -4569,6 +4863,41 @@ Lines added: 1, lines removed: 1
---
The batch file looks fine. The `. was unexpected at this time.` error is likely a side effect of how the batch file handles the Python error exit.
The Python script is working correctly:
- RAM detection: 76.7GB available
- Worker calculation: 3 workers (RAM limit)
- Processing sequences as expected
- Only fails when trying to run 7z (PATH issue, which you're ignoring)
The batch file error is likely from error handling when Python exits with a non-zero code. The script logic appears correct; the only issue is the missing 7z executable.
To verify, you could temporarily set `"zipper": "zip"` in the config to test without 7z, but otherwise the script is functioning as expected.
---
_**User (2025-11-11 06:13Z)**_
threadripper epic
---
_**Agent (model default, mode Agent)**_
---
Threadripper system with ~96GB RAM. The script is using it well:
- **76.7GB available** (80% of total)
- **3 workers** calculated from RAM (30.7GB / 8GB per job)
- Processing **36 sequences** concurrently
- CPU at **86%** utilization
The RAM-based worker calculation is working as intended. With that much RAM, you can run multiple 7z instances in parallel while keeping the 1GB dictionary size for maximum compression. The script should handle large sequences efficiently on this system.
---

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,235 @@
<!-- Generated by SpecStory, Markdown v2.1.0 -->
<!-- cursor Session ebd5381e-09fc-4db2-a2c9-6daab402cc8a (2025-11-17 19:23Z) -->
# Sort and comment gitattributes file (2025-11-17 19:23Z)
_**User (2025-11-17 19:20Z)**_
@gitattributes (1-59) let's sort this with some comments and sort each with a section. can we do that without presenting errors?
---
_**Agent (model default, mode Agent)**_
---
Organizing the gitattributes file into sections with comments and removing duplicates. Checking for duplicates first:
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: components/gitattributes</summary>
</details>
</tool-use>
---
---
Organizing into sections with comments, removing duplicates, and sorting each section alphabetically:
---
<tool-use data-tool-type="write" data-tool-name="write">
<details><summary>Tool use: **code_edit** • Edit file: components/gitattributes</summary>
**Chunk 1**
Lines added: 63, lines removed: 42
```diff
@@ -1,59 +1,80 @@
+ # Git LFS attributes configuration
+ # All listed file types will be tracked by Git LFS
+
+ # Video files
+ *.avi filter=lfs diff=lfs merge=lfs -text
+ *.mkv filter=lfs diff=lfs merge=lfs -text
+ *.mov filter=lfs diff=lfs merge=lfs -text
+ *.MOV filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
- *.png filter=lfs diff=lfs merge=lfs -text
- *.jpg filter=lfs diff=lfs merge=lfs -text
+
+ # Image files
+ *.bmp filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
+ *.gif filter=lfs diff=lfs merge=lfs -text
*.hdr filter=lfs diff=lfs merge=lfs -text
+ *.jpg filter=lfs diff=lfs merge=lfs -text
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
+ *.png filter=lfs diff=lfs merge=lfs -text
+ *.psd filter=lfs diff=lfs merge=lfs -text
+ *.tga filter=lfs diff=lfs merge=lfs -text
+ *.tif filter=lfs diff=lfs merge=lfs -text
+ *.tiff filter=lfs diff=lfs merge=lfs -text
+
+ # 3D/CG files
+ *.3ds filter=lfs diff=lfs merge=lfs -text
+ *.abc filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
- *.7z filter=lfs diff=lfs merge=lfs -text
- *.abc filter=lfs diff=lfs merge=lfs -text
- *.pdf filter=lfs diff=lfs merge=lfs -text
- *.mkv filter=lfs diff=lfs merge=lfs -text
- *.obj filter=lfs diff=lfs merge=lfs -text
- *.max filter=lfs diff=lfs merge=lfs -text
- *.ma filter=lfs diff=lfs merge=lfs -text
+ *.blend1 filter=lfs diff=lfs merge=lfs -text
+ *.blend2 filter=lfs diff=lfs merge=lfs -text
*.bvh filter=lfs diff=lfs merge=lfs -text
- *.h5 filter=lfs diff=lfs merge=lfs -text
- *.tar filter=lfs diff=lfs merge=lfs -text
+ *.bvh.gz filter=lfs diff=lfs merge=lfs -text
*.c4d filter=lfs diff=lfs merge=lfs -text
- *.mov filter=lfs diff=lfs merge=lfs -text
- *.blend1 filter=lfs diff=lfs merge=lfs -text
- *.3ds filter=lfs diff=lfs merge=lfs -text
- *.hdf5 filter=lfs diff=lfs merge=lfs -text
- *.psd filter=lfs diff=lfs merge=lfs -text
- *.zip filter=lfs diff=lfs merge=lfs -text
+ *.dae filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.fbxkey filter=lfs diff=lfs merge=lfs -text
- *.blend2 filter=lfs diff=lfs merge=lfs -text
+ *.ma filter=lfs diff=lfs merge=lfs -text
+ *.max filter=lfs diff=lfs merge=lfs -text
*.mb filter=lfs diff=lfs merge=lfs -text
- *.ma filter=lfs diff=lfs merge=lfs -text
- *.tiff filter=lfs diff=lfs merge=lfs -text
+ *.obj filter=lfs diff=lfs merge=lfs -text
+ *.usd filter=lfs diff=lfs merge=lfs -text
+ *.vdb filter=lfs diff=lfs merge=lfs -text
+
+ # Audio files
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
+ *.wav filter=lfs diff=lfs merge=lfs -text
+
+ # Archive/Compression files
+ *.7z filter=lfs diff=lfs merge=lfs -text
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
+ *.gz filter=lfs diff=lfs merge=lfs -text
+ *.rar filter=lfs diff=lfs merge=lfs -text
+ *.tar filter=lfs diff=lfs merge=lfs -text
+ *.zip filter=lfs diff=lfs merge=lfs -text
+
+ # Documents
*.ai filter=lfs diff=lfs merge=lfs -text
- *.gz filter=lfs diff=lfs merge=lfs -text
- *.tga filter=lfs diff=lfs merge=lfs -text
- *.tif filter=lfs diff=lfs merge=lfs -text
- *.jpeg filter=lfs diff=lfs merge=lfs -text
- *.bmp filter=lfs diff=lfs merge=lfs -text
+ *.docx filter=lfs diff=lfs merge=lfs -text
*.eps filter=lfs diff=lfs merge=lfs -text
- *.rar filter=lfs diff=lfs merge=lfs -text
- *.bz2 filter=lfs diff=lfs merge=lfs -text
- *.avi filter=lfs diff=lfs merge=lfs -text
- *.bvh.gz filter=lfs diff=lfs merge=lfs -text
- *.dae filter=lfs diff=lfs merge=lfs -text
- *.mp3 filter=lfs diff=lfs merge=lfs -text
- *.mp3 filter=lfs diff=lfs merge=lfs -text
- *.vdb filter=lfs diff=lfs merge=lfs -text
- *.aep filter=lfs diff=lfs merge=lfs -text
+ *.pdf filter=lfs diff=lfs merge=lfs -text
+
+ # Adobe files
*.aegraphic filter=lfs diff=lfs merge=lfs -text
- *.prproj filter=lfs diff=lfs merge=lfs -text
+ *.aep filter=lfs diff=lfs merge=lfs -text
+ *.prel filter=lfs diff=lfs merge=lfs -text
*.prin filter=lfs diff=lfs merge=lfs -text
- *.prel filter=lfs diff=lfs merge=lfs -text
*.prmf filter=lfs diff=lfs merge=lfs -text
- *.wav filter=lfs diff=lfs merge=lfs -text
- *.docx filter=lfs diff=lfs merge=lfs -text
- *.MOV filter=lfs diff=lfs merge=lfs -text
- *.gif filter=lfs diff=lfs merge=lfs -text
+ *.prproj filter=lfs diff=lfs merge=lfs -text
+
+ # Substance files
*.sbs filter=lfs diff=lfs merge=lfs -text
*.sbsar filter=lfs diff=lfs merge=lfs -text
*.spp filter=lfs diff=lfs merge=lfs -text
- *.usd filter=lfs diff=lfs merge=lfs -text
- *.uni filter=lfs diff=lfs merge=lfs -text
+
+ # Data files
+ *.h5 filter=lfs diff=lfs merge=lfs -text
+ *.hdf5 filter=lfs diff=lfs merge=lfs -text
+
+ # Other
+ *.uni filter=lfs diff=lfs merge=lfs -text
+
```
</details>
</tool-use>
---
---
Checking for linting errors:
---
<tool-use data-tool-type="generic" data-tool-name="read_lints">
<details>
<summary>Tool use: **read_lints** • Read lints for 1 file</summary>
Lint paths:
- `components/gitattributes`
Lint results
**No lint errors found**
</details>
</tool-use>
---
---
Reorganized the gitattributes file:
- **Organized into sections** with comments:
- Video files
- Image files
- 3D/CG files
- Audio files
- Archive/Compression files
- Documents
- Adobe files
- Substance files
- Data files
- Other
- **Sorted each section** alphabetically
- **Removed duplicates**: `*.ma` (was on lines 13 and 28) and `*.mp3` (was on lines 42 and 43)
- **No errors**: syntax is valid and linting passes
The file is now organized and easier to maintain.
---

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,197 @@
<!-- Generated by SpecStory, Markdown v2.1.0 -->
<!-- cursor Session 92e6d22f-d2e8-4786-8d47-b22f9893e990 (2025-11-26 20:08Z) -->
# Configure ConfigLoader for zipseq and unzipseq (2025-11-26 20:08Z)
_**User (2025-11-26 19:57Z)**_
@ConfigLoader.ps1 ConfigLoader should push zipseq and unzipseq to \Renders.
---
_**Agent (model default, mode Agent)**_
---
Checking for `zipseq` and `unzipseq` files and the `\Renders` directory structure.
---
<tool-use data-tool-type="generic" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "*zipseq*" • **2** results in **1** directory</summary>
Directory: **a:\1 Amazon_Active_Projects\3 ProjectStructure** (2 files)
| File |
|------|
| `ZipSeqArchv.bat` |
| `UnzipSeqArchv.bat` |
</details>
</tool-use>
---
<tool-use data-tool-type="generic" data-tool-name="glob_file_search">
<details>
<summary>Tool use: **glob_file_search** • Searched codebase "*unzipseq*" • **1** result in **1** directory</summary>
Directory: **a:\1 Amazon_Active_Projects\3 ProjectStructure** (1 file)
| File |
|------|
| `UnzipSeqArchv.bat` |
</details>
</tool-use>
---
<tool-use data-tool-type="search" data-tool-name="codebase_search">
<details>
<summary>Tool use: **codebase_search** • Searched codebase "Renders directory structure or path" • **14** results</summary>
| File | Lines |
|------|-------|
| `NewProject.bat` | L58-83 |
| `NewProject.bat` | L63 |
| `UpgradeToGitProj.bat` | L59 |
| `UpgradeToGitProj.bat` | L53-126 |
| `components/gitignore` | L123 |
| `zip_sequences.py` | L565-585 |
| `UpgradeToGitProj.bat` | L121-166 |
| `zip_sequences.py` | L102 |
| `UpgradeToGitProj.bat` | L160-218 |
| `ConfigLoader.ps1` | L59 |
| `GetStructDir.ps1` | L27-68 |
| `UpgradeToGitProj.bat` | L215-295 |
| `ZipSeqArchv.bat` | L44 |
| `UnzipSeqArchv.bat` | L42 |
</details>
</tool-use>
---
---
Adding logic to deploy `ZipSeqArchv.bat` and `UnzipSeqArchv.bat` to the project root's `\Renders` directory. Checking the current deployment logic:
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: ConfigLoader.ps1</summary>
</details>
</tool-use>
---
---
Adding logic to deploy `ZipSeqArchv.bat` and `UnzipSeqArchv.bat` to the project root's `\Renders` directory:
---
<tool-use data-tool-type="write" data-tool-name="search_replace">
<details><summary>Tool use: **code_edit** • Edit file: ConfigLoader.ps1</summary>
**Chunk 1**
Lines added: 24, lines removed: undefined
```diff
@@ -317,4 +317,28 @@
Write-Host &quot;All batch files refreshed successfully.&quot; -ForegroundColor Green
+
+ # Deploy ZipSeqArchv.bat and UnzipSeqArchv.bat to \Renders
+ Write-Host &quot;&#96;n=== Deploying ZipSeqArchv.bat and UnzipSeqArchv.bat to \Renders ===&quot; -ForegroundColor Magenta
+ $rendersDir = Join-Path -Path $resolvedProject -ChildPath &#39;Renders&#39;
+ if (-not (Test-Path -LiteralPath $rendersDir -PathType Container)) {
+ New-Item -Path $rendersDir -ItemType Directory -Force | Out-Null
+ Write-Host &quot;Created Renders directory: $rendersDir&quot; -ForegroundColor Cyan
+ }
+ $zipFiles = @(
+ @{ Name = &#39;ZipSeqArchv.bat&#39;; Source = Join-Path -Path $structDir -ChildPath &#39;ZipSeqArchv.bat&#39; },
+ @{ Name = &#39;UnzipSeqArchv.bat&#39;; Source = Join-Path -Path $structDir -ChildPath &#39;UnzipSeqArchv.bat&#39; }
+ )
+ foreach ($zipFile in $zipFiles) {
+ $targetPath = Join-Path -Path $rendersDir -ChildPath $zipFile.Name
+ try {
+ Copy-Item -Path $zipFile.Source -Destination $targetPath -Force
+ Write-Host &quot;[OK] $targetPath&quot; -ForegroundColor Green
+ }
+ catch {
+ Write-Host &quot;[FAIL] $targetPath&quot; -ForegroundColor Red
+ Write-Host &quot; $($_.Exception.Message)&quot; -ForegroundColor DarkRed
+ exit 1
+ }
+ }
# Deploy .gitattributes and .gitignore to project root if they don&#39;t exist
```
</details>
</tool-use>
---
---
Checking for linting errors:
---
<tool-use data-tool-type="generic" data-tool-name="read_lints">
<details>
<summary>Tool use: **read_lints** • Read lints for 1 file</summary>
Lint paths:
- `ConfigLoader.ps1`
Lint results
**No lint errors found**
</details>
</tool-use>
---
---
Updated `ConfigLoader.ps1` to deploy `ZipSeqArchv.bat` and `UnzipSeqArchv.bat` to the project root's `\Renders` directory.
The changes:
1. **Creates the `Renders` directory** if it doesn't exist
2. **Deploys both batch files** to `\Renders` in the project root
3. **Provides status messages** for each deployment
This follows the same pattern as the git files deployment and runs after the recursive batch file updates and before the git files deployment. The files are copied to `\Renders` even if they already exist elsewhere in the project.
---

View File

@@ -317,6 +317,30 @@ if ($MyInvocation.InvocationName -ne '.') {
Write-Host "All batch files refreshed successfully." -ForegroundColor Green
# Deploy ZipSeqArchv.bat and UnzipSeqArchv.bat to \Renders
Write-Host "`n=== Deploying ZipSeqArchv.bat and UnzipSeqArchv.bat to \Renders ===" -ForegroundColor Magenta
$rendersDir = Join-Path -Path $resolvedProject -ChildPath 'Renders'
if (-not (Test-Path -LiteralPath $rendersDir -PathType Container)) {
New-Item -Path $rendersDir -ItemType Directory -Force | Out-Null
Write-Host "Created Renders directory: $rendersDir" -ForegroundColor Cyan
}
$zipFiles = @(
@{ Name = 'ZipSeqArchv.bat'; Source = Join-Path -Path $structDir -ChildPath 'ZipSeqArchv.bat' },
@{ Name = 'UnzipSeqArchv.bat'; Source = Join-Path -Path $structDir -ChildPath 'UnzipSeqArchv.bat' }
)
foreach ($zipFile in $zipFiles) {
$targetPath = Join-Path -Path $rendersDir -ChildPath $zipFile.Name
try {
Copy-Item -Path $zipFile.Source -Destination $targetPath -Force
Write-Host "[OK] $targetPath" -ForegroundColor Green
}
catch {
Write-Host "[FAIL] $targetPath" -ForegroundColor Red
Write-Host " $($_.Exception.Message)" -ForegroundColor DarkRed
exit 1
}
}
# Deploy .gitattributes and .gitignore to project root if they don't exist
Write-Host "`n=== Deploying .gitattributes and .gitignore to project root ===" -ForegroundColor Magenta
$gitFiles = @(

View File

@@ -21,7 +21,7 @@ if not exist "%GET_STRUCT_DIR%" (
)
for /f "usebackq delims=" %%I in (`powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"Set-StrictMode -Version Latest; $structDir = & '%GET_STRUCT_DIR%' -ProjectRoot '%PROJ_ROOT%'; if (-not $structDir) { throw \"Failed to get structDir from GetStructDir.ps1\" }; $pyPath = Join-Path $structDir 'zip_sequences.py'; if (-not (Test-Path -LiteralPath $pyPath)) { throw \"zip_sequences.py not found at $pyPath\" }; Write-Output $pyPath"`) do set "PY_SCRIPT=%%I"
"Set-StrictMode -Version Latest; $structDir = & '%GET_STRUCT_DIR%' -ProjectRoot '%PROJ_ROOT%'; if (-not $structDir) { throw \"Failed to get structDir from GetStructDir.ps1\" }; $pyPath = Join-Path $structDir 'zip_sequences.py'; if (-not (Test-Path -LiteralPath $pyPath)) { throw \"zip_sequences.py not found at $pyPath\" }; Write-Output $pyPath"`) do set "PY_SCRIPT=%%~I"
if not defined PY_SCRIPT (
echo [ERROR] Unable to resolve zip_sequences.py path from config.
@@ -33,10 +33,12 @@ pushd "%PROJ_ROOT%" >nul 2>&1
python "%PY_SCRIPT%" --verbose %*
set "ERR=!ERRORLEVEL!"
if not "!ERR!"=="0" (
echo Failed to update render sequence archives (exit code !ERR!).
popd >nul 2>&1
if !ERR! NEQ 0 (
echo Failed to update render sequence archives ^(exit code !ERR!^).
exit /b !ERR!
)
popd >nul 2>&1
exit /b !ERR!
exit /b 0

View File

@@ -1,56 +1,96 @@
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
*.hdr filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.7z filter=lfs diff=lfs merge=lfs -text
*.abc filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
# Git LFS attributes configuration
# All listed file types will be tracked by Git LFS
# Video files
*.avi filter=lfs diff=lfs merge=lfs -text
*.mkv filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
*.max filter=lfs diff=lfs merge=lfs -text
*.ma filter=lfs diff=lfs merge=lfs -text
*.bvh filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.c4d filter=lfs diff=lfs merge=lfs -text
*.mov filter=lfs diff=lfs merge=lfs -text
*.blend1 filter=lfs diff=lfs merge=lfs -text
*.3ds filter=lfs diff=lfs merge=lfs -text
*.hdf5 filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.fbxkey filter=lfs diff=lfs merge=lfs -text
*.blend2 filter=lfs diff=lfs merge=lfs -text
*.mb filter=lfs diff=lfs merge=lfs -text
*.ma filter=lfs diff=lfs merge=lfs -text
*.tiff filter=lfs diff=lfs merge=lfs -text
*.ai filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.MOV filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text
*.webm filter=lfs diff=lfs merge=lfs -text
# Image files
*.bmp filter=lfs diff=lfs merge=lfs -text
*.exr filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.hdr filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.tga filter=lfs diff=lfs merge=lfs -text
*.tif filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.bmp filter=lfs diff=lfs merge=lfs -text
*.eps filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.avi filter=lfs diff=lfs merge=lfs -text
*.tiff filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text
# 3D/CG files
*.3ds filter=lfs diff=lfs merge=lfs -text
*.abc filter=lfs diff=lfs merge=lfs -text
*.blend filter=lfs diff=lfs merge=lfs -text
*.blend1 filter=lfs diff=lfs merge=lfs -text
*.blend2 filter=lfs diff=lfs merge=lfs -text
*.bvh filter=lfs diff=lfs merge=lfs -text
*.bvh.gz filter=lfs diff=lfs merge=lfs -text
*.c4d filter=lfs diff=lfs merge=lfs -text
*.dae filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.fbx filter=lfs diff=lfs merge=lfs -text
*.fbxkey filter=lfs diff=lfs merge=lfs -text
*.ma filter=lfs diff=lfs merge=lfs -text
*.max filter=lfs diff=lfs merge=lfs -text
*.mb filter=lfs diff=lfs merge=lfs -text
*.obj filter=lfs diff=lfs merge=lfs -text
*.usd filter=lfs diff=lfs merge=lfs -text
*.vdb filter=lfs diff=lfs merge=lfs -text
*.aep filter=lfs diff=lfs merge=lfs -text
*.aegraphic filter=lfs diff=lfs merge=lfs -text
*.prproj filter=lfs diff=lfs merge=lfs -text
*.prin filter=lfs diff=lfs merge=lfs -text
*.prel filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.docx filter=lfs diff=lfs merge=lfs -text
*.MOV filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
*.bphys filter=lfs diff=lfs merge=lfs -text
*.bobj filter=lfs diff=lfs merge=lfs -text
*.bvel filter=lfs diff=lfs merge=lfs -text
*.bpointcache filter=lfs diff=lfs merge=lfs -text
*.blob filter=lfs diff=lfs merge=lfs -text
*.unitypackage filter=lfs diff=lfs merge=lfs -text
# Flip Fluids cache files
*.data filter=lfs diff=lfs merge=lfs -text
*.sqlite3 filter=lfs diff=lfs merge=lfs -text
# Substance files
*.sbs filter=lfs diff=lfs merge=lfs -text
*.sbsar filter=lfs diff=lfs merge=lfs -text
*.spp filter=lfs diff=lfs merge=lfs -text
*.spp filter=lfs diff=lfs merge=lfs -text
# Audio files
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
# Archive/Compression files
*.7z filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
# Documents
*.docx filter=lfs diff=lfs merge=lfs -text
*.xlsx filter=lfs diff=lfs merge=lfs -text
*.eps filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
# Adobe files
*.aegraphic filter=lfs diff=lfs merge=lfs -text
*.aep filter=lfs diff=lfs merge=lfs -text
*.prel filter=lfs diff=lfs merge=lfs -text
*.prin filter=lfs diff=lfs merge=lfs -text
*.prmf filter=lfs diff=lfs merge=lfs -text
*.prproj filter=lfs diff=lfs merge=lfs -text
*.ai filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
# Data files
*.h5 filter=lfs diff=lfs merge=lfs -text
*.hdf5 filter=lfs diff=lfs merge=lfs -text
# Other
*.uni filter=lfs diff=lfs merge=lfs -text
*.pdn filter=lfs diff=lfs merge=lfs -text
# Python files
*.npz filter=lfs diff=lfs merge=lfs -text

View File

@@ -41,13 +41,6 @@
*.tmp
*.temp
# Blender internal cache files
*.bpy
*.bmesh
*.bvh
*.bobj
*.bphys
# OS generated files
.DS_Store
.DS_Store?
@@ -119,6 +112,7 @@ Renders/**
!Renders/**/
!Renders/**/*.bat
!Renders/**/*.log
seq/
# Premiere
*.prlock
@@ -127,4 +121,4 @@ Adobe Premiere Pro Audio Previews/
Adobe Premiere Pro (Beta) Video Previews/
Adobe Premiere Pro (Beta) Audio Previews/
Pr/RnR/
Pr/RnR/

View File

@@ -1,8 +1,8 @@
{
"dailyFormat": "daily_YYMMDD",
"structDir": "D:\\0 ProjectStructure",
"structDir": "A:\\1 Amazon_Active_Projects\\3 ProjectStructure",
"zipper": "7z",
"compression": 9,
"compression": 0,
"Max7zInst": 0
}

View File

@@ -18,6 +18,7 @@ import subprocess
import sys
import tempfile
import time
import traceback
from concurrent.futures import ThreadPoolExecutor, as_completed
from pathlib import Path
from typing import Iterator, Sequence
@@ -53,11 +54,18 @@ STATE_SUFFIX = ".meta.json"
DEFAULT_CONFIG = {
"zipper": "7z",
"compression": 9,
"compressionMethod": "LZMA2", # Compression method: LZMA2 (multi-threaded), PPMd (single-threaded), BZip2, Deflate
"dailyFormat": "daily_YYMMDD",
"Max7zInst": 0, # Maximum concurrent 7z instances (0 = auto-calculate)
}
def log(mode: str, message: str, *, verbose_only: bool = False, verbose: bool = False) -> None:
if verbose_only and not verbose:
return
print(f"[{mode}] {message}", flush=True)
def load_config() -> dict:
# First try to load from project's .config folder (current working directory)
# Then fall back to ProjectStructure repo config (next to zip_sequences.py)
@@ -70,22 +78,28 @@ def load_config() -> dict:
("repo", repo_config),
]
log("init", "Loading configuration sources...")
for source, config_path in config_paths:
try:
if config_path.exists():
log("init", f"Reading {source} config at {config_path}")
text = config_path.read_text(encoding="utf-8")
try:
data = json.loads(text)
if isinstance(data, dict):
merged = DEFAULT_CONFIG.copy()
merged.update(data)
log("init", f"Configuration loaded from {source}")
return merged
except json.JSONDecodeError:
log("init", f"Config file at {config_path} is invalid JSON; skipping")
continue
except OSError:
log("init", f"Unable to read config at {config_path}; skipping")
continue
# If no config found, return defaults
log("init", "No config files found; using default settings")
return DEFAULT_CONFIG.copy()
@@ -107,6 +121,12 @@ if not isinstance(COMPRESSION_LEVEL, int):
COMPRESSION_LEVEL = 9
COMPRESSION_LEVEL = max(0, min(9, COMPRESSION_LEVEL))
COMPRESSION_METHOD = CONFIG.get("compressionMethod", "LZMA2")
# Validate compression method
valid_methods = {"LZMA2", "PPMd", "BZip2", "Deflate"}
if COMPRESSION_METHOD not in valid_methods:
COMPRESSION_METHOD = "LZMA2" # Default to LZMA2 for multi-threading support
MAX_7Z_INSTANCES = CONFIG.get("Max7zInst", 0)
if MAX_7Z_INSTANCES is not None:
if isinstance(MAX_7Z_INSTANCES, str):
@@ -197,22 +217,18 @@ def estimate_ram_per_job(seq_dir: Path, seq_state: dict) -> int:
total_bytes = sum(entry.get("size", 0) for entry in seq_state.get("files", []))
if ZIPPER_TYPE == "7z":
# Base RAM: 500MB per job
base_ram = 500 * 1024 * 1024 # 500 MB
# Fixed dictionary size: 1GB (1024MB)
# Actual observed usage: ~2GB per process regardless of sequence size
# Use a tight estimate to allow maximum concurrency
# Estimate 3GB per job (50% safety margin over observed ~2GB)
base_ram = 3 * 1024 * 1024 * 1024 # 3GB base estimate
# Compression factor: 7z can use significant RAM, especially for large files
# Use 0.15x factor (conservative estimate accounting for 7z's 80% usage)
compression_factor = 0.15
# For very large folders (>10GB), cap at 8GB per job
max_ram_per_job = 8 * 1024 * 1024 * 1024 # 8 GB
large_folder_threshold = 10 * 1024 * 1024 * 1024 # 10 GB
if total_bytes > large_folder_threshold:
estimated_ram = max_ram_per_job
# For very large sequences (>50GB), add small buffer
if total_bytes > 50 * 1024 * 1024 * 1024: # >50GB
# Add 1GB for very large sequences
estimated_ram = base_ram + (1 * 1024 * 1024 * 1024)
else:
estimated_ram = max(base_ram, int(total_bytes * compression_factor))
estimated_ram = min(estimated_ram, max_ram_per_job)
estimated_ram = base_ram
return estimated_ram
else:
@@ -245,7 +261,7 @@ def max_workers(
# If no work items provided, return CPU-based limit
if work_items is None or len(work_items) == 0:
return (cpu_limit, None)
return (cpu_limit, {})
# Try to calculate RAM-based limit
available_ram = get_available_ram()
@@ -254,7 +270,7 @@ def max_workers(
# RAM detection failed, fall back to CPU limit
if verbose:
log("zip", "RAM detection failed, using CPU-based worker limit", verbose_only=True, verbose=verbose)
return (cpu_limit, None)
return (cpu_limit, {})
# For 7z: use fixed dictionary size and calculate workers
if ZIPPER_TYPE == "7z":
@@ -264,75 +280,178 @@ def max_workers(
# Check if Max7zInst is configured
if MAX_7Z_INSTANCES is not None:
# Use configured maximum instances, but still respect user's --jobs
# Use configured maximum instances, but still respect user's --jobs and work items
final_limit = MAX_7Z_INSTANCES
num_work_items = len(work_items) if work_items else 0
if num_work_items > 0:
final_limit = min(final_limit, num_work_items)
if requested and requested > 0:
final_limit = min(final_limit, requested)
# Create RAM limits dict (all use fixed dict size, but return as dict for consistency)
ram_limits_dict: dict[Path, int] = {}
if work_items:
for seq_dir, _, _, _ in work_items:
ram_limits_dict[seq_dir] = fixed_dict_size_bytes
if verbose:
log(
"zip",
f"Using Max7zInst={MAX_7Z_INSTANCES} from config → "
f"requested: {requested}, final: {final_limit}",
f"work items: {num_work_items}, requested: {requested}, final: {final_limit}",
verbose_only=True,
verbose=verbose
)
return (final_limit, fixed_dict_size_bytes)
return (final_limit, ram_limits_dict)
# Auto-calculate based on RAM if Max7zInst not configured
# Prioritize maximum concurrency: one worker per sequence when possible
if available_ram is not None:
# 7z uses ~2-3x dictionary size in RAM, but with overhead use 8x for safety
# This accounts for 7z's internal buffers, OS overhead, and other processes
FIXED_RAM_PER_JOB = FIXED_DICT_SIZE_MB * 8 * 1024 * 1024 # 8GB per job
# available_ram is already 80% of total (20% reserved for system)
# Use only 40% of that for compression jobs (very conservative to prevent swapping)
compression_ram = int(available_ram * 0.4)
# Use 95% of available RAM for compression jobs
compression_ram = int(available_ram * 0.95)
# Calculate worker limit based on fixed per-job RAM
ram_limit = max(1, compression_ram // FIXED_RAM_PER_JOB)
# Estimate RAM for each work item
work_items_with_ram: list[tuple[Path, int, tuple[Path, Path, Path, dict]]] = []
ram_limits_dict: dict[Path, int] = {}
# Use RAM limit directly (no CPU limit)
final_limit = ram_limit
for seq_dir, zip_path, state_path, seq_state in work_items:
try:
estimated_ram = estimate_ram_per_job(seq_dir, seq_state)
work_items_with_ram.append((seq_dir, estimated_ram, (seq_dir, zip_path, state_path, seq_state)))
ram_limits_dict[seq_dir] = estimated_ram
except Exception:
# If estimation fails, use a safe default (3GB)
default_ram = 3 * 1024 * 1024 * 1024 # 3GB
work_items_with_ram.append((seq_dir, default_ram, (seq_dir, zip_path, state_path, seq_state)))
ram_limits_dict[seq_dir] = default_ram
num_work_items = len(work_items) if work_items else 0
# Calculate total estimated RAM
total_estimated_ram = sum(ram for _, ram, _ in work_items_with_ram)
# If all sequences fit in available RAM, use one worker per sequence (maximum concurrency)
if total_estimated_ram <= compression_ram:
worker_count = num_work_items
else:
# Not all fit - use bin-packing to minimize workers
# Sort by estimated RAM (largest first) for bin-packing
work_items_with_ram.sort(key=lambda x: x[1], reverse=True)
# Bin-packing algorithm: pack largest items first
bins: list[list[tuple[Path, int, tuple[Path, Path, Path, dict]]]] = []
bin_remaining: list[int] = []
for seq_dir, estimated_ram, work_item in work_items_with_ram:
# Try to fit in existing bin
placed = False
for i, remaining in enumerate(bin_remaining):
if remaining >= estimated_ram:
bins[i].append((seq_dir, estimated_ram, work_item))
bin_remaining[i] -= estimated_ram
placed = True
break
# If doesn't fit, create new bin
if not placed:
bins.append([(seq_dir, estimated_ram, work_item)])
bin_remaining.append(compression_ram - estimated_ram)
# Worker count is number of bins
worker_count = len(bins)
# Cap at number of actual work items (can't have more workers than jobs)
if num_work_items > 0:
worker_count = min(worker_count, num_work_items)
# Respect user's --jobs if provided
if requested and requested > 0:
final_limit = min(final_limit, requested)
worker_count = min(worker_count, requested)
if verbose:
ram_gb = available_ram / (1024 ** 3)
compression_ram_gb = compression_ram / (1024 ** 3)
ram_per_job_gb = FIXED_RAM_PER_JOB / (1024 ** 3)
total_estimated_gb = total_estimated_ram / (1024 ** 3)
log(
"zip",
f"RAM: {ram_gb:.1f}GB available (80% of total), {compression_ram_gb:.1f}GB for compression (40%), {ram_per_job_gb:.1f}GB per job (dict: {FIXED_DICT_SIZE_MB}MB) → "
f"RAM limit: {ram_limit}, requested: {requested}, final: {final_limit}",
f"RAM: {ram_gb:.1f}GB available (80% of total), {compression_ram_gb:.1f}GB for compression (95%)",
verbose_only=True,
verbose=verbose
)
log(
"zip",
f"Estimated RAM per sequence: {total_estimated_gb:.1f}GB total across {num_work_items} sequences",
verbose_only=True,
verbose=verbose
)
if total_estimated_ram <= compression_ram:
log(
"zip",
f"All sequences fit in RAM → using {worker_count} workers (one per sequence)",
verbose_only=True,
verbose=verbose
)
else:
log(
"zip",
f"Using bin-packing: {worker_count} workers needed",
verbose_only=True,
verbose=verbose
)
log(
"zip",
f"Final worker count: {worker_count} (requested: {requested})",
verbose_only=True,
verbose=verbose
)
return (final_limit, fixed_dict_size_bytes)
# Return worker count and RAM limits dict
return (worker_count, ram_limits_dict)
# RAM detection failed, use a safe default (no CPU limit)
if verbose:
log("zip", "RAM detection failed and Max7zInst not set, using default worker limit of 4", verbose_only=True, verbose=verbose)
default_limit = 4
num_work_items = len(work_items) if work_items else 0
if num_work_items > 0:
default_limit = min(default_limit, num_work_items)
if requested and requested > 0:
default_limit = requested
return (default_limit, fixed_dict_size_bytes)
default_limit = min(default_limit, requested)
# Create RAM limits dict with safe defaults (12GB per job for 1GB dict)
ram_limits_dict: dict[Path, int] = {}
if work_items:
default_ram = 12 * 1024 * 1024 * 1024 # 12GB default
for seq_dir, _, _, _ in work_items:
ram_limits_dict[seq_dir] = default_ram
if verbose:
log(
"zip",
f"RAM detection failed and Max7zInst not set, using default worker limit → "
f"work items: {num_work_items}, requested: {requested}, final: {default_limit}",
verbose_only=True,
verbose=verbose
)
return (default_limit, ram_limits_dict)
# For zip compression, use existing estimation-based approach
# Estimate RAM per job for each work item
ram_estimates = []
ram_limits_dict: dict[Path, int] = {}
for seq_dir, zip_path, state_path, seq_state in work_items:
try:
estimated_ram = estimate_ram_per_job(seq_dir, seq_state)
ram_estimates.append(estimated_ram)
ram_limits_dict[seq_dir] = estimated_ram
except Exception:
# If estimation fails, use fallback estimate
ram_estimates.append(1024 * 1024 * 1024) # 1GB fallback for zip
fallback_ram = 1024 * 1024 * 1024 # 1GB fallback for zip
ram_estimates.append(fallback_ram)
ram_limits_dict[seq_dir] = fallback_ram
if not ram_estimates:
return (cpu_limit, None)
return (cpu_limit, {})
max_ram_per_job = max(ram_estimates)
ram_limit = max(1, available_ram // max_ram_per_job)
@@ -350,28 +469,49 @@ def max_workers(
verbose=verbose
)
return (final_limit, None)
def log(mode: str, message: str, *, verbose_only: bool = False, verbose: bool = False) -> None:
if verbose_only and not verbose:
return
print(f"[{mode}] {message}")
return (final_limit, ram_limits_dict)
def is_archive_path(path: Path) -> bool:
return any(part in ("_archive", "_CURRENT") for part in path.parts)
def find_sequence_dirs(root: Path) -> Iterator[Path]:
def find_sequence_dirs(root: Path, *, verbose: bool = False) -> Iterator[Path]:
seen_dirs = set() # Track directories we've already yielded to avoid duplicates
for dirpath, dirnames, filenames in os.walk(root):
path = Path(dirpath)
dirnames[:] = [d for d in dirnames if d not in ("_archive", "_CURRENT")]
if is_archive_path(path):
if verbose:
rel = path.relative_to(root) if path.is_relative_to(root) else path
log("scan", f"Skipping archive path: {rel}", verbose_only=True, verbose=verbose)
continue
# Check if this directory has sequence files directly
has_frames = any(Path(dirpath, f).suffix.lower() in SEQUENCE_EXTENSIONS for f in filenames)
if has_frames:
yield path
path_resolved = path.resolve()
if path_resolved not in seen_dirs:
seen_dirs.add(path_resolved)
yield path
elif verbose:
# Log directories that don't have sequence files for debugging
rel = path.relative_to(root) if path.is_relative_to(root) else path
if "scab" in path.name.lower():
# Special logging for directories that might be sequences
frame_extensions = [f for f in filenames if Path(f).suffix.lower() in SEQUENCE_EXTENSIONS]
all_files = list(path.iterdir()) if path.exists() else []
log("scan", f"Directory {rel}: {len(filenames)} files in dir, {len(frame_extensions)} with sequence extensions, {len(all_files)} total items", verbose_only=True, verbose=verbose)
# Check subdirectories
for subdir in dirnames[:5]: # Check first 5 subdirs
subdir_path = path / subdir
try:
subdir_files = list(subdir_path.iterdir()) if subdir_path.exists() else []
subdir_frame_files = [f for f in subdir_files if f.is_file() and f.suffix.lower() in SEQUENCE_EXTENSIONS]
if subdir_frame_files:
log("scan", f" Subdirectory {subdir} has {len(subdir_frame_files)} sequence files", verbose_only=True, verbose=verbose)
except (OSError, PermissionError):
pass
def iter_sequence_files(seq_dir: Path) -> Iterator[Path]:
@@ -426,19 +566,27 @@ def state_changed(seq_state: dict, stored_state: dict | None) -> bool:
def archive_path_for(seq_dir: Path) -> Path:
rel = seq_dir.relative_to(RENDER_ROOT)
suffix = ".7z" if ZIPPER_TYPE == "7z" else ".zip"
return (ARCHIVE_ROOT / rel).with_suffix(suffix)
# Append suffix instead of replacing, since directory names might have dots (e.g., "scab_v2.1")
return ARCHIVE_ROOT / f"{rel}{suffix}"
def sequence_dir_for(zip_path: Path) -> Path:
rel = zip_path.relative_to(ARCHIVE_ROOT)
return (RENDER_ROOT / rel).with_suffix("")
# Remove the archive suffix (.7z or .zip) from the end
# Handle both .7z and .zip extensions
rel_str = str(rel)
if rel_str.endswith(".7z"):
rel_str = rel_str[:-3]
elif rel_str.endswith(".zip"):
rel_str = rel_str[:-4]
return RENDER_ROOT / rel_str
def state_path_for(zip_path: Path) -> Path:
return zip_path.with_suffix(zip_path.suffix + STATE_SUFFIX)
def zip_sequence(seq_dir: Path, zip_path: Path, per_job_memory_limit: int | None = None) -> None:
def zip_sequence(seq_dir: Path, zip_path: Path, per_job_memory_limit: int | None = None, worker_count: int = 1, *, verbose: bool = False) -> None:
if ZIPPER_TYPE == "7z":
if SEVEN_Z_EXE is None:
raise RuntimeError(
@@ -498,16 +646,61 @@ def zip_sequence(seq_dir: Path, zip_path: Path, per_job_memory_limit: int | None
"-t7z", # Use 7z format, not zip
]
# Add fixed dictionary size if specified (7z memory usage is controlled by dictionary size)
if per_job_memory_limit is not None:
# per_job_memory_limit is actually the fixed dictionary size in bytes
dict_size_mb = per_job_memory_limit // (1024 * 1024)
cmd.append(f"-md={dict_size_mb}m")
# Set compression method and memory/dictionary size based on method
# At compression level 0, use Copy (store) method for maximum speed
FIXED_DICT_SIZE_MB = 1024
if COMPRESSION_LEVEL == 0:
# Level 0 = no compression, just store files (fastest)
cmd.append("-m0=Copy")
# Copy method doesn't need threading, but enable it anyway for consistency
cmd.append("-mmt=on")
else:
# Compression levels 1-9: use configured compression method
if COMPRESSION_METHOD == "PPMd":
# PPMd: specify memory as part of method string
cmd.append(f"-m0=PPMd:mem={FIXED_DICT_SIZE_MB}m")
elif COMPRESSION_METHOD == "LZMA2":
# LZMA2: use -md for dictionary size
cmd.append("-m0=LZMA2")
cmd.append(f"-md={FIXED_DICT_SIZE_MB}m")
elif COMPRESSION_METHOD == "BZip2":
# BZip2: use -md for dictionary size (smaller max: 900KB)
max_bzip2_dict = min(FIXED_DICT_SIZE_MB, 900) # BZip2 max is 900KB
cmd.append("-m0=BZip2")
cmd.append(f"-md={max_bzip2_dict}k")
elif COMPRESSION_METHOD == "Deflate":
# Deflate: doesn't use dictionary size parameter
cmd.append("-m0=Deflate")
else:
# Fallback: use LZMA2
cmd.append("-m0=LZMA2")
cmd.append(f"-md={FIXED_DICT_SIZE_MB}m")
# CPU thread allocation: when there's only 1 worker, use all CPU cores
# When there are multiple workers, use auto mode to let 7z decide
# Note: PPMd is single-threaded and won't benefit from -mmt
cpu_cores = os.cpu_count() or 1
if COMPRESSION_METHOD == "PPMd":
# PPMd is single-threaded, so -mmt won't help
# But we can still set it for consistency
cmd.append("-mmt=on")
elif worker_count == 1:
# Single worker: use all CPU cores for maximum speed (LZMA2, BZip2, Deflate support this)
cmd.append(f"-mmt={cpu_cores}")
else:
# Multiple workers: use auto mode (7z will manage threads)
cmd.append("-mmt=on")
cmd.extend([
str(temp_zip_abs),
f"@{list_file_abs}",
])
# Log the command in verbose mode for debugging
if verbose:
cmd_str = " ".join(cmd)
log("zip", f"7z command: {cmd_str}", verbose_only=True, verbose=verbose)
result = subprocess.run(
cmd,
cwd=seq_dir,
@@ -623,9 +816,9 @@ def expand_sequence(zip_path: Path, seq_state: dict) -> None:
os.utime(file_path, ns=(entry["mtime_ns"], entry["mtime_ns"]))
def process_zip(seq_dir: Path, zip_path: Path, state_path: Path, seq_state: dict, per_job_memory_limit: int | None, *, verbose: bool) -> Sequence[Path]:
def process_zip(seq_dir: Path, zip_path: Path, state_path: Path, seq_state: dict, per_job_memory_limit: int | None, worker_count: int, *, verbose: bool) -> Sequence[Path]:
log("zip", f"{seq_dir} -> {zip_path}", verbose_only=True, verbose=verbose)
zip_sequence(seq_dir, zip_path, per_job_memory_limit)
zip_sequence(seq_dir, zip_path, per_job_memory_limit, worker_count, verbose=verbose)
state_path.write_text(json.dumps(seq_state, indent=2))
return (zip_path, state_path)
@@ -637,9 +830,20 @@ def process_expand(zip_path: Path, state: dict, *, verbose: bool) -> None:
def run_zip(requested_workers: int | None, *, verbose: bool) -> int:
work_items: list[tuple[Path, Path, Path, dict]] = []
log("init", f"Scanning sequences under {RENDER_ROOT.resolve()}")
total_scanned = 0
quick_skipped = 0
state_skipped = 0
empty_dirs = 0
queued = 0
if RENDER_ROOT.exists():
for seq_dir in find_sequence_dirs(RENDER_ROOT):
for seq_dir in find_sequence_dirs(RENDER_ROOT, verbose=verbose):
total_scanned += 1
rel = seq_dir.relative_to(RENDER_ROOT)
if total_scanned <= 5 or total_scanned % 10 == 0:
log("scan", f"[{total_scanned}] Inspecting {rel}")
# Get the target archive path (will be .7z if ZIPPER_TYPE is "7z")
zip_path = archive_path_for(seq_dir)
state_path = state_path_for(zip_path)
@@ -649,16 +853,17 @@ def run_zip(requested_workers: int | None, *, verbose: bool) -> int:
# Check if we need to upgrade from .zip to .7z
old_zip_path = None
old_stored_state = None
if ZIPPER_TYPE == "7z":
old_zip_path = zip_path.with_suffix(".zip")
if old_zip_path.exists():
old_state_path = state_path_for(old_zip_path)
old_stored_state = load_state(old_state_path)
# If old .zip exists and archive doesn't, we'll check state later
# If old .zip exists and .7z doesn't, use old .zip's state for comparison
if not zip_path.exists() and old_stored_state is not None:
stored_state = old_stored_state
# If archive exists and we have stored state, do quick check before computing full state
# If .7z archive exists and we have stored state, do quick check before computing full state
if zip_path.exists() and stored_state is not None:
# Quick check: if directory mtime is older than archive, likely unchanged
try:
@@ -666,7 +871,10 @@ def run_zip(requested_workers: int | None, *, verbose: bool) -> int:
archive_mtime = zip_path.stat().st_mtime_ns
# If directory wasn't modified since archive was created, skip state computation
if dir_mtime <= archive_mtime:
# Still need to check for old .zip cleanup
quick_skipped += 1
if quick_skipped <= 5:
log("scan", f"Skipping {rel} (unchanged since archive)")
# Still need to check for old .zip cleanup (we have .7z, so .zip is obsolete)
if old_zip_path and old_zip_path.exists():
old_zip_path.unlink(missing_ok=True)
old_state_path = state_path_for(old_zip_path)
@@ -680,29 +888,60 @@ def run_zip(requested_workers: int | None, *, verbose: bool) -> int:
# Compute current state only if we need to
seq_state = compute_state(seq_dir)
if not seq_state["files"]:
empty_dirs += 1
if empty_dirs <= 5:
log("scan", f"{rel} has no files; skipping")
continue
# Check if state changed
if stored_state is not None and not state_changed(seq_state, stored_state):
# Target archive is up to date, but we might still need to clean up old .zip
if old_zip_path and old_zip_path.exists():
old_zip_path.unlink(missing_ok=True)
old_state_path = state_path_for(old_zip_path)
if old_state_path.exists():
old_state_path.unlink(missing_ok=True)
continue
# Metadata matches stored state
state_skipped += 1
if state_skipped <= 5:
log("scan", f"{rel} metadata unchanged; archive up to date")
if zip_path.exists():
# .7z exists and is up to date, clean up old .zip if it exists
if old_zip_path and old_zip_path.exists():
old_zip_path.unlink(missing_ok=True)
old_state_path = state_path_for(old_zip_path)
if old_state_path.exists():
old_state_path.unlink(missing_ok=True)
elif old_zip_path and old_zip_path.exists() and old_stored_state is not None:
# .7z doesn't exist, but .zip exists and metadata matches
# Keep the .zip file, don't create .7z
continue
else:
# No archive exists, but state matches (shouldn't happen, but be safe)
continue
work_items.append((seq_dir, zip_path, state_path, seq_state))
queued += 1
if queued <= 5 or queued % 5 == 0:
total_bytes = sum(entry.get("size", 0) for entry in seq_state.get("files", []))
size_gb = total_bytes / (1024 ** 3)
log("scan", f"Queued {rel} for compression (~{size_gb:.2f}GB) [{queued} total]")
if not work_items:
if not RENDER_ROOT.exists():
log("zip", "Render root 'Renders' not found; nothing to zip.")
else:
log("zip", "Archives already up to date; no sequences needed zipping.")
log(
"scan",
f"Summary: scanned {total_scanned}, quick-skipped {quick_skipped}, "
f"state-skipped {state_skipped}, empty {empty_dirs}, queued {queued}",
)
removed = cleanup_orphan_archives(verbose=verbose)
if removed:
log("zip", f"Removed {removed} orphan archive(s).", verbose=verbose)
return 0
# Calculate RAM-aware worker count based on work items
worker_count, per_job_memory_limit = max_workers(requested_workers, work_items, verbose=verbose)
worker_count, ram_limits_dict = max_workers(requested_workers, work_items, verbose=verbose)
log(
"init",
f"Preparing to compress {len(work_items)} sequence(s) with {worker_count} worker(s)",
)
updated_paths: list[Path] = []
@@ -711,7 +950,7 @@ def run_zip(requested_workers: int | None, *, verbose: bool) -> int:
with ThreadPoolExecutor(max_workers=worker_count) as executor:
future_map = {
executor.submit(process_zip, seq_dir, zip_path, state_path, seq_state, per_job_memory_limit, verbose=verbose): seq_dir
executor.submit(process_zip, seq_dir, zip_path, state_path, seq_state, ram_limits_dict.get(seq_dir), worker_count, verbose=verbose): seq_dir
for seq_dir, zip_path, state_path, seq_state in work_items
}
@@ -731,6 +970,11 @@ def run_zip(requested_workers: int | None, *, verbose: bool) -> int:
verbose_only=True,
verbose=verbose,
)
log(
"scan",
f"Summary: scanned {total_scanned}, quick-skipped {quick_skipped}, "
f"state-skipped {state_skipped}, empty {empty_dirs}, queued {queued}",
)
removed = cleanup_orphan_archives(verbose=verbose)
if removed:
@@ -788,42 +1032,96 @@ def run_expand(worker_count: int, *, verbose: bool) -> int:
def cleanup_orphan_archives(*, verbose: bool) -> int:
if not ARCHIVE_ROOT.exists():
log("zip", "Archive root does not exist; nothing to clean up.", verbose_only=True, verbose=verbose)
return 0
removed: list[Path] = []
log("zip", f"Scanning for orphan archives in {ARCHIVE_ROOT.resolve()}", verbose_only=True, verbose=verbose)
# Look for both .zip and .7z archives
archive_patterns = ["*.zip", "*.7z"]
for pattern in archive_patterns:
for zip_path in ARCHIVE_ROOT.rglob(pattern):
seq_dir = sequence_dir_for(zip_path)
if seq_dir.exists():
continue
try:
for zip_path in ARCHIVE_ROOT.rglob(pattern):
try:
# Resolve to absolute paths for consistent checking
zip_path_abs = zip_path.resolve()
# Calculate state path BEFORE checking/removing archive
state_path = state_path_for(zip_path)
state_path_abs = state_path.resolve()
# Calculate sequence directory using sequence_dir_for
# This function works with paths relative to ARCHIVE_ROOT
seq_dir = sequence_dir_for(zip_path)
seq_dir_abs = seq_dir.resolve()
# Check if sequence directory exists and is actually a directory
if seq_dir_abs.exists() and seq_dir_abs.is_dir():
log("zip", f"Archive {zip_path.relative_to(ARCHIVE_ROOT)} has matching sequence directory; keeping", verbose_only=True, verbose=verbose)
continue
rel = zip_path.relative_to(ARCHIVE_ROOT)
log("zip", f"Removing orphan archive {rel}", verbose_only=True, verbose=verbose)
# Sequence directory doesn't exist - this is an orphan archive
rel = zip_path.relative_to(ARCHIVE_ROOT)
log("zip", f"Removing orphan archive {rel}", verbose_only=False, verbose=verbose)
zip_path.unlink(missing_ok=True)
state_path = state_path_for(zip_path)
if state_path.exists():
state_path.unlink()
removed.append(zip_path)
# Remove archive file
if zip_path_abs.exists():
zip_path_abs.unlink()
log("zip", f"Deleted archive: {rel}", verbose_only=True, verbose=verbose)
# Remove state file if it exists
if state_path_abs.exists():
state_path_abs.unlink()
state_rel = state_path.relative_to(ARCHIVE_ROOT)
log("zip", f"Removed orphan metadata {state_rel}", verbose_only=False, verbose=verbose)
removed.append(zip_path_abs)
except Exception as e:
# Log error but continue processing other archives
try:
rel = zip_path.relative_to(ARCHIVE_ROOT)
except:
rel = zip_path
log("zip", f"Error processing archive {rel}: {e}", verbose_only=True, verbose=verbose)
log("zip", f"Traceback: {traceback.format_exc()}", verbose_only=True, verbose=verbose)
continue
except Exception as e:
log("zip", f"Error scanning for {pattern} archives: {e}", verbose_only=True, verbose=verbose)
log("zip", f"Traceback: {traceback.format_exc()}", verbose_only=True, verbose=verbose)
continue
if not removed:
log("zip", "No orphan archives found.", verbose_only=True, verbose=verbose)
return 0
for parent in sorted({p.parent for p in removed}, key=lambda p: len(p.parts), reverse=True):
if not parent.exists():
# Clean up empty parent directories
archive_root_abs = ARCHIVE_ROOT.resolve()
for parent in sorted({p.resolve().parent for p in removed}, key=lambda p: len(p.parts), reverse=True):
parent_resolved = parent.resolve()
if not parent_resolved.exists():
continue
while parent != ARCHIVE_ROOT and not any(parent.iterdir()):
parent.rmdir()
parent = parent.parent
try:
while parent_resolved != archive_root_abs and not any(parent_resolved.iterdir()):
parent_resolved.rmdir()
parent_resolved = parent_resolved.parent.resolve()
except OSError:
# Ignore errors when removing directories (might be in use)
pass
return len(removed)
def main() -> int:
args = parse_args()
log("init", "zip_sequences starting up...")
log("init", f"Working directory: {Path.cwd()}")
log("init", f"Mode: {args.mode}, zipper: {ZIPPER_TYPE}, jobs arg: {args.jobs or 'auto'}")
if ZIPPER_TYPE == "7z":
exe = SEVEN_Z_EXE or "not found"
max_inst = MAX_7Z_INSTANCES if MAX_7Z_INSTANCES is not None else "auto"
log("init", f"7z executable: {exe}, Max7zInst: {max_inst}, method: {COMPRESSION_METHOD}, level: {COMPRESSION_LEVEL}")
if args.mode == "expand":
# For expand mode, use simple CPU-based worker calculation