Settings¶
smartLog offer some settings to customize it to your needs. In order to view the settings launch the smartLog main window and click the settings toggle at the bottom left:
The settings section shows up:
It contains the following elements:
- 1) Tooltips: If checked show tooltips for all major widgets. Needs a restart of Nuke to become effective.
- 2) Log interval: Update the time in the log for the current working file after that amount of seconds. Needs a restart of smartLog to become effective.
- 3) Idle after: Make the time logger idle if the mouse cursor has not moved in the session for that amount of seconds. Needs a restart of Nuke to become effective.
- 4) User: Add this user to a time log when a new time log gets created. Users can be edited for each log at any time if needed. This is just the default user to set when a new time log gets created.
- 5) Time out sound: Play this sound when the Timer window times out. Tip: You can put custom .wav files into smartLog’s sounds folder to play your own custom notification sounds. Sound is not suported in Nuke-11. Use an older or a newer version.
- 6) Log root: The root directory in which smartLog will search for logs and save logs to. Needs a restart of smartLog to become effective. You can set this root to a location that is accessible for multiple work stations like a cloud folder or server and multiple machines are then able to log into the same root directory.
- 7) Substring ignore pattern: Here you can take over full control to define which time logs get merged when clicking the merge button as shown in the merge section. Here you can define a regular expression pattern and a substitution for it. For more information about this feature have a look at the Defining custom merge patterns section.
- 8) Ignore patterns: If a working file matches any of these patterns, smartLog will not log time to it. See Working with ignore patterns for more information.
- 9) Save: Click to apply the settings. Note that some settings require a restart of smartLog or Nuke. See tooltips of each setting for more information.
Advanced¶
The following describes how to edit certain functionality of smartLog and to take over control how smartLog should behave under certain conditions. You should be familiar with regular expressions in order to edit smartLog’s behavior and customizing the features to your needs.
Defining custom merge patterns¶
The merge function lets you merge and un-merge certain working files. File naming is likely to change from company to company so we made this feature configurable. Since version 1.1, the settings section contains a text field called Substring ignore pattern which you can use to your advantage to take over full control on defining which time logs to merge. With that you can merge time logs by show, sequence, shot, task, user or any combination of these or even in a completely different way.
This is the default substitution pattern value:
(.*\/.*)(?<=[vV])([0-9]+)?([_\w]*)
\1*
Note
The substitution ignore pattern text field expects two lines:
1) The first line is the regular expression that defines all log’s working files. 2) The second line defines the substitution using a back reference as described below.
Any line starting with a #
will not be parsed. Use this to add comments
for your patterns or uncomment unused patterns. Empty lines will also not
be parsed. Use this to create separate paragraphs and increase readability.
By default, smartLog assumes working files to contain a version number and a
user abbreviation at the end of each working file as this is a common standard.
That being said, a usual working file name would be: SH0010_v001_xxx.nk
.
Depending on your environment, you would probably also append the show name and
a sequence name.
When clicking the merge button, all time logs that are associated with the
working file SH0010
get merged, meaning the version and the user
abbreviation xxx
get ignored. This is what the above substitution pattern
does.
However, we know that naming is likely differ from company to company. In addition, what if you don’t want to get time logs of multiple users merged? That is where a custom substring ignore pattern gets useful. It lets you freely define a regular expression pattern and a substitution to take over full control about which time logs should be merged. The substitution pattern gets defined using a back reference.
Let’s have a look at the default pattern that ignores version and user information by launching the regex101 link that is contained in the default substitution pattern as seen in the screenshot above:
https://regex101.com/r/osN3jm/1
regex101 is a good resource to test regular expression patterns interactively while typing.
At the top we create a pattern that contains three groups. The first group
describes the whole path up to the version information. Then we define a group
for the version information. And we define a third group which is an optional
group (by having prepended ?
) for the user abbreviation.
We can now use a back reference and substitute the path with the content of the
first group which describes everything up to the version information. The
version information itself and the user abbreviation get replaced with *. The
substitution becomes simply: \1*
Substitution pattern examples¶
Let’s see how substitution patterns change the merged result by having a look at a few examples.
Merge by version and user abbreviation
Given the following three time logs with different versions and user abbreviations …
… and applying the following substitution:
(.*\/.*)(?<=[vV])([0-9]+)?([_\w]*)
\1*
… will merge all three time logs:
Merge only version
… but using the following substitution:
(.*\/.*)(?<=[vV])([0-9]+)
\1*
… will only merge time logs from various versions while keeping the user information in two separate logs:
Merge by user
Given the following time logs from various users…
… and applying the following substitution:
(.*_)([a-z]*)
\2
… will merge time logs by users:
Merge by show and shot
Given the following time logs from various tasks from various shots …
… and applying the following substitution:
(.*\/[a-z]*)_([a-z0-9]*)(.*)
\1_\2
… will merge by show and shot by ignoring any task:
What about merging time logs for whole sequences? Or shows? Or Shows and sequences? There are hundreds of more combinations and you are free in configuring merge patterns to your needs. These are just a few examples how you can apply a custom merge substitution pattern to your advantage.
Note
Keep in mind that each smartLog always searches the absolute path of
each time log’s working file. You can use that to your advantage to either
create a pattern that describes the whole path or just the working file’s
base name. To describe the parent directory of a working file use
(.*\/)
as seen here:
https://regex101.com/r/mPMgwW/1
Please also note that smartLog does not look at the file extension. That being said, a pattern does not need to include any group that describes the file extension.
Working with ignore patterns¶
Sometimes we don’t want to time track certain working files. For example, consider quick temp files where we don’t require any version information as these are simply tiny working files without the need to use any version information. Or annotation files in NukeStudio/ Hiero. Having these time tracked would create unwanted time logs which we probably don’t want anyways. For that, we can add regular expression patterns to tell smartLog to ignore time tracking if a working file name matches a certain pattern. The setting’s Ignore patterns element as seen above was designed for that purpose. This is a text field which you can use to define regular expression patterns for working files that should be ignored.
Each line represents a regular expression pattern. You can add comments to each
pattern for better readability. Comments start with a #
symbol. That means,
each line that starts with a #
symbol will not be read by smartLog helps
you remembering what each ignore pattern’s purpose is. Empty lines get also
skipped so that you can separate patterns by empty lines to increase
readability.
By default, we have already added the following ignore content:
# Add regular expression patterns for working files that should be skipped from time logging.
# Any line starting with a '#' symbol is a comment and will be skipped. Empty lines are also skipped
# and serve increasing readability.
# Ignore time logging for file names that don't contain a version number. E.g. temp and annotation files.
# https://regex101.com/r/azKBas/1
^.((?!_[vV]\d).)*$
As described above, all lines starting with a #
symbol are comments and
will be skipped. The same applies to empty lines. So in fact, we have just
added one regular expression pattern which is located in the last line. Have
a look at the second last line which is a URL:
https://regex101.com/r/azKBas/1
If you open it in you explorer you will be directed to a live online regular expression evaluator which looks like the following:
At the top you see the pattern that we use in the settings. At the top you see
how different examples behave to this pattern. The first three lines contain
dummy working files that contain version information in their working file.
The bottom line something.nk
does not contain a version. It will be marked
blue which means it matches the pattern. That is because the regular expression
pattern will match anything where a small or capital v
followed by one or
several numbers is not contained. In other words, this pattern can be used to
ignore any working file that does not contain any version information. These
working files are usually temp- or annotation files that are not meant for
versioning up. In that case we want to ignore these.
Whenever we save or open any working file that does matches any ignore pattern, smartLog will not log any time to it, will not create any time log at all for it and thus will not show it in the smartLog main window as there will simply nothing be recorded for that working file.
If a working file matches an ignore pattern, we will also see this information in the terminal: