make paths relative
This commit is contained in:
@@ -16893,7 +16893,6 @@ _**User**_
|
||||
|
||||
_**Agent (model default, mode Agent)**_
|
||||
|
||||
|
||||
The script reports "No moves found in move log" despite 136 moves. Checking the JSON structure and the Python script's parsing:
|
||||
|
||||
|
||||
@@ -16907,7 +16906,6 @@ The script reports "No moves found in move log" despite 136 moves. Checking the
|
||||
|
||||
---
|
||||
|
||||
|
||||
Checking how the move log is saved in PowerShell to verify the JSON structure:
|
||||
|
||||
|
||||
@@ -16921,7 +16919,6 @@ Checking how the move log is saved in PowerShell to verify the JSON structure:
|
||||
|
||||
---
|
||||
|
||||
|
||||
Adding debug output to the Python script to inspect the loaded JSON:
|
||||
|
||||
|
||||
@@ -16954,7 +16951,6 @@ Status: **completed**
|
||||
|
||||
---
|
||||
|
||||
|
||||
Added debug output and support for both camelCase and PascalCase property names (PowerShell's `ConvertTo-Json` may use PascalCase). The script will:
|
||||
|
||||
1. Show what keys are in the JSON data
|
||||
@@ -16966,3 +16962,81 @@ Run the script again to see what's in the JSON and why the moves aren't being fo
|
||||
|
||||
---
|
||||
|
||||
_**User**_
|
||||
|
||||
incredible! now we just need to make sure to run bpy.ops.file.make_paths_relative() after remapping the textures.
|
||||
|
||||
---
|
||||
|
||||
_**Agent (model default, mode Agent)**_
|
||||
|
||||
|
||||
Adding `bpy.ops.file.make_paths_relative()` after remapping to convert absolute paths to relative:
|
||||
|
||||
|
||||
---
|
||||
|
||||
<tool-use data-tool-type="read" data-tool-name="read_file_v2">
|
||||
<details><summary>Tool use: **read_file_v2** • Read file: a:\1 Amazon_Active_Projects\3 ProjectStructure\remap_texture_paths.py</summary>
|
||||
|
||||
</details>
|
||||
</tool-use>
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
<tool-use data-tool-type="unknown" data-tool-name="edit_file_v2">
|
||||
<details>
|
||||
<summary>Tool use: **edit_file_v2**</summary>
|
||||
|
||||
|
||||
Parameters:
|
||||
|
||||
```json
|
||||
{
|
||||
"relativeWorkspacePath": "a:\\1 Amazon_Active_Projects\\3 ProjectStructure\\remap_texture_paths.py"
|
||||
}
|
||||
```
|
||||
Additional data:
|
||||
|
||||
```json
|
||||
{
|
||||
"codeblockId": "cf7dff8c-38d3-4fab-8987-6fc7cd6438ac"
|
||||
}
|
||||
```
|
||||
Status: **completed**
|
||||
|
||||
|
||||
</details>
|
||||
</tool-use>
|
||||
|
||||
---
|
||||
|
||||
|
||||
Added `bpy.ops.file.make_paths_relative()` after remapping and before saving. The script will:
|
||||
|
||||
1. Remap all texture paths to their new locations
|
||||
2. Convert all absolute paths to relative paths (for portability)
|
||||
3. Save the blend file
|
||||
|
||||
This ensures blend files use relative paths, making them portable across different machines and folder structures.
|
||||
|
||||
---
|
||||
|
||||
_**User**_
|
||||
|
||||
blendfile Kirk had absolute paths by accident. @pwsh (1-1075) can we have it so any image textures with absolute paths are remapped relative as well? ignore the nodetree and other paths from `\\Nexus\assets\BlenderAssets\Amazon\Char\Cartoon1\Cartoon1_006.blend`, those are vestigial.
|
||||
|
||||
---
|
||||
|
||||
_**Agent (model default, mode Agent)**_
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user