Wiki

Clone wiki

JSON Cam / Home

JSON Cam is a free open-source camera I/O suite. The goal of this effort is to have a spec in an open format that is easy to read/write from any 3D application, while keeping things as lightweight and reliable as possible. Json (a bit like XML) is a very popular file type that is a 1:1 python dictionary. This makes it easy to support, update and add new applications to the list. It also makes it easy to drop into an existing pipeline.

Simply create a dictionary that contains the data needed by the spec and save it out to a json (.cam extension) file. That's it.

If you have any interest in supporting an application that isn't in the list. Please feel free to fork the repo and send me a pull request.

Currently supported apps are:

  • Softimage
  • Houdini
  • Maya (coming very soon)

All code provided in the JSON Cam repo is provided under the LGPL license.

Install git and clone repo with this:

$ git clone https://bitbucket.org/crewshin/json-cam.git/wiki

Load json data (.cam file):

#!python

import json

jsonData = open("/Path/To/Input/File.cam)
data = json.load(jsonData) # "data" is a dictionary. Use as needed.
jsonData.close()

Write out a json file using Python:

#!python

import json

# Create a dictionary
myDictionary = {"key":"value"}

# Write it out
outFile = "/Path/To/Output/File.cam"
with open(outFile, "w") as outFile:
    json.dump(myDictionary, outFile, sort_keys=True, indent=4)

Updated