-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added build instructions for myself.. lol
- Loading branch information
Showing
6 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters