Skip to content

Commit

Permalink
added build instructions for myself.. lol
Browse files Browse the repository at this point in the history
  • Loading branch information
zpelgrims committed Feb 21, 2016
1 parent 3f58245 commit d855f60
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 0 deletions.
Binary file added src/releases/zoic_linux_v1.0.zip
Binary file not shown.
44 changes: 44 additions & 0 deletions src/releases/zoic_linux_v1.0/ae/aiZoicTemplate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import mtoa.ui.ae.templates as templates
import pymel.core as pm
import maya.cmds as cmds
import mtoa.ui.ae.utils as aeUtils

class aiZoicTemplate(templates.AttributeTemplate):

def filenameEdit(self, mData) :
attr = self.nodeAttr('aiBokehPath')
cmds.setAttr(attr,mData,type="string")

def LoadFilenameButtonPush(self, *args):
basicFilter = 'All Files (*.*)'
ret = cmds.fileDialog2(fileFilter=basicFilter, dialogStyle=2, cap='Load File',okc='Load',fm=4)
if ret is not None and len(ret):
self.filenameEdit(ret[0])
cmds.textFieldButtonGrp("filenameGrp", edit=True, text=ret[0])

def filenameNew(self, nodeName):
path = cmds.textFieldButtonGrp("filenameGrp", label="Bokeh image location", changeCommand=self.filenameEdit, width=300)
cmds.textFieldButtonGrp(path, edit=True, text=cmds.getAttr(nodeName))
cmds.textFieldButtonGrp(path, edit=True, buttonLabel="...",
buttonCommand=self.LoadFilenameButtonPush)

def filenameReplace(self, nodeName):
cmds.textFieldButtonGrp("filenameGrp", edit=True, text=cmds.getAttr(nodeName) )



def setup(self):
self.addControl("aiSensorWidth", label="Sensor Width (cm)")
self.addControl("aiSensorHeight", label="Sensor Height (cm)")
self.addControl("aiFocalLength", label="Focal Length (mm)")
self.addSeparator()
self.addControl("aiUseDof", label="Enable depth of field")
self.addControl("aiFStop", label="F-stop")
self.addControl("aiFocalDistance", label="Focus distance (cm)")
self.addSeparator()
self.addControl("aiOpticalVignetting", label="Optical Vignetting")
self.addSeparator()
self.addControl("aiUseImage", label="Enable Image based bokeh")
self.addCustom('aiBokehPath', self.filenameNew, self.filenameReplace)

templates.registerTranslatorUI(aiZoicTemplate, "camera", "zoic")
Binary file not shown.
71 changes: 71 additions & 0 deletions src/releases/zoic_linux_v1.0/bin/zoic.mtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# zoic 0x00070007
[node zoic]
desc STRING "Extended camera shader with added options for mage based bokeh shapes and optical vignetting."
maya.name STRING "camera"
maya.id INT 0x00070007
maya.translator STRING "zoic"

[attr sensorWidth]
maya.name STRING "aiSensorWidth"
min FLOAT 0.1
max FLOAT 10
default FLOAT 3.6
linkable BOOL FALSE
desc STRING "Width of the sensor in centimeters. Default value is the width of a full frame sensor."

[attr sensorHeight]
maya.name STRING "aiSensorHeight"
min FLOAT 0.1
max FLOAT 10
default FLOAT 2.4
linkable BOOL FALSE
desc STRING "Height of the sensor in centimeters. Default value is the height of a full frame sensor."

[attr focalLength]
maya.name STRING "aiFocalLength"
min FLOAT 1
softmin FLOAT 8
softmax FLOAT 200
max FLOAT 1000
default FLOAT 35
desc STRING "Distance between the lens and the point at which the light converges in millimeters."

[attr useDof]
maya.name STRING "aiUseDof"
default BOOL true
desc STRING "Enable Depth of Field"
linkable BOOL FALSE

[attr fStop]
maya.name STRING "aiFStop"
min FLOAT 0.01
softmin FLOAT 0.7
softmax FLOAT 32.0
max FLOAT 100.0
default FLOAT 2.8
desc STRING "Ratio of the distance from the lens to the point where the focused light converges (the focal length) over the diameter of the aperture."

[attr focalDistance]
maya.name STRING "aiFocalDistance"
min FLOAT 0.001
max FLOAT 99999
default FLOAT 115
desc STRING "Distance between lens and object in focus in millimeters."

[attr opticalVignetting]
maya.name STRING "aiOpticalVignetting"
min FLOAT 0.0
softmax FLOAT 50.0
max FLOAT 1000.0
default FLOAT 0
desc STRING "Sometimes referred to as the cat-eye effect, this is a lens imperfection that is not caused by the glass but by the outer edge of the lens, also known as the exit aperture. When the main aperture is fully open, light coming into the camera from steep angles will be blocked partially by the edge of the lens. This creates cat-eye like bokeh shapes near the edges of an image. It should be noted that this lens effect is purely mechanical and can not be confused with lens distortion."

[attr useImage]
maya.name STRING "aiUseImage"
default BOOL false
desc STRING "Enable Image based bokeh"

[attr bokehPath]
maya.name STRING "aiBokehPath"
default STRING ""
desc STRING "Path to bokeh image. No need to convert to .tx"
Binary file added src/releases/zoic_linux_v1.0/bin/zoic.so
Binary file not shown.
4 changes: 4 additions & 0 deletions src/zoic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

// (C) Zeno Pelgrims, www.zenopelgrims.com

// to build on my linux machine:
// g++ -std=c++11 -o $ZENOCAMERA/src/zoic.os -c -fPIC -D_LINUX -I/run/media/i7210038/ZENO_MAJOR/Dropbox/majorproject/data/solidangle/Arnold-4.2.11.0-linux/include $ZENOCAMERA/src/zoic.cpp -L/usr/lib64 -lOpenImageIO -L/opt/appleseed/lib -ltiff
// g++ -o $ZENOCAMERA/bin/zoic.so -shared $ZENOCAMERA/src/zoic.os -L/run/media/i7210038/ZENO_MAJOR/Dropbox/majorproject/data/solidangle/Arnold-4.2.11.0-linux/bin -lai -L/usr/lib64 -lOpenImageIO -L/opt/appleseed/lib -ltiff"


// IDEAS

Expand Down

0 comments on commit d855f60

Please sign in to comment.