csengine package

Subpackages

Submodules

csengine.CSOverlay module

csengine.audiochannel module

class csengine.audiochannel.AudioChannel(type, channelNr=0)[source]

Bases: object

CHUNK = 1024
ReaderThread()[source]
activeStack = None
busy = False
channel = None
channelNr = 0
openOutputChannel()[source]
readerThread = None
shutdown = False
write(chunk)[source]

csengine.csmediafile module

class csengine.csmediafile.csmediafile(filename)[source]

Bases: object

CHUNK_BYTES = 1024
DELAY_CHUNKS = 0
DISPOSE_FRAMES = 0
EMPTY_AUDIO = b'\x00\x00\x00\x00\x00'
arraySize = 0
audioCallback = None
audioPipe = None
audioProcess = None
audioReader = None
audioReadyEvent = None
audioStdErrReader = None
audioVideoSyncFrames = 0
calcDurationString(msec)[source]
currentAudioFrames = 0
currentFrame = None
durationStr = ''
enableAudio = True
enableVideo = True
filename = None
framerate = 0
getCurrentFrame()[source]
getDurationMsec()[source]
getMediaInformation()[source]
getVideoPosition()[source]
h = 0
hasAudio = False
hasVideo = False
height = 0
isPaused = False
isPlaying = False
min = 0
msec = 0
outputStream = None
pa = None
pause()[source]
pauseEvent = None
play(seek='')[source]
playFrom(msec)[source]
readAudio()[source]
readAudioStderr()[source]
readVideo()[source]
readVideoStderr()[source]
scale = ''
sec = 0
shutdown = False
stop()[source]
syncCounter = 0
testThread()[source]
totalFrames = 0
totalSamples = 0
videoFrameCount = 0
videoPipe = None
videoProcess = None
videoReader = None
videoReadyEvent = None
videoStdErrReader = None
videoSyncEvent = None
videoSyncTimer = None
width = 0

csengine.easycv module

Module: easycv.py

This module defines the function that will make it easier to work with OpenCV. A plugin can directly engage with OpenCV using import cv2 statement, but many frequently used operations can be done using the functions in this module.

The methods are all static and there is no need to create an instance of the class CVEssentials

class csengine.easycv.CVEssentials[source]

Bases: object

static OverlayImage(frame, overlay, xPos, yPos, overlay_size)[source]

This function overlays one image over the provided frame at the provided x and y positions scaled to a specific size.

Make sure that the overlay image does not go out of bounds when overlaying.The provided frame should be greater than the size of the overlay plus it’s position values.

Parameters:
  • frame (numpy.ndarray, shape (height, width, channels), dtype uint8 or float32) – The frame on which the image will be overlayed

  • overlay (numpy.ndarray, shape (height, width, channels), dtype uint8 or float32) – The image frame to overlay on the original frame

  • xPos (int) – The x position of where the overlay will start

  • yPos (int) – The y position of where the overlay will start

  • overlay_size (tuple (width,height)) – The dimensions of the image to be overlayed

Returns:

Returns the frame after overlaying image over the current frame

Return type:

numpy.ndarray, shape (height, width, channels), dtype uint8 or float32

static OverlayTransparent(background_img, img_to_overlay_t, x, y, blur=5, overlay_size=(640, 480))[source]

Overlays a transparant PNG onto another image using CV2

Parameters:
  • background_img (numpy.ndarray, shape (height, width, channels), dtype uint8 or float32) – The background image

  • img_to_overlay_t (numpy.ndarray, shape (height, width, channels), dtype uint8 or float32) – The transparent image to overlay (has alpha channel)

  • x (int) – x location to place the top-left corner of our overlay

  • y (int) – y location to place the top-left corner of our overlay

  • overlay_size (int[]) – The size to scale our overlay to (tuple), no scaling if None

  • blur (float) – The Blur amount for corner smoothing

Returns:

Background image with overlay on top

Return type:

int[]

static RemoveColorRange(frame, background, brights, darks, dim, blur=0)[source]

Removes a range of color pixels from the frame and replaces with background. This function can be used for effects like Green/Blue Screen

Parameters:
  • frame (numpy.ndarray, shape (height, width, channels), dtype uint8 or float32) – the main front frame as numpty array

  • background – the frame that needs to replace the color range

  • brights (float array as [b,g,r] values) – the upper color range of colors in [b, g, r] format

  • darks (float array as [b,g,r] values) – the lower color range of colors in [b, g, r] format

  • dim (tuple (width, height)) – dimensions of the frame as tuple (width, height)

Returns:

frame which has all pixels of provided color range in frame, replaced by background

Return type:

frame as numpy.ndarray, shape (height, width, channels), dtype uint8 or float32

static RemovePixelsOfColor(image, red, blue, green)[source]

Converts all pixels in an image of a certain color to transparent using cv2 and numpy

Parameters:
  • image (numpy.ndarray, shape (height, width, channels), dtype uint8 or float32) – The image matrix.

  • red (int (0-255)) – The red color value for the color to be removed.

  • blue (int (0-255)) – The blue color value for the color to be removed.

  • green (int (0-255)) – The green color value for the color to be removed.

Returns:

bgra with all black pixels converted to transparent

Return type:

numpy.ndarray, shape (height, width, channels), dtype uint8 or float32

static resizeWithAspectRatio(curr_height, curr_width, image, scale)[source]
static showErrorOnVideo(frame, error_message, color=(0, 0, 255))[source]
static showPreview(frame)[source]
static showPreviewWindow(frame)[source]

csengine.emptypluginbase module

@Name: Empty Plugin Parent Template @Description: This is the Empty Plugin Class that will be parent class to empty plugins that can be

shipped with the application. These empty plugins lead you to the download page.

@Created on: Jan-2022 @Created by: Vinimay Kaul @Last Modified: 21-Jan-2022 @Last Modified by: Vinimay Kaul

class csengine.emptypluginbase.EmptyPluginBase(**kwargs)[source]

Bases: object

Represents am Empty Plugin Base Template with its properties and methods.

Variables:
  • normalBG (str) – The path to the Background Image to be shown as a thumbnail in CamSkool for the plugin. (Default: “”)

  • downBG (str) – The path to the MouseOver Image to be shown when the user mouseovers the thumbnail. (Default: “”)

  • controllerBG (str) – The path to the Background Image to be shown in the plugin’s controller. (Default: “”)

  • name (str) – The name of the Plygin as shown in the application. (Default: “Sample Plugin”)

  • description (str) – The short description of the plugin that will be used in the app. (Default: “No Information available.”)

  • tags_raw (str) – The tags for the plugin that will be used in search. (Default: “plugin,camskool,untagged”)

  • plugin_path (str) – The path where the plugin will be installed or found. This path should always be CEEnvironment.GetFullPluginsPath() / plugin_name, unless you specifically want to install the plugin at a different location.

  • type – This value defines where the plugin will show up in the app. The type of plugin decides wehre it shows.

The values have to be “ANIM”, “IMAGE” or “TOOL”. The names can be confusing because the design process and ideas about plugin types and categories changed over time but the values are still the same as the first categorisations. Changing this in the code is easy, but it will mean that all the plugins have to be recompiled and resigned and re-uploaded. (Default: “TOOL”) :vartype type: str :ivar platform: This value was used to make sure that the platform specific plugins could be made. Check globals class for options like globals.COMPATIBILITY_ALL, globals.COMPATIBILITY_WIN_ONLY, globals.COMPATIBILITY_MAC_ONLY :vartype platform: int :ivar stackable: This value allows the application to know if this plugin can be stacked over other plugins or not. Some plugins cannot be stacked over other plugins because of their functionality, but most plugins can be. (Default: False) :vartype stackable: bool :ivar infoImagePath: :vartype infoImagePath: :ivar iconImage: :vartype iconImage: :ivar downloadLink: :vartype downloadLink: :ivar pipes: The pipes array used to communicate between modules. :vartype pipes: pipes Array :ivar writerEvent: A Thread Event used to write the Audio data :vartype writerEvent: threads.Event :ivar audioReRoute: Value defines if the Audio will be rerouted to the speakers or not :vartype audioReRoute: bool :ivar requiresRGB: This value determines if the frame needs to return the RGB value or RGBA. If true then frames will be returned as RGBA else RGB :vartype requiredRG: bool

AddPluginToList()[source]
ObservePlatformCompatibility()[source]
audioOverlayChannel = None
audioReRoute = False
callback_posChange(instance, value)[source]
createFavoritesUI()[source]
createPluginUI()[source]
createSearchListUI()[source]
downloadPlugin(*args)[source]
getItemRating()[source]
getTotalVotes()[source]
onMouseOver(*args)[source]
pipes = []
requiresRGB = False
showPluginInfo(instance)[source]
updateLayoutPosition(*args)[source]
writerEvent = None

