/*
This example demonstrates how to copy an operator and connect it to another object.
*/
NewScene( null, false );
var sphere = CreatePrim( "Sphere", "MeshSurface" );
var cube = CreatePrim( "Cube", "MeshSurface" );
Translate( "Cube", 10, 0, 0, siRelative, siView, siObj, siXYZ );
// Apply the Bend operator to the sphere and change the angle
var bendop = ApplyOp( "Bend", sphere )(0);
bendop.angle.Value = 45;
// Copy the existing Bend operator (with the angle modification) and apply it to the cube
var bendop2 = bendop.Copy();
bendop2.Connect( "Cube" );
Application.LogMessage( bendop2.angle.FullName + "=" + bendop2.angle.Value );
// Expected result:
//INFO : cube.polymsh.bendop.angle=45
|