Graphics

 View Only
  • 1.  Face.Face.IsBound

    Posted 07-02-2025 14:12

    Is there a Xpression script counterpart to the Visual Logic Face.Face.IsBound? I want to check to see if there is a material bound to an object, but running into roadblocks doing it with Visual Logic, so I'd like to do it with a script instead.



    ------------------------------
    Daryl Judd
    Sbgtv
    ------------------------------



  • 2.  RE: Face.Face.IsBound

    Posted 07-02-2025 14:29

    I guess you could use "getmaterial" property and see if it returns something or nothing? 



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



  • 3.  RE: Face.Face.IsBound

    Posted 07-02-2025 14:34

    I just quickly tested this and it seemed to work. 

    dim obj as xpBaseObject
    dim mat as xpMaterial
     
    self.GetObjectByName("Quad1", obj)
    if obj.GetMaterial(0, mat) = true
    engine.DebugMessage("material", 0)
    else
    engine.DebugMessage("no material", 0)
    end if 



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



  • 4.  RE: Face.Face.IsBound

    Posted 07-07-2025 16:23

    Perfect, thank you Simon!



    ------------------------------
    Daryl Judd
    Sbgtv
    ------------------------------



  • 5.  RE: Face.Face.IsBound

    Posted 07-07-2025 17:07

    No worries! Pleased it worked!



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