Graphics

 View Only
  • 1.  OnPreviewRender

    Posted 02-15-2023 15:47

    Can anybody tell me why this script in the "OnPreviewRender" tab:

    dim PreviewPage as xpTextObject
    dim Dir as xpSceneDirector
    self.GetObjectByName("PreviewChoiceVLTxt",PreviewPage)
    self.GetSceneDirectorByName("SceneDirector1",Dir)
    If PreviewPage.Text = "Row1" then
    Dir.Position = 25
    ElseIf PreviewPage.Text = "Row2" then
    Dir.Position = 30
    ElseIf PreviewPage.Text = "Row3" then
    Dir.Position = 35
    ElseIf PreviewPage.Text = "Row4" then
    Dir.Position = 40
    ElseIf PreviewPage.Text = "Row5" then
    Dir.Position = 45
    End If
    Is working in XP10.1_5434 but NOT in XP11.1_5760?
    And with "working" I mean: by choosing one of the options (Row1-5) I want to see the preview of that director position. 


    ------------------------------
    Rob van Rooyen
    Senior Graphics Specialis
    NEP The Netherlands
    Hilversum Netherlands
    ------------------------------


  • 2.  RE: OnPreviewRender

    Posted 02-16-2023 06:08

    I just tested your script in 11.1.5761 and found that your script works for me. 



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



  • 3.  RE: OnPreviewRender

    Posted 02-16-2023 09:54

    That's strange... You use only one build later and it works? Is there any notification of this in the change-log? I do have to mention I am using the 64bit version. Perhaps that's the answer?



    ------------------------------
    Rob van Rooyen
    Senior Graphics Specialis
    NEP The Netherlands
    Hilversum Netherlands
    ------------------------------



  • 4.  RE: OnPreviewRender

    Posted 02-16-2023 12:12

    Try to recompile your script(s) when you go into a different version.

    Add in some Engine.WriteToLog() debug statements to see if it is even firing. If not, check the preferences on the different version to see if there are some preferences for scripting not correctly set.



    ------------------------------
    Azathoth
    Son of Cthulhu
    ------------------------------



  • 5.  RE: OnPreviewRender

    Posted 02-16-2023 12:21

    I checked with 64bit version, seems to work for me. 

    You should check the debugger 

    You can add your own messages as well. 

    Engine.debugmessage("Hello World", 0)


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



  • 6.  RE: OnPreviewRender

    Posted 02-16-2023 13:41

    If you are uninstalling/installing a lot on the same system make sure the last thing you do is install. If you uninstall one edition of XPression it will uninstall the script engine for all. 

    You could also try clearing the script cache: Edit > Preferences > On DIsk Cache > Script Engine > Delete the contents of this folder