csengine.fileuploader module

class csengine.fileuploader.Uploader[source]

Bases: object

ENDPOINT = '/upload'
IP = '165.232.144.123'
PORT = '8000'
upload(file)[source]

csengine.globals module

@Name: Cam Engine Globals @Description: This file includes all the global variables that need

to be accessed by the application from various locations.

@Created on: Feb-2021 @Created by: Vinimay Kaul @Last Modified: 27-Feb-2021 @Last Modified by: Vinimay Kaul

class csengine.globals.ActivePlugin[source]

Bases: object

active_plugin = None
active_slide = None
static getActivePlugin()[source]
static getActiveSlide()[source]
static setActivePlugin(plugin)[source]
static setActiveSlide(slide)[source]
slideObject = None
class csengine.globals.ApplicationScreens[source]

Bases: object

AnimationsScreen = None
static GetAnimationsScreen()[source]
static GetPnSScreen()[source]
static GetSearchScreen()[source]
static GetToolsScreen()[source]
PnSScreen = None
SearchScreen = None
static SetAnimationsScreen(anims)[source]
static SetPnSScreen(pns)[source]
static SetSearchScreen(search)[source]
static SetToolsScreen(tools)[source]
ToolsScreen = None
class csengine.globals.CEEnvironment[source]

Bases: object

AppDataFolder = WindowsPath('.')
static GetAppDataFolder()[source]
static GetAppFolder()[source]
static GetFullPluginsPath()[source]
static GetPluginFolder()[source]
KEY_STORE = ''
static SetAppDataFolder(path)[source]
TEST_MODE_ACTIVE = False

csengine.overlay module

csengine.pluginbase module

Module: csengine/pluginbase.py

This module contains the Basic Plugin Class that needs to be inherited by all Plugins.

class csengine.pluginbase.PluginBase(**kwargs)[source]

Bases: object

This is the base class for all plugins that need to be made for CamSkool application. All plugins need to inherit this class and overwrite the following functions:

  • modifyController() - Override this function in subclass to modify the controller UI. If not overridden it will show an emtpy controller. Use self.controllerCanvas.add_widget(YOUR MAIN WIDGET HERE)

  • getFrame() - This function is called every Frame. Override this function to change the frame t be shown

  • dropFrame() - This function is called in case another frame is still being processes - so we drop one frame to hold the framerate

  • play() - This function is called immediately after the Controller is created and made visible. Add any code in the function override that needs to run when the controller is visible.

  • stop() - This function is called when the controller is closed and the confirm dialog is also YES

  • preload() - Override this function to put anything that needs to be completed before the plugin opens.

Variables:
  • normalBG (str) – The path to the Background Image to be shown as a thumbnail in CamSkool for the plugin. (Default: “”)

  • downBG (str) – The path to the MouseOver Image to be shown when the user mouseovers the thumbnail. (Default: “”)

  • controllerBG (str) – The path to the Background Image to be shown in the plugin’s controller. (Default: “”)

  • name (str) – The name of the Plygin as shown in the application. (Default: “Sample Plugin”)

  • description (str) – The short description of the plugin that will be used in the app. (Default: “No Information available.”)

  • tags_raw (str) – The tags for the plugin that will be used in search. (Default: “plugin,camskool,untagged”)

  • plugin_path (str) – The path where the plugin will be installed or found. This path should always be CEEnvironment.GetFullPluginsPath() / plugin_name, unless you specifically want to install the plugin at a different location.

  • type (str) – This value defines where the plugin will show up in the app. The type of plugin decides wehre it shows. The values have to be “ANIM”, “IMAGE” or “TOOL”. The names can be confusing because the design process and ideas about plugin types and categories changed over time but the values are still the same as the first categorisations. Changing this in the code is easy, but it will mean that all the plugins have to be recompiled and resigned and re-uploaded. (Default: “TOOL”)

  • platform (int) – This value was used to make sure that the platform specific plugins could be made. Check globals class for options like globals.COMPATIBILITY_ALL, globals.COMPATIBILITY_WIN_ONLY, globals.COMPATIBILITY_MAC_ONLY

  • stackable (bool) – This value allows the application to know if this plugin can be stacked over other plugins or not. Some plugins cannot be stacked over other plugins because of their functionality, but most plugins can be. (Default: False)

  • infoImagePath (str) – This is the relative path for the Plugin Info Image.

  • iconImage (str) – This is the relative path for the Plugin’s icon image.

  • downloadLink (str) – This is the url for this plugin’s download link in the store.

AddPluginToList()[source]
ObservePlatformCompatibility()[source]
accept()[source]
activatePlugin()[source]
addRemoveFavorites(instance)[source]
applyAudioChannelGain(gain)[source]
applyAudioMainGain(gain)[source]
audioMonitorToggle(*args)[source]
audioOverlayChannel = None
audioReRoute = False
callback_posChange(instance, value)[source]

This function is deprecated and will be removed in a future version since it is no longer required.

closeController(*args)[source]
closeLoader(*args)[source]
createAudioInput()[source]
createAudioOutput(bufferSize=None)[source]
createFavoritesUI()[source]

Creates Favorites List. Not functional as of now

createMenuButtons()[source]
createPluginUI()[source]
createSearchListUI()[source]

The function that creates the UI for the plugin in the Search Window. This is different from the main screen list of plugins. You can add/delete/modify anything on the plugin Search UI here.

deactivatePlugin()[source]
disconnectAudioPort(pipe)[source]
dropFrame()[source]

This function is called in case another frame is still being processes - so we drop one frame to hold the frame rate

Returns:

void

getAudio(chunk)[source]
getFrame(cam_frame)[source]

This function is called every Frame. Override this function to change the frame to be returned every time the Video Engine calls this function.

Modify the frame by using openCV functions or pre-made function ins csengine.easycv.py and return the modified frame.

Returns:

Returns the modified frame.

Return type:

numpy.array image

getItemRating()[source]

This function is called to fetch the plugin item’s rating information. This is currently hardcoded as no online rating system is available on the CamSkool website.

Returns:

A rating value

Return type:

float

getTotalVotes()[source]

This function is called to fetch the plugin item’s votes information. This is currently hardcoded as no online voting system is available on the CamSkool website.

Returns:

A voting value

Return type:

int

isPreloadComplete(dt)[source]
minimizeController(controller, animate=True)[source]
modifyController()[source]

Override this function in the child plugin class to modify how the controller looks. You can change the look and feel of the controller, add controls and functionality in this function.

Returns:

Returns the Kivy Parent Layout for the controller. Add controls and Listeners to the Plugin Controller and return the parent Layout.

Return type:

kivy.uix.gridlayout

onAudioMonitorReady(connected)[source]
onMouseOver(*args)[source]

This function is called whenever there is a Mouseover detected on the thumbnail of the plugin on the Plugin List Screens of CamSkool. Whatever changed need to be made to the plugin Thumbnail on mouseover need to be added here.

openPlugin(*args)[source]

This function is called when the user clicks the “Open” button of the plugin or opens the plugin from anywhere. This function then adds the current plugin to the current stack in the current classroom.

Returns:

void

pipes = []
play()[source]

This function is called immediately after the Controller is created and made visible. Add any code in the function override that needs to run when the controller is visible. This is called whenever the plugin is loaded or initialized.

Returns:

void

playAudioFile(filepath, *args)[source]
pluginDismiss()[source]
preload()[source]

Override this function to put anything that needs to be completed before the plugin opens.

Returns:

void

registerAudioLevelCallbacks()[source]
reject()[source]
requiresRGB = False
restoreController(animate=True)[source]
restoreWindowSize()[source]

This function when called restores the window size from whatever the current window size is to the original window size with an animation

return: void

setWindowSize(x, y)[source]

Call this function to resize the application window to the desired size with animation.

Parameters:
  • x (int) – The new desired width

  • y (int) – The new desired height

Returns:

void

showController(*args)[source]
showPluginInfo(instance)[source]

This function is called when the user clicks on the Info button. This function will then show a popup box with all the relevant information.

Parameters:

instance (PluginBase) – The instance of the current PluginBase class

Returns:

void

startPreload(*args)[source]
stop()[source]

This function is called when the controller is closed and the confirm dialog is also YES

Returns:

void

updateLayoutPosition(*args)[source]

Call back function for UI updates

writeAudioOverlay(chunk)[source]
writerEvent = None

csengine.slides module

class csengine.slides.Slides[source]

Bases: object

addPluginToActiveStack(pluginObject)[source]
addSlide()[source]
initAudio()[source]
inputAudioChannel = None
makeNewInstance(pluginObject)[source]
makeSelectionActive(index)[source]
overlayAudioChannels = [None, None, None]
removeSlide(index)[source]
shutdown()[source]

csengine.stack module

class csengine.stack.Stack(slides, name)[source]

Bases: object

addToStack(pluginObject)[source]
audioChannelBusy = [False, False, False]
dropFrame()[source]
getAudio(chunk)[source]
getFrame(frame)[source]
openSelectedController(index)[source]
removeFromStack(pluginObject)[source]
shutdown = False
updateStackButtons()[source]

csengine.tkinter module

class csengine.tkinter.TkinterAPI[source]

Bases: object

EM_Message = 'An Error Occured!'
EM_title = 'Error'
KiVY_CLK_INTV_FOCUSED = 0.5
KiVY_CLK_INTV_UNFOCUSED = 0.05
TkkivyClock = None
aboutScreenVisible = False
static askOKCancel(title='Information', message='This is just an Information')[source]
static askQuestion(title='Information', message='This is just an Information')[source]
static askRetryCancel(title='Information', message='This is just an Information')[source]
static askYesNo(title='Information', message='This is just an Information')[source]
static askYesNoCancel(title='Information', message='This is just an Information')[source]
changeKivyClockSpeed(focused)[source]
static closeAbout(master)[source]
color = None
fileTypes = [['All Files', '*.*']]
focus_last = True
getMaster()[source]
static pI()[source]
path = ''
runMainLoop(x)[source]
static selectColor()[source]
static selectFile(fileType)[source]
static showAboutScreen()[source]
static showErrorMessage(title='Error', message='An Error Occurred')[source]
static showInfoMessage(title='Information', message='This is just an Information')[source]
static showSplashScreen()[source]
static showWarningMessage(title='Warning', message='Warning!')[source]
startCETK()[source]
stopCETK()[source]
tkMaster = None

csengine.uix module

@Name: Cam Engine UI Elements @Description: This file includes all the reusable UI Elements or UI elements that

the plugins need to access from within the application.

@Created on: Dec-2020 @Created by: Vinimay Kaul @Last Modified: 26-Dec-2022 @Last Modified by: Vinimay Kaul

class csengine.uix.BoxLayoutX(**kwargs)[source]

Bases: BoxLayout

set_bgcolor(r, b, g, o)[source]
update_rect(*args)[source]
class csengine.uix.ControlsScreen(**kwargs)[source]

Bases: Popup

controller_popup

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

game_icon

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

game_name

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

class csengine.uix.InputTextDialog(**kwargs)[source]

Bases: ModalView

onEnter(*args)[source]
show(callback)[source]
validate(*args)[source]
class csengine.uix.ItemIcon(**kwargs)[source]

Bases: Image

makeIcon()[source]
class csengine.uix.ItemInformationBox(**kwargs)[source]

Bases: Popup

closeInfo(*args)[source]
emptyDef(*args, **kwargs)[source]
getDescKV()[source]
getInfoScrollView(itemDesc)[source]
getSeparator()[source]
getStarImage(value)[source]
makeRatingStars(value)[source]
onOpen(*args, **kwargs)[source]
show()[source]
uninstallPlugin(*args, **kwargs)[source]
class csengine.uix.LabelX(**kwargs)[source]

Bases: Label

set_bgcolor(r, b, g, o)[source]
update_rect(*args)[source]
class csengine.uix.LoginScreen(**kwargs)[source]

Bases: Screen

on_kv_post(base_widget)[source]
class csengine.uix.MainScreen(sm=None, **kwargs)[source]

Bases: Screen

screen_manager

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

class csengine.uix.MenuScreen(**kw)[source]

Bases: Screen

static LoadAllPlugins()[source]
static RefreshPlugins(refresh=False)[source]
help_btn

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

help_btn_D

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

on_enter()[source]
play_btn

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

play_btn_D

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

rewards_btn

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

rewards_btn_D

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

search_btn

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

search_btn_D

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

settings_btn

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

settings_btn_D

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

showUpcoming(item)[source]
sidebarMenuGL

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

stackButtonClicked(instance, index)[source]
tools_btn

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

tools_btn_D

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

class csengine.uix.Notification(*args, **kwargs)[source]

Bases: FloatLayout

autoClose(*args)[source]
closeNotification(*args)[source]
messageLabel

StringProperty(defaultvalue=u’’, **kw) Property that represents a string value.

Parameters:
defaultvalue: string, defaults to ‘’

Specifies the default value of the property.

