Itās just a test panel. If I add or remove an element, there is no sync.
test_panel.py (2.1 KB)
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)
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.
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.
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