Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arnold 7.2.2 support #93

Open
wants to merge 41 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
76f56c7
update adclm patching
JenusL Apr 2, 2023
782a156
add new triplanar parameters
JenusL Apr 2, 2023
e255b27
add dual-lobe phase to standard_volume
JenusL Apr 2, 2023
2977537
hide displacement from standard_volume ppg
JenusL Apr 2, 2023
2922804
add emission scaling to standard_volume
JenusL Apr 2, 2023
0043aca
add blackbody contrast to standard_volume
JenusL Apr 2, 2023
b3405c5
tweak min/max of standard_volume parameters
JenusL Apr 2, 2023
f8172ac
add AI_LOG_PLUGINS to info log level
JenusL Apr 2, 2023
f8b1300
adjust checkerboard ui
JenusL Apr 24, 2023
10fddfd
updated noIcon to exr and tx in testsuite
JenusL Apr 24, 2023
78dca32
add adp settings command
JenusL Apr 24, 2023
581aad4
bump min arnold version
JenusL Apr 24, 2023
530e75c
add support for curve basis and wrap_mode
JenusL Apr 24, 2023
06799af
skip export of min_pixel_width in unsupported modes
JenusL Apr 24, 2023
2fd68e5
add setting for auto maketx
JenusL Apr 24, 2023
01900fd
add support for multi output shaders
JenusL Apr 24, 2023
d39a199
add support for osl shaders in build system
JenusL Apr 24, 2023
2ccd993
don't create shaderdef for osl versions of default softimage shaders
JenusL Apr 24, 2023
846df76
add some osl shaders of standard softiamge shaders as example
JenusL Apr 24, 2023
ee1d863
multiple output shader test
JenusL Apr 24, 2023
c80bc60
version up
JenusL Apr 24, 2023
87b8a95
update abuild logic to use python or py launcher
JenusL Apr 24, 2023
6681df3
update dev env helper
JenusL Apr 24, 2023
cfca070
tiny change of osl build dir
JenusL Apr 24, 2023
ba98ba3
package adp and crashdump files
JenusL Apr 24, 2023
74e7611
delete scntoc file
JenusL Apr 24, 2023
a212857
api changes
JenusL Jun 4, 2023
69c8002
add shadow and sss to autobump visibility
JenusL Jun 4, 2023
b0ab9c9
remove global sss_use_autobump option
JenusL Jun 4, 2023
6ba7c4d
add enable_sky to physical_sky
JenusL Jun 4, 2023
e91668d
add wset and uvw_matrix to uv_transform
JenusL Jun 4, 2023
910d94b
fix api change typo
JenusL Jun 4, 2023
034f3a8
add distance shader
JenusL Jun 4, 2023
aacc7b1
add global light sampling options
JenusL Jun 4, 2023
4b165a9
clean up operator parameters linkability
JenusL Jun 4, 2023
9f20673
remove matrixes from non animatable list
JenusL Jun 11, 2023
d96b550
add special cases for set_transform matrix to support motion blur
JenusL Jun 11, 2023
a726081
update autobump in sss test
JenusL Jun 11, 2023
29c0756
update operators test with motion blur
JenusL Jun 11, 2023
0b73166
bump minimum arnold version
JenusL Jun 12, 2023
38b577a
update SItoA version and added one more number
JenusL Jun 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 7.0.0.0 or newer
* Arnold 7.2.2.0 or newer
* Python 2.6 or newer
* Visual Studio 2015 (Windows)
* GCC 4.2.4 (Linux)
Expand Down Expand Up @@ -65,7 +65,7 @@ VS_HOME = r'C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC'
WINDOWS_KIT = r'C:/Program Files (x86)/Windows Kits/10'

XSISDK_ROOT = r'C:/Program Files/Autodesk/Softimage 2015 SP2/XSISDK'
ARNOLD_HOME = r'C:/SolidAngle/Arnold-7.0.0.0-windows'
ARNOLD_HOME = r'C:/SolidAngle/Arnold-7.2.2.0-windows'

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

Expand Down
20 changes: 15 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ if system.os() == 'windows':
duplicate = 0,
exports = 'env')

[SITOA_SHADERS, SITOA_SHADERS_PRJ] = env.SConscript(os.path.join('shaders', 'src', 'SConscript'),
[SITOA_SHADERS, SITOA_SHADERS_PRJ, SITOA_OSL_SHADERS] = env.SConscript(os.path.join('shaders', 'src', 'SConscript'),
variant_dir = os.path.join(BUILD_BASE_DIR, 'shaders'),
duplicate = 0,
exports = 'env')
Expand Down Expand Up @@ -338,7 +338,7 @@ else:
duplicate = 0,
exports = 'env')

SITOA_SHADERS = env.SConscript(os.path.join('shaders', 'src', 'SConscript'),
[SITOA_SHADERS, SITOA_OSL_SHADERS] = env.SConscript(os.path.join('shaders', 'src', 'SConscript'),
variant_dir = os.path.join(BUILD_BASE_DIR, 'shaders'),
duplicate = 0,
exports = 'env')
Expand Down Expand Up @@ -397,6 +397,9 @@ else:
PACKAGE_FILES = [
[os.path.join(plugin_binary_path, 'sitoa', DLLS), os.path.join(addon_path, bin_path)],
[os.path.join(plugin_binary_path, 'shaders', DLLS), os.path.join(addon_path, bin_path)],
[os.path.join(plugin_binary_path, 'shaders', 'osl', '*.oso'), os.path.join(addon_path, bin_path)],
[os.path.join(ARNOLD_BINARIES, 'ADPClientService%s' % get_executable_extension()), os.path.join(addon_path, bin_path)],
[os.path.join(ARNOLD_BINARIES, 'AdpSDKUtil%s' % get_executable_extension()), os.path.join(addon_path, bin_path)],
[os.path.join(ARNOLD_BINARIES, 'ArnoldLicenseManager%s' % get_executable_extension()), os.path.join(addon_path, bin_path)],
[os.path.join(ARNOLD_BINARIES, 'kick%s' % get_executable_extension()), os.path.join(addon_path, bin_path)],
[os.path.join(ARNOLD_BINARIES, 'maketx%s' % get_executable_extension()), os.path.join(addon_path, bin_path)],
Expand All @@ -408,6 +411,7 @@ PACKAGE_FILES = [
[os.path.join(ARNOLD_BINARIES, '*%s.*' % get_library_extension()), os.path.join(addon_path, bin_path)],
[os.path.join(ARNOLD_BINARIES, '*.pit'), os.path.join(addon_path, bin_path)],
[os.path.join(ARNOLD_BINARIES, '*.png'), os.path.join(addon_path, bin_path)],
[os.path.join(ARNOLD_BINARIES, 'senddmp'), os.path.join(addon_path, bin_path, 'senddmp')],
[ARNOLD_OCIO, os.path.join(addon_path, bin_path, '..', 'ocio')],
[ARNOLD_PLUGINS, os.path.join(addon_path, bin_path, '..', 'plugins')],
[os.path.join('plugins', 'helpers', '*.js'), os.path.join(addon_path, plugins_path)],
Expand Down Expand Up @@ -485,10 +489,14 @@ def make_patch_adlm(target, source, env):

def patch_adlm(wg_bin_path, env):
new_adlmint_last_char = '2' # ONLY ONE CHARACTER
size = 0

if system.os() == 'windows':
adclmhub_name = find_adclmhub(wg_bin_path, 'AdClmHub_')
if adclmhub_name == 'AdClmHub_2.0.0.dll':
if adclmhub_name == 'AdClmHub_3.1.1.dll':
size = 498696
seek_pos = 0x57F6C
elif adclmhub_name == 'AdClmHub_2.0.0.dll':
size = 524128
seek_pos = 367692
elif adclmhub_name == 'AdClmHub_1.1.1.dll':
Expand Down Expand Up @@ -536,7 +544,7 @@ def patch_adlm(wg_bin_path, env):
with open(adclmhub_path, 'r+b') as f:
f.seek(seek_pos)
letter = f.read(1)
if letter == 't':
if letter != new_adlmint_last_char:
print 'Patching {} ...'.format(adclmhub_name)
f.seek(seek_pos)
f.write(new_adlmint_last_char)
Expand Down Expand Up @@ -564,7 +572,8 @@ PATCH = env.Patch('patch', SITOA)
################################

env.Install(os.path.join(env['TARGET_WORKGROUP_PATH'], bin_path), [str(SITOA[0]),
str(SITOA_SHADERS[0])])
str(SITOA_SHADERS[0]),
SITOA_OSL_SHADERS])

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, '..', 'ocio'), [glob.glob(os.path.join(ARNOLD_OCIO, '*'))])
Expand Down Expand Up @@ -604,6 +613,7 @@ top_level_alias(env, 'testsuite', TESTSUITE)
env.AlwaysBuild(PACKAGE)
env.AlwaysBuild('install')

env.Depends(SITOA_SHADERS, SITOA_OSL_SHADERS)
env.Depends(PACKAGE, SITOA)
env.Depends(PACKAGE, SITOA_SHADERS)
env.Depends(DEPLOY, PACKAGE)
Expand Down
19 changes: 14 additions & 5 deletions abuild.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
@echo off
set py=python

REM Use python launcher if it's found in PATH.
REM Use python launcher if python isn't found in PATH.
WHERE python >nul 2>nul
IF NOT ERRORLEVEL 1 GOTO :usepython

WHERE py >nul 2>nul
IF NOT ERRORLEVEL 1 (
set "py=py -2"
)
IF NOT ERRORLEVEL 1 GOTO :usepy

:usepython
set py=python
GOTO :end

:usepy
set "py=py -2"
GOTO :end

:end
@echo on

@REM invokes a local install of scons (forwarding all arguments)
Expand Down
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-7.0.0.0/linux'
ARNOLD_HOME = r'/usr/SolidAngle/Arnold-7.2.2.0/linux'

TARGET_WORKGROUP_PATH = './dist/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/10'

XSISDK_ROOT = r'C:/Program Files/Autodesk/Softimage 2015 SP2/XSISDK'
ARNOLD_HOME = r'C:/SolidAngle/Arnold-7.0.0.0-windows'
ARNOLD_HOME = r'C:/SolidAngle/Arnold-7.2.2.0-windows'

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

Expand Down
11 changes: 9 additions & 2 deletions open_dev_console.cmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
@echo off

rem Windows helper script to open a dev console by simply dubble-clicking the batch file.
rem Windows helper script to set the environment and open a dev console by simply dubble-clicking the batch file.
rem Update the paths below to the locations that is correct for your system.

set sitoa_dev_cmd="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.0
set "Path=C:\Users\lindg\DEV\Portable Python-2.7.17 x64\App\Python;%Path%"
set "Path=C:\Users\lindg\DEV\SolidAngle\Arnold-7.2.2.0-windows\bin;%Path%"
set "Path=%~dp0dist\Softimage_2015\Addons\SItoA\Application\Plugins\bin\nt-x86-64;%Path%"

set "ARNOLD_PLUGIN_PATH=%~dp0dist\Softimage_2015\Addons\SItoA\Application\Plugins\bin\nt-x86-64"

set sitoa_dev_cmd="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.0

WHERE wt.exe /Q
if %ERRORLEVEL% NEQ 0 (
Expand Down
5 changes: 5 additions & 0 deletions plugins/helpers/ArnoldMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ function AddHelpSubMenu(in_menu)
item = in_menu.AddCallbackItem("Licensing Home", "OnHelpMenu");
item = in_menu.AddCallbackItem("Licensing", "OnHelpMenu");
item = in_menu.AddSeparatorItem();
item = in_menu.AddCallbackItem("ADP Settings", "OnHelpMenu");
item = in_menu.AddSeparatorItem();
item = in_menu.AddCallbackItem("Legal Notice", "OnHelpMenu");
item = in_menu.AddCallbackItem("About SItoA", "OnHelpMenu");
}
Expand Down Expand Up @@ -416,6 +418,9 @@ function OnHelpMenu(in_ctxt)
case "Licensing":
Licensing();
return;
case "ADP Settings":
SITOA_ADPSettings();
return;
case "Legal Notice":
LegalNotice();
return;
Expand Down
13 changes: 9 additions & 4 deletions plugins/helpers/ArnoldProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ function AddParamsShape(in_prop)
function AddParamsCurve(in_prop, strands)
{
in_prop.AddParameter2("mode", siString, "ribbon", null, null, null, null, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("basis", siString, "catmull-rom", null, null, null, null, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("min_pixel_width", siFloat, 0.25, 0, 2, 0, 2, 0, siPersistable|siAnimatable);
}

Expand All @@ -545,11 +546,13 @@ function AddParamsSubdivision(in_prop, strands)

in_prop.AddParameter2("disp_autobump", siBool, 1, 0, 1, 0, 1, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("autobump_camera", siBool, 1, 0, 1, 0, 1, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("autobump_shadow", siBool, 0, 0, 1, 0, 1, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("autobump_diffuse_reflection", siBool, 0, 0, 1, 0, 1, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("autobump_specular_reflection", siBool, 0, 0, 1, 0, 1, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("autobump_diffuse_transmission", siBool, 0, 0, 1, 0, 1, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("autobump_specular_transmission", siBool, 0, 0, 1, 0, 1, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("autobump_volume_scattering", siBool, 0, 0, 1, 0, 1, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("autobump_subsurface", siBool, 0, 0, 1, 0, 1, 0, siPersistable|siAnimatable);

in_prop.AddParameter2("adaptive_subdivision", siBool, 0, 0, 1, 0, 1, 0, siPersistable|siAnimatable);
in_prop.AddParameter2("subdiv_adaptive_metric", siString, "auto", null, null, null, null, 0, siPersistable|siAnimatable);
Expand Down Expand Up @@ -739,11 +742,13 @@ function arnold_parameters_DefineLayout(io_Context)
item = xsiLayout.AddItem("disp_autobump", "Autobump");
xsiLayout.AddGroup("Autobump Visibility", true);
item = xsiLayout.AddItem("autobump_camera", "Camera (primary)");
item = xsiLayout.AddItem("autobump_shadow", "Shadow");
item = xsiLayout.AddItem("autobump_diffuse_reflection", "Diffuse Reflection");
item = xsiLayout.AddItem("autobump_specular_reflection", "Specular Reflection");
item = xsiLayout.AddItem("autobump_diffuse_transmission", "Diffuse Transmission");
item = xsiLayout.AddItem("autobump_specular_transmission", "Specular Transmission");
item = xsiLayout.AddItem("autobump_volume_scattering", "Volume Scattering");
item = xsiLayout.AddItem("autobump_subsurface", "Subsurface Scattering");
xsiLayout.EndGroup();
xsiLayout.EndGroup();
xsiLayout.AddGroup("Subdivision", true);
Expand Down Expand Up @@ -781,7 +786,8 @@ function arnold_parameters_DefineLayout(io_Context)
{
xsiLayout.AddGroup("Arnold Curves Parameters", true, 50);
xsiLayout.AddItem("min_pixel_width", "Min. Pixel Width");
xsiLayout.AddEnumControl( "mode", Array( "Ribbon", "ribbon", "Thick", "thick", "Oriented Ribbon (ICE Strands)", "oriented"), "Mode", siControlCombo);
xsiLayout.AddEnumControl("mode", Array("Ribbon", "ribbon", "Thick", "thick", "Oriented Ribbon (ICE Strands)", "oriented"), "Mode", siControlCombo);
xsiLayout.AddEnumControl("basis", Array("B-Spline", "b-spline", "Catmull-Rom (ICE Strands)", "catmull-rom", "Linear", "linear"), "Basis", siControlCombo);
xsiLayout.EndGroup();
}
catch(exception)
Expand Down Expand Up @@ -1259,11 +1265,13 @@ function arnold_parameters_disp_autobump_OnChanged()
if (oCustomProperty.Parameters("autobump_camera") != null)
{
PPG.autobump_camera.Enable(autobump_on);
PPG.autobump_shadow.Enable(autobump_on);
PPG.autobump_diffuse_reflection.Enable(autobump_on);
PPG.autobump_specular_reflection.Enable(autobump_on);
PPG.autobump_diffuse_transmission.Enable(autobump_on);
PPG.autobump_specular_transmission.Enable(autobump_on);
PPG.autobump_volume_scattering.Enable(autobump_on);
PPG.autobump_subsurface.Enable(autobump_on);
}
}

Expand All @@ -1281,9 +1289,6 @@ function arnold_parameters_adaptive_subdivision_OnChanged()

function arnold_parameters_mode_OnChanged()
{
if (PPG.mode.Value=="thick")
PPG.min_pixel_width.Value = 0;

PPG.min_pixel_width.Enable(PPG.mode.Value=="ribbon" || PPG.mode.Value=="oriented");
}

Expand Down
3 changes: 3 additions & 0 deletions plugins/helpers/ArnoldShaderDef.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function XSILoadPlugin( in_reg )
in_reg.RegisterShader("cross", 1, 0);
in_reg.RegisterShader("cryptomatte", 1, 0);
in_reg.RegisterShader("curvature", 1, 0);
in_reg.RegisterShader("distance", 1, 0);
in_reg.RegisterShader("divide", 1, 0);
in_reg.RegisterShader("dot", 1, 0);
in_reg.RegisterShader("exp", 1, 0);
Expand Down Expand Up @@ -244,6 +245,8 @@ function Arnold_cryptomatte_1_0_DefineInfo(in_ctxt) { return true; }
function Arnold_cryptomatte_1_0_Define(in_ctxt) { return true; }
function Arnold_curvature_1_0_DefineInfo(in_ctxt) { return true; }
function Arnold_curvature_1_0_Define(in_ctxt) { return true; }
function Arnold_distance_1_0_DefineInfo(in_ctxt) { return true; }
function Arnold_distance_1_0_Define(in_ctxt) { return true; }
function Arnold_divide_1_0_DefineInfo(in_ctxt) { return true; }
function Arnold_divide_1_0_Define(in_ctxt) { return true; }
function Arnold_dot_1_0_DefineInfo(in_ctxt) { return true; }
Expand Down
49 changes: 49 additions & 0 deletions plugins/metadata/arnold_operators.mtd
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,21 @@
[attr enable]
linkable BOOL false

[attr selection]
linkable BOOL false

[attr collection]
linkable BOOL false

###########################################################################
[node disable]

[attr enable]
linkable BOOL false

[attr selection]
linkable BOOL false

[attr mode]
linkable BOOL false

Expand All @@ -42,6 +51,18 @@ linkable BOOL false
[attr enable]
linkable BOOL false

[attr selection]
linkable BOOL false

[attr filename]
linkable BOOL false

[attr look]
linkable BOOL false

[attr assign_type]
linkable BOOL false

[attr assign_materials]
linkable BOOL false

Expand Down Expand Up @@ -72,6 +93,9 @@ linkable BOOL false
[attr enable]
linkable BOOL false

[attr selection]
linkable BOOL false

[attr translate]
linkable BOOL false

Expand All @@ -81,12 +105,37 @@ linkable BOOL false
[attr scale]
linkable BOOL false

[attr matrix]
linkable BOOL false

[attr transform_order]
linkable BOOL false

[attr rotate_order]
linkable BOOL false

[attr mode]
linkable BOOL false

###########################################################################
[node string_replace]

[attr enable]
linkable BOOL false

[attr selection]
linkable BOOL false

[attr match]
linkable BOOL false

[attr replace]
linkable BOOL false

[attr os]
linkable BOOL false
soft.label STRING "OS"

###########################################################################
[node switch_operator]

Expand Down
15 changes: 15 additions & 0 deletions plugins/sitoa/common/Commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,21 @@ SITOA_CALLBACK SITOA_ShowMac_Execute(CRef& in_ctxt)
}


SITOA_CALLBACK SITOA_ADPSettings_Init(CRef& in_ctxt)
{
Context ctxt(in_ctxt);
Command oCmd = ctxt.GetSource();
oCmd.EnableReturnValue(false);
oCmd.SetFlag(siNoLogging, true);
return CStatus::OK;
}

SITOA_CALLBACK SITOA_ADPSettings_Execute(CRef& in_ctxt)
{
Context ctxt(in_ctxt);
AiADPDisplayDialogWindow();
return CStatus::OK;
}


// Run pitreg
Expand Down
Loading