|
<< Click to Display Table of Contents >> Navigation: Nodes > Standard properties |
The properties in this section are available to multiple nodes, and this section is to have them documented in just one place. Nodes using them will just show the corresponding links to the property documentation here.
Lock: This property will protect the node and all its properties from involuntary modifications, as no changes will be allowed until explicitly deactivating its Lock property again. It also provides a lock icon on top of the node for easy access. It is available in most of the nodes, except python nodes and some nodes not having any properties to protect.
Bypass: Enable or disable the bypass. When it is enabled the node won't be processed, but it will pass the inputs to the outputs. This function is available for most of the nodes but not all (this is a not a Workflows generic function, each node is still responsible to select which inputs are passed to which outputs..). For example python nodes do not have it by default (see the mail node for an implementation example), and neither some switching or classifier nodes which purpose is precisely to divert traffic..
In general, for simple cases we recommend the Drag & Drop action from a file browser to define the file path properties. It works with most nodes, it is the fastest method and it avoids typing mistakes.
By default, any path properties left empty will inherit the equivalent ones from the input files. For example, if you connect an input file to an encoder task node without setting up any property then it will place the encoded file in the same folder and also using the same filename, thus only changing the extension. Or if you only set the destination Directory property then the base name will still come from the input file.
Also, a protection system is provided to avoid files overwritten with themselves, so if the input and output files have the same format (same extension) an same location an error will appear in the Validation Inspector. You can solve it either by changing the output Directory or the output Base Name.
When typing a path to a folder you should add and end slash "/" to the path. Please note that in many cases the path may not exist yet, so Workflows can't check if you have typed a file path or a folder path. Example:
If myFolder is a folder and not a regular file:
Correct path definition: /This/is/myFolder/
Ambigous path definition: /This/is/myFolder
Note for Python programmers: The node connectors pass all the above metadata to other nodes, as what it goes trough the connectors are not just the file paths but special objects including all kind of metadata obtained by previous nodes called Universal paths, (the details of this mechanism are only necessary for programmers.. )
Also check that the Name Convention of the node matches the file paths that it is expected to manage. For example, if a node will receive files made of still images with no frame numbers in their filenames you should use a name convention not containing the [frame] field in the Name Convention property (or just remove the [frame] tag if it appeared by default...)
Many path style properties accept metadata token extraction and metadata token injection, For more details about name convention please read this chapter: Name convention
In this way no metadata is lost across the whole workflow (each node can inject as much metadata as needed to the Universal Paths to be sent trough the output connectors, so all the previous metadata can be accessed by further nodes even if not contained by the passed files themselves ).
Most of the metadata being passed between nodes can be visualized with the pyPrintInputs node, which will dump it into the Script Editor panel. To better understand the Universal Paths data structures it is highly recommended to make some example workflows and then connect the pyPrintInputs node to see what is really going trough the connectors.
Example: Let's suppose we have the following exr sequence:
D:/Downloads/MyClip.0.exr
D:/Downloads/MyClip.1.exr
D:/Downloads/MyClip.2.exr
...
D:/Downloads/MyClip.1014.exr
If we load it into Mistika Workflows (for example by drag & drop) and connect the resulting node to a pyPrintInputs node, when executing the workflow we will see this Universal Path in the script editor panel, which describes all the media files belonging to the enumerated sequence and all the metadata found on their codec header, thus making it available to posterior nodes:
MyClip.exr : D:/Downloads/MyClip.exr?uniColor=uniColor:Rec709:Gamma 2 4&sequence=true&format=[path][baseName][.frame][.ext]
{'Exr Raw': {'Part 1': {'0000:Container.Bitrate:': '2382330', '0001:Container.Long Name:': 'QuickTime / MOV', '0002:Container.Name:': 'mov,mp4,m4a,3gp,3g2,mj2', '0003:Container.Programs:': '0', '0004:Container.Streams:': '2', '0005:Container.URL:': 'd:/Downloads/MyClip.MOV', '0006:Container.compatible_brands:': 'isommp41mp42', '0007:Container.creation_time:': '2023-04-26T15:46:23.000000Z', '0008:Container.major_brand:': 'mp42', '0009:Container.minor_version:': '1', '0010:Stream 0.creation_time:': '2023-04-26T15:46:23.000000Z', '0011:Stream 0.handler_name:': 'Core Media Audio', '0012:Stream 0.language:': 'und', '0013:Stream 0.vendor_id:': '[0][0][0][0]', '0014:Stream 0.clip.audio.channels:': '1', '0015:Stream 0.clip.containerData.Bitrate:': '89357', '0016:Stream 0.clip.containerData.Bits Per Sample:': '0', '0017:Stream 0.clip.containerData.Channels:': '1', '0018:Stream 0.clip.containerData.Codec Long Name:': 'AAC (Advanced Audio Coding)', '0019:Stream 0.clip.containerData.Codec Name:': 'aac', '0020:Stream 0.clip.containerData.Codec Type:': 'audio', '0021:Stream 0.clip.containerData.FourCC:': '1630826605', '0022:Stream 0.clip.containerData.Profile:': 'LC', '0023:Stream 0.clip.containerData.Sample Rate:': '44100', '0024:Stream 0.clip.containerData.contaner:': 'avFormat', '0025:Stream 0.clip.image.codec:': 'EXR.EXR_DWA_RGB', '0026:Stream 1.creation_time:': '2023-04-26T15:46:23.000000Z', '0027:Stream 1.handler_name:': 'Core Media Video', '0028:Stream 1.language:': 'und', '0029:Stream 1.vendor_id:': '[0][0][0][0]', '0030:Stream 1.clip.containerData.Bitrate:': '2288027', '0031:Stream 1.clip.containerData.Bits Per Component:': '8', '0032:Stream 1.clip.containerData.Bits Per Sample:': '24', '0033:Stream 1.clip.containerData.Codec Long Name:': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', '0034:Stream 1.clip.containerData.Codec Name:': 'h264', '0035:Stream 1.clip.containerData.Codec Type:': 'video', '0036:Stream 1.clip.containerData.Fields Order:': '1', '0037:Stream 1.clip.containerData.FourCC:': '828601953', '0038:Stream 1.clip.containerData.Level:': '31', '0039:Stream 1.clip.containerData.Pixel Format:': 'yuv420p', '0040:Stream 1.clip.containerData.Profile:': 'High', '0041:Stream 1.clip.containerData.b-frames:': '\x01', '0042:Stream 1.clip.containerData.contaner:': 'avFormat', '0043:Stream 1.clip.image.codec:': 'EXR.EXR_DWA_RGB', '0044:clip.endFrame:': 1014, '0045:clip.fps:': '25.00', '0046:clip.frames:': 1015, '0047:clip.startFrame:': '0', '0048:clip.tapeName:': 'MyClip', '0049:clip.timeCode:': '00:00:00:00', '0050:clip.audio.bitDepth:': 'Float', '0051:clip.audio.channels:': '1', '0052:clip.audio.sampleRate:': '44100', '0053:clip.image.aspectRatio:': '1.78', '0054:clip.image.codec:': 'ff:QuickTime / MOV:h264 (avc1)', '0055:clip.image.format:': 7, '0056:clip.image.pixelAspectRatio:': '1', '0057:clip.image.rotation:': '-90', '0058:clip.image.resolution.resolution:': '1280x720', '0059:clip.image.resolution.resolutionX:': 1280, '0060:clip.image.resolution.resolutionY:': 720, '0061:file.created:': '2023-04-26T18:14:58.000', '0062:file.modified:': '2023-04-26T18:15:00.000', '0063:file.name:': 'MyClip.[0-1015].exr', '0064:file.path:': 'd:/Downloads', '0065:file.size:': '12090329', '0066:render.material:': 'D:/tmp/', '0067:render.project:': 'copotato', '0068:sourcesGroup.Input0.name:': 'MyClip.MOV', '0069:sourcesGroup.Input0.path:': 'd:/Downloads/', '0070:uniColor.colorSource:': 'uniColor', '0071:uniColor.gamma:': 'Gamma 2 4', '0072:uniColor.gamut:': 'Rec709', 'channels': {'channels0': 'B', 'channels1': 'G', 'channels2': 'R'}, 'dwaCompressionLevel': 45.0, 'framesPerSecond': Rational (C++ object at: 0x000000018A89F110), 'pixelAspectRatio': 1.0, 'screenWindowWidth': 1.0, 'type': 'scanlineimage'}}, 'clip': {'audio': {'bitDepth': 'Float', 'channels': None, 'sampleRate': '44100'}, 'comment': '#ChannelsList(B:G:R)', 'endFrame': 1014, 'fps': '25.00', 'frameNrOffset': 0, 'frames': 1015, 'image': {'aspectRatio': '1.78', 'codec': 'ff:QuickTime / MOV:h264 (avc1)', 'format': 7, 'pixelAspectRatio': 1.0, 'resolution': {'resolution': '1280x720', 'resolutionX': 1280, 'resolutionY': 720}, 'rotation': '-90'}, 'startFrame': '0', 'tapeName': 'MyClip', 'timeCode': '00:00:00:00@25.000000'}, 'file': {'created': '2023-04-26T18:14:58.000', 'modified': '2023-04-26T18:15:00.000', 'name': 'MyClip.0.exr', 'path': 'D:/Downloads', 'size': '12090329', 'sourceFile': 'D:/Downloads/MyClip.0.exr'}, 'render': {'material': 'D:/tmp/', 'project': 'copotato'}, 'uniColor': {'colorSource': 'uniColor', 'gamma': 'Gamma 2 4', 'gamut': 'Rec709'}}
Note that you can also inject custom metadata by using specialized nodes, such as the CSVtoUPmetadata, SetUPmetadata, etc.
Python programmers can find the reference guide in CuniversalPath class in the Mistika Python extension library., and some introductory examples in Python scripting tools. (in fact, the pyPrintInputs node is a python node itself, with its source code provided in its code property).
Another important aspect is that, even if the UPs can travel trough alternative branches of the nodegraph, the fact is that all the nodes of the workflow are always executed, even when their input connectors are empty (not receiving any Universal Paths because they went trough alternate routes). So when you build your own python nodes it is important to define what they do when not receiving any Universal Path, because their process method will be executed anyway.
Some megapack format currently supported in Mistika Workflows are the following:
Content metadata: At the bottom of the properties panel of many input nodes there is a comprehensive list with useful information found in the file embedded metadata, typically used to access image settings or camera settings. This metadata can be also used in posterior nodes of the Workflow as part of the definition of new paths, file names, or sidecar metadata files. An example of use is available in this video about metadata tokens
Debayer (From File, Custom): This pulldown menu allows to use the debayer options to change the image extraction settings from the raw format ("Custom") or to keep those settings as they were configured in the camera ("From File")
Include Subfolders (also known as Recursive): When active, this property imports all the files that are included in any subfolders of the selected path, and not ortherwise
Include: You can determine the type of files with which Watcher will react according to their name or extension. In case of writing *. * it will be activated with any name and file extension.
File Name Only: When enabled, the Include and Exclude filters are matched against the file name only, ignoring the folder path.
Filter Mode: How to parse the include / exclude properties for matching filenames.
Text: Characters are interpreted as they are. Symbols like [ or # do not have any special meaning.
Glob: Equivalent to the Glob command used on file browsers of the operating system. For example you can use ? and * for matching. Something like A*.r3d will match all r3d files starting with an "A".
Regular Expressions: Accepts regular expressions (regexp).
If you want to change the default behavior to maintain the original hierarchy then activate the Add Root property.
When a path is a folder, use that folder as the root of the created UPs. The relative tree of the files below the folder is preserved in the UPs, which is what posterior nodes use to replicate the same tree at the destination (copy / upload nodes, etc). When disabled, the files are treated as a flat list of independent paths with no common root.
[mcp]
Another node that can input files into a workflow is the "File Dropper", but that node is only intended for remote usage via the "Mistika Runner" application, to pass the paths that the user dropped into the Runner GUI.
[/mcp]
Note: An introduction to encoder nodes is available in this video: video tutorial using transcoding nodes
Note: Encoder nodes are also known as "Transcoder" nodes.
Note: Not all the properties below are available to all the encoder nodes.
Use AV Audio: If active, the audio tracks will be taken from the embedded audio of the source movie files. If deactivated, the Ext.audio input connector will be used instead (multiple Ext.audio inputs can be created by doing drag & drop from other audio sources, but note that not all codecs support it).
Existing Outputs (Overwrite, Skip if output exists, Skip if frame count matches):
Overwrite: Overwrite existing files, if any.
Skip if output exists: Skip files if they already exist (they will not be rendered).
Skip if frame count matches: Skip files if they already exist and they have the same duration.
An example case is the production of proxies as a background process (you want to create proxies for each media file, but you do not want to repeat the render if it was already made)
Enable Frame Range (First Frame, Duration): If enabled it will show a First Frame and Duration properties to define which part of the input clips will be rendered (and then passed to the next nodes).
Warning: Most formats have their own resolution limits, an error will appear at execution time if exceeded. Few formats have unlimited resolution (in particular, EXR and Mistika js are only limited by the hardware capabilities).
Pixel Aspect Ratio: When used in encoder nodes, it changes the pixelAspectRatio, that is, the shape of individual pixels: Most modern imaging formats (HD, UHD...) use square pixels 1:1, but old television formats such as PAL, NTSC, and some film other formats use rectangular pixels with other aspect ratios. This property permits to change the pixelAspectRatio when rendering new media. The image resolution will be changed at render time, compressing the image in one direction (thus reducing the number of pixels) in order to match the new pixel aspect ratio.
Nearest
Bilinear
Bicubic
7 taps
15 taps
Log Bicubic
Log 7 taps
Log 15 taps
Note: 7 taps and 15 taps (Log or not) are based on complex Fourier transformations, and they are recommended for the highest quality (they are not based on AI or any math tricks that could create artifacts, instead these modes will simulate an optical scaling. They are slower (but still real-time with modern hardware) and in most cases provide the highest quality.
The "Log" modes (Log 7 taps, Log 15 taps) will convert to logarithmic color space before appling the scaling and then back to linear. They are intended for images coming in linear gamma, as the resulting image quality of the Taps filter is significantly better when the scaling is performed in log space (but this only applies when the images are in linear gamma).
Anamorphic: It will apply a non proportional scaling of the image, stretching or shrinking it by a different factor on each axis as necessary in order to match the new resolution
The next two properties are only used during retiming operations, so they will only appear when selecting a Framerate value different than "From Input":
Trim if TC is odd: If the resulting TC out after the retiming operation is odd then it will apply a one-frame trimming at the end to make it even. This is a typical requirement from broadcasters to ensure proper syncing (interlaced material should have an even number of frames, conversions between 29,97 and 25 need to discard one frame, and so on).
Interlaced: Indicates if the new media to be produced needs to be Interlaced or not, thus determining the render and encoding process accordingly:
No. Render by frames. To produce progressive (or segmented frame) formats.
PAL: Interlaced, upper field first.
NTSC: Interlaced, lower field first
From Input: Keep it as the input media.
(Note that in this property the PAL / NTSC labels only indicate the field dominance, not the resolution or frame rate)
Deinterlace mode: If the original media was interlaced and it needs to be deinterlaced (if you set Interlaced = No ) then you can select the de-interlacing algorithm here.
Auto: It works in combination with the Interlaced property. If the input clip is interlaced and the Interlaced property is set to From Input then it will not deinterlace the clip. And if it is set to PAL or NTSC then it applies a YADIF deinterlacing (although this can change over the time depending on the effects combination and further development progress).
Yadif: Deinterlace using the YADIF algorithm. Good quality and fast, currently considered the best general purpose deinterlacing algorithm in the industry, so it is a reproduce-able standard in other systems.
Mistika AI: It uses AI to regenerate odd or even lines as needed. It can achieve higher quality than YADIF but it is slower. It is based on Mistika own machine learning, so it is not a reproduce-able standard in other systems.
First Frame From: When rendering to enumerated sequences it defines the first frame number to be used in their file names.
From Input: Same frame number as the source frame being transcoded.
From TC: Set the frame number based on the time code of the source clip and its frame rate. Logically this only works if the image format contains time code information, which should not be taken for granted.
Custom: A new property First Frame Nmber will appear, where the user can define this number.
Stereo Mode: Selects the stereo-3D format to be used by an encoder node when rendering Stereo 3D images. For this to work the input media needs to receive an stereo aware effect before reaching the encoder node (otherwise it will fail to understand the media format correctly). Example:
MediaMovie (For example, a Canon SBS 180 sequence) -> Apply Mesh -> ProRes
In this particular example, the Apply Mesh node works with VR180 Stereo3D content and it will inject the necessary stereo metadata to the Universal Path being sent. Then the ProRes node -> Stereo Mode property can be set to your preferred output format (Left Eye, Right Eye, Side By Side 180, etc ...) and it will render according to your selected mode.
Many encoder nodes (but not all) support multitrack audio, by connecting multiple audio files via additional Ext. Audio input connectors (you can create additional Ext. Audio connectors via drag & drop the audio outputs of other nodes into the encoder node).
Note that old audio codecs such as wav are very compatible with other applications but do not support very long file sizes. If you need to encode long audio clips use more modern formats such as w64.
Pack Audio Tracks: When rendering files with audio, pack all the audio channels into a same audio track, rather than using one audio track per audio channel.
Write RND Only: The node will save a Mistika render job ( .rnd script file) , but it will not render it. This property is available to most encoder nodes.
Note that the encoder nodes not only transcode media files, while doing so they also render all the effects injected by other nodes upstream (color trasnformations, compositing, denoise, vr stitching, and so on), so in most cases the encoder nodes are the "render" point of a complex workflow, and they are the nodes that take most of the processing time.
By default, the .rnd files are saved in the SGO Data/Projects/PDEFAULT/DATA/RENDER/WORKFLOWS folder. But the encoder nodes with this capability have a rnd connector, which for example you can connect to a copy node to send the .rnd file elsewhere.
In general, activating the Write RND Only property is useful in these cases:
- When you want to execute the render process at a later stage (for example, when you plan to pass the .rnd file to a MistikaRender node to execute the render process). Alternatively, you can render a .rnd file with this command line:
Path To your Workflows installation/workflows -r PathToRndFile
- When you plan to submit the .rnd render jobs to an independent render farm (for example, by copying the .rnd files to a Mistika Ultima BatchManager queue folder)
- For the particular case of Mistika Boutique users, you can also use this feature when you plan to conform against .rnd files (in this way you could use Workflows to pre-apply certain effects in a per clip basis (LUTs, color transformations, compositions...), and then conform an EDL files against those .rnd files, all in a non destructive manner (no render is done).
Apart from that, note that Mistika Boutique (and Mistika Ultima) can also render these .rnd files via the "mistika -r PathToRnd" command line (for example to render them with Mistika Ultima Batch Manager). Although using workflows -r is more recommended in general for full compatibility, ensuring that you are using the same software version that created those .rnd files)
METADATA PROPERTIES
Here you can find a tutorial about Metadata Management in Mistika Workflows:
The exact metadata fields will depend on the capabilities of each previous node, some nodes can extract a lot of embedded metadata from their media files, while other nodes are more limited (or the additional metadata may not even exist in the original codec...).
Source Tape Name: The TapeName metadata field that comes embedded inside the internal header of the original source media file (if any). It is also the "name" field that you will see in the metadata properties when you import a media file into Mistika Workflows, and it does not need to match the file-name at all (although it happens quite often)
Source File Name: The file-name of the original media file.
Render File Name: The new file-name that will be created for the rendered File (which can be redefined according to the current Name Convention ).
Export Metadata -> Export CDL: When CDL metadata is passed to a node having this property active, it will create a sidecar .cc file (color primaries information) alongside with the rendered files, according to the ASC CDL standard.
Example:
Let's say that you import a sequence in this style:
Clipname.1000.dpx
Clipname.1001.dpx
Clipname.1002.dpx
...
which is then passed to a Conform Filter node that is given an EDL containing CDL information. Then if you activate Export CDL in a posterior EXR encoder node (for example) it will create a file named Clipname.exr.cc containing the CDL metadata, on the same folder as the destination media. So you will end with content like this in the destination folder:
Clipname.1000.exr
Clipname.1001.exr
Clipname.1002.exr
Clipname.exr.cc
It also works the other way automatically: If you import said exr sequence and a Clipname.exr.cc file is found in the same folder then its CDL metadata will be available on posterior nodes, for example to be used by Export CDL on posterior encoder nodes.
IMPORTANT NOTE: For the color spaces conversion to work, the workflow will also need to know the original color space of the input clip which has to specified in the Color Space properties of the input clip. In some cases the input clip node will set correct values for these properties automatically, but in other cases it has to be set by the user manually (for example by using the tag ColorSpace). See gamma, gamut below for more details.
You can select "Undefined" (in some nodes or "From input in another nodes) to keep default settings coming with the file or to select any other alternative from the list.
In the case of input nodes, what you select in these properties is just the color space of the original extraction, and this metadata information is then passed to task node encoders which have the option to convert to other color spaces (for example by using the Unicolor property). But logically this conversion will only work properly if the original color space was accurately defined in the previous nodes.
The drop-down menu allows to select the possible values, but the default behavior is to simply pass-through the available metadata settings coming with the original files (if they are defined). But sometimes that metadata is undefined or unsupported by the input decoder nodes, so you can use these properties to declare them explicitly. If you see unexpected colors in the final images then you may need to use the Gamma and Gamut properties to declare their specific values at import time.
In some cases both parameters can have a reduced number of options depending on the nature of the node.
Some input nodes like Watcher and Folder are color agnostic because they need to permit to import heterogeneous files, so they do not permit to set these properties. For these cases you can use the tagColorSpace task node. You will also need to use it for image formats coming wihout this information (or if Mistika Workflows can't find it)
Here you have a video tutorial about Color management in Mistika Workflows
Display filters are .dfilt files stored in the SGO AppData/shared/display_filters folder. They have the same effect as if you apply them in Mistika Ultima & Boutique as display filters of "render" type.
A display filter is not limited to use the media files passed to a node, but it can also reference its own image clips. If a display filter was created using several image layers the Set DisplayFilter files node permits to substitute those images at execution time, just before using the display filter in another node.
If the display filter contains a Mistika multilayer effect (such as Mistika Comp3D) and the node is left in "From Input" state then the files coming from the input connectors will be used. This permits to apply complex composites without knowing the file paths in advance.
EXAMPLE: The following example explains how to apply a logo overlay to any incoming media file, by using a display filter:
- In Mistika Boutique use a Comp3D effect to compose the logo over an image clip (by now use any clip and logo you want, we will change it later...), add any other effects you want and create a display filter with the result. Test that it works as expected in Boutique. Just make sure the display filter is saved in the shared/display_filters folder as usual.
- Now open Mistika Workflows and connect a Watcher node to an encoder task node of the desired type (for example a ProRes task node), and leave its file path as "From Input"
- In the Display Filter property of the encoder node select the display filter that you have created in Mistika Boutique.
- Add the workflow to the queue. From this point every time that a media file appears in the Watcher folder the logo will be composed as an overlay on top of the input media as part of the encoder execution (this method is optimal to maintain the best quality, as both the compositing and the transcoding will happen at the same time, thus avoiding two generations of compression). The files passed trough its input connector are automatically assigned as layer1 of the display filter (background of the composition)
If you also want to change the logo image then you can add an independent flow for this (an independent "island" in the same workflow) :
- create a SetDisplayFilterFiles node, and select the same display filter as in the above exampe
- connect a node containing the new logo to the SetDisplayFilterFiles node. This node will modify the display filter at execution time, so that it will use the new file path (you could also redirect the result to a new display filter file if you want, but it is not necessary for this example).
- connect the rank connector of the SetDisplayFilterFiles node to the encoder node (ProRes in the above example), to ensure the SetDisplayFilterFiles branch of the workflow is executed first. (do not connect the SetDisplayFilterFiles output to the encoder node input, only the rank link must be connected. The rank link will just establish the execution order (modifying the display filter before using it in the encoder node)
Burn In, Slate: Superimpose the two different types of metadata information as image overlays (Slate and Burn In).
They use .json templates created with the Workflows Slate tool (check its documentation for more details).
The Burn In property permits to select a template, while the Slate property permits to specify a Head Slate Template and a Tail Slate Template, also including some typical presets.
Example:
File name (without time stamp): sample1.mp4
New file name (with Add TimeStamp activated): sample1-1779295861036.mp4
Render Farm: Enable or disable the external render farm (if selected. Render managers from 3rd parties such as AWS Deadline10 can be selected in the preferences ). When it is active, the node will submit a .rnd render job to the selected render farm to process the render externally.
The active render farm type can be selected in File->Preferences>renderFarm
3rd party render managers are documented in their own manuals and not here.
Warning: After following the below procedure and saving the workflows file, the new
.mwf file will contain your credentials and long term token. Anyone having access to the .mwf file can use the associated google services of your account.
For more safety or if not sure, we recommend creating a dedicated google account for your workflows, rather than using personal accounts.
For more details, read the Python scripting tools chapter
This node just copies the input to the path defined in the property dstFile and sends it to the output for the next node.
Code:
from shutil import copyfile
def init(self): # initialization function to create in/out connectors and properties (attributes)
self.addConnector("in",1,1) # 1=input. 1=mandatory
self.addConnector("out",2,0) # 2=output. 0=optional
self.addProperty('dstFile')
return True # successful initialization
def isReady(self): # check if the node can be processed. in this example, dstFile needs to be defined
ifself.dstFile!='':
return self.critical('myErrorID','dstFile can not be empty')
return True
def process(self): #copy in file to dst File and set output connector)
input=self.firstConnector#("in")
output=self.firstConnectorByName("out")
copyfile(input.url(),self.dstFile)
output.setUrl(self.dstFile)
return True # performed ok (no error management in this example)
Schema:
In order to make it work correctly, you will need to create an schema file for the node properties. it should be in "SGO AppData/shared/config/schemas" and it should be something like this: (myCopy.xsd)
Note: This example is just a copy of python.xsd but adding the “dstFile” property:
<xsd:schema xmlns:sgo="http://www.sgo.es/2017/sgo.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element sgo:categoryType="categoryCollapsible" name="Python" sgo:visibility="0" sgo:sortOrder="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="objectName" type="xsd:string" sgo:visibility="0" sgo:sortOrder="0"/>
<xsd:element name="color" type="color" sgo:visibility="0" sgo:sortOrder="1"/>
<xsd:element name="dstFile" type="universalPath" sgo:visibility="0" sgo:sortOrder="2" sgo:properties="pathNameFilters('All Files (*.*)')"/>
<xsd:element name="schemaName" type="xsd:anyURI" sgo:visibility="0" sgo:sortOrder="3" sgo:properties="pathNameFilters('xsd Files (*.xsd)')"/>
<xsd:element name="code" type="textEditor" sgo:visibility="0" sgo:sortOrder="4"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
If you want to remove the code and some schema details (once the node is finished and well tested) you can also remove default lines, in the next example we have removed the source code and the scheme file, to keep it out of sight for normal users:
<xsd:schema xmlns:sgo="http://www.sgo.es/2017/sgo.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element sgo:categoryType="categoryCollapsible" name="Python" sgo:visibility="0" sgo:sortOrder="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="objectName" type="xsd:string" sgo:visibility="0" sgo:sortOrder="0"/>
<xsd:element name="color" type="color" sgo:visibility="0" sgo:sortOrder="1"/>
<xsd:element name="dstFile" type="universalPath" sgo:visibility="0" sgo:sortOrder="2" sgo:properties="pathNameFilters('All Files (*.*)')"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>