MCPcopy Create free account
hub / github.com/Robbyant/lingbot-map / _set_nested

Function _set_nested

demo_render/rgbd_render/config.py:361–366  ·  view source on GitHub ↗

Set a nested attribute via dotted path, e.g. 'scene.voxel_size'.

(obj, path: str, value)

Source from the content-addressed store, hash-verified

359
360
361def _set_nested(obj, path: str, value):
362 """Set a nested attribute via dotted path, e.g. 'scene.voxel_size'."""
363 parts = path.split('.')
364 for part in parts[:-1]:
365 obj = getattr(obj, part)
366 setattr(obj, parts[-1], value)
367
368
369def _build_segments_from_flat_args(ns: dict) -> List[CameraSegment]:

Callers 2

_applyFunction · 0.90
merge_cliMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected