![]() This runs when an asset instance loads and notices the asset’s Version field has changed since the scene file was saved. See the two types of asset versioning for more information. This system may be useful for small-scale, backwards-compatible changes such as adding new parameters. This is part of the older versioning system, allowing you to write an “upgrade” handler that can automatically convert old versions of a node to the latest version. Runs when this node type is uninstalled from the session. Note that saving changes to an HDA node type triggers the On Uninstall and On Install scripts since the old HDA node type is uninstalled first before the new HDA node type with the latest changes is installed. ![]() Runs when this node type is installed into the session. This can be useful, for example, if you are somehow indexing nodes by their names or paths in some external storage, to keep the external index up-to-date. The script can use kwargs to get the previous name string. Runs after the user changes the name of a node of this type. The script can use kwargs to get the number (starting from 0) of the input that changed. Runs when an input on a node of this type is connected, disconnected, or switched. The user cannot undo actions performed in this script. This can be useful to clean up changes made in a PreFirstCreate script (see above). This includes when Houdini is “unloading” the node because the user is starting a new file, opening a file, or quitting. Runs after the last instance of a node type is deleted in a scene. The OnDeleted handler runs before the node’s individual “deletion script” if it exists. The user can edit this (HScript command language only) script in the parameter editor using ▸ Edit deletion script. Unrelated to this event handler, each node instance can have its own individual “deletion script”. In the script you can check if the node is being deleted because Houdini is unloading the scene using the () function (despite the name, this function returns True when Houdini is starting a new file or opening a file as well as when it is quitting). Runs before an instance of a node type is deleted (while the node still exists). Runs for each instance of an asset when the asset updates because the shared definition changed. ![]() This runs on each node after all nodes are loaded, so the script will see the complete scene. If you need to do something when a node inside an asset loads, you must put that code in the asset’s load handler. This does not run when loading the node as part of the contents of another asset. This also runs when pasting nodes from the clipboard. Runs after an instance of a node type is created as Houdini loads a scene file from disk ( not when a user creates a node in the network editor, see OnCreated above). You can use this, for example, to make changes to a node that Houdini will automatically save (for example, add spare parameters). Runs after the user creates a new instance of a node type ( not when a scene file loads, see OnLoaded below). You may want to include corresponding code in a PostLastDelete handler (see below) to undo changes made by this script. The user cannot undo the actions performed in this script. In the script you can check if the node is being created because Houdini is loading a file using the () function. For example, copying texture maps to required locations, or setting environment variables. This can be useful for setting up an environment necessary for one or more instances of the asset to work. If you then added another geometry object, the event would not trigger. ![]() This includes when Houdini is creating nodes as it loads a scene file from disk.įor example, if a scene has no geometry objects, when you add one, this would trigger the PreFirstCreate handler for the geometry object type. Runs when the first instance of a node type is created in a scene. Var triggers = ScriptApp.getProjectTriggers()įor (var i = 0 i < triggers.The following events can trigger scripts. timeBased().everyMinutes(INTERVAL).create() Maximum number of threads to process per run. Then you will essentially be running logic for every new email (with up to 10 minutes delay, which is probably fine). Have your trigger run every 10 minutes for example. Yes, you can trigger a function for every new email!
0 Comments
Leave a Reply. |