Graphics

 View Only
  • 1.  Metadata and scripting issue with a sports graphic

    Posted 11-03-2023 12:00

    I have a scene file that allows our users to select two sports team logos from Streamline that have information embedded in three metadata fields. One is the location of the team (or the name of the university, in the case of colleges), the second is the name of the team (or mascot) and the third is what league or conference they are in.

    That third field is used to display the logo for the league or conference automatically on the graphic, using a script:

    Dim LeagueLogo as xpBaseObject

    Scene.GetObjectByName("LeagueLogo", LeagueLogo)

    LeagueLogo.SetVolatileTextureFile(0, Engine.ProjectPath & "\Images\SportsLeagueLogos\" & Text & ".png")

    It really is only intended to sort out the college teams.

    For instance, if both teams are in the same collegiate conference it will use that conference's logo:

    But if they are NOT in the same conference, it displays the NCAA logo:
    The issue comes here. If you begin to make a still now for a different sport altogether, it keeps the NCAA logo (because technically the two metadata fields are NOT equal):
    Normally, it corrects itself as soon as you drop in another team from the same sport:
    I don't know much about scripting. I didn't write the previous script myself. Someone from Ross did it for me years ago.
    Is there a way to add a function in the script that would "exclude" a specified list of leagues?
    My thought process is this. It only does the "compare" IF they are colleges.
    So it would ignore the function for things like the NFL, NBA, NHL, etc.


    ------------------------------
    Kenny Meade
    ------------------------------


  • 2.  RE: Metadata and scripting issue with a sports graphic

    Posted 11-03-2023 13:57

    I just realized that the script only goes to a folder and "pulls" the logo based on a string value assigned in a visual logic.

    Here's the logic:

    So I guess what I'm trying to do is find a way to analyze the value of either "League_L" or "League_R" and only run the green part below, IF they are collegiate.
    Otherwise it would just simply pass the value of one of them directly to FILEPATH:


    ------------------------------
    Kenny Meade
    ------------------------------



  • 3.  RE: Metadata and scripting issue with a sports graphic

    Posted 11-03-2023 14:13

    I should also add the reason I'm trying to carry this further is because we have occasionally had logos that get their metadata deleted or corrupted and have recently started getting images on-air of two NFL teams with it actually showing the NCAA logo. I figured the best way to "prevent" this was simply to find a way to exclude all the other sports except for the ones that were collegiate conferences.

    Or perhaps someone has a better approach altogether to accomplish this.



    ------------------------------
    Kenny Meade
    ------------------------------



  • 4.  RE: Metadata and scripting issue with a sports graphic

    Ross Staff
    Posted 11-04-2023 13:25

    How automated does this have to be? Since you can't be sure which team (left or right) may have incorrect or blank league metadata, what if you just added an override text object to your scene. Publish it and assign a user input control with a blank entry at the top and then all of the possible league logos that could be selected. Just before the Filepath.text block, use an input selector with your new text object's Is Empty property as the index, the result of your metadata visual logic text as choice 0, and that new text object's text as choice 1. If your plugin users put in the two teams and notice the league is incorrect, they can select something manually in that override text object. 

    If you're on version 11, you may also want to play around with the Published Value Property visual logic block. It allows you to send image metadata to a Published Object field, which can be edited in the plugin if incorrect or outdated.

    https://www.rossvideo.com/resources/ross-university/published-value-property-visual-logic-block/



    ------------------------------
    Jeff Mayer
    Ross Video
    ------------------------------



  • 5.  RE: Metadata and scripting issue with a sports graphic

    Posted 11-03-2023 14:20

    Try making a new logic tree that tests against the league text and will make the quad (assuming a quad gets the texture) invisible if it is not a league value. Then it doesn't matter if the quad gets a default texture because it is not displayed.



    ------------------------------
    Azathoth
    Son of Cthulhu
    ------------------------------