![]() 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). This includes when Houdini is “unloading” the node because the user is starting a new file, opening a file, or 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. The following events can trigger scripts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |