Graphics

 View Only
  • 1.  import settings from other scene

    Posted 07-10-2017 08:02
    Hi there.

    I've gotten two scene in an project.



    ----- Scene 1----
    Scene1 is called "_Settings" and had got multiple text objects.

    Withing these object I save my data. For example the location of the files, and where the project is saved.
    "Textobject1" is called Projecturl
    "Textobject2" is called ImageDirectory




    ----- Scene 2----

    in Scene2 (and multiple other scenes) I want to use the data which is saved in scene 1, So I can replace it on my code.

    How can I import the settings from the first scene and use it to locate my files?


    Dim txt as xpTextObject
    Dim Projecturl as xpTextObject
    Dim ImageDirectory as xpTextObject
    Dim material as xpmaterial
    Dim obj as xpbaseobject
    Dim shad as xpBaseShader

    If txt.Text = "Purple" Then
    material.GetShader(0, shad)
    shad.SetFileName(Projecturl + ImageDirectory "Video\DLS\Purple.avi")
    Else if txt.Text = "Blue" Then
    material.GetShader(0, shad)
    shad.SetFileName(Engine.ProjectPath.ToString + "Video\DLS\Blue.avi")
    End if


  • 2.  RE: import settings from other scene

    Posted 07-14-2017 02:14
    Hey, can I just check why you are using 2 scenes? You could put the textobject1 and 2 in a layerobject and tick "show in render only" that way it's all contained within one scene.
    That would be my prefered method, it avoids messing out with multiples scenes.

    If you want to call another scene you're doing to have to tell you're script to look at the other scene for those objects.

    Here's a discussion that may help you.
    http://discussions.rossvideo.com/forum/default-forum-gc1/xpression-cg-and-graphics-system-gc12/9544-copy-text-objects
    #XPression


  • 3.  RE: import settings from other scene

    Posted 07-17-2017 07:46
    I've got multiple scene which I use, but all of them are using the same technique. All of them are using the settings which are places in Scene 1. And all of those scene have other and more different materials .
    #XPression


  • 4.  RE: import settings from other scene

    Posted 07-17-2017 10:04