State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:6.0v6|BugID:587940|
def eventFilter(*args, **kwargs): if(args[0] == "catalog_itemThumbnailUpdate"): global i i = i + 1 print(args, kwargs) return True return True i = 0 Utils.EventModule.RegisterEventFilter(eventFilter) print(i) and notice the number of Catalog Thumbnail updates being processed.RegenerateThumbnail() function to collect and eventually forward thumbnail updates in batches based on a timer. To use the following script either run the code in the Python tab, or create a .py file in the UIPlugins folder in one of your KATANA_RESOURCES directories and insert the following to automatically run the code when launching Katana.import UI4import PyQt5.QtCore as QtCoreoriginalRegenerateThumbnail = UI4.Util.CatalogEventHandlers.RegenerateThumbnailg_catalogItems = {}g_timer = QtCore.QTimer()g_timer.setSingleShot(True)# Set batch update to run after specific interval delayg_timer.setInterval(500)def regeneratePending(): for catalogItem in g_catalogItems: originalRegenerateThumbnail(catalogItem) g_catalogItems.clear()g_timer.timeout.connect(regeneratePending)def newRegenerateThumbnail(catalogItem): # Use dict to ensure deduplication while maintaining insertion order g_catalogItems[catalogItem] = None # If not started, start single shot timer to call regeneratePending() after 500ms if g_timer.isActive() == False: g_timer.start()UI4.Util.CatalogEventHandlers.RegenerateThumbnail = newRegenerateThumbnail We're sorry to hear that
Please tell us why