No thumbnail when file name contains ";" (semicolon) (1 Viewer)

ltfearme

Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Just check if the split count is greater than 1, if it is then its a multi-texture if not its a valid single filename.
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    But what if filename contains more than one ";"

    ie to resolve this gordian knot :):
    common.waiting.1.png;common;waiting;2.png;;commonwaiting;3.png (I doubt that this will ever happen but anyway)

    Just for performance sake, function which will very fast resolve issue like this (just think on screen render and how much ms will be lost to decode this).
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    good point about more than one semi-colon...this split char should of been a non-valid char :(

    Guess you could use regex to split by a list of known extensions.
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    Yes, that could be fast approach. I'm curious what arion_p can say about this :).
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    I dumped texture files to a log and couldn't find any multi texture string. I wonder if it is ever used. 2nd to that, I don't have a clue right now from where that string can came. Skin, images... ?? Probably it's related to animation because split code was introduced when animation went into MP (SVN 9511 16.7.2006).
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    It would usually be generated from a skin animation control.
     

    Migue

    Retired Team Member
  • Premium Supporter
  • January 27, 2006
    381
    305
    Florida
    But animation control does it's own splitting itself, so the GUIImage splitting code doesn't get called.
     

    Users who are viewing this thread

    Top Bottom