Graphics

 View Only
  • 1.  Get and Set Scale

    Posted 01-17-2013 21:59
    Can anyone advise me, please, on how to use the script commands for GetScale and SetScale?

    I would like for one quad object's scale to be retreived and used to set another object's scale. Since the first object will be a variable aspect ratio, I need for the frame behind it to match its scale. I know it can be done, but I'm not understanding the SDK well enough to know how to script it.

    Thanks!


  • 2.  RE: Get and Set Scale

    Posted 01-18-2013 07:24
    The code you need... If I don't make some little mistake...

    Dim YourFirstObject as xpBaseObject

    Dim YourSecondObject as xpBaseObject

    Dim X, Y, Z as Double

    YourScene.GetObjectByName("YourObjectToGet", YourFirstObject) //Here change name "YourObjectToGet"

    YourScene.GetObjectByName("YourObjectToSet", YourSecondObject) //Here change name "YourObjectToSet"

    YourFirstObject.GetScaleXYZ(X, Y, Z)

    YourSecondObject.SetScale(X, Y, Z)


    #XPression