csengine package
Subpackages
Submodules
csengine.CSOverlay module
csengine.audiochannel module
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
- currentAudioFrames = 0
- currentFrame = None
- durationStr = ''
- enableAudio = True
- enableVideo = True
- filename = None
- framerate = 0
- h = 0
- hasAudio = False
- hasVideo = False
- height = 0
- isPaused = False
- isPlaying = False
- min = 0
- msec = 0
- outputStream = None
- pa = None
- pauseEvent = None
- scale = ''
- sec = 0
- shutdown = False
- syncCounter = 0
- 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
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:
objectRepresents 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
- audioOverlayChannel = None
- audioReRoute = False
- pipes = []
- requiresRGB = False
- writerEvent = None
csengine.fileuploader module
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
- slideObject = None
- class csengine.globals.ApplicationScreens[source]
Bases:
object- AnimationsScreen = None
- PnSScreen = None
- SearchScreen = None
- ToolsScreen = None
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:
objectThis 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.
- 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.
- 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.
- 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
- 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
- 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
- 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
- preload()[source]
Override this function to put anything that needs to be completed before the plugin opens.
- Returns:
void
- requiresRGB = False
- 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
- 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
- stop()[source]
This function is called when the controller is closed and the confirm dialog is also YES
- Returns:
void
- writerEvent = None
csengine.slides module
csengine.stack module
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
- color = None
- fileTypes = [['All Files', '*.*']]
- focus_last = True
- path = ''
- 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.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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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.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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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- 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.
- 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.
- 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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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.Notification(*args, **kwargs)[source]
Bases:
FloatLayout- 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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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.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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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, wherea,b, andcare properties withrebindFalseanddis aStringProperty. Then when the rule is applied,textbecomes bound only tod. Ifa,b, orcchange,textstill remains bound tod. Furthermore, if any of them wereNonewhen the rule was initially evaluated, e.g.bwasNone; thentextis bound toband will not become bound todeven whenbis changed to not beNone.By setting
rebindtoTrue, however, the rule will be re-evaluated and all the properties rebound when that intermediate property changes. E.g. in the example above, wheneverbchanges or becomes notNoneif it wasNonebefore,textis evaluated again and becomes rebound tod. The overall result is thattextis now bound to all the properties amonga,b, orcthat haverebindset toTrue.- **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.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
transformproperty.- 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).
- trans:
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_rotationis aBooleanPropertyand 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)
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- FORMATTER = <logging.Formatter object>
- LOG_FILE = 'C:\\CSLOGS\\logs.txt'
- LOG_LIFE_TIME = 3
- debugFile = None
- debugToFile = None
- exc_hook = None
- frozen = False
- log_level = 0
- log_path = './'
- logfile = None
- printActive = False
- stderr_buf = None