Remove Unused Clips v1.1

This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Antony Nasce
Removes any Clips not used in Sequences in a Hiero Project
6.3, 7.0 or later
Linux, Mac, Windows
19 Feb 2013

Purge Unused Clips - Removes any unused Clips from a Project

Usage: Copy to ~/.hiero/Python/StartupUI

Demonstrates the use of hiero.core.find_items module

Usage: Right-click on an item in the Bin View > "Purge Unused Clips"

Result: Any Clips not used in a Sequence in the active project will be removed

Requires Hiero 1.5v1 or later.

Please login in order to download these files.


# Henrik Cednert 2013-02-18 15:39
Hi Ant

Does this work in 1.6v1 or does it just take very long time to purge 46 clips? Tried twice but killed it after 5 minutes of spinning blue circle in win 7.

# Frank Rueter 2014-04-25 01:14
I tried this but it only removed some clips, then this this error:
Traceback (most recent call last):
File "/ohufx/pipelin e/tools/hiero/P ython/StartupUI /", line 106, in PurgeUnused
B = BI.parentBin()
RuntimeError: Object does not have a parent bin.
# Yanru Mu 2016-05-05 08:24
B = proj.clipsBin()
try: B = BI.parentBin()
except: pass
# Frank Rueter 2016-05-05 21:16
is that safe? I haven't had a chance to check the code and understand why the error is happening.
I wouldn't want to throw a catch-all except block in there which might only suppress a symptom rather than fix the problem
# Yanru Mu 2016-05-06 11:41
Sorry, forget my code. It doesn't fix the problem.
This error happened when the project have repeated clips.
for example, project has a clip Clip('aaa'), for some reason, it is added to project again(maybe by script). Then the project has two clips, but they are the same one. When you begin to remove all of them by for loop. The first one, no problem, the clip become an unattached object without parent. The second one, when we want get its parentBin, error happened.

let bin get items, then removeItem.
# Frank Rueter 2016-05-07 00:12
sounds like some bugs that should be fixed on the Foundry side. Have you tried this in v10?
# Yanru Mu 2016-05-09 03:08
Not yet
# Stefan Ihringer 2015-07-20 20:47
Used it in Hiero 1.8v2 and it doesn't work as expected. All clips are removed regardless of whether they are in a sequence. I found out that the "if trackitem.souce () in CLIPSTOREMOVE" test fails. But if you build the list from BinItems (get binItem() for every clip returned by findItems() and use trackitem.sourc e().binItem() here) it does work.

You have no rights to post comments

We have 2244 guests and 69 members online