Graphics

 View Only
  • 1.  Using Visual Logic or Scripting to change position and width of text object

    Posted 10-05-2023 16:19

    I have a XPression Scene with a quad object on the left and a text object on the right. The scene is updated using template links through MOS Gateway in ENPS.
    I want to use the visibility of the quad object to control the x position of the text object or group of text objects. I would also like the width of the bounding box to change based on either the quad object visibility or x position of the text.

    I need to know how to do this using either visual logic or scripting 

    Thanks in advance. Any help appreciated.



    ------------------------------
    Cindy McNicholl
    ------------------------------


  • 2.  RE: Using Visual Logic or Scripting to change position and width of text object

    Posted 10-05-2023 17:04

    This can be done easily with the Input Selector in Visual Logic. The Visible node will show 0 (quad is hidden) or 1 (quad is visible), connect this to the Index of the Input Selector node to have it select which value to use for the Output. As for changing the bounding box for the text, you'll want to use the Autosqueeze Width node.

    I'll attach the project I made and a screenshot below:



    ------------------------------
    Omar Reyes
    Fargo United States
    ------------------------------



  • 3.  RE: Using Visual Logic or Scripting to change position and width of text object

    Posted 10-05-2023 17:51
      |   view attached

    Here is the file, attached the wrong one before...



    ------------------------------
    Omar Reyes
    Fargo United States
    ------------------------------

    Attachment(s)

    xpf
    VisualLogic.xpf   48 KB 1 version


  • 4.  RE: Using Visual Logic or Scripting to change position and width of text object

    Posted 10-05-2023 19:19

    Thanks so much for your help! I hadn't used the input selector block before.  That did it!



    ------------------------------
    Cindy McNicholl
    ------------------------------



  • 5.  RE: Using Visual Logic or Scripting to change position and width of text object

    Posted 10-05-2023 19:25

    Is there a way to have whether the quad has a material or new material assigned to it control the text position, instead of the quad's visibility?

    I have the length of text string control similar adjustments on other objects. (0 string length as opposed to 1 or greater)



    ------------------------------
    Cindy McNicholl
    ------------------------------



  • 6.  RE: Using Visual Logic or Scripting to change position and width of text object

    Posted 10-06-2023 03:26

    A material name will appear in the faces property of an object. 

    here I have tied it to a text object which would allow me to do pretty much whatever I want from there.



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