Skip to content

Commit ecd5e8f

Browse files
Merge branch 'aws-deadline:mainline' into tile_rendering_checkbox
2 parents 6c0ba21 + 004746d commit ecd5e8f

3 files changed

Lines changed: 5 additions & 14 deletions

File tree

DEVELOPMENT.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ For redshift licensing, set the environment variable by using `$env:redshift_LIC
241241
1. `set C4D_LOCATION=<Cinema 4D location>` on Windows Command or `$env:C4D_LOCATION = <Cinema 4D location>` on Windows Powershell.
242242
1. The default location for `Cinema 4D` on Windows is `C:\Program Files\Maxon Cinema 4D 2025\`. This location would be automatically used if the directory exists.
243243
2. For running the adaptor tests, we would need to install `pywin32` to the installation paths as its an adaptor dependency.
244-
2.1 Run `pip install pywin32==308 -t <your Python site-packages location>`.
245-
During my testing, pywin32's version 308 was required because of other dependencies requiring this version.
244+
2.1 Run `pip install pywin32==308 -t <your Python site-packages location>`
245+
* e.g. `pip install pywin32==308 -t "C:\Program Files\Maxon Cinema 4D 2025\resource\modules\python\libs\win64\lib\site-packages"`
246+
During testing, pywin32's version 308 was required because of other dependencies requiring this version.
246247
3. Run `hatch run integ:test`
247248

src/deadline/cinema4d_adaptor/Cinema4DClient/cinema4d_client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,30 +88,25 @@ def map_path(self, path: str) -> str:
8888
# If submission was not from Mac (i.e. not posix source format), just do normal path mapping
8989
if not has_posix_format:
9090
mapped_path = super().map_path(path)
91-
print(f"Using normal path mapping (non-POSIX): '{path}' -> '{mapped_path}'")
9291
return mapped_path
9392

9493
print(
9594
"Found POSIX format rule, converting path separators for Mac to Windows compatibility"
9695
)
97-
print(f"Original path: '{path}'")
9896

9997
# Convert backslashes to forward slashes for consistency with POSIX paths.
10098
# This is safe because:
10199
# 1. When submitting from Mac, backslashes can only appear as path separators
102100
# 2. Windows accepts both '\' and '/' as valid path separators
103101
converted_path = path.replace("\\", "/")
104-
print(f"Converted path: '{converted_path}'")
105102

106103
# Try path mapping with converted path
107104
mapped_path = super().map_path(converted_path)
108105

109106
# If mapped path is the same as converted path, mapping failed
110107
# so try with original path instead
111108
if mapped_path == converted_path:
112-
print("Path mapping with converted path failed (no rules matched)")
113109
mapped_path = super().map_path(path)
114-
print(f"Using original path mapping: '{path}' -> '{mapped_path}'")
115110
return mapped_path
116111

117112
print(f"Successfully mapped converted path: '{converted_path}' -> '{mapped_path}'")

src/deadline/cinema4d_adaptor/Cinema4DClient/cinema4d_handler.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ def _remap_assets(self) -> None:
7777
# whether we have done owner[param_id] = mapped_path
7878
attempted_basic_path_mapping_approach = False
7979
try:
80-
print(
81-
f"Attempting to update path for asset with owner '{owner}', paramId '{param_id}', "
82-
f"new filename '{mapped_path}', nodeSpace '{node_space}', and nodePath '{node_path}'."
83-
)
8480
success = self._pathmap_recognized_types(
8581
owner, param_id, node_space, node_path, mapped_path
8682
)
@@ -199,7 +195,6 @@ def _pathmap_base_material(self, owner, node_space, node_path, mapped_path) -> b
199195
return True
200196

201197
def start_render(self, data: dict) -> None:
202-
self.doc = c4d.documents.GetActiveDocument()
203198
self.render_data = self.doc.GetActiveRenderData()
204199
self.render_data[c4d.RDATA_FRAMESEQUENCE] = c4d.RDATA_FRAMESEQUENCE_MANUAL
205200
frame = int(self.render_kwargs.get("frame", data["frame"]))
@@ -218,8 +213,6 @@ def start_render(self, data: dict) -> None:
218213
self.render_data[c4d.RDATA_MULTIPASS_FILENAME]
219214
)
220215

221-
self._remap_assets()
222-
223216
bm = bitmaps.MultipassBitmap(
224217
int(self.render_data[c4d.RDATA_XRES]),
225218
int(self.render_data[c4d.RDATA_YRES]),
@@ -325,3 +318,5 @@ def set_scene_file(self, data: dict) -> None:
325318

326319
c4d.documents.InsertBaseDocument(doc)
327320
c4d.documents.SetActiveDocument(doc)
321+
self.doc = doc
322+
self._remap_assets()

0 commit comments

Comments
 (0)