Any time you use CopyPaste() (or any other command for that matter), you're going to trigger events which incur additional processing cost. CopyPaste() usually invokes validation routines before Softimage returns control to the user as it needs to ensure no illegal scenarios have been created. Whether validation is invoked really depends on what you're copying and pasting. If you use Partition.AddProperty() in the scripting object model, you'll avoid some of the performance hit.
A parameter override is just a variant of a custom property. The performance hit comes from evaluating the contents of an override property as changing passes or updating a partition means Softimage has to extract the parameters from the override property and determine if they exist on each and every object, cluster, and shader in the partition to build a map so it knows what to draw onscreen in the viewport as a final result. If the scene is large (e.g. many objects or many parameters), then it will take a while to build the map. When you leave the pass, the internal map is destroyed and replaced with a new map for the pass you are entering. If you want better performance, use material/shader overrides instead of parameter overrides. i.e. apply shaders/materials to the partition instead of override properties. These tend to evaluate significantly faster because Softimage can make wide assumptions and do less work to reach a final result. Example: a material override means all objects in the partition use the same materials and shaders. With a parameter override, Softimage must drill down and compare each and every object, cluster, and shader for overridden parameters. Matt From: [email protected] [mailto:[email protected]] On Behalf Of Gareth Bell Sent: Wednesday, April 03, 2013 2:18 AM To: [email protected] Subject: Application.CopyPaste Morning all, Just a quick shout out to see if anyone has come across this before. I'm sort of re-hashing a previous thread I started some time ago but this time I rewrote the whole script in Python. To give you a little context we work on enormous scenes (1gb+) with hundreds of passes/partitions. We've found that Ctrl+D a pass takes too long and there's no progress display so have resorted to writing our own Duplicate Pass script. What it does is essentially rebuilds the selected passes from scratch. It all works fantastically well except after saving the scene, changing passes takes anywhere north of 20mins. After a little routing around in the code I;ve deduced it is only the copy/paste of partition overrides that causes this. All other aspects of the rebuild are made from scratch i.e. newPartition = xsi.SICreatePartition (newPass[0], eachPartition.name, partitionMembers), newDisplayProp = xsi.AddProp ("Display Property", newPartition[0]) etc. But the only way (well the easiest way!) I could get a solid remake of the partition override is through xsi.CopyPaste (eachOverride, "", newPartition[0]). This copy/paste seems to be the reason passes are taking so long to change. Would anyone have an inkling as to why this command is causing the whole scene to slow down so much post-save? XP Soft 2012 SP1 Cheers G

