Here’s a new one for anyone who wants to be able to apply changes globally to a bunch of selected timeline text fx. It’s available on the Logik Portal(Best way to install it) or here:
Mike
Here’s a new one for anyone who wants to be able to apply changes globally to a bunch of selected timeline text fx. It’s available on the Logik Portal(Best way to install it) or here:
Mike
Nice one Mike, this is going to be so useful.
I was going to take a look into something like this over break but now that I look at your code I’m glad I didn’t. Someone needs to crown you the UI king.
EDIT: Just tried to use it on a timeline with two text FXs on 2021.1 (Linux) and got the following error:
selected_segment: <flame.PySegment object at 0x7f60978884b0>
script_path: /opt/Autodesk/shared/python/adjust_text_fx
temp_text_file: /opt/Autodesk/shared/python/adjust_text_fx/temp/temp_text.ttg_node
backup_temp_text_file: /opt/Autodesk/shared/python/adjust_text_fx/temp/backup_temp_text.ttg_node
temp_xml_path: /opt/Autodesk/shared/python/adjust_text_fx/temp/temp_text.xml
playhead_position: ‘10:00:01+01’
FontName : /opt/Autodesk/font/Discreet
FontName : /opt/Autodesk/font/Discreet
FontSize : 50
ItalicAngle : 0
Kern : 0
Justification : Justify_Centre
CharSoftness : 0
ShadowSoftness : 0
RulerStaticTranslationX : 5
RulerStaticTranslationY : -5
elem_dict: {‘Outline’: ‘0’, ‘Standard’: ‘0’, ‘DropShadow’: ‘0’, ‘Subscript’: ‘0’, ‘Superscript’: ‘0’, ‘Underline’: ‘0’, ‘Fill’: ‘1’}
drop_shadow: False
elem_dict: {‘a’: ‘100’, ‘r’: ‘100’, ‘b’: ‘100’, ‘g’: ‘100’}
fill_transp: 100
elem_dict: {‘a’: ‘100’, ‘r’: ‘0’, ‘b’: ‘0’, ‘g’: ‘0’}
shadow_transp: 100
BlurOn : False
shadow_blur: False
BlurLevel : 5
shadow_blur_level 5
channel_name: translation/x
child_names: []
child_objects: []
No Key Frames Found
GlobalHotKeyButton execute callback [((<flame.PySegment object at 0x7f60978884b0>, <flame.PySegment object at 0x7f6097888520>),)] failed because of an error of type “local variable ‘value’ referenced before assignment”
Hey Kyle!
Did you manually install the script or did you install it through the Logik Portal? If you installed it manually check the folder permissions for the script folder. Flame will need full permissions to that folder. Could you save out the text fx and email it to me so I can give it a shot on my end?
Mike
Manually installed onto a shared folder where we keep all of our hooks. Other scripts that require a config all work fine and it wrote out to /opt/Autodesk/shared/pythong/adjust_text_fx w/o any issue it seems.
Thanks for sending that over. I just checked it out and it looks like the script doesn’t like when either the x or y position of the text layer is set to 0. Let me know if it works for you if you move the text layer.
Mike
Winner, winner, half a chicken dinner. It loads the UI now but I keep getting a seg fault when I try to apply the changes, sadly. It looks like it’s removing the first text FX segment when I highlight them to then go into the script.
selected_segment: <flame.PySegment object at 0x7f7369f69210>
script_path: /opt/Autodesk/shared/python/adjust_text_fx
temp_text_file: /opt/Autodesk/shared/python/adjust_text_fx/temp/temp_text.ttg_node
backup_temp_text_file: /opt/Autodesk/shared/python/adjust_text_fx/temp/backup_temp_text.ttg_node
temp_xml_path: /opt/Autodesk/shared/python/adjust_text_fx/temp/temp_text.xml
playhead_position: ‘10:00:00+16’
FontName : /opt/Autodesk/font/Discreet
FontName : /opt/Autodesk/font/Discreet
FontSize : 50
ItalicAngle : 0
Kern : 0
Justification : Justify_Centre
CharSoftness : 0
ShadowSoftness : 0
RulerStaticTranslationX : 5
RulerStaticTranslationY : -5
elem_dict: {‘Outline’: ‘0’, ‘Standard’: ‘0’, ‘DropShadow’: ‘0’, ‘Subscript’: ‘0’, ‘Superscript’: ‘0’, ‘Underline’: ‘0’, ‘Fill’: ‘1’}
drop_shadow: False
elem_dict: {‘a’: ‘100’, ‘r’: ‘100’, ‘b’: ‘100’, ‘g’: ‘100’}
fill_transp: 100
elem_dict: {‘a’: ‘100’, ‘r’: ‘0’, ‘b’: ‘0’, ‘g’: ‘0’}
shadow_transp: 100
BlurOn : False
shadow_blur: False
BlurLevel : 5
shadow_blur_level 5
channel_name: translation/x
child_names: [‘Extrap’, ‘Value’]
child_objects: [<Element ‘Extrap’ at 0x7f7369fe54e0>, <Element ‘Value’ at 0x7f7369fe5570>]
No Key Frames Found
Value: 10
translation_x: 10
channel_name: translation/y
child_names: [‘Extrap’, ‘Value’]
child_objects: [<Element ‘Extrap’ at 0x7f7369fe55d0>, <Element ‘Value’ at 0x7f7369fe5630>]
No Key Frames Found
Value: -370
translation_y: -370
channel_name: translation/speed
channel_name: shear/x
channel_name: shear/y
channel_name: scale/x
channel_name: scale/y
channel_name: rotation
channel_name: transparency
Applying Changes <<<
FontName : /opt/Autodesk/font/Discreet
FontSize : 50
ItalicAngle : 0
Kern : 0
Justification : Justify_Centre
CharSoftness : 0
ShadowSoftness : 0
RulerStaticTranslationX : 5
RulerStaticTranslationY : -5
elem_dict: {‘Outline’: ‘0’, ‘Standard’: ‘0’, ‘DropShadow’: ‘0’, ‘Subscript’: ‘0’, ‘Superscript’: ‘0’, ‘Underline’: ‘0’, ‘Fill’: ‘1’}
drop_shadow: False
elem_dict: {‘a’: ‘100’, ‘r’: ‘100’, ‘b’: ‘100’, ‘g’: ‘100’}
fill_transp: 100
elem_dict: {‘a’: ‘100’, ‘r’: ‘0’, ‘b’: ‘0’, ‘g’: ‘0’}
shadow_transp: 100
BlurOn : False
shadow_blur: False
BlurLevel : 5
shadow_blur_level 5
channel_name: translation/x
child_names: [‘Extrap’, ‘Value’]
child_objects: [<Element ‘Extrap’ at 0x7f7369fe54e0>, <Element ‘Value’ at 0x7f7369fe5570>]
No Key Frames Found
Value: 10
translation_x: 10
channel_name: translation/y
child_names: [‘Extrap’, ‘Value’]
child_objects: [<Element ‘Extrap’ at 0x7f7369fe55d0>, <Element ‘Value’ at 0x7f7369fe5630>]
No Key Frames Found
Value: -370
translation_y: -370
channel_name: translation/speed
channel_name: shear/x
channel_name: shear/y
channel_name: scale/x
channel_name: scale/y
channel_name: rotation
channel_name: transparency
new_font_size: 50
new_italic_angle: 0
new_kern: 0
new_justification: Justify_Centre
new_fill_transp: 100
new_char_soft: 0.00
new_offset_x: 10.0
new_offset_y: -370.0
new_separation: 0
new_shadow: 0
new_shadow_transp: 100
new_shad_softness: 0.00
new_all_shadows_translation_x: 5.00
new_all_shadows_translation_y: -5.00
new_shadow_blur: False
new_shadow_blur_level: 5
channel name: translation/x
Current Value: 10
New Value: 10.0
channel name: translation/y
Current Value: -370
New Value: -370.0
Segment no longer exist.
Traceback (most recent call last):
File “/amsterdamfs/2d_share/FLAME/python_hooks/pyFlame/adjust_text_fx/adjust_text_fx.py”, line 1323, in regen_text_fx
self.save_text_fx(fx, self.selected_seqment)
File “/amsterdamfs/2d_share/FLAME/python_hooks/pyFlame/adjust_text_fx/adjust_text_fx.py”, line 1523, in save_text_fx
fx = seg.create_effect(‘Text’)
RuntimeError: Segment no longer exist.
playhead_position: ‘10:00:00+09’
Applying Changes <<<
FontName : /opt/Autodesk/font/Discreet
FontSize : 50
ItalicAngle : 0
Kern : 0
Justification : Justify_Centre
CharSoftness : 0
ShadowSoftness : 0
RulerStaticTranslationX : 5
RulerStaticTranslationY : -5
elem_dict: {‘Outline’: ‘0’, ‘Standard’: ‘0’, ‘DropShadow’: ‘0’, ‘Subscript’: ‘0’, ‘Superscript’: ‘0’, ‘Underline’: ‘0’, ‘Fill’: ‘1’}
drop_shadow: False
elem_dict: {‘a’: ‘100’, ‘r’: ‘100’, ‘b’: ‘100’, ‘g’: ‘100’}
fill_transp: 100
elem_dict: {‘a’: ‘100’, ‘r’: ‘0’, ‘b’: ‘0’, ‘g’: ‘0’}
shadow_transp: 100
BlurOn : False
shadow_blur: False
BlurLevel : 5
shadow_blur_level 5
channel_name: translation/x
child_names: [‘Extrap’, ‘Value’]
child_objects: [<Element ‘Extrap’ at 0x7f7369fe54e0>, <Element ‘Value’ at 0x7f7369fe5570>]
No Key Frames Found
Value: 10
translation_x: 10
channel_name: translation/y
child_names: [‘Extrap’, ‘Value’]
child_objects: [<Element ‘Extrap’ at 0x7f7369fe55d0>, <Element ‘Value’ at 0x7f7369fe5630>]
No Key Frames Found
Value: -370
translation_y: -370
channel_name: translation/speed
channel_name: shear/x
channel_name: shear/y
channel_name: scale/x
channel_name: scale/y
channel_name: rotation
channel_name: transparency
new_font_size: 25
new_italic_angle: 0
new_kern: 0
new_justification: Justify_Centre
new_fill_transp: 100
new_char_soft: 0.00
new_offset_x: 10.0
new_offset_y: -370.0
new_separation: 0
new_shadow: 0
new_shadow_transp: 100
new_shad_softness: 0.00
new_all_shadows_translation_x: 5.00
new_all_shadows_translation_y: -5.00
new_shadow_blur: False
new_shadow_blur_level: 5
channel name: translation/x
Current Value: 10
New Value: 10.0
channel name: translation/y
Current Value: -370
New Value: -370.0
Application: flame 2021.1 x86_64
Pid: 99803
Error: abnormal termination, signal = 11
SIGSEGV - Segmentation Fault
Signal was generated internally:
address not mapped to object at address 0x00000000
This should hopefully fix it. If anyone wants to give it a try and let me know if they run into any problems.
Mike
adjust_text_fx_v1.1.zip (12.9 KB)
Unfortunately it’s still removing the first segment when I enter the UI and then returning similar errors about a missing segment.
Segment no longer exist.
Traceback (most recent call last):
File “/amsterdamfs/2d_share/FLAME/python_hooks/pyFlame/adjust_text_fx/adjust_text_fx.py”, line 998, in set_slider
self.regen_text_fx()
File “/amsterdamfs/2d_share/FLAME/python_hooks/pyFlame/adjust_text_fx/adjust_text_fx.py”, line 1371, in regen_text_fx
self.save_text_fx(fx, self.selected_segment)
File “/amsterdamfs/2d_share/FLAME/python_hooks/pyFlame/adjust_text_fx/adjust_text_fx.py”, line 1571, in save_text_fx
fx = seg.create_effect(‘Text’)
RuntimeError: Segment no longer exist.
playhead_position: ‘10:00:00+00’
playhead_position: ‘10:00:00+00’
playhead_position: ‘10:00:00+00’
playhead_position: ‘10:00:00+00’
What I’m doing is highlighting the two text FX segments and then right click, select the hook. Unsure if that has anything to do with it.
Hmmm my guess from that error is that there might be a permissions problem. Does this folder exist on your machine: /opt/Autodesk/shared/python/adjust_text_fx/temp
It does and it’s wide open, same with it’s parent folder.
Ahhh I see what the problem is. You’re adding the text as a gap fx… and yea, that seems to not be working correctly. If you add the text to a clip on the timeline does it work? It looks like I’ll need to find a way of maintaining the gap when I delete the text fx.
Yep, that works as expected.
Personally I’d most likely use this when it comes to subtitles which I always have as a gap FX so the ability to use it on that would be great.
Yea, totally makes sense. This should fix the gap issue.
adjust_text_fx_v1.2.zip (12.5 KB)
Mind the gap MikeV…
That works now, thanks!
A small thing I noticed though. You can’t enter negative values for the position offset. When you use the cursor to drag the values it will do it but then it grinds the machine to a halt.
When I look at the shell it seems like it’s evaluating the changes for every change as opposed to once when you click “Apply”. When you have to drag to alter a value this results in lots of changes in a very short amount of time which then locks everything up to the point where I got an error about Flame not responding. It eventually came around though so that’s good.
EDIT: It looks like it applies every change interactively so I guess that’s where the performance hit is coming into play.
Great to hear it’s working now. I’m going to put it back up on the Logik Portal and website. Thanks for helping test it out.
Yea, every time you change a value the script is saving and then reloading a text setup to give the update on the screen. That’s where the performance hit comes in. I’m on a iMac Pro with pretty fast drives so it isn’t to bad for me, but I can see how it might be a little slower on other machines. I figured since the script would probably mainly be used to make small changes like nudging legals up or down, changing the font or font size, the slowness would be an acceptable hit in exchange for having to hit the Apply button to see changes.
Mike
Thanks for writing it.
Any idea what isn’t allowing negative values to be entered though?
Do you get any errors in the shell when you enter negative numbers? I just gave it a quick try here and it seems to be working with negative numbers.
Mike
Strange. No, no errors. I’ve tried entering ‘-’ and then the number both of the keyboard and within the calculator and neither get passed through to the UI. Dragging does the trick though.
Once I drag and get a negative number, then both the keyboard and calculator start to register negative values to I can +/- whatever and it works, including other fields. What’s super weird is this seems to only happen when I first start Flame. After that all good.
And of course now that I’ve been trying to see if it’s when I first login to the system or whatever, now it’s all working. Let’s just say it works and it’s weird gremlins that decide if they want to come out or not, depending on their mood.