ChyronHego Forums  

Go Back   ChyronHego Forums > Software > LEIF and Macro Scripting

LEIF and Macro Scripting Help with LEIF API and VBScript macros

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2017, 11:42 AM
charleslin charleslin is offline
 
Join Date: Feb 2017
Posts: 3
Default Flip surface texture

Looking for the attribute name for either "X Scale" or "Flip H" toggle in the surface Transform properties. It seems like the simplest thing that I can't find any documentation for.

Why couldn't they have simply named it
ActiveCanvas.Scene.Element ("Pod1").Element (0).Transform.XScale
or
ActiveCanvas.Scene.Element ("Pod1").Element (0).Transform.FlipH

?

Would that be too much to ask?

Can anyone point me in the right direction here?
Reply With Quote
  #2  
Old 07-27-2017, 12:01 PM
charleslin charleslin is offline
 
Join Date: Feb 2017
Posts: 3
Default

So I thought I would be clever and see if I could get Lyric to reveal the attribute name by creating a keyframe and seeing what "pops" when I expand it on the timeline...

TexScaleX appeared.
Flip H didn't key.

So I plug it into my macros:

Code:
'capture flip check
lin_flipCheckT1 = ActiveCanvas.Scene.Template("T1_FLIP_SCRUB").Text
lin_flipCheckT2 = ActiveCanvas.Scene.Template("T2_FLIP_SCRUB").Text

'set Team1 flip
If lin_flipCheckT1 = "YES" then
   ActiveCanvas.Scene.Element("AWAY_LOGO").Element(1).TexScaleX 0.750
Else
   ActiveCanvas.Scene.Element("AWAY_LOGO").Element(1).TexScaleX -0.750

End If
...and...poof.

Code:
Error executing macro: 0x800a01b6
Object doesn't support this property or method: 'ActiveCanvas.Scene.Element(...).Element(...).TexScaleX'
at Shot Box line: 7
at Source line: 7

Reply With Quote
  #3  
Old 07-27-2017, 07:47 PM
charleslin charleslin is offline
 
Join Date: Feb 2017
Posts: 3
Default

Well...due to deadlines, I had to resort to a more crude solution:
Duplicate the Pod and make the duplicate's .Visible *=-1 (inverse) of the original.

So in essence, I ended up with this:
Code:
'capture flip check
lin_flipCheckT1 = ActiveCanvas.Scene.Template("T1_FLIP_SCRUB").Text
lin_flipCheckT2 = ActiveCanvas.Scene.Template("T2_FLIP_SCRUB").Text

'set Team1 flip
If lin_flipCheckT1 = "YES" then
   ActiveCanvas.Scene("AWAY_LOGO").Visible = true
   ActiveCanvas.Scene("AWAY_LOGO_FLIP").Visible = false

Else
   ActiveCanvas.Scene("AWAY_LOGO").Visible = false
   ActiveCanvas.Scene("AWAY_LOGO_FLIP").Visible = true


End If

'set Team2 flip
If lin_flipCheckT2 = "YES" then
   ActiveCanvas.Scene("HOME_LOGO").Visible = true
   ActiveCanvas.Scene("HOME_LOGO_FLIP").Visible = false

Else
   ActiveCanvas.Scene("HOME_LOGO").Visible = false
   ActiveCanvas.Scene("HOME_LOGO_FLIP").Visible = true


End If

Hopefully one day a solution will be found. In the mean time, I hope this helps someone else in the near future who might run into the same issue.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 11:22 AM.


Copyright 2015 ChyronHego Corporation