Scripting Live-Link šŸ“œ

Itā€™s just a test panel. If I add or remove an element, there is no sync.
test_panel.py (2.1 KB)

1 Like

UPDATE

  • Corrected an unreg bug (small error msg) . as @Elreenys reported to me above.
  • an addon debug system is set in place as a checkbox. it is only for controlling if your link is working properly. youā€™ll see the activity of every timer and handler check.
  • now #STOP in the first line will stop the livelink from your editor.

Script-LiveLink_V21.py (23.3 KB)

1 Like

@Elreenys

It worked perfectly with me. i donā€™t understand ?
you can try to push on the ā€œExecuteā€ operator, it will manually run the script. as it was in the text editor and pushing the run script button.

ezgif-2-646620cc9619

or copy paste in the text editor.

be sure that #EXECUTE is in firt line. and that the link is running. in the new v21 thereā€™s a debug mode where you can check the activity of the addon.

also if #EXECUTE_CUSTOM is alone witouth boundaries the script will be empty.

are you on 2.81 ? i did not try it yet.

Oops, yes I forgot the #execute. Sorry @BD3D.

1 Like

I have just started using it. Here is my question what happens if a user saves a script multiple times in a row and if the script is a modal one? Is this well defined? I will try to look at the script later since I would like to contribute to this. My basic testing proves that this idea works.

One thing I want to add is to be able to increase and decrease the number of scripts (in the tab) that this one watches.

I donā€™t know the specific answer as I donā€™t use nodal operator that much, all I can tell you is thatā€™ it will adopt thatā€™s same behavior as clicking Ā« running script Ā» multiple time in a row. IMO, Thereā€™s no reasons it wil adopt another behavior.

If an user donā€™t want to be annoyed every time he save he can remove only one letter from #EXECUTE.
What could also be done is an #EXECUTE_IF_CHANGE fonction ā†’ if new text == old text ā†’ do not execute. I think this can be done easily.

Every scriptslots are affected by one same SCR_OT_start_link and OT_stop_link operators with index values.

Thoses operators will activate/stop timers and handlers (3 def: text_pollX ,text_execX, and redrawX). I think itā€™s not possible to transfer any arguments in thoses def without fuc*ing things up with the timers/handlers (and stopping them). Thatā€™s why I propose only 3 slots. copy/paste def 10x the same way I did 3x seems really absurd :frowning:

1 Like