Release Notes/2021.30000/next and Palette:logger Ext: Difference between pages

From Derivative
< Release Notes‎ | 2021.30000(Difference between pages)
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
 
Line 1: Line 1:
''These are the release notes for our upcoming release. Welcome to the "insider club"!
{{ExtSummary
''
|COMPName=logger
== Build 2021.36870 - Oct xx, 2021 ==
|opFamily=COMP
 
|short=The Extension class of a logger COMP.
=== New Features ===
|long=The Extension class of a logger COMP.}}
 
{{ExtClassSummary
* TouchDesigner's graphics API is now [https://www.vulkan.org/ Vulkan], openGL has been retired. macOS uses [https://github.com/KhronosGroup/MoltenVK/ MoltenVK], a portability project allowing Vulkan to be used on top of Apple's Metal framework.
|COMPName=
* [[Vulkan]]
|class=LoggerExt
* [[Python]] - Upgrade to 3.9.5. <!-- Needs update to Python page, category page can not have experimental version-->
|short=The LoggerExt constructor drives the Logger COMP and exposes various promoted methods in addition to holding essential data to the Logger COMP instance and the logging library.
* [[OpenCV]] - Upgrade to 4.5.2.
|long=The LoggerExt constructor drives the Logger COMP and exposes various promoted methods in addition to holding essential data to the Logger COMP instance and the logging library.
* [[Text COMP]]
|empty=False}}
** document format string function formatting from Ivan
{{ExtMemberSection
* [[Geo Text COMP]]
|sectionSummary=
* [[Stype Out CHOP]]
|items={{ExtClassMember
* [[FreeD Out CHOP]]
|class=LoggerExt
* [[Audio VST CHOP]]
|name=Active
 
|type=bool
* [[ParGroup]] - A new python object that allows you to work with parameters at a higher level.
|set=1
** [[ParGroup Execute DAT]] - Similar to Parameter Execute DAT but organized around ParGroup objects.
|text=Whether the Logger COMP is currently Active or not. Should always match the <syntaxhighlight inline=True lang=python>self.ownerComp.par.Active</syntaxhighlight> value.}}
** [[ParGroup_Class]] -
{{ExtClassMember
 
|class=LoggerExt
* [[Deltacast]] support has been added, TouchDesigner supports both Deltacast PCI-e video cards and the Deltacast FLEX product line.
|name=IncludePID
* [[Ouster]] now requires version 2 firmware.
|type=bool
 
|set=1
* [[Custom Operators]] - Due to large changes in Vulkan, all Custom Operator TOPs will need to be upgraded to a newer API. The API is much cleaner to work with and powerful. Upgrading should be quick for cases other than TOPs written using OpenGL, which will need to be moved to Vulkan.
|text=Whether the Logger COMP is currently including the PID in the log messages or not. Should always be the opposite of the <syntaxhighlight inline=True lang=python>self.ownerComp.par.Addpidtofilename</syntaxhighlight> value.}}
* [[Custom Operators]] - Now supports downloading and creating many more pixel formats.
{{ExtClassMember
* [[Custom Operators]] - Custom Operator TOPs can now create 3D, 2D Array and Cube textures in CPUMem mode.
|class=LoggerExt
* [[Custom Operators]] - Custom Operator TOP can now upload to multiple color buffers, with different dimensions/resoluions/formats when in CPUMem mode.
|name=LogFileName
* [[Custom Operators]] - Can now use the CPython API to define a custom Python class for the node. This allows directly interacting with the C++ code via Python calls.
|type=str
* [[Custom Operators]] - Now supports calling Python callbacks from the C++ code.
|set=1
* [[Custom Operators]] - Classes these are based on are now put into the 'TD' namespace. Existing plugins will continue to work, but if you upgrade to the latest header files you'll likely need to add <code>using namespace TD;</code> in your code to find all the definitions when recompiling your plugin.
|text=A string representation of the full file name used by the logger handler when logging to file.}}
 
{{ExtClassMember
* [[FBX COMP]] - Added 'Texture Directory' parameter which is used as an additional search location for external texture files if they can't be found at the default location specified inside the FBX file.
|class=LoggerExt
* Pre-multiply by Alpha overhaul - Largely re-worked how TOPs and MATs deal with alpha. They all now try to generate Pre-Multiplied Alpha when generating colors, and the MATs assume incoming textures and colors are Pre-Multiplied Alpha.
|name=LogFolder
** [[Camera COMP]] / [[Light COMP]] - Background color now has option to pre-multiply by alpha. On by default for new nodes.
|type=str
** Add 'Pre-Multiply' controls for [[Fit TOP]], [[Corner Pin TOP]], [[Layout TOP]], [[Level TOP]] and [[Transform TOP]].
|set=1
* New [[SearchReplace_Dialog|Search Dialog]] that also offers Search & Replace functionality. Available globally or per component.
|text=A string representation of the full folder path were the log file is being stored. Defaults to the project folder /TDLogs folder.}}
* Panel Rendering upgrade '''*** NOTE - fill this in! ***''' - Panels no longer rendered with fixed sized textures.
{{ExtClassMember
** UI Text Rendering changed to use Slug Library and panel direct rendering.
|class=LoggerExt
 
|name=LogLevel
=== New Python ===
|type=str
 
|set=1
 
|text=A string representation of the log level currently being selected. Can be of type CRITICAL, ERROR, WARNING, DEBUG, INFO. Should always be the opposite of the <syntaxhighlight inline=True lang=python>self.ownerComp.par.Loglevel</syntaxhighlight> value.}}
* [[Camera_Class|Camera]].frameBounds() - Now returns a frame width that can be used for the Ortho Width parameter of an orthographic camera.
{{ExtClassMember
* [[COMP Class]].reload(path, password=None) - Reloads the component from the given file path. This will replace its children as well as top level parameters and update flags, node width/height, storage, comments and inputs (but keep original node x,y).
|class=LoggerExt
* [[Connector Class]].description - A description for this connection. Example: 'Color Image'
|name=Logger
* [[Dependency Class]] callbacks method
|type=logging.Logger
** A modifiable list of functions. When the Dependency object is modified, it calls each function on the list.
|set=1
** The function is called with a single argument which is a dictionary containing the following:
|text=The current logging library Logger object.}}
***'dependency'- The Dependency that was modified.
{{ExtClassMember
***'prevVal' - The previous value if available.
|class=LoggerExt
***'callback' - This callback function, which can be removed the the Dependency callbacks if needed.
|name=LoggerName
 
|type=str
* [[WebclientDAT Class]].connections - List of current HTTP connection identifiers.
|set=1
* [[WebclientDAT Class]].closeConnection(id) - Close the connection associated with the given identifier.
|text=The logger name used for the logger object initialization. In the logger object, this will also follow the dot notation based on whether the logger has any parents. It will always get updated based on <syntaxhighlight inline=True lang=python>self.ownerComp.par.Loggername</syntaxhighlight> value.}}
* [[WebclientDAT Class]].request - Added timeout keyword.
{{ExtClassMember
* [[NetworkEditor_Class|NetworkEditor]].placeOPs method accepts opType for creating node. This argument can be either a string or a type. Example: <code>ui.panes[0].placeOPs(opType='waveCHOP')</code> or <code>ui.panes[0].placeOPs(opType=waveCHOP)</code>
|class=LoggerExt
* [[tdu Class]] - Added tdu.forceCrash() to force a crash for debugging and crash recovery testing.
|name=Origin
* [[tdu Module|tdu]].tryExcept(func1, func2 or value) -> result -  Second parameter can be another callable function or a direct value.
|type=COMP
Example:
|set=1
tdu.tryExcept(lambda: 1/me.par.w, 0.0) # second argument is simply 0.0
|text=Where the logging message are originating from. This gets added to the logging messages.}}
tdu.tryExcept(lambda: 1/me.par.w, me.GetDefaultValue)  # Good:  me.GetDefaultValue not called until needed.
{{ExtClassMember
tdu.tryExcept(lambda: 1/me.par.w, me.GetDefaultValue()) # >> INCORRECT <<.  Always calls second function even if not needed.
|class=LoggerExt
* Added support to assign a list of ops to a multi-op parameter in python.
|name=LogsQueue
** calling eval() on multi-op parameters will now return a single op if there is only 1 result, a list if there are more than 1, and none if there are no results.
|type=list
* [[UI Class]].rolloverPanel returns the latest panel rolloved over. Takes into account click through, depth order, and other panel settings.
|set=1
<!--* [[Project App]].customSplashFile now specifies a custom file to load during splash. Works with Commercial or Pro licenses.
|text=A possibly empty list of tuples which represent a log level and a message. The queue can sometimes be filled if the logger object wasn't available yet when messages started being logged.}}
-->
|empty=False}}
 
{{ExtMethodSection
=== New Palette ===
|sectionSummary=
 
|items={{ExtClassMethod
* [[TDAbleton]] Components are now available individually in the palette.
|class=LoggerExt
* [[Palette:materialDesignIcons]] - New component replacing symbolPicker.
|name=ClearHandlers
<!--* [[Palette:pixelMapper]] - Initial pixelMapper experimental release.-->
|call=ClearHandlers()
* [[Palette:kantanUVHelper]] - Fixed an issue where kantanUVHelper could fill GPU Memory considerably.
|returns=
* [[Palette:presets]] / [[Palette:particlesGpu]] - Fixed an issue where custom user presets wouldn't be recalled properly.
|text=In the case that a Logger get reinitialized and an handler get duplicated, use this method to clear the handlers. A new handler should be created after calling createFileHandler or similar. This method is here as an helper to accomodate developers adding custom handlers.}}
 
{{ExtClassMethod
=== Bug Fixes and Improvements===
|class=LoggerExt
 
|name=Critical
* Upgrade to CUDA 11.2, OpenCV 4.5.2, Slug library 6.0, OpenColorIO 2.1.0, Substance SDK 8.3.0, [[Blackmagic Design]] SDK 12.2.
|call=Critical(message: str, withInfos: bool = True)
 
|returns=None
* [[Material Design Icons]] - Upgrade to 5.4.55. Include cheat-sheet in installer.
|text=Log a Critical message.
* [[Animation COMP]] - Preserve custom columns in keyframe DAT tables when editing keyframes.
* message (str): The required message to be added to the LogItem. A message can be an empty string.}}
* [[Button COMP]] / [[Slider COMP]] - Updated to use Text COMP internally and include 'Label' and 'Value' parameters.
{{ExtClassMethod
* [[List COMP]] - Improvements
|class=LoggerExt
** Fractional font sizes are now allowed. Font sizes are no longer rounded down to the nearest integer. See '''Backward Compatibility''' below.
|name=Debug
** Text offset now supports fractional floating point numbers.
|call=Debug(message: str, withInfos: bool = True)
** No longer wraps around negative indices when accessing cell attributes.
|returns=None
** str(ListCell) returns calculated text at that cell, or blank.
|text=Log a Debug message.  
** Fixed dragging onto list components when their viewer has been resized/stretched.
* message (str): The required message to be added to the LogItem. A message can be an empty string.}}
** Fixed dropping to use python defined items.
{{ExtClassMethod
** Callback DAT is now docked on the outside of the OP by default.
|class=LoggerExt
** Added support for custom fonts using Font File.
|name=Error
* [[OP Viewer COMP]] - New 'Interactive' parameter controls interaction with mouse and keyboard.
|call=Error(message: str, withInfos: bool = True)
* [[Panel Component|Panel COMP]]s - All Panel COMPs now have 'TOP Smoothness' parameter which controls background TOP's viewer smoothness settings. In previous builds of TouchDesigner, this was always 'Mipmap Pixels', so old files will load with this setting whereas the default for new Panel COMP's is 'Interpolate Pixels'.
|returns=None
* [[Panel Component|Panel COMP]] - The [[Drag-and-Drop]] callback onStartHoverGetAccept now contains information as to where the mouse entered the panel in its <code>info</code> dictionary. Key name <code>coords</code>.
|text=Log an Error message.
 
* message (str): The required message to be added to the LogItem. A message can be an empty string.}}
* [[Panel Component|Panel COMP]] - 'Allow Expansion' parameter controls whether or not parameters can be expanded to reveal expression fields.
{{ExtClassMethod
* [[GLSL MAT]] - Point Sprites must now use TDPointCoord() instead of gl_PointCoord to obtain the texture coordinates for the sprite. See '''Backwards Compatibility''' section below.
|class=LoggerExt
* [[Level TOP]] - Added 'Pre-Multiply RGB by Alpha' parameter to Post page.
|name=Info
* [[Level TOP]] - No longer clamps floating point input values by default.
|call=Info(message: str, withInfos: bool = True)
* [[Luma Level TOP]] - Fixed alpha being effected by options other than 'Opacity'.
|returns=None
* [[Null TOP]] / [[Out TOP]] - And other all other TOPs can now select their 'Viewer Smoothness' and 'Fill Mode'. Previously this was not available on 'instance-style' TOPs.
|text=Log an Info message.
* [[OpenColorIO TOP]] - Upgrade to v2.1.0
* message (str): The required message to be added to the LogItem. A message can be an empty string.}}
* [[Ouster TOP]] / [[Ouster Select TOP]] - Output now reverts to a default black texture when the active flag is disabled.
{{ExtClassMethod
* [[Ouster TOP]] / [[Ouster Select TOP]] - Added option to not display incomplete frames.
|class=LoggerExt
* [[Ouster TOP]] - Added support for signal multiplier. Requires firmware version 2.1 or greater.
|name=Log
* [[Ouster TOP]] - Fixed missing and skipped packet numbers incrementing incorrectly when using a partial azimuth window.
|call=Log(message: str, level: str, withInfos: bool = True, **logItemDict: dict) -> None
 
|returns=
* [[Substance TOP]] - Upgrade to SDK 8.3.0
|text=This is the main method called from the overrides for Info, Debug, Error, etc.
* [[Switch TOP]] - When in Blend mode, will no longer cook 2 inputs if the switch value is an integer.
    It is going through additional checks before calling the underlying methods tolog messages to file, textport, or statusbar.
* [[Text TOP]] - Added smart quotes support.
    All those additional method calls are subject to the current parameters setup ofthe logger COMP.
* [[Text TOP]] - Added support for floating point positions offsets for non-bitmap fonts.
    When a Callback DAT is added, the callback onMessageLogged() will be called,passing the logItemDict to the user.
* [[Text TOP]] - Stroke rendering now looks a bit better, but still not as good as Scalable mode.
* message (str): The required message to be added to the LogItem. A message can be an empty string.
* [[Video Device Out TOP]] - Fixed Blackmagic 10-bit RGB 4:4:4 output not working correctly.
* level (str): The required LogLevel, such as ERROR, WARNING, INFO, etc.
* [[Video Device Out TOP]] - [[AJA]] 10-bit output now works when firmware that does not support color space conversion is loaded onto the device.
* withInfos (bool): Include additional informations in log message from the stack trace. Defaults to True.
* [[Video Device Out TOP]] - Added support for 12-bit output from AJA devices.
* logItemDict (**dict): Additional keywords can be used to override the default data such as `source`, `absFrame`, `frame`}}
* [[Video Device Out TOP]] - Added support for [[Blackmagic Design]] 12-bit output.
{{ExtClassMethod
 
|class=LoggerExt
* [[Video Device Out TOP]] / [[Video Device In TOP]] - Added 'Reset Stats' pulse parameters.
|name=Warning
* [[Video Device In TOP]] - Added support for capturing 10-bit input when using firmware that does not support color space conversions.
|call=Warning(message: str, withInfos: bool = True)
* [[Video Device In TOP]] - Added support for 12-bit RGB 4:4:4 capture on [[AJA]] devices.
|returns=None
 
|text=Log a Warning message.
* [[Video Device In TOP]] - Reduce stalls that occur when the input signal format into Blackmagic devices changes.
* message (str): The required message to be added to the LogItem. A message can be an empty string.}}
* [[Video Device In TOP]] - New transfer modes for Vulkan implementation.
|empty=False}}
* [[Video Device In TOP]] - New 'signal_fps' [[Info CHOP]] channel for [[Blackmagic Design]] and [[AJA]] devices.
{{History}}
* [[ZED TOP]] - Now outputs a blank image when there is an error or no camera found.
{{#invoke:Category
* [[Joystick CHOP]] - Added active toggle.
|list
* [[MIDI In CHOP]] - Much smoother timesliced channels especially when dealing with high frequency input.
|Palette Extensions}}
* [[MIDI Out CHOP]] - Fixed issue with random values being generated when number of channels changed.
* [[Panel CHOP]] - Fixed crash when target panel deleted.
* [[Select CHOP]] - New options to filter channel names by numeric suffix.
* [[Sync In CHOP]] - Warning when project still in Realtime mode.
* [[Sync Out CHOP]] - Include client Realtime status in info.
* [[Timer CHOP]] - New parameter menu called 'Length Type' specifies Fixed or Infinite length. When set to 'Infinite' length, segments are not available.
* [[Timer CHOP]] - Fixed calling initialization when called from onSegmentExit callback.
 
* [[Examine DAT]] - Fixed missing entries with matching values but different keys.
* [[OP Execute DAT]] - Fixed onDelete() never being called.
 
* [[Parameter Execute DAT]] - Fixed failing to monitor changes when a parameter default is changed.
* Using floating point values in integer parameters (either through expressions or exports) will now round the value, instead of truncate it. See '''Backwards Compatibility''' section below.
* Added information about SDK version used by the operator. MMB on an operator or click "i" Info icon in the parameter dialog to view in the pop-up info.
** [[Kinect Azure TOP]] / [[Kinect Azure Select TOP]] / [[Kinect Azure CHOP]] - Added SDK version to the pop-up info.
** [[Nvidia Denoise TOP]] / [[Nvidia Background TOP]] / [[Face Track CHOP]] - Added SDK version to pop-up info.
* [[Preference|TOP preference]] - 'Viewer Smoothness' and 'Fill Mode' can now be controlled by a preference.
* Automatically created parameters will no longer be classified as 'custom parameters'. This applies to Parameter DAT filters, dialog options, and python access. Affects following operators: [[Custom Operators|C++/Custom Operators]] / [[Audio VST CHOP]] / [[Substance TOP]] / [[Notch TOP]]
 
<!-- Rob Bairos: Mon Oct 18 16:43
 
* Disallow dropping of built-in options onto active tile panel viewers.
  (De-activate the tile if you wish to access the operator copy/move/parm/etc drop options).
 
https://podio.com/derivativeca/osx-port/apps/bugs-rfes/items/7805
-->
 
* Added drag-drop support for json file extensions
* Fixed color picker dialog parameter UI when dealing with ranges other than 0-1.
* Added wildcard dependency to ops function search so new nodes will trigger a recook.
* Cooking optimizations, data dependency improvements, updating parameter value optimizations, extension initialization improvements.
* Fixed issue with self parameter dependency (me.X depending on me.Y) not getting updated when parameter Y is updated during cook. 
 
* Allow binding to named object attributes. Expression format is 2 tuple: (object, attribute), example: (op('box1'), 'nodeY')
* Allow binding to python None value, which return blank string or 0. Allows binding expressions to evaluate to None, without error when source not available.
* Fixed Bind expressions involving 'me.curPar'
* Fixed some issues with menu dropdown lists not updating corectly in custom parameters.
* ctrl+c now interrupts Python scripts in macOS. Try it for hangs.
* Refactoring panel layout for more efficiency and better performance.
* Reconnecting audio devices better handled by Audio CHOPs.
* Improvements to pop-up help performance and size for DATs
* toecollapse/toeexpand now support duplicate operator names in which only case changes.
 
=== Backward Compatibility ===
 
*  '''BACKWARD COMPATIBILITY''' - [[wrnchAI CHOP]] - Has now been disabled due to the company no longer selling licenses.
* '''BACKWARD COMPATIBILITY''' - Using floating point values in integer parameters (either through expressions or exports) will now round the value, instead of truncate it. This may cause different behavior for fractional values exported to menus or other integer parameters.
* '''BACKWARD COMPATIBILITY''' [[List COMP]] - Fractional font sizes are now allowed. Font sizes are no longer rounded down to the nearest integer. Example: Exporting 4.9 to an integer parameter will now be considered a value of 5, not 4.
* '''BACKWARD COMPATIBILITY''' - [[GLSL MAT]] - When working with Point Sprites, you must now use TDPointCoord() instead of gl_PointCoord to obtain the texture coordinates for the sprite.
* '''BACKWARD COMPATIBILITY''' - [[PBR MAT]] - Removed 'Mult Alpha by Light Luminance' feature, as it didn't work with the more alpha-correct-behavior of the shader now.
* '''BACKWARD COMPATIBILITY''' - The python object type for the [[Nvidia Flow Emitter COMP]] has been renamed to flowemitterCOMP from flowEmitterCOMP to be consistent with naming conventions.
* '''BACKWARD COMPATIBILITY''' - [[Light COMP]] - Removed defunct 'Shadow Mapping Projection' view type from projection menu.
* '''BACKWARD COMPATIBILITY''' - [[SVG TOP]] - Has been removed for now because the OpenGL feature it was based on does not exist in Vulkan. Please use [[Palette:webSvg]] to load SVG files in TouchDesigner.
* '''BACKWARD COMPATIBILITY''' - The tscript command 'jpeg' has been removed. The 'quality' keyword in OP.save() can be used to control JPEG quality instead.
 
Notes to clarify:
* Disallow changing the contents of an operator unless it is locked, or when executing within the onCook callback of a Script Operator.
* '''BACKWARD COMPATIBILITY''' - Lock any operators that were accessing the script methods outside the onCook callback.
 
==Known Issues==

Latest revision as of 19:08, 9 November 2023

These Extensions reference a specific Palette:logger. The Extension class of a logger COMP.


LoggerExt[edit]

The LoggerExt constructor drives the Logger COMP and exposes various promoted methods in addition to holding essential data to the Logger COMP instance and the logging library.

Members[edit]

Activebool :

Whether the Logger COMP is currently Active or not. Should always match the self.ownerComp.par.Active value.

IncludePIDbool :

Whether the Logger COMP is currently including the PID in the log messages or not. Should always be the opposite of the self.ownerComp.par.Addpidtofilename value.

LogFileNamestr :

A string representation of the full file name used by the logger handler when logging to file.

LogFolderstr :

A string representation of the full folder path were the log file is being stored. Defaults to the project folder /TDLogs folder.

LogLevelstr :

A string representation of the log level currently being selected. Can be of type CRITICAL, ERROR, WARNING, DEBUG, INFO. Should always be the opposite of the self.ownerComp.par.Loglevel value.

Loggerlogging.Logger :

The current logging library Logger object.

LoggerNamestr :

The logger name used for the logger object initialization. In the logger object, this will also follow the dot notation based on whether the logger has any parents. It will always get updated based on self.ownerComp.par.Loggername value.

OriginCOMP :

Where the logging message are originating from. This gets added to the logging messages.

LogsQueuelist :

A possibly empty list of tuples which represent a log level and a message. The queue can sometimes be filled if the logger object wasn't available yet when messages started being logged.

Methods[edit]

LoggerExt.ClearHandlers():

In the case that a Logger get reinitialized and an handler get duplicated, use this method to clear the handlers. A new handler should be created after calling createFileHandler or similar. This method is here as an helper to accomodate developers adding custom handlers.

LoggerExt.Critical(message: str, withInfos: bool = True)None:

Log a Critical message.

  • message (str): The required message to be added to the LogItem. A message can be an empty string.

LoggerExt.Debug(message: str, withInfos: bool = True)None:

Log a Debug message.

  • message (str): The required message to be added to the LogItem. A message can be an empty string.

LoggerExt.Error(message: str, withInfos: bool = True)None:

Log an Error message.

  • message (str): The required message to be added to the LogItem. A message can be an empty string.

LoggerExt.Info(message: str, withInfos: bool = True)None:

Log an Info message.

  • message (str): The required message to be added to the LogItem. A message can be an empty string.

LoggerExt.Log(message: str, level: str, withInfos: bool = True, **logItemDict: dict) -> None:

This is the main method called from the overrides for Info, Debug, Error, etc.

It is going through additional checks before calling the underlying methods tolog messages to file, textport, or statusbar. All those additional method calls are subject to the current parameters setup ofthe logger COMP. When a Callback DAT is added, the callback onMessageLogged() will be called,passing the logItemDict to the user.

  • message (str): The required message to be added to the LogItem. A message can be an empty string.
  • level (str): The required LogLevel, such as ERROR, WARNING, INFO, etc.
  • withInfos (bool): Include additional informations in log message from the stack trace. Defaults to True.
  • logItemDict (**dict): Additional keywords can be used to override the default data such as `source`, `absFrame`, `frame`

LoggerExt.Warning(message: str, withInfos: bool = True)None:

Log a Warning message.

  • message (str): The required message to be added to the LogItem. A message can be an empty string.

TouchDesigner Build: