Question about Script macro... #1430
-
Hi. I just wanted to confirm that running a script inline v.s. a file in a macro segment works slightly different — in that running a .py file doesn't have access to obspython, correct? Just asking this because I have code that uses the obspython module, and it only does anything when ran inline. i.e., obs.script_log does not log any messages when using a external file. OBS Studio 31.0.4 (.deb) / Advanced Scene Switcher 1.31.0 / Ubuntu 25.04 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The inline and file based scripting macro segments both require Here is what the default file based python script will look like:
The main difference between the two methods, inline and file, is the way they get invoked. https://github.com/WarmUpTill/SceneSwitcher/wiki/Scripting#inline-scripts |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
If I had to guess it is because of the filename.
test.py
is probably some "reserved" file / module name and thus cannot be loaded.(I am not a Python expert - just ran into similar issues myself and am guessing here)
Try using something like
example.py
.