<s> from pymel . core import curve , spaceLocator , select <EOL> from pymel . core . nodetypes import ClusterHandle , Cluster <EOL> from pymel . core . runtime import ClusterCurve <EOL> class BarnDoor ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> self . top = None <EOL> self . bottom = None <EOL> self . left = None <EOL> self . right = None <EOL> class BarnDoorFlip ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> self . corner1 = <NUM_LIT:0> <EOL> self . corner2 = <NUM_LIT:0> <EOL> self . edge = <NUM_LIT:0> <EOL> class BarnDoorPreviewLine ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> self . curve = None <EOL> self . corner1_locator = None <EOL> self . corner2_locator = None <EOL> self . cluster1 = None <EOL> self . cluster2 = None <EOL> self . cluster_handle1 = None <EOL> self . cluster_handle2 = None <EOL> def build ( self ) : <EOL> """<STR_LIT>""" <EOL> self . curve = curve ( d = <NUM_LIT:1> , p = [ ( <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ) , ( - <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:0> ) ] , k = ( <NUM_LIT:0> , <NUM_LIT:1> ) ) <EOL> self . corner1_locator = spaceLocator ( ) <EOL> self . corner2_locator = spaceLocator ( ) <EOL> select ( self . curve ) <EOL> ClusterCurve ( ) <EOL> curve_shape = curve . getShape ( ) <EOL> clusters = [ ] <EOL> handles = [ ] <EOL> for node in curve_shape . listHistroy ( ) : <EOL> if isinstance ( node , ClusterHandle ) : <EOL> handles . append ( node ) <EOL> elif isinstance ( node , Cluster ) : <EOL> clusters . append ( node ) <EOL> self . cluster1 = clusters [ <NUM_LIT:0> ] <EOL> self . cluster2 = clusters [ <NUM_LIT:0> ] <EOL> self . cluster_handle1 = handles [ <NUM_LIT:0> ] <EOL> self . cluster_handle2 = handles [ <NUM_LIT:1> ] <EOL> self . cluster1 . setAttr ( '<STR_LIT>' , <NUM_LIT:0> ) <EOL> self . cluster2 . setAttr ( '<STR_LIT>' , <NUM_LIT:0> ) </s>
