Graphics

 View Only
  • 1.  Scripting Changes in Layout Mode

    Posted 29 days ago

    So, I have a problem, I am hoping there might be a solution I am missing. 

    I have a script that renames some groups in a scene based on certain criteria. The script works well; however, I notice the script only works in Layout mode (and I am passing the scene on the getscene call, not a copy), so I wrote a script and some GPI triggers that switches to Layout mode to make the changes then switch back to sequencer automatically, but now I discover another issue, if the scene is not the focused scene when it goes to layout mode the script does not rename the groups.

    I can't see any option in the API for setting a focused scene in Layout mode so I thought, get the take item from the sequencer and then choose to edit in layout mode, but again I see no API calls to be able to edit a take item from sequencer in Layout mode. 

    Any suggestions on how I can consistently get this script to rename these groups or workarounds to getting a way to focus the scene I need when i switch to layout mode? 



    ------------------------------
    Carlito Chippy
    ------------------------------


  • 2.  RE: Scripting Changes in Layout Mode

    Ross Staff
    Posted 26 days ago

    Are you making an C#/C++/Visual Basic API app or doing all of this directly inside of XPression? 




  • 3.  RE: Scripting Changes in Layout Mode

    Posted 26 days ago

    Doing this in Xpression with Dashboard as a control for some items. 



    ------------------------------
    Carlito Chippy
    ------------------------------



  • 4.  RE: Scripting Changes in Layout Mode

    Ross Staff
    Posted 25 days ago

    Hmm..

    Why do you want to edit in both Layout and Sequencer? 




  • 5.  RE: Scripting Changes in Layout Mode

    Posted 25 days ago

    I dont necessarily want to. My scene relies on having group names have numbers numbers in a specific order (based on data that comes in each game), I have a script that renames the groups but it only works in Layout mode AND with the scene being the focused scene, so that is why I switch to Layout mode, have the script run and then back to Sequencer when done. I am open to doing it another way that works, this was my solution after realizing the groups do not get renames if the script runs in Sequencer mode.



    ------------------------------
    Carlito Chippy
    ------------------------------



  • 6.  RE: Scripting Changes in Layout Mode

    Posted 5 days ago

    Bumping this hoping someone has a suggestion that could help me. 



    ------------------------------
    Carlito Chippy
    ------------------------------



  • 7.  RE: Scripting Changes in Layout Mode

    Posted 3 days ago

    I'm kinda curious of what the whole workflow is that requires renaming things within the scene itself (which is meant to be more a template for other things to change from there, not something that itself should be changing all the time per se). It might be possible to not deal with this and still get the same end result.

    All that said: what is the trigger for your script to run? It may also be possible to have your original script run on the scene that has been taken online instead of the scene that's in layout. If it's from a Script command in a Keyboard shortcut, you may just need to get the Scene object from the xpOutputFramebuffer object instead of the Engine.GetScene.



    ------------------------------
    Zachary Fradette
    United States
    ------------------------------



  • 8.  RE: Scripting Changes in Layout Mode

    Posted 3 days ago
    So in terms of your curiosity. In the image below is an example of the logic. The players names get highlighted row by row however their position on the field (dots on the right) can be varied. So my logic to solve this problem such that when the name is highlighted the correct dot is highlighted is to animate each dot with an animation controller pointing to that group, so what my scrip does is renumber the groups based a comparison that matches the numbers on the left with ones on the right. It all works perfectly except it only works if the scene is highlighted on layout mode. So after working tediously on the script and getting it all to work as needed, I found out it does not work in sequencer mode. And while digging to find a solution it seems to be a high level limitation of renaming the group object in this manner. But I am hoping someone with more in depth knowledge of how Xpression handles this might have a solution or suggest another workflow to achieve same solution. 


    ------------------------------
    Carlito Chippy
    ------------------------------



  • 9.  RE: Scripting Changes in Layout Mode

    Posted 3 days ago

    What user action does the highlighting? Is it just releasing pauses in a scene director and the scene director has a script block?

    The way that I would tackle this is, instead of renaming the groups, have all of the groups named for player 1, 2, 3, 4, and instead use a script (or even Visual Logic) to adjust the position of the groups. That way, animation wise and logic wise, it's very easy, just 1>2>3>4, but position wise the objects have shifted position.



    ------------------------------
    Zachary Fradette
    United States
    ------------------------------



  • 10.  RE: Scripting Changes in Layout Mode

    Posted 3 days ago

    No user action, scene director has script blocks. 

    Yea I think I may to just take a different approach as you suggested and find a different way to get this working given this limitation. 



    ------------------------------
    Carlito Chippy
    ------------------------------