Graphics

 View Only
  • 1.  Xpression API

    Posted 06-06-2024 06:18

    Hello guys,

     

    is there any way to find out by code, if a specific scene in Xpression contains a script or some visual logic.

    I would like to use this information to automatically build a projects documentary which would be helpful if you pass a project to other colleagues.

    I did not find an Api call in the documentary referring to this matter.

     

    Tom Lehmann

     



  • 2.  RE: Xpression API

    Posted 16 days ago

    I haven't found a way to see a script in a scene from the API (I was recently looking for a way to set a script on an object programmatically), but at least in v11.5 and maybe earlier, xpSceneObject has a read/write VisualLogic property (type xpVisualLogic). In the xpVisualLogic object, you might be able to tell if it's at least blank or not. For example, there's a TabCount property you can read, then you can get tabs by index or name. So if tab count is greater than 0, I guess it would mean someone added some VL to the scene, although personally I tend to have VL tabs around that were used for testing that aren't actually doing anything in the scene. But you could for example get the VL object for the scene, loop through the tabs, and list out the name of each tab, and if it's enabled or not. That's about all you get.

    If you really need the details you might be able to parse an export file, which can be created from the API using xpVisualLogicTabObject.SaveToXVL(). Unfortunately, instead of a human-readable XML-type format implied by the .xvl file extension, the contents look like a binary format that would be difficult to parse without access to the file format.



    ------------------------------
    - Ben
    ------------------------------