notiLayout

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

notify(text, auto_close=True)[source]
resetNotification(*args)[source]
class csengine.uix.PopUpOK(**kwargs)[source]

Bases: Popup

closePop(*args)[source]
show()[source]
class csengine.uix.PopUpYESNO(**kwargs)[source]

Bases: Popup

emptyDef(*args)[source]
onNoClicked(instance)[source]
onYesClicked(instance)[source]
show()[source]
class csengine.uix.RPCustomMessagePopup(**kwargs)[source]

Bases: Popup

action = ''
button_caption

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

caller = None
message

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

message_popup

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

class csengine.uix.RPMessagePopup(**kwargs)[source]

Bases: Popup

caller = None
message

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

message_popup

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

class csengine.uix.RPValidatePopup(**kwargs)[source]

Bases: Popup

caller = None
message

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

validate_popup

ObjectProperty(defaultvalue=None, rebind=False, **kw) Property that represents a Python object.

Parameters:
defaultvalue: object type

Specifies the default value of the property.

rebind: bool, defaults to False

Whether kv rules using this object as an intermediate attribute in a kv rule, will update the bound property when this object changes.

That is the standard behavior is that if there’s a kv rule text: self.a.b.c.d, where a, b, and c are properties with rebind False and d is a StringProperty. Then when the rule is applied, text becomes bound only to d. If a, b, or c change, text still remains bound to d. Furthermore, if any of them were None when the rule was initially evaluated, e.g. b was None; then text is bound to b and will not become bound to d even when b is changed to not be None.

By setting rebind to True, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, whenever b changes or becomes not None if it was None before, text is evaluated again and becomes rebound to d. The overall result is that text is now bound to all the properties among a, b, or c that have rebind set to True.

**kwargs: a list of keyword arguments
baseclass

If kwargs includes a baseclass argument, this value will be used for validation: isinstance(value, kwargs[‘baseclass’]).

Warning

To mark the property as changed, you must reassign a new python object.

Changed in version 1.9.0: rebind has been introduced.

Changed in version 1.7.0: baseclass parameter added.

class csengine.uix.RewardsScreen(**kw)[source]

Bases: Screen

class csengine.uix.RoundedButton(**kwargs)[source]

Bases: Button

emptyFunction()[source]
makeFullButton()[source]
makeHalfButton()[source]
makeQuarterButton()[source]
class csengine.uix.ScatterX(**kwargs)[source]

Bases: Scatter

Init = False
apply_transform(trans, post_multiply=False, anchor=(0, 0))[source]

Transforms the scatter by applying the “trans” transformation matrix (on top of its current transformation state). The resultant matrix can be found in the transform property.

Parameters:
trans: Matrix.

Transformation matrix to be applied to the scatter widget.

anchor: tuple, defaults to (0, 0).

The point to use as the origin of the transformation (uses local widget space).

post_multiply: bool, defaults to False.

If True, the transform matrix is post multiplied (as if applied before the current transform).

Usage example:

from kivy.graphics.transformation import Matrix
mat = Matrix().scale(3, 3, 3)
scatter_instance.apply_transform(mat)
do_rotation = False

Allow rotation.

do_rotation is a BooleanProperty and defaults to True.

frameHeight = 480
frameWidth = 640
on_touch_move(touch)[source]

Receive a touch move event. The touch is in parent coordinates.

See on_touch_down() for more information.

on_touch_up(touch)[source]

Receive a touch up event. The touch is in parent coordinates.

See on_touch_down() for more information.

outOfRange = False
videoHeight = 0
videoOffsetX = 0
videoOffsetY = 0
videoWidth = 0
wOffset = (0, 0)
wSize = (0, 0)
class csengine.uix.SearchScreen(**kw)[source]

Bases: Screen

closeSearch()[source]
search(keywords)[source]
sortByWeight(item)[source]
class csengine.uix.ShowNTellScreen(**kw)[source]

Bases: Screen

class csengine.uix.ShowWaiting(**kwargs)[source]

Bases: ModalView

close()[source]
createLoader(text)[source]
show(text)[source]
class csengine.uix.SideBarMenu(**kwargs)[source]

Bases: FloatLayout

class csengine.uix.SideMenuScreen(**kw)[source]

Bases: Screen

activateTestMode(*args)[source]
reportBug(instance)[source]
showHideSideMenu()[source]
showSplashScreen()[source]
showUpcoming(item)[source]
submitReport(ipop, ti, *args)[source]
uploadBug(*args)[source]
class csengine.uix.SlideScreen(**kw)[source]

Bases: Screen

addSlide()[source]
changeButtonName(text)[source]
changeName()[source]
definiteDelete()[source]
enableButton(index)[source]
firstEnter = True
onSlideClicked(btn_Instance, index)[source]
on_enter()[source]
rebuildSlides(activeIndex)[source]
removeSlide()[source]
slideLimit = 18
stackButtonClicked(instance, index)[source]
class csengine.uix.ToolsScreen(**kw)[source]

Bases: Screen

class csengine.uix.TrackPad[source]

Bases: object

createScatter(width, height)[source]
getPosition()[source]
getSize()[source]
getWidget()[source]
scatter = None
widget = None
class csengine.uix.VUMeter(width)[source]

Bases: object

getWidget()[source]
update(val)[source]
class csengine.uix.ValidatePopup(**kwargs)[source]

Bases: Popup

csengine.utility module

@Name: Cam Engine Utilities @Description: This file includes all the Utility Classes. These are used by

the Core application as well as the Plugins.

@Created on: Feb-2021 @Created by: Vinimay Kaul @Last Modified: 17-March_2021 @Last Modified by: Vinimay Kaul

class csengine.utility.DebugUtility[source]

Bases: object

static Debug(data)[source]
static Err(data, i, console='')[source]
FORMATTER = <logging.Formatter object>
static InspectFrame()[source]
LOG_FILE = 'C:\\CSLOGS\\logs.txt'
LOG_LIFE_TIME = 3
static Log(data)[source]
static LogToFile(data, filename)[source]
static Print(data)[source]
static activatePrint(activate=True)[source]
static closeLogging()[source]
static csExceptionHook(type, value, err_traceback)[source]
debugFile = None
debugToFile = None
exc_hook = None
frozen = False
static get_console_handler()[source]
static get_file_handler(logfile)[source]
static get_logger(logger_name, level, logfile)[source]
static initLogging()[source]
log_level = 0
log_path = './'
logfile = None
printActive = False
static purgeOldLogs()[source]
stderr_buf = None
class csengine.utility.FileUtility[source]

Bases: object

static ReadAllFromFile(filepath, filename)[source]
static ReadLineNumberFromFile(filepath, filename, index)[source]
static ReadLinesFromFile(filepath, filename, amount)[source]
static SaveBinaryToFile(filepath, filename, filedata)[source]
static SaveToFile(filepath, filename, filedata, append=False)[source]
class csengine.utility.FireBaseUtility[source]

Bases: object

uploadFilefilePath(cloudFileName, localFileName)[source]
class csengine.utility.MiscUtility[source]

Bases: object

static Decrypt(data)[source]
static Encrypt(data)[source]
static SetupAppFolder()[source]
class csengine.utility.NotificationUtility[source]

Bases: object

NotificationObject = None
static notify(message, auto_close=True)[source]
static setNotificationObject(object)[source]
class csengine.utility.OSUtility[source]

Bases: object

static CreateMacPath(user, pth)[source]
static CreateWindowsPath(user, pth)[source]
Execute(path)[source]
ExecuteNonBlocking()[source]
static ExpandMacPath(user, m_path)[source]
static GetMacBundlePath()[source]
static GetPlatformID()[source]
static GetWindowsBundlePath()[source]
static InstallMacCamLib(application_path, plugin_path, pkg_path, audio_plugin_path)[source]
static MakeMacPath(folder_path)[source]
static Restart(testMode=False)[source]
static isPluginsInstalled(application_path, plugin_path, pkg_path, audio_plugin_path)[source]
class csengine.utility.PluginUtility[source]

Bases: object

static ActivatePlugins()[source]
static BrowsePlugins(ns_pkg)[source]
static GetAllPlugins(ns_pkg)[source]
static LoadFavoritesFromFile(pluginObject)[source]
Plg_Anim_List = []
Plg_Favorites = []
Plg_Img_List = []
Plg_SEffect_List = []
Plg_SearchResults = []
Plg_SearchWeights = []
Plg_Sound_List = []
Plg_Tool_List = []
static SaveFavoritesToFile()[source]
static searchAnim(searchText)[source]
static searchImage(searchText)[source]
static searchTool(searchText)[source]
static searchUtility(keywords, searchType='all')[source]
static validatePlugin(name)[source]

Module contents