Skip to content

Commit

Permalink
Merge pull request #76 from JenusL/feat/a5.4.0
Browse files Browse the repository at this point in the history
Arnold 5.4 support
  • Loading branch information
sjannuz authored Sep 19, 2019
2 parents b03b047 + 4b588d3 commit 4f9706b
Show file tree
Hide file tree
Showing 25 changed files with 413 additions and 150 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ under an Apache 2.0 open source license.
#### Requirements

* Softimage 2015 SP1
* Arnold 5.3.1.1 or newer
* Arnold 5.4.0.1 or newer
* Python 2.6 or newer
* Visual Studio 2012 (Windows)
* GCC 4.2.4 (Linux)
Expand Down Expand Up @@ -65,7 +65,7 @@ VS_HOME = r'C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC'
WINDOWS_KIT = r'C:/Program Files (x86)/Windows Kits/8.0'

XSISDK_ROOT = r'C:/Program Files/Autodesk/Softimage 2015/XSISDK'
ARNOLD_HOME = r'C:/SolidAngle/Arnold-5.3.1.1/win64'
ARNOLD_HOME = r'C:/SolidAngle/Arnold-5.4.0.1/win64'

TARGET_WORKGROUP_PATH = r'./Softimage_2015/Addons/SItoA'

Expand Down
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ env.Install(os.path.join(env['TARGET_WORKGROUP_PATH'], bin_path), [str(SITOA[0])
str(SITOA_SHADERS[0])])

env.Install(os.path.join(env['TARGET_WORKGROUP_PATH'], bin_path), [glob.glob(os.path.join(ARNOLD_BINARIES, '*'))])
env.Install(os.path.join(env['TARGET_WORKGROUP_PATH'], bin_path, '..'), [glob.glob(ARNOLD_PLUGINS)])
env.Install(os.path.join(env['TARGET_WORKGROUP_PATH'], bin_path, '..', 'plugins'), [glob.glob(os.path.join(ARNOLD_PLUGINS, '*'))])

# Copying Scripting Plugins
# (if you modify the files directly on workgroup they will be overwritted with trunk version)
Expand Down
14 changes: 13 additions & 1 deletion abuild.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
@echo off
set py=python

REM Use python launcher if it's found in PATH.
WHERE py >nul 2>nul
IF NOT ERRORLEVEL 1 (
set "py=py -2"
)

@echo on

@REM invokes a local install of scons (forwarding all arguments)
@%py% contrib\scons\scons --site-dir=tools\site_scons %*

@python contrib\scons\scons --site-dir=tools\site_scons %*
@set py=
2 changes: 1 addition & 1 deletion config/custom_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
SHCXX = r'/usr/bin/gcc-4.2.4/bin/gcc-4.2.4'

XSISDK_ROOT = r'/usr/Softimage/Softimage_2015/XSISDK'
ARNOLD_HOME = r'/usr/SolidAngle/Arnold-5.3.1.1/linux'
ARNOLD_HOME = r'/usr/SolidAngle/Arnold-5.4.0.1/linux'

TARGET_WORKGROUP_PATH = './Softimage_2015/Addons/SItoA'

Expand Down
2 changes: 1 addition & 1 deletion config/custom_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
WINDOWS_KIT = r'C:/Program Files (x86)/Windows Kits/8.0'

XSISDK_ROOT = r'C:/Program Files/Autodesk/Softimage 2015/XSISDK'
ARNOLD_HOME = r'C:/SolidAngle/Arnold-5.3.1.1/win64'
ARNOLD_HOME = r'C:/SolidAngle/Arnold-5.4.0.1/win64'

TARGET_WORKGROUP_PATH = r'./Softimage_2015/Addons/SItoA'

Expand Down
12 changes: 8 additions & 4 deletions plugins/helpers/ArnoldLights.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ function AddPointLight_Execute(in_name)
light.Parameters("LightArea").value = true;
light.Parameters("LightAreaGeom").value = 3;
// Mapping Arnold Light Parameter to XSI Light Parameter..
var spotRadius = light.Parameters("LightAreaXformSX");
spotRadius.AddExpression(light.FullName+".light.arnold_point_light.radius");
var lightRadius = light.Parameters("LightAreaXformSX");
lightRadius.AddExpression("this.light.point_light.radius");
return light; // return the light
}

Expand Down Expand Up @@ -110,8 +110,10 @@ function AddSpotLight_Execute(in_name)

ApplyLightShader(lightPrim, "arnold_spot_light");
// Mapping Arnold Light Parameters to XSI Light Parameters..
var spotRadius = lightPrim.Parameters("LightAreaXformSX");
spotRadius.AddExpression(lightPrim.FullName+".light.arnold_spot_light.radius")
var coneAngle = lightPrim.Parameters("LightCone");
coneAngle.AddExpression("this.light.spot_light.cone_angle");
var lightRadius = lightPrim.Parameters("LightAreaXformSX");
lightRadius.AddExpression("this.light.spot_light.radius");
lightPrim.LightArea = true;
lightPrim.LightAreaGeom = 2;
return lightPrim;
Expand Down Expand Up @@ -143,6 +145,8 @@ function AddQuadLight_Execute(in_name)
var name = in_name == null ? "Quad" : in_name;
var light = GetPrimLight("Light_Box.Preset", name, "", null, null, null);
var lightPrim = light.Light;
var lightType = lightPrim.Parameters("Type");
lightType.Value = 1; // Infinite light gizmo

ApplyLightShader(lightPrim, "arnold_quad_light");
return lightPrim;
Expand Down
7 changes: 6 additions & 1 deletion plugins/helpers/ArnoldMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ function AddShadersSubMenu(in_menu)
in_menu.AddSeparatorItem();
in_menu.AddCallbackItem("Standard Volume", "OnShadersMenu");
in_menu.AddSeparatorItem();
in_menu.AddCallbackItem("Physical Sky", "OnShadersMenu");
in_menu.AddCallbackItem("Physical Sky", "OnShadersMenu");
in_menu.AddSeparatorItem();
in_menu.AddCallbackItem("Clip Geo", "OnShadersMenu");
}


Expand Down Expand Up @@ -521,6 +523,9 @@ function OnShadersMenu(in_ctxt)
case "Operator":
SITOA_AddShaderStack("Arnold.operator.1.0", "OutputShaderStack");
break;
case "Clip Geo":
SITOA_AddShader("Arnold.clip_geo.1.0", "surface");
break;
}
}

Expand Down
4 changes: 3 additions & 1 deletion plugins/helpers/ArnoldProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ function AddParamsShape(in_prop)
in_prop.AddParameter2("self_shadows", siBool, 1, 0, 1, 0, 5, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("receive_shadows", siBool, 1, 0, 1, 0, 5, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("export_pref", siBool, false, null, null, null, null);
in_prop.AddParameter2("export_nref", siBool, false, null, null, null, null);
in_prop.AddParameter2("subdiv_smooth_derivs", siBool, false, null, null, null, null);
in_prop.AddParameter2("sss_setname", siString, "", null, null, null, null, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("toon_id", siString, "", null, null, null, null, 0, siPersistable|siAnimatable);
Expand Down Expand Up @@ -686,7 +687,8 @@ function arnold_parameters_DefineLayout(io_Context)
xsiLayout.AddItem("invert_normals", "Invert Normals");
xsiLayout.AddItem("self_shadows", "Self Shadows");
xsiLayout.AddItem("receive_shadows", "Receive Shadows");
xsiLayout.AddItem("export_pref", "Export Bind Pose (Pref)");
xsiLayout.AddItem("export_pref", "Export Bind Pose Positions (Pref)");
xsiLayout.AddItem("export_nref", "Export Bind Pose Normals (Nref)");
xsiLayout.AddItem("subdiv_smooth_derivs", "Smooth Subdiv Tangents");
xsiLayout.EndGroup();

Expand Down
Loading

0 comments on commit 4f9706b

Please sign in to comment.