Graphics

 View Only
  • 1.  C# script not adding scene to group scene

    Posted 04-15-2016 05:04

    I have the following C# code:

    if (engine.GetSceneByName("LAT_0", out scene))
    {
    //scene.BeginUpdate();
    if (scene.IsGroup)
    sceneGroup = (xpSceneGroup)scene; //
    switch (dt[4])
    {

    case "cloud":
    if (sceneGroup != null)
    {
    engine.CreateScene(true, out scene_local);

    scene_local.Name = scene.Name + "_" + index.ToString();

    SetCloud(scene_local, true, dt[2], dt[3], dt[5], dt[6]); //add objects

    sceneGroup.AddScene(scene_local);
    index++;
    }
    break;
    }
    }

    and instead of adding to the LAT_0 crawl group scene is adding to the end of the scene manager without any group reference as shown in the attached picture:





    Tried even to duplicate LAT_0_C and unfortunately it still adds copies at the end of the scene manager. Even after update thumbnails, it still displays added scenes at the end. Detach from parent inside right click properties is grayed which tells me that looses the parent.

    Please be so kind and help me out with this issue. Thank you.
    CJ



  • 2.  RE: C# script not adding scene to group scene

    Posted 04-15-2016 20:06
    When you call GetSceneByName("LAT_0") that is returning you an in-memory copy of the LAT_0 scene, not the actual scene you are seeing in the SceneManager.
    GetSceneByName takes an optional third paramater which specifies if you want a copy or the original scene (default is a copy).

    You can not add scenes to an original scene; only to a copy.

    Take a look at this C# sample that should help: https://na11.springcm.com/atlas/Link/Document/12442/3025e6b6-2704-e311-a16d-d89d67143433/5821707b-4503-e611-97db-d89d67132a6d


    #XPression


  • 3.  RE: C# script not adding scene to group scene

    Posted 04-16-2016 02:02
    Thank you very much. Great example helped a lot. I will implement it in the next hour.
    #XPression


  • 4.  RE: C# script not adding scene to group scene

    Posted 04-17-2016 21:08

    Great news is working perfectly. It took me a while to understand scene instances and to keep them till dissolve.Thank you again. Now I can control tickers, lower thirds and side panels from my web page / server in real time . Here are some pictures with the control / curation web page and the Xpression output:


    #XPression


  • 5.  RE: C# script not adding scene to group scene

    Posted 04-18-2016 20:42
    That looks really cool.. Nice job.
    #XPression


  • 6.  RE: C# script not adding scene to group scene

    Posted 06-05-2016 18:12
    Thanks. Here a movie demo https://vimeo.com/168851843
    #XPression