Skip to content

stooge57/xPyScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  xPyScript is a free and open source program that allows you to program single display models
using python. You specify a xLights xmodel that defines the physical element of your display
prop and use Python to animate the lights, similar to using an Arduino and the FastLED library.
Output is to the screen and the physical LED pixels via a E1.31 controller if connected.
Currently only 3 channel RGB pixels and E1.31 protocol controllers are supported. The resultant
sequence can be exported to an xlight's .xsq file, which can be opened by xLights and added to
a larger sequence or saved to a .fseq file.
 
 
== Usage ==
 See help and the examples for details on how to use the program. When importing your .xsq file
 into xLights, be sure and RenderAll to show the sequence.
  
  
== Build ==
 - Requires Python 3
 
 - Requires PyQt6
    a cross-platform application development framework used to create graphical user interfaces

    command line:
      pip install PyQt6

 - Requires sacn
    a Python sACN/E1.31 library that supports the standard DMX message of the protocol

    command line:
      pip install sacn

 - Requires pyside6-rcc (only if you are modifying the help file)
    used to compile Qt resource files (.qrc) into Python code

	 command line:
       pyside6-rcc -g python -o helpResource.py helpResource.qrc
	  
	 after compiling, change the line in the helpResource.py file from 
	 "PySide6 import QtCore" to "PyQt6 import QtCore"

 - Requires QtDesigner (only if you are modifying the GUI)
    QtDesigner was used to design the GUI and create the .ui files. The resultant .py files
    are generated by the command line: 
	  pyuic6 MainWindow.ui -o MainWindow.py (etc, for each .ui file)
	  
 
== Internals ==
 When executing the run command, a thread is created that calls your sequence's setup() method
 once and then repeatedly calls your loop() method. The show() method copies the thread's node
 colors to the main thread which updates the GUI's nodes and displays them on the screen and
 sends them to the pixel controller. When exporting to a .xsq, each show() call will also copy
 the node colors to a frame list which will later be converted into the .xsq file when the
 sequence finishes. Each show() frame is converted into an xLights "On Effect", and are
 combined with previous frames when the color and the end time of the previous frame equals the
 start time of the current frame. Also, the show() method, looks for the requestInterruption to
 stop the thread.
 
== Comments ==
 All comments are welcomed, as are example code that you want to share and allow to be posted.
 
MIT License - Randy Haas 2025


 

About

Use Python to program xLights effects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published