Skip to content

Commit e2a0a86

Browse files
Replace MEDM in log messages
1 parent 38455c8 commit e2a0a86

6 files changed

Lines changed: 53 additions & 53 deletions

File tree

python/tk_multi_loader/dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@ def _on_medm_tree_selection_changed(
25352535
# Re-evaluate all proxy filter items
25362536
self._publish_proxy_model.invalidateFilter()
25372537
else:
2538-
app.log_warning("MEDM: Could not get item from index")
2538+
app.log_warning("FlowAM: Could not get item from index")
25392539

25402540

25412541
################################################################################################

python/tk_multi_loader/medm/entity_model.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ def _initialize_project(self) -> None:
236236
session_project = self._flow_module.data.get_session_project()
237237
self._project = self._flow_module.data.Project(session_project.id)
238238
self._app.log_debug(
239-
f"MEDM Entity: Initialized project '{self._project.name}'"
239+
f"FlowAM Entity: Initialized project '{self._project.name}'"
240240
)
241241
except Exception as e:
242242
self._app.log_error(
243-
f"MEDM Entity: Failed to initialize project: {type(e).__name__}: {e}. "
243+
f"FlowAM Entity: Failed to initialize project: {type(e).__name__}: {e}. "
244244
"Entity tree will not be loaded."
245245
)
246246
self._project = None
@@ -273,11 +273,11 @@ def _get_structural_type_ids(self) -> set:
273273

274274
self._structural_type_ids = {folder_id, pipeline_step_id}
275275
self._app.log_debug(
276-
f"MEDM Entity: structural type IDs = {self._structural_type_ids}"
276+
f"FlowAM Entity: structural type IDs = {self._structural_type_ids}"
277277
)
278278
except self._flow_module.FlowError as e:
279279
self._app.log_warning(
280-
f"MEDM Entity: could not resolve structural type IDs ({e}); "
280+
f"FlowAM Entity: could not resolve structural type IDs ({e}); "
281281
"non-structural assets without structural descendants will be hidden."
282282
)
283283
self._structural_type_ids = set()
@@ -338,13 +338,13 @@ def _load_medm_assets(self) -> None:
338338
"""
339339
if self._project is None:
340340
self._app.log_warning(
341-
"MEDM Entity: Cannot load assets - project not initialized"
341+
"FlowAM Entity: Cannot load assets - project not initialized"
342342
)
343343
self.data_refresh_fail.emit("Project not initialized")
344344
return
345345

346346
try:
347-
self._app.log_debug("MEDM: Loading entity tree (project children only)...")
347+
self._app.log_debug("FlowAM: Loading entity tree (project children only)...")
348348

349349
count = 0
350350
for asset in self._project.iterate_children():
@@ -353,13 +353,13 @@ def _load_medm_assets(self) -> None:
353353
count += 1
354354

355355
self._app.log_debug(
356-
f"MEDM: Entity tree loaded successfully. Loaded {count} root assets"
356+
f"FlowAM: Entity tree loaded successfully. Loaded {count} root assets"
357357
)
358358
self.cache_loaded.emit()
359359
self.data_refreshed.emit(True)
360360

361361
except Exception as e:
362-
self._app.log_error(f"Failed to load MEDM data: {e}")
362+
self._app.log_error(f"Failed to load FlowAM data: {e}")
363363
import traceback
364364

365365
self._app.log_debug(traceback.format_exc())
@@ -428,11 +428,11 @@ def _load_children_for_item(self, item: QtGui.QStandardItem) -> None:
428428
for child_asset in tree_children:
429429
self._add_asset_item(child_asset, item)
430430
self._app.log_debug(
431-
f"MEDM: Loaded {len(tree_children)}/{len(children)} children for '{asset.name}' "
431+
f"FlowAM: Loaded {len(tree_children)}/{len(children)} children for '{asset.name}' "
432432
f"(non-structural leaf children hidden from tree)"
433433
)
434434
except Exception as e:
435-
self._app.log_debug(f"MEDM: Could not get children for '{asset.name}': {e}")
435+
self._app.log_debug(f"FlowAM: Could not get children for '{asset.name}': {e}")
436436

437437
def _fetch_and_cache_children(self, asset: Asset) -> List[Asset]:
438438
"""

python/tk_multi_loader/medm/latestpublish_model.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def __init__(
119119
self._current_entity = None
120120

121121
self._project_id = 0
122-
self._project_name = "MEDM Project"
122+
self._project_name = "FlowAM Project"
123123
self._initialize_project_info()
124124

125125
# -------------------------------------------------------------------------
@@ -179,7 +179,7 @@ def _initialize_project_info(self) -> None:
179179
self._project_name = self._app.context.project["name"]
180180
except Exception as e:
181181
self._app.log_warning(
182-
f"MEDM LatestPublish: Failed to initialize project info: {type(e).__name__}: {e}. "
182+
f"FlowAM LatestPublish: Failed to initialize project info: {type(e).__name__}: {e}. "
183183
"Using default project values. This may indicate the session project was not "
184184
"initialized or the project ID is invalid."
185185
)
@@ -200,10 +200,10 @@ def _populate_model_from_selected_item(
200200

201201
asset = self._extract_asset_from_tree_item(selected_item)
202202
if asset is None:
203-
self._app.log_warning("MEDM: Could not extract asset from selected item")
203+
self._app.log_warning("FlowAM: Could not extract asset from selected item")
204204
return
205205

206-
self._app.log_debug(f"MEDM: Asset extracted: {asset.name}")
206+
self._app.log_debug(f"FlowAM: Asset extracted: {asset.name}")
207207

208208
children_asset_sg_dicts = self._fetch_asset_children(asset)
209209

@@ -218,14 +218,14 @@ def _populate_model_from_selected_item(
218218
children_asset_sg_dicts = [self._asset_to_sg_dict(asset)]
219219
except Exception as e:
220220
self._app.log_warning(
221-
f"MEDM: Could not convert leaf asset '{asset.name}' to sg_dict: {e}"
221+
f"FlowAM: Could not convert leaf asset '{asset.name}' to sg_dict: {e}"
222222
)
223223
# Keep a reference to the raw asset so we can still fetch its
224224
# drafts below.
225225
leaf_asset_fallback = asset
226226

227227
self._app.log_debug(
228-
f"MEDM: Fetched {len(children_asset_sg_dicts)} latest version dicts from children"
228+
f"FlowAM: Fetched {len(children_asset_sg_dicts)} latest version dicts from children"
229229
)
230230

231231
assets_for_draft_lookup = [
@@ -248,7 +248,7 @@ def _populate_model_from_selected_item(
248248
self._cache.drafts[child_asset.id] = raw_drafts
249249
except Exception as e:
250250
self._app.log_debug(
251-
f"MEDM: Could not fetch drafts for '{child_asset.name}': {e}"
251+
f"FlowAM: Could not fetch drafts for '{child_asset.name}': {e}"
252252
)
253253
continue
254254

@@ -257,12 +257,12 @@ def _populate_model_from_selected_item(
257257
try:
258258
draft_dicts.append(self._draft_to_sg_dict(draft_info, child_asset))
259259
self._app.log_debug(
260-
f"MEDM: Found draft '{getattr(draft_info, 'name', '?')}' "
260+
f"FlowAM: Found draft '{getattr(draft_info, 'name', '?')}' "
261261
f"for asset '{child_asset.name}'"
262262
)
263263
except Exception as e:
264264
self._app.log_warning(
265-
f"MEDM: Could not convert draft '{getattr(draft_info, 'name', '?')}' "
265+
f"FlowAM: Could not convert draft '{getattr(draft_info, 'name', '?')}' "
266266
f"for '{child_asset.name}': {e}"
267267
)
268268

@@ -302,7 +302,7 @@ def _populate_model_from_selected_item(
302302
draft_count += 1
303303

304304
self._app.log_debug(
305-
f"MEDM: center panel now has {self.rowCount()} items "
305+
f"FlowAM: center panel now has {self.rowCount()} items "
306306
f"({draft_count} draft(s), {published_count} published)"
307307
)
308308

@@ -353,27 +353,27 @@ def _fetch_asset_children(self, asset: Asset) -> List[Dict[str, Any]]:
353353
for child_asset in child_assets:
354354
if _is_structural_asset_util(child_asset, self._flow_module):
355355
self._app.log_debug(
356-
f"MEDM: Skipping structural asset '{child_asset.name}' from center panel"
356+
f"FlowAM: Skipping structural asset '{child_asset.name}' from center panel"
357357
)
358358
continue
359359
try:
360360
asset_dict = self._asset_to_sg_dict(child_asset)
361361
children_asset_sg_dicts.append(asset_dict)
362362
self._app.log_debug(
363-
f"MEDM: Added asset '{child_asset.name}' with latest version "
363+
f"FlowAM: Added asset '{child_asset.name}' with latest version "
364364
f"v{child_asset.version_number}"
365365
)
366366
except Exception as e:
367367
self._app.log_warning(
368-
f"MEDM: Error processing child asset '{child_asset.name}': {e}"
368+
f"FlowAM: Error processing child asset '{child_asset.name}': {e}"
369369
)
370370
continue
371371

372372
except Exception as e:
373-
self._app.log_warning(f"MEDM: Error fetching asset children: {e}")
373+
self._app.log_warning(f"FlowAM: Error fetching asset children: {e}")
374374

375375
self._app.log_debug(
376-
f"MEDM: Loaded {len(children_asset_sg_dicts)} children assets for asset '{asset.name}'"
376+
f"FlowAM: Loaded {len(children_asset_sg_dicts)} children assets for asset '{asset.name}'"
377377
)
378378
return children_asset_sg_dicts
379379

@@ -385,7 +385,7 @@ def _asset_to_sg_dict(self, asset: Asset) -> Dict[str, Any]:
385385
:returns: Dictionary with Shotgun-compatible fields
386386
"""
387387
sg_publish_type_id = None
388-
sg_publish_type_code = "MEDM Asset"
388+
sg_publish_type_code = "FlowAM Asset"
389389

390390
medm_type_ids = asset.type_ids
391391
if len(medm_type_ids) > 0:
@@ -404,7 +404,7 @@ def _asset_to_sg_dict(self, asset: Asset) -> Dict[str, Any]:
404404
"created_by": {
405405
"type": "HumanUser",
406406
"id": 1,
407-
"name": asset.created_by or "MEDM User",
407+
"name": asset.created_by or "FlowAM User",
408408
},
409409
"entity": {"type": "Asset", "id": None, "name": asset.name},
410410
"project": {
@@ -453,7 +453,7 @@ def _draft_to_sg_dict(
453453
:returns: sg_data dictionary compatible with action hooks and center panel UI.
454454
"""
455455
sg_publish_type_id = None
456-
sg_publish_type_code = "MEDM Asset"
456+
sg_publish_type_code = "FlowAM Asset"
457457

458458
# Prefer the published asset's type_ids; fall back to the draft's own
459459
# type_ids for NewDraftInfo where no published asset exists yet.
@@ -524,7 +524,7 @@ def _fetch_new_draft_items_for_parent(
524524
draft_type="new"
525525
)
526526
except Exception as e:
527-
self._app.log_warning(f"MEDM: Could not fetch new-asset drafts: {e}")
527+
self._app.log_warning(f"FlowAM: Could not fetch new-asset drafts: {e}")
528528
all_new_drafts = []
529529
self._cache.drafts[self._NEW_DRAFTS_CACHE_KEY] = all_new_drafts
530530
else:
@@ -537,13 +537,13 @@ def _fetch_new_draft_items_for_parent(
537537
try:
538538
draft_sg_dict = self._draft_to_sg_dict(draft_info, asset=None)
539539
self._app.log_debug(
540-
f"MEDM: Found new-asset draft '{getattr(draft_info, 'name', '?')}' "
540+
f"FlowAM: Found new-asset draft '{getattr(draft_info, 'name', '?')}' "
541541
f"under parent '{parent_asset_id}'"
542542
)
543543
result.append(draft_sg_dict)
544544
except Exception as e:
545545
self._app.log_warning(
546-
f"MEDM: Could not convert new-asset draft "
546+
f"FlowAM: Could not convert new-asset draft "
547547
f"'{getattr(draft_info, 'name', '?')}': {e}"
548548
)
549549
return result
@@ -601,7 +601,7 @@ def get_sg_data():
601601
self.appendRow(qt_item)
602602

603603
self._app.log_debug(
604-
f"MEDM: Added item '{qt_item.text()}' to model (row count: {self.rowCount()})"
604+
f"FlowAM: Added item '{qt_item.text()}' to model (row count: {self.rowCount()})"
605605
)
606606

607607
def _set_tooltip(self, item: QtGui.QStandardItem, sg_item: Dict[str, Any]) -> None:

python/tk_multi_loader/medm/publishhistory_model.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def __init__(
106106
self._current_sg_data = None
107107

108108
self._project_id = 0
109-
self._project_name = "MEDM Project"
109+
self._project_name = "FlowAM Project"
110110
self._initialize_project_info()
111111

112112
# -------------------------------------------------------------------------
@@ -147,7 +147,7 @@ def load_data(self, sg_data: Dict[str, Any]) -> None:
147147
self.data_refreshed.emit(True)
148148
else:
149149
self._app.log_warning(
150-
"MEDM History: No asset found in selected publish asset sg_data dict"
150+
"FlowAM History: No asset found in selected publish asset sg_data dict"
151151
)
152152
self.data_refresh_fail.emit("No asset found in selection")
153153
return
@@ -164,7 +164,7 @@ def load_data(self, sg_data: Dict[str, Any]) -> None:
164164
self._add_version_as_qt_item(asset_version, medm_asset)
165165

166166
self._app.log_debug(
167-
f"MEDM History: Loaded {len(versions)} published versions"
167+
f"FlowAM History: Loaded {len(versions)} published versions"
168168
)
169169

170170
try:
@@ -179,18 +179,18 @@ def load_data(self, sg_data: Dict[str, Any]) -> None:
179179
self._add_draft_as_qt_item(draft_info, medm_asset)
180180
if drafts:
181181
self._app.log_debug(
182-
f"MEDM History: Added {len(drafts)} draft(s) for asset '{medm_asset.name}'"
182+
f"FlowAM History: Added {len(drafts)} draft(s) for asset '{medm_asset.name}'"
183183
)
184184
except Exception as e:
185185
# Drafts are optional - a failure here should not prevent published
186186
# versions from being shown.
187-
self._app.log_warning(f"MEDM History: Could not fetch drafts: {e}")
187+
self._app.log_warning(f"FlowAM History: Could not fetch drafts: {e}")
188188

189189
self.cache_loaded.emit()
190190
self.data_refreshed.emit(True)
191191

192192
except Exception as e:
193-
self._app.log_error(f"MEDM History: Error loading versions: {e}")
193+
self._app.log_error(f"FlowAM History: Error loading versions: {e}")
194194
self.data_refresh_fail.emit(str(e))
195195

196196
def async_refresh(self) -> None:
@@ -221,7 +221,7 @@ def _initialize_project_info(self) -> None:
221221
self._project_name = self._app.context.project["name"]
222222
except Exception as e:
223223
self._app.log_warning(
224-
f"MEDM History: Failed to initialize project info: {type(e).__name__}: {e}. "
224+
f"FlowAM History: Failed to initialize project info: {type(e).__name__}: {e}. "
225225
"Using default project values. This may indicate the session project was not "
226226
"initialized or the project ID is invalid."
227227
)
@@ -262,7 +262,7 @@ def get_sg_data():
262262
qt_item.get_sg_data = get_sg_data
263263

264264
self.appendRow(qt_item)
265-
self._app.log_debug(f"MEDM History: Added version v{version_number}")
265+
self._app.log_debug(f"FlowAM History: Added version v{version_number}")
266266

267267
def _version_to_sg_dict(
268268
self, version: AssetVersion, asset: Asset
@@ -275,7 +275,7 @@ def _version_to_sg_dict(
275275
:returns: sg_data dictionary compatible with Shotgun UI
276276
"""
277277
sg_publish_type_id = None
278-
sg_publish_type_code = "MEDM Asset"
278+
sg_publish_type_code = "FlowAM Asset"
279279

280280
medm_type_ids = asset.type_ids
281281
if medm_type_ids:
@@ -297,7 +297,7 @@ def _version_to_sg_dict(
297297
"created_by": {
298298
"type": "HumanUser",
299299
"id": None,
300-
"name": version.created_by or "MEDM User",
300+
"name": version.created_by or "FlowAM User",
301301
},
302302
"entity": {
303303
"type": "Asset",
@@ -343,7 +343,7 @@ def _draft_to_sg_dict(
343343
:returns: sg_data dictionary compatible with action hooks and Shotgun UI
344344
"""
345345
sg_publish_type_id = None
346-
sg_publish_type_code = "MEDM Asset"
346+
sg_publish_type_code = "FlowAM Asset"
347347

348348
# Prefer the published asset's type_ids; fall back to the draft's own
349349
# type_ids for NewDraftInfo where no published asset exists yet.
@@ -414,7 +414,7 @@ def get_sg_data():
414414
# Prepend so drafts always appear above all published versions.
415415
self.insertRow(0, qt_item)
416416
self._app.log_debug(
417-
f"MEDM History: Added {draft_type} draft '{draft_info.name}' "
417+
f"FlowAM History: Added {draft_type} draft '{draft_info.name}' "
418418
f"(draft_id={draft_info.draft_id})"
419419
)
420420

python/tk_multi_loader/medm/thumbnail_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def _resolve_and_fetch(
154154
url = self._flow_module.asset_management.get_thumbnail_url(revision_id)
155155
except Exception as exc:
156156
self._app.log_debug(
157-
f"MEDM ThumbnailService: URL resolve failed for {revision_id}: {exc}"
157+
f"FlowAM ThumbnailService: URL resolve failed for {revision_id}: {exc}"
158158
)
159159
self._url_cache[revision_id] = url
160160

@@ -178,7 +178,7 @@ def _resolve_and_fetch(
178178
) as response:
179179
if response.status != 200:
180180
self._app.log_debug(
181-
f"MEDM ThumbnailService: HTTP {response.status} for {revision_id}"
181+
f"FlowAM ThumbnailService: HTTP {response.status} for {revision_id}"
182182
)
183183
return
184184
image_data = response.read(self._MAX_IMAGE_BYTES)
@@ -192,7 +192,7 @@ def _resolve_and_fetch(
192192

193193
except Exception as exc:
194194
self._app.log_debug(
195-
f"MEDM ThumbnailService: Download failed: {type(exc).__name__}: {exc}"
195+
f"FlowAM ThumbnailService: Download failed: {type(exc).__name__}: {exc}"
196196
)
197197

198198
def _process_pending(self) -> None:
@@ -205,5 +205,5 @@ def _process_pending(self) -> None:
205205
callback(qt_item, image_data)
206206
except Exception as exc:
207207
self._app.log_debug(
208-
f"MEDM ThumbnailService: Callback error: {type(exc).__name__}: {exc}"
208+
f"FlowAM ThumbnailService: Callback error: {type(exc).__name__}: {exc}"
209209
)

0 commit comments

Comments
 (0)