nuke.memory2

Memory module containing functionality for querying and controlling Nuke’s Memory API, currently the module is named memory2 for backwards compatibility with the old nuke.memory(cmd, value) function which is now deprecated. Once removed this module will be deprecated and it will be renamed to nuke.memory. To avoid future conflicts it is recommended to import like so:

from nuke import memory2 as memory

Functions

allocatorInfo

Creates a dictionary of allocators mapped by their name to another dictionary containing various metadata information about the allocator.

clearUsage

Attempts to clear all memory, setUsage(0) and clearUsage() are effectively the same.

info

Creates a dictionary of Node names mapped to a list of memory information for that node.

maxUsage

Reports the maximum memory usage Nuke will aim to use.

setMaxUsage

Set the maximum memory usage Nuke will aim to use.

setUsage

If the value given is less than the current usage, free memory to the new usage.

totalRAM

Reports the total RAM detected by Nuke.

totalVM

Reports the total virtual memory (VM) detected by Nuke.

usage

Reports the current memory usage allocated.