Graphics

 View Only
  • 1.  Scripting Bounding Box and Pivot Point

    Posted 07-09-2025 12:07

    Hello! I am attempting to create a script at a specific point on a scene director. Basically, I need to set the pivot point of a quad object to the leftmost point of the boundingbox of a text object. Then, at a certain frame, I need another script on the scene director to set the pivot point to the right part of the text object's bounding box. I am not super familiar with scripting personally, so any help would be much appreciated!



    ------------------------------
    Philip Doherty
    Elon University
    ------------------------------


  • 2.  RE: Scripting Bounding Box and Pivot Point

    Posted 07-09-2025 12:14

    Place these where you need them.

    Left 

    Dim obj As xpQuadObject
    dim xWidth as string
     
    scene.GetObjectByName("Quad1", obj)
     
    xWidth = obj.Width
     
    obj.PivotX = xWidth /2 * -1


    Right 
    Dim obj As xpQuadObject
    dim xWidth as string
     
    scene.GetObjectByName("Quad1", obj)
     
    xWidth = obj.Width
     
    obj.PivotX = xWidth /2 


    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 3.  RE: Scripting Bounding Box and Pivot Point

    Posted 07-10-2025 11:16

    This worked perfectly. Appreciate it!



    ------------------------------
    Philip Doherty
    Elon University
    ------------------------------



  • 4.  RE: Scripting Bounding Box and Pivot Point

    Posted 07-10-2025 11:23

    No worries!



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------