Cinema 4D Shotgun toolkit base on Diego Garcia Huerta Clarisse Shotgun toolkit.
Implementation of a shotgun toolkit engine for Cinema 4D. This engine is based on the tk-clarisse engine adapted to Cinema 4D. It supports the classic boostrap startup methodology and integrates with cinema adding a shotgun menu in it's menu bar.
- Engine Installation
- Configuring your project for Shotgun Toolkit
- Modifying the toolkit configuration files to add this engine and related apps
- Modifying the Templates
- Add additional App into Engine
- Configuring Cinema 4D in the software launcher
- Caching and downloading the engine into disk
With the engine, hooks for most of the standard tk application are provided:
- tk-multi-workfiles2
- tk-multi-snapshot
- tk-multi-loader2
- tk-multi-publish2
- tk-multi-breakdown
- tk-multi-setframerange ( see notes below as this is a fork from the original shotgun repository to allow having hooks per engine, as the original one has support only for certain applications)
(Also included a hook that allows to take a thumbnail of cinema window, useful for configuring tk-multi-snapshot for example.)
Note: This engine has been tested in Windows using Cinema 4D R20
When I started using shotgun toolkit, I found quite challenging figuring out how to install and configure a new tk application or a new engine. Shotgun Software provides extensive documentation on how to do this, but I used the get lost in details, specially with so many configuration files to modify.
If you are familiar with how to setup an engine and apps, you might want to skip the rest of this document, just make sure to check the templates and additions to the configs that might give you a good start.
If you are new to shotgun toolkit, I recommend you to read at least the following shotgun articles, so you get familiar with how the configuration files are setup, and the terminology used:
Here are detailed instructions on how to make this engine work assuming you use a standard shotgun toolkit installation and have downloaded shotgun desktop.
Shotgun Desktop Download Instructions
If you haven't done it yet, make sure you have gone through the basic steps to configure your project to use shotgun toolkit, this can be done in shotgun desktop app, by:
-
enter into the project clicking it's icon
-
click on the user icon to show more options (bottom right)
-
click on Advanced project setup
- Select a configuration: "Shotgun Default" or pick an existing project that you have already setup pages and filters for.
- Select a Shotgun Configuration: select "default" which will download the standard templates/configuration from shotgun. (this documentation is written assuming you have this configuration)
- Define Storages: Make sure you name your first storage "primary", and a choose a primary folder where all the 'jobs' will be stored, in this case "D:\demo\jobs" for illustrative purposes.
- Project Folder Name: This is the name of the project in disk. You might have some sort of naming convention for project that you might follow, or leave as it is. (My advice is that you do not include spaces in the name!)
- Select Deployment: Choose "Centralized Setup". This will be the location of the configuration files (that we will be modifying later). For example, you could place the specific configuration for a project (in this example called game_config) within a folder called "configs" at the same level then the jobs folder, something like:
├───jobs
└───configs
└───game_config
├───cache
├───config
│ ├───core
│ │ ├───hooks
│ │ └───schema
│ ├───env
│ │ └───includes
│ │ └───settings
│ ├───hooks
│ │ └───tk-multi-launchapp
│ ├───icons
│ └───tk-metadata
└───install
├───apps
├───core
├───engines
└───frameworks
(Note that this might not be suitable for more complex setups, like distributed configurations)
Every pipeline configuration has got different environments where you can configure apps accordingly. (for example you might want different apps depending if you are at an asset context or a shot context). The configured environments really depend on your projects requirements. While project, asset, asset_step, sequence, shot, shot_step, site are the standard ones, it is not uncommon to have a sequence_step environment or use a episode based environment either.
I've included a folder called 'config' in this repository where you can find the additions to each of the environments and configuration yml files that come with the default shotgun toolkit configuration repository (as of writing)
These yaml files provided should be merged with the original ones as they won't work on their own.
As an example, for the location of the engine, we use a git descriptor that allows up to track the code from a git repository. This become easy to update whenever a new version is released. So in the example above, you should modify the file:
.../game_config/config/env/includes/engine_locations.yml
and add the following changes from this file: engine_locations.yml
# Cinema 4D
engines.tk-cinema.location:
type: github_release
organization: mikedatsik
repository: tk-cinema
version: v1.0.0
Or in your environments you should add tk-cinema yml file, for example in the asset_step yml file:
/configs/game_config/env/asset_step.yml
Let's add the include at the beginning of the file, in the 'includes' section:
- ./includes/settings/tk-cinema.yml
Now we add a new entry under the engines section, that will include all the information for our cinema application:
tk-cinema: "@settings.tk-cinema.asset_step"
And so on.
Finally, do not forget to copy the additional tk-cinema.yml
into your settings folder.
The additions to config/core/templates.yml
are provided also under the config directory of this repository, specifically:
To load Cinema preload plugins, when you add additional applications you must add line with new app name, id, pace in menu
.
In file python\tk_cinema\constant_apps.py
add following string:
["app name", "id", "pace in menu"]
Example:
["Sync Frame Range with Shotgun", "3366874", "main"],
In order for Cinema 4D to show up in the shotgun launcher, we need to add it to our list of softwares that are valid for this project.
- Navigate to your shotgun url, ie.
example.shotgunstudio.com
, and once logged in, clink in the Shotgun Settings menu, the arrow at the top right of the webpage, close to your user picture. - Click in the Software menu
- We will create a new entry for Cinema 4D, called "Cinema 4D". The description was conveniently copied and pasted from Wikipedia.
- We should now specify the engine this software will use. "tk-cinema"
- Note that you can restrict this application to certain projects by specifying the project under the projects column. If no projects are specified this application will show up for all the projects that have this engine in their configuration files.
If you want more information on how to configure software launches, here is the detailed documentation from shotgun. Configuring software launches
One last step is to cache the engine and apps from the configuration files into disk. Shotgun provides a tank command for this. Tank Advanced Commands
-
Open a console and navigate to your pipeline configuration folder, where you will find a
tank
ortank.bat
file. (in our case we placed the pipeline configuration underD:\demo\configs\game_config
) -
type
tank cache_apps
, and press enter. Shotgun Toolkit will start revising the changes we have done to the configuration yml files and downloading what is required, in this case the engine and the changes for tk-multi-setframerange app listed below.
If we now go back and forth from our project in shotgun desktop ( < arrow top left if you are already within a project ), we should be able to see Cinema 4D as an application to launch.
This application forms the basis for file management in the Shotgun Pipeline Toolkit. It lets you jump around quickly between your various Shotgun entities and gets you started working quickly. No path needs to be specified as the application manages that behind the scenes. The application helps you manage your working files inside a Work Area and makes it easy to share your work with others.
Basic hooks have been implemented for this tk-app to work. open, save, save_as, reset, and current_path are the scene operations implemented.
A Shotgun Snapshot is a quick incremental backup that lets you version and manage increments of your work without sharing it with anyone else. Take a Snapshot, add a description and a thumbnail, and you create a point in time to which you can always go back to at a later point and restore. This is useful if you are making big changes and want to make sure you have a backup of previous versions of your scene.
Hooks are provided to be able to use this tk-app, similar to workfiles2.
The Shotgun Loader lets you quickly overview and browse the files that you have published to Shotgun. A searchable tree view navigation system makes it easy to quickly get to the task, shot or asset that you are looking for and once there the loader shows a thumbnail based overview of all the publishes for that item. Through configurable hooks you can then easily reference or import a publish into your current scene.
The hooks provided support all the input reference and import formats from Cinema 4D.
The Publish app allows artists to publish their work so that it can be used by artists downstream. It supports traditional publishing workflows within the artist’s content creation software as well as stand-alone publishing of any file on disk. When working in content creation software and using the basic Shotgun integration, the app will automatically discover and display items for the artist to publish. For more sophisticated production needs, studios can write custom publish plugins to drive artist workflows.
Only the basic publishing of the current session is provided with this app.
The Scene Breakdown App shows you a list of items you have loaded (referenced) in your scene and tells you which ones are out of date. From this overview, you can select multiple objects and click the update button which will update all your selected items to use the latest published version.
This is a simple yet useful app that syncs your current file with the latest frame range in Shotgun for the associated shot. If a change to the cut has come in from editorial, quickly and safely update the scene you are working on using this app. Towards the end, it will display a UI with information about what got changed.
This app has been forked so it can include it's own hooks. The original implementation from shotgun software had the engines logic hardcoded, so I went ahead and refactored it to be able to support hooks per engine. You should configure this app from the following repository and branch: tk-multi-setframerange enable_hooks_for_app
The location section for this app should look like:
location:
type: git_branch
branch: enable_hooks_for_app
path: https://github.com/diegogarciahuerta/tk-multi-setframerange
version: b24a977
where version represents the commit id. (at the time of writting the latest commit) (note that the hook for cinema is however included with the tk-cinema engine)
For completion, I've kept the original README from shotgun, that include very valuable links:
This repository is a part of the Shotgun Pipeline Toolkit.
- For more information about this app and for release notes, see the wiki section.
- For general information and documentation, click here: https://support.shotgunsoftware.com/entries/95441257
- For information about Shotgun in general, click here: http://www.shotgunsoftware.com/toolkit
All the apps that are part of our standard app suite are pushed to our App Store. This is where you typically go if you want to install an app into a project you are working on. For an overview of all the Apps and Engines in the Toolkit App Store, click here: https://support.shotgunsoftware.com/entries/95441247.
Don't hesitate to contact us! You can find us on support@shotgunsoftware.com