parentLoc = Locator('parent')

locator1 = Locator("locator", parent=parentLoc)

locator1.xfo.tr.x = 3
locator1.xfo.tr.y = -1
locator1.xfo.tr.z = 1

locator2 = Locator("locator2", parent=parentLoc)

locator2.xfo.sc.x = 1
locator2.xfo.sc.y = 2
locator2.xfo.sc.z = 1

locator2.xfo.tr.x = 2
locator2.xfo.tr.y = 5
locator2.xfo.tr.z = 3

locator2.xfo.ori.setFromEulerAngles(Vec3(Math_degToRad(45.0),
                                    Math_degToRad(0.0),
                                    Math_degToRad(0.0)))

constraint = locator2.constrainTo(locator1, 'Scale', True, 'ScaleConstraint')

builder = plugins.getBuilder()

config = builder.getConfig()
config.setExplicitNaming(True)

builder.build(parentLoc)
parentLoc = Locator('parent')

locator1 = Locator("locator", parent=parentLoc)

locator1.xfo.tr.x = 3
locator1.xfo.tr.y = -1
locator1.xfo.tr.z = 1

locator2 = Locator("locator2", parent=parentLoc)

locator2.xfo.sc.x = 1
locator2.xfo.sc.y = 2
locator2.xfo.sc.z = 1

locator2.xfo.tr.x = 2
locator2.xfo.tr.y = 5
locator2.xfo.tr.z = 3

locator2.xfo.ori.setFromEulerAngles(Vec3(Math_degToRad(45.0),
                                    Math_degToRad(0.0),
                                    Math_degToRad(0.0)))

constraint = locator2.constrainTo(locator1, 'Position', True, 'PositionConstraint')

builder = plugins.getBuilder()

config = builder.getConfig()
config.setExplicitNaming(True)

builder.build(parentLoc)
Exemple #3
0
parentLoc = Locator('parent')

locator1 = Locator("locator", parent=parentLoc)

locator1.xfo.tr.x = 3
locator1.xfo.tr.y = -1
locator1.xfo.tr.z = 1

locator2 = Locator("locator2", parent=parentLoc)

locator2.xfo.sc.x = 1
locator2.xfo.sc.y = 2
locator2.xfo.sc.z = 3

locator2.xfo.tr.x = 2
locator2.xfo.tr.y = 5
locator2.xfo.tr.z = 3

locator2.xfo.ori.setFromEulerAngles(Vec3(Math_degToRad(45.0),
                                    Math_degToRad(0.0),
                                    Math_degToRad(0.0)))

constraint = locator2.constrainTo(locator1, 'Pose', True, 'PoseConstraint')

builder = plugins.getBuilder()

config = builder.getConfig()
config.setExplicitNaming(True)

builder.build(parentLoc)
Exemple #4
0
parentLoc = Locator('parent')

locator1 = Locator("locator", parent=parentLoc)

locator1.xfo.tr.x = 3
locator1.xfo.tr.y = -1
locator1.xfo.tr.z = 1

locator2 = Locator("locator2", parent=parentLoc)

locator2.xfo.sc.x = 1
locator2.xfo.sc.y = 2
locator2.xfo.sc.z = 1

locator2.xfo.tr.x = 2
locator2.xfo.tr.y = 5
locator2.xfo.tr.z = 3

locator2.xfo.ori.setFromEulerAngles(
    Vec3(Math_degToRad(45.0), Math_degToRad(0.0), Math_degToRad(0.0)))

constraint = locator2.constrainTo(locator1, 'Scale', True, 'ScaleConstraint')

builder = plugins.getBuilder()

config = builder.getConfig()
config.setExplicitNaming(True)

builder.build(parentLoc)
Exemple #5
0
parentLoc = Locator('parent')

locator1 = Locator("locator", parent=parentLoc)

locator1.xfo.tr.x = 3
locator1.xfo.tr.y = -1
locator1.xfo.tr.z = 1

locator2 = Locator("locator2", parent=parentLoc)

locator2.xfo.sc.x = 1
locator2.xfo.sc.y = 2
locator2.xfo.sc.z = 1

locator2.xfo.tr.x = 2
locator2.xfo.tr.y = 5
locator2.xfo.tr.z = 3

locator2.xfo.ori.setFromEulerAngles(
    Vec3(Math_degToRad(45.0), Math_degToRad(0.0), Math_degToRad(0.0)))

constraint = locator2.constrainTo(locator1, 'Position', True,
                                  'PositionConstraint')

builder = plugins.getBuilder()

config = builder.getConfig()
config.setExplicitNaming(True)

builder.build(parentLoc)
parentLoc = Locator('parent')

locator1 = Locator("locator", parent=parentLoc)

locator1.xfo.tr.x = 3
locator1.xfo.tr.y = -1
locator1.xfo.tr.z = 1

locator2 = Locator("locator2", parent=parentLoc)

locator2.xfo.sc.x = 1
locator2.xfo.sc.y = 2
locator2.xfo.sc.z = 1

locator2.xfo.tr.x = 2
locator2.xfo.tr.y = 5
locator2.xfo.tr.z = 3

locator2.xfo.ori.setFromEulerAngles(
    Vec3(Math_degToRad(45.0), Math_degToRad(0.0), Math_degToRad(0.0)))

constraint = locator2.constrainTo(locator1, 'Orientation', True,
                                  'OrientationConstraint')

builder = plugins.getBuilder()

config = builder.getConfig()
config.setExplicitNaming(True)

builder.build(parentLoc)
Exemple #7
0
        2: 'ZXY',
        3: 'XZY',
        4: 'ZYX',
        5: 'YXZ'
    }

    srcLoc = Locator(rotOrderStrMap[i] + '_src', parent=parentLoc)

    srcLoc.xfo.tr.x = i * 2
    srcLoc.xfo.tr.y = 0
    srcLoc.xfo.tr.z = 0

    tgtLoc = Locator(rotOrderStrMap[i] + '_tgt', parent=parentLoc)
    tgtLoc.ro = RotationOrder(i)

    tgtLoc.xfo.tr.x = i * 2
    tgtLoc.xfo.tr.y = 0
    tgtLoc.xfo.tr.z = 0

    tgtLoc.xfo.ori.setFromEulerAngles(
        Vec3(Math_degToRad(90.0), Math_degToRad(0.0), Math_degToRad(0.0)))

    constraint = tgtLoc.constrainTo(srcLoc, 'Pose', True, 'PoseConstraint')

builder = plugins.getBuilder()

config = builder.getConfig()
config.setExplicitNaming(True)

builder.build(parentLoc)