Copying ICE nodes with input connections

This is a plugin that attempts to ease the workflow of reconnecting ports when copying ICE nodes. The plugin will copy and paste the selected node and will also re-wire all the input ports that would otherwise be lost when using ctrl-c/ctrl-v. Just right-click on the node you want to copy and select the command from the menu.

Perhaps, this could be pretty handy when you need to get lots of data from a location, but couldn’t be arsed to drag’n’drop a new node, then fiddle around connecting wires between ports. Maybe it’ll save 30-seconds or so in your day?


Writing this plugin was a pretty good exercise in generating ICE trees procedurally and showed some big limitations. The plugin offers partial support for compound nodes that are registered in Softimage. Since the SDK does not offer any direct means of copy/past of ICE nodes in the UI (no such command is exposed) one method to copy a compound would be to recursively traverse down through all internal nodes and port connections, then to rebuild that structure as a clone of the original compound. Unfortunately, there are several cases where this fails as there are no proper hooks in the SDK. For example, there doesn’t appear to be a method to traverse reference ports and  no way to read the properties of compounds (color, author, version etc.). So, accurate recreation of the compound just isn’t possible that way.

Perhaps an alternative would be to generate an XML description of the custom compound through the built-in export command. This could then be imported as an entire representation of the node. This seems like the most viable method, but at the moment it can be really slow, especially on a network. Maybe one for the future.

So, I’ve decided to instead offer limited support of registered compounds. Things are likely to fail if the compound has been modified extensively or if it contains reference ports. In this case a big warning will appear and you should proceed with real caution. Don’t use this on compounds unless you’re sure you kow what you’re doing!

In summary:

  • The command will work take as input any selected nodes in all visible ICE trees. So make sure you only have selected what you need to copy!
  • Only registered compounds can be copied. That means compounds that are in the factory or workgroup locations. Since custom compounds cannot be entirely re-created procedurally, they have to be excluded.
  • Even registered compounds are not fully supported. Due to limitations of the ICE scripting SDK (or at least my knowledge of it!) not all parameters can be correctly copied between compounds. This particularly relates to data on reference ports, but there may be other cases.
  • If you’ve mucked around inside a registered compound, the plugin will issue a warning that the compound may not have been copied correctly. Since not all internal nodes can be regenerated though scripting, the default state of the registered compound is used as a template. This is the best-case at the moment, so use at your own risk!
  • The SDK doesn’t offer any control for where a new node will appear, so don’t be surprised if it decides to land somewhere way off screen!
This entry was written by Ciaran Moloney , posted on Monday September 27 2010at 11:09 am , filed under ICE, Softimage and tagged , , . Bookmark the permalink . Post a comment below or leave a trackback: Trackback URL.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>