cmds.delete extreemly slow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey, i'm looking for some help with a performance issue. I've got a large hair set from xgen that i'm exporting the guides to alembic. during the process i convert them using
mel.eval("xgmCreateCurvesFromGuides 0 0")
then export using
cmds.AbcExport(jobArg = job_args)
and then i remove the temporary curves using
cmds.delete(temp_for_del)
temp_for_del is the group node all the splines are parented to. But this takes almost 15 minutes to delete. if i just leave them in the scene and select the groups from the UI and hit Delete on my keyboard, it take about 2 seconds.
I have history turned off for this operation, but that doesn't change anything. I've attempted to iterate the splines one by one and delete each individually, but that doesn't help. I've also tried to use the OpenMaya.MDagModifier.deleteNode function, but that takes just as long. Additionally, i've attempted to just select them and call the function that the UI appears to use, doDelete, but that takes just as long.
If anybody knows a better way to delete these curves that would be as fast as the UI, it would be greatly appreciated!
Thanks!