C4D 2026.4 — Supported API to release an imported Particle Group Alembic file handle?
-
Title: Cinema 4D 2026.4: How to release an Alembic file used by a Particle Group?
Hi Maxon SDK team,
I'm developing a Cinema 4D plugin on Windows (Cinema 4D 2026.4). It imports an animated Alembic file as a native Particle Group using
c4d.documents.MergeDocument().When the archive is no longer needed, I disable the Particle Group cache and clear it:
pg.SetParameter(c4d.DescID(c4d.SIMULATION_CACHE_ENABLED), False, c4d.DESCFLAGS_SET_0)doc.ExecutePasses(None, True, True, True, c4d.BUILDFLAGS_NONE)c4d.CallButton(pg, c4d.SIMULATION_DELCACHE)
The Particle Group then reports zero particles, but Windows still returns
[WinError 32](file in use) when I try to rename the original.abcfile.I reproduced this with an animated Ogawa Alembic file (22 samples, around 51,700 particles at frame 1) in a fresh test document, without adding Undo entries or changing the source path. The same procedure successfully releases a small, single-sample Alembic file.
Is there a supported Python or C++ API or workflow that releases the native Particle Group's Alembic file handle while keeping the Cinema 4D document open? Does removing or freeing the imported Particle Group guarantee that the file is released, or is there another required step?
I can provide the exact test script and a sample Alembic archive if needed.