Scene Updater

Introduction

With the upcoming Cinema 4D R20, the ability to load scenes, that got saved with Cinema 4D versions older than R12, will be removed.

The plugin described herein is supposed to help users locate such scenes and, when running in a version which still has the ability to load such scenes (e.g. R19), it can convert these to a newer file format, which can then be loaded in R20 again. When doing so, no files will be overwritten, but instead it will save a new scene file with the major version of Cinema 4D appended to the filename.

Scene Updater can not guarantee converted scenes will act or produce the same results as the file did before. It only allows to convert the scene file format to a newer version that can be opened in R20. The conversion happens basically by loading the scene into a more up-to-date version of Cinema 4D and saving it under a different name. If the scene already has issues with the used Cinema 4D version, the plugin can not do anything about it.

Scene Updater can not erase files.
Scene Updater will not overwrite files (at least unless not explicitly wanted by the user).

General Workflow within Cinema 4D

General Workflow

The general workflow consists of two main steps:

  1. Importing scene files
    • Optionally filtering and selecting the results of the import
  2. Clicking the Convert button

Where to Find the Plugin
The Scene Updater plugin can be found in the Plugins menu:

Main Dialog
The main dialog looks like so:

The options dialog (the small cogwheel next to the plugin in the menu) provides the option to set the minimal version to consider scene files for conversion. By default it is set to R12 and there’s actually no need to change it for now.

Menus

File

Open file

Import a single .c4d scene file.

Open folder

Import all .c4d scene files that are in a selected directory.

Open one level of subfolders

Import all .c4d scene files that are in a given directory and one level below. This option is meant for people with a project folder, which then contains sub-directories for different projects, but who do not want to scan any backup sub-directories possibly contained in the actual project directories..

Open all subfolders

Import all .c4d scene files that are in a given directory (including all sub-directories).

It’s also possible to drag files or folders from Explorer or Finder onto this dialog in order to get them imported.

Example of a directory tree and the differences between all three options:

Open current Document

Import the currently active scene. The document needs a name, so it either got loaded (most likely, as one is looking for conversion of old scenes) or needs to be saved at least one time (which will then result in an already converted scene).

Open all opened Document

Import all open scenes. The documents need to have names, so either got loaded (most likely, as one is looking for conversion of old scenes) or need to be saved at least one time (which will then result in an already converted scene).

Content Browser

Import all items from your personal content preset library to the dialog.

While we use this plugin internally to scan our own content libraries, these are excluded in the published version. This was not done to hide anything, but to reduce the results to those relevant for a user. The content libraries delivered with R20 will not contain any old scenes anymore.

Edit

Select

Select results from import according to the mode chosen (see below), Shift modifier supported.

Deselect

Deselect results from import according to the mode chosen (see below).

Remove

Remove results according to the mode chosen (see below). The files will only be removed from the result list, it will not delete any files.

For Select, Deselect and Remove there are the following options:

All

Act on all files in the result list.

Pre R(Minimal Version)

Act on results with a version below the Minimal Version (R12 by default). Basically results which need updating.

Pre R(Minimal Version) Converted

Act on results with a version below the Minimal Version (R12 by default), but which have been already converted.

Post R(Minimal Version)

Act on results with a version above the Minimal Version (R12 by default). Results which need no conversion.

Presets

Act on results from a Content Browser library scan.

Filtering Results

In order to get a quick overview of the results of an import operation, one can easily hide certain groups of files.

Pre R(Minimal Version)

Yellow – Display results which are a version below the Minimal Version (R12 by default). Most likely results in need to be updated.

Pre R(Minimal Version) Converted

Light Green – Display results which are a version below the Minimal Version (R12 by default) and have been already converted. Probably candidates to be removed from the result list.

Post R(Minimal Version)

Green – Display results which are a version equal or above the Minimal Version (R12 by default), which don’t need to be converted. Probably candidates to be removed from the result list.

Scene Conversion

After one or multiple scene files have been imported, they are displayed in the result list, as shown below.

Scene files previously converted by this plugin will not be listed.

CheckBox

Allows to select scene files in the list. These can then later on be converted in a single step via the Convert button at the bottom of the dialog.

R6.0 (well in above screenshot)

The version of the scene file.

Convert

Save a copy of the scene file with the current version of Cinema 4D. In doing so the resulting scene file can then be loaded again in Cinema 4D R20.
The created file will get the suffix “_r(Current Version of c4d)”, so if you run the plugin in R19 and you convert a file named “test.c4d”, it will result in a file “test_r19.c4d”.
If the scene file is located in a Content Browser library, it will launch “Save Project with Assets” instead of just saving the scene file.

The result may not be identical to the original file version. Due to the long history of Cinema 4D, very old scenes might not be imported completely correct in to Cinema 4D R19. If encountering such a case, we recommend to use the plugin with an older Cinema 4D version on command line.

The resulting scene files will most likely have an increased file size.

Refresh

Refresh the status of a file. For example after modifying or saving it with another version of Cinema 4D running in parallel.

Open

Open the given scene file in Cinema 4D.

Remove

Remove the file from the result list. The file will not be deleted, just removed from the list.

Bottom of the Window

Status

Number of files in result list.
Total files [Yellow – Results that need conversion / Light Green – Results which are already converted / Green – Results which don’t need conversion]

Convert

Save a copy of all scene files selected and visible with the current version of Cinema 4D. In doing so resulting scene files can then be loaded again in Cinema 4D R20.
Created files will get the suffix “_r(Current Version of c4d)”, so if you run the plugin in R19 and you convert a file named “test.c4d”, it will result in a file “test_r19.c4d”.
If scene files are located in a Content Browser library, it will launch “Save Project with Assets” instead of just saving the scene file.

The result may not be identical to the original file version. Due to the long history of Cinema 4D, very old scenes might not be imported completely correct in to Cinema 4D R19. If encountering such a case, we recommend to use the plugin with a older Cinema 4D version on command line.

The resulting scene files will most likely have an increased file size.

General Workflow on Command Line

The general workflow from command line is pretty much the same as the one described above.
Basically one sets a file/folder to scan and it will write the result list to a file, optionally converting scene files in need.

In contrast to the UI command of this plugin, the command line can be used with version of Cinema 4D down to R14.

Command Line Options

All command line options need to be enclosed with double quotes.
Option Description
-SceneUpdater This argument needs to be the first one.
Scan file/folder specified directly next to this parameter: -SceneUpdater’FILE_OR_FOLDER_PATH’
Import options (only one possible)
-Folder
-OneLevel
-SubFolder
If path to process is a file this option is ignored.
-Folder (default behavior): Process only the content of the folder, same as described for File Menu => Open Folder
-OneLevel: Process folder and one level of sub-folders, same as described for File Menu => Open one level of subfolder
-SubFolder: Process folder and all sub-folders, same as described for File Menu => Open all subfolders
Action on files (only one possible)
-CheckConversion
-Convert
-CheckConversion (default behavior): Show result list, only, do not convert anything
-Convert: Convert files that are below R12 or actually below minimal version set in parameter -Version
-Output Write result list to a file, specified directly next to this parameter -Output ‘FILEPATH’
The output format depends on the -Json option.
If the file can’t be written for any reason, results are printed to the console.
-OverwriteOutput Allow to overwrite the result list file. If this option is not set and the result list file can not be written, results are printed to the console.
-Json The result list will be in JSON format.

Example 1

Convert all files below version 12 in {your path}/R5/010-Wasser/ (including all sub-folders), write the result list to {your path}/R5/010-Wasser/result.txt and allow to overwrite this resulting text file (in case the operation is run more than once).

“CINEMA 4D.exe” “-SceneUpdater ‘{your path}/R5/010-Wasser/’ -SubFolder -Output ‘{your path}/R5/010-Wasser/result.txt’ -OverwriteOutput -Convert”

Example 1 Output

By running the above example with Cinema 4D R15, the following will happen:

  • The scene {your path}/R5/010-Wasser/010.c4d will be converted and saved as {your path}/R5/010-Wasser/010_r15.c4d
  • Write result list to: {your path}/R5/010-Wasser/result.txt

Each line of the result list file contains the following: FILE,FILE_PATH_CONVERTED,INITIAL_FILE_VERSION

{your path}/R5/010-Wasser/010.c4d,{your path}/R5/010-Wasser/010_r15.c4d,6.21<br>
{your path}/R5/010-Wasser/R6/cineyes.c4d,False,15.21<br>
{your path}/R5/010-Wasser/R6/Sch_del/lebka_r6.c4d,False,6.0

Note on line 2: FILE_PATH_CONVERTED is False since the file does not need to be converted (minimal version is default R12).
Note on line 3: FILE_PATH_CONVERTED is False while the version actually indicates, that it should have been converted. An error occurred, check file permissions and available disk space.

Example 2

Just check for files below version 12 in {your path}/R5/010-Wasser/ (including all sub-folders), write the result list to {your path}/R5/010-Wasser/result.json and allow to overwrite this file (in case the operation is run more than once).

“CINEMA 4D.exe” “-SceneUpdater ‘{your path}/R5/010-Wasser/’ -SubFolder -Output ‘{your path}/R5/010-Wasser/result.json’ -Json -OverwriteOutput”

Example 2 Output

By running the above example with Cinema 4D R15, the following will happen:

  • Write result list in JSON file format to: {your path}/R5/010-Wasser/result.json
  • No scene files will be converted (as -Convert option is not set)

Note, comments in the JSON file below got added manually for explanatory purposes.

[
    {   # This file got converted
        "path": "<your path>\\R5\\010-Wasser\\010.c4d",
        "convertedPath": "<your path>\\R5\\010-Wasser\\010_r15.c4d",
        "version": 5.21
    },
    {   # This file doesn't need to be converted (convertedPath set to False and version above r12)
        "path": "<your path>\\R5\\010-Wasser\\R6\\cineyes.c4d",
        "convertedPath": False,
        "version": 15.21
    },
    {   # This file needs to be converted (convertedPath set to False and version below r12), but an error occurred, check file permissions and available disk space
        "path": "<your path>\\R5\\010-Wasser\\R6\\Sch_del\\lebka_r6.c4d",
        "convertedPath": False,
        "version": 6.0
    }
]

Example 3

Convert scene files below version 12 in {your path}/R5/010-Wasser/ (including one level of sub-folders) and print the result in txt format to the console.

CommandLine.exe “-SceneUpdater ‘{your path}/R5/010-Wasser/’ -OneLevel -Convert”

Example 3 Output

By running the above example with Cinema 4D R15, the following will happen:

  • The scene {your path}/R5/010-Wasser/010.c4d will be converted and saved as {your path}/R5/010-Wasser/010_r15.c4d
  • The result list (same as in Example 1) is printed to the console.

Limitations

  1. Content Browser scanning is not available through command line.
  2. While loading some files a message dialog may open for example in case of missing assets from Substance module. The plugin will hang until an user interaction. There is no way for the plugin to bypass theses messages.

Requirements

For use as a Command inside of Cinema 4D user interface, Cinema 4D R19 (Windows or Mac) is required.
For use on the command line (batch mode), Cinema 4D R14 (Windows or Mac) is required.

Installation

Unzip the downloaded archive to Cinema 4D’s default plugin folder.

Download

  sceneupdater_1.0.0.zip (563.7 KiB)

Please rate this

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *