Skip to content

Commit 8669056

Browse files
committed
Merge branch 'RB-10.5'
2 parents d0aed85 + 5dedde4 commit 8669056

File tree

9 files changed

+144
-104
lines changed

9 files changed

+144
-104
lines changed

Changes

+26-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
1-
10.5.x.x (relative to 10.5.6.0)
1+
10.5.x.x (relative to 10.5.6.2)
22
========
33

4+
5+
6+
10.5.6.2 (relative to 10.5.6.1)
7+
========
8+
9+
Fixes
10+
-----
11+
12+
- USDScene : Fixed round-tripping of `ai:light` shader type for the output shader of light networks.
13+
14+
10.5.6.1 (relative to 10.5.6.0)
15+
========
16+
17+
Fixes
18+
-----
19+
20+
- USDScene : Fixed round-tripping of `__lights` set membership for non-UsdLux lights.
21+
- DisplayDriverServer : Fixed delays connecting to the server on Windows.
22+
23+
Build
24+
-----
25+
26+
- SConstruct : Support detection of OpenEXR versions with a patch version containing multiple digits.
27+
- Fixed building with MSVC and Gaffer Dependencies 8.x.
28+
429
10.5.6.0 (relative to 10.5.5.0)
530
========
631

@@ -11,7 +36,6 @@ Improvements
1136
- `IECoreGL::ColorTexture`: Added new constructor that accepts an argument specifying the internal storage format to use.
1237

1338

14-
1539
10.5.5.0 (relative to 10.5.4.2)
1640
========
1741

SConstruct

+4-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ SConsignFile()
5757
ieCoreMilestoneVersion = 10 # for announcing major milestones - may contain all of the below
5858
ieCoreMajorVersion = 5 # backwards-incompatible changes
5959
ieCoreMinorVersion = 6 # new backwards-compatible features
60-
ieCorePatchVersion = 0 # bug fixes
60+
ieCorePatchVersion = 2 # bug fixes
6161
ieCoreVersionSuffix = "" # used for alpha/beta releases. Example: "a1", "b2", etc.
6262

6363
###########################################################################################
@@ -1174,7 +1174,9 @@ else:
11741174
# that "C4275 can be ignored if you are deriving from a type in the
11751175
# C++ Standard Library", which is the case
11761176
"/wd4275",
1177+
"/wd4003", # suppress warning "not enough arguments for function-like macro invocation 'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY'"
11771178
"/D_CRT_SECURE_NO_WARNINGS", # suppress warnings about getenv and similar
1179+
"/DHAVE_SNPRINTF", # Fixes error "multiple definitions of snprintf"
11781180
]
11791181
)
11801182

@@ -1308,7 +1310,7 @@ if doConfigure :
13081310

13091311
exrMajorVersion = None
13101312
for line in open( str( exrVersionHeader ) ) :
1311-
m = re.match( r'^#define OPENEXR_VERSION_STRING "(\d)\.(\d)\.(\d)"$', line )
1313+
m = re.match( r'^#define OPENEXR_VERSION_STRING "(\d)\.(\d)\.(\d+)"$', line )
13121314
if m :
13131315
exrMajorVersion = int( m.group( 1 ) )
13141316

config/ie/buildAll

+15-21
Original file line numberDiff line numberDiff line change
@@ -115,30 +115,24 @@ nukeVersions = IEBuild.utils.versionsToInstall( "nuke" )
115115
houdiniVersions = IEBuild.utils.versionsToInstall( "houdini" )
116116
rvVersions = IEBuild.utils.versionsToInstall( "rv" )
117117

118-
if platform in ( "cent7.x86_64", ) :
119118

120-
for compilerVersion in compilerVersions:
121-
for pythonVersion in pythonVersions :
122-
build( [ "COMPILER_VERSION="+compilerVersion, "PYTHON_VERSION="+pythonVersion, "DL_VERSION=UNDEFINED" ] )
119+
for compilerVersion in compilerVersions:
120+
for pythonVersion in pythonVersions :
121+
build( [ "COMPILER_VERSION="+compilerVersion, "PYTHON_VERSION="+pythonVersion, "DL_VERSION=UNDEFINED" ] )
123122

124-
for mayaVersion in mayaVersions :
125-
compilerVersion = IEEnv.registry["apps"]["maya"][mayaVersion][platform]["compilerVersion"]
126-
build( [ "APP=maya", "APP_VERSION="+mayaVersion ] )
123+
for mayaVersion in mayaVersions :
124+
compilerVersion = IEEnv.registry["apps"]["maya"][mayaVersion][platform]["compilerVersion"]
125+
build( [ "APP=maya", "APP_VERSION="+mayaVersion ] )
127126

128-
for nukeVersion in nukeVersions :
129-
compilerVersion = IEEnv.registry["apps"]["nuke"][nukeVersion][platform]["compilerVersion"]
130-
build( [ "APP=nuke", "APP_VERSION="+nukeVersion ] )
127+
for nukeVersion in nukeVersions :
128+
compilerVersion = IEEnv.registry["apps"]["nuke"][nukeVersion][platform]["compilerVersion"]
129+
build( [ "APP=nuke", "APP_VERSION="+nukeVersion ] )
131130

132-
for houdiniVersion in houdiniVersions :
133-
compilerVersion = IEEnv.registry["apps"]["houdini"][houdiniVersion][platform]["compilerVersion"]
134-
build( [ "APP=houdini", "APP_VERSION="+houdiniVersion ] )
131+
for houdiniVersion in houdiniVersions :
132+
compilerVersion = IEEnv.registry["apps"]["houdini"][houdiniVersion][platform]["compilerVersion"]
133+
build( [ "APP=houdini", "APP_VERSION="+houdiniVersion ] )
135134

136-
for rvVersion in rvVersions :
137-
build( [ "APP=rv", "APP_VERSION="+rvVersion, "DL_VERSION=UNDEFINED" ] )
138-
139-
installDocs()
140-
141-
else :
142-
143-
raise RuntimeError( "Unknown platform" )
135+
for rvVersion in rvVersions :
136+
build( [ "APP=rv", "APP_VERSION="+rvVersion, "DL_VERSION=UNDEFINED" ] )
144137

138+
installDocs()

contrib/IECoreUSD/src/IECoreUSD/ShaderAlgo.cpp

+18-11
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include "pxr/usd/usd/schemaRegistry.h"
5050
#endif
5151

52+
#include "boost/algorithm/string/predicate.hpp"
5253
#include "boost/algorithm/string/replace.hpp"
5354
#include "boost/pointer_cast.hpp"
5455

@@ -391,22 +392,28 @@ IECoreScene::ShaderNetworkPtr IECoreUSD::ShaderAlgo::readShaderNetwork( const px
391392
IECoreScene::ShaderNetworkPtr result = new IECoreScene::ShaderNetwork();
392393
IECoreScene::ShaderNetwork::Parameter outputHandle = readShaderNetworkWalk( usdSource.GetPrim().GetParent().GetPath(), usdSource.GetOutput( usdSourceName ), *result );
393394

394-
// For the output shader, set the type to "ai:surface" if it is "ai:shader".
395-
// This is complete nonsense - there is nothing to suggest that this shader is
396-
// of type surface - it could be a simple texture or noise, or even a
397-
// displacement or volume shader.
395+
// If the output shader has type "ai:shader" then set its type to
396+
// "ai:surface" or "ai:light" as appropriate. This is just a heuristic,
397+
// needed because we don't write the type out in `writeShaderNetwork()`.
398+
// It's fragile because it is possible to assign `ai:shader` types as
399+
// displacements or volumes as well as surfaces. But in the majority of
400+
// cases this allows us to round-trip shader assignments as required by
401+
// Gaffer's conventions.
398402
//
399-
// But arbitrarily setting the type on the output to "ai:surface" matches our
400-
// current Gaffer convention, so it allows round-tripping.
401-
// In the long run, the fact this is working at all appears to indicate that we
402-
// don't use the suffix of the shader type for anything, and we should just set
403-
// everything to prefix:shader ( aside from lights, which are a bit of a
404-
// different question )
403+
/// \todo In the long run, we want to stop relying on shader types
404+
/// completely.
405405
const IECoreScene::Shader *outputShader = result->getShader( outputHandle.shader );
406406
if( outputShader->getType() == "ai:shader" )
407407
{
408408
IECoreScene::ShaderPtr o = outputShader->copy();
409-
o->setType( "ai:surface" );
409+
if( boost::ends_with( outputShader->getName(), "_light" ) )
410+
{
411+
o->setType( "ai:light" );
412+
}
413+
else
414+
{
415+
o->setType( "ai:surface" );
416+
}
410417
result->setShader( outputHandle.shader, std::move( o ) );
411418
}
412419

contrib/IECoreUSD/src/IECoreUSD/USDScene.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ IECore::PathMatcher localSet( const pxr::UsdPrim &prim, const pxr::TfToken &name
247247
{
248248
result.addPath( std::vector<IECore::InternedString>() );
249249
}
250-
return result;
251250
}
252251

253252
const size_t prefixSize = prim.GetPath().GetPathElementCount();

contrib/IECoreUSD/test/IECoreUSD/USDSceneTest.py

+28
Original file line numberDiff line numberDiff line change
@@ -3973,5 +3973,33 @@ def testReadFromStageCache( self ) :
39733973
self.assertEqual( root.childNames(), [ "sphere" ] )
39743974
self.assertIsInstance( root.child( "sphere" ).readObject( 0 ), IECoreScene.SpherePrimitive )
39753975

3976+
def testRoundTripArnoldLight( self ) :
3977+
3978+
lightShader = IECoreScene.ShaderNetwork(
3979+
shaders = {
3980+
"light" : IECoreScene.Shader( "distant_light", "ai:light", parameters = { "exposure" : 2.0 } )
3981+
},
3982+
output = "light",
3983+
)
3984+
3985+
root = IECoreScene.SceneInterface.create(
3986+
os.path.join( self.temporaryDirectory(), "test.usda" ),
3987+
IECore.IndexedIO.OpenMode.Write
3988+
)
3989+
light = root.createChild( "light" )
3990+
light.writeAttribute( "ai:light", lightShader, 0 )
3991+
root.writeSet( "__lights", IECore.PathMatcher( [ "/light" ] ) )
3992+
del root, light
3993+
3994+
root = IECoreScene.SceneInterface.create(
3995+
os.path.join( self.temporaryDirectory(), "test.usda" ),
3996+
IECore.IndexedIO.OpenMode.Read
3997+
)
3998+
light = root.child( "light" )
3999+
self.assertIn( "ai:light", light.attributeNames() )
4000+
self.assertEqual( light.readAttribute( "ai:light", 0 ), lightShader )
4001+
self.assertIn( "__lights", root.setNames() )
4002+
self.assertEqual( root.readSet( "__lights" ), IECore.PathMatcher( [ "/light" ] ) )
4003+
39764004
if __name__ == "__main__":
39774005
unittest.main()
+44-64
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,53 @@
11
#usda 1.0
2-
# Source: https://graphics.pixar.com/usd/docs/api/_usd_skel__schema_overview.html
2+
#Source: https://graphics.pixar.com/usd/docs/api/_usd_skel__schema_overview.html
33
(
4-
startTimeCode = 1
5-
endTimeCode = 10
4+
endTimeCode = 10
5+
startTimeCode = 1
6+
upAxis = "Y"
67
)
8+
79
def SkelRoot "Model" (
8-
prepend apiSchemas = ["SkelBindingAPI"]
10+
prepend apiSchemas = ["SkelBindingAPI"]
911
)
1012
{
11-
def Skeleton "Skel" {
12-
uniform token[] joints = ["Shoulder", "Shoulder/Elbow", "Shoulder/Elbow/Hand"]
13-
uniform matrix4d[] bindTransforms = [
14-
((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)),
15-
((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,2,1)),
16-
((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,4,1))
17-
]
18-
uniform matrix4d[] restTransforms = [
19-
((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)),
20-
((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,2,1)),
21-
((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,2,1))
22-
]
23-
def SkelAnimation "Anim" {
24-
uniform token[] joints = ["Shoulder/Elbow"]
13+
def Skeleton "Skel" (
14+
prepend apiSchemas = ["SkelBindingAPI"]
15+
)
16+
{
17+
uniform matrix4d[] bindTransforms = [( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ), ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 2, 1) ), ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 4, 1) )]
18+
uniform token[] joints = ["Shoulder", "Shoulder/Elbow", "Shoulder/Elbow/Hand"]
19+
uniform matrix4d[] restTransforms = [( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) ), ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 2, 1) ), ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 2, 1) )]
20+
rel skel:animationSource = </Model/Skel/Anim>
2521

26-
float3[] translations = [(0,0,2)]
27-
quatf[] rotations.timeSamples = {
28-
1: [(1,0,0,0)],
29-
10: [(0.7071, 0.7071, 0, 0)]
30-
}
31-
half3[] scales = [(1,1,1)]
32-
}
22+
def SkelAnimation "Anim"
23+
{
24+
uniform token[] joints = ["Shoulder/Elbow"]
25+
quatf[] rotations.timeSamples = {
26+
1: [(1, 0, 0, 0)],
27+
10: [(0.7071, 0.7071, 0, 0)],
28+
}
29+
half3[] scales = [(1, 1, 1)]
30+
float3[] translations = [(0, 0, 2)]
31+
}
32+
}
3333

34-
rel skel:animationSource = <Anim>
35-
}
36-
def Mesh "Arm" (
37-
prepend apiSchemas = ["SkelBindingAPI"]
38-
)
39-
{
40-
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4]
41-
int[] faceVertexIndices = [
42-
2, 3, 1, 0,
43-
6, 7, 5, 4,
44-
8, 9, 7, 6,
45-
3, 2, 9, 8,
46-
10, 11, 4, 5,
47-
0, 1, 11, 10,
48-
7, 9, 10, 5,
49-
9, 2, 0, 10,
50-
3, 8, 11, 1,
51-
8, 6, 4, 11
52-
]
53-
point3f[] points = [
54-
(0.5, -0.5, 4), (-0.5, -0.5, 4), (0.5, 0.5, 4), (-0.5, 0.5, 4),
55-
(-0.5, -0.5, 0), (0.5, -0.5, 0), (-0.5, 0.5, 0), (0.5, 0.5, 0),
56-
(-0.5, 0.5, 2), (0.5, 0.5, 2), (0.5, -0.5, 2), (-0.5, -0.5, 2)
57-
]
58-
rel skel:skeleton = </Model/Skel>
59-
int[] primvars:skel:jointIndices = [
60-
2,2,2,2, 0,0,0,0, 1,1,1,1
61-
] (
62-
interpolation = "vertex"
63-
elementSize = 1
64-
)
65-
float[] primvars:skel:jointWeights = [
66-
1,1,1,1, 1,1,1,1, 1,1,1,1
67-
] (
68-
interpolation = "vertex"
69-
elementSize = 1
70-
)
71-
matrix4d primvars:skel:geomBindTransform = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1))
72-
}
34+
def Mesh "Arm" (
35+
prepend apiSchemas = ["SkelBindingAPI"]
36+
)
37+
{
38+
int[] faceVertexCounts = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4]
39+
int[] faceVertexIndices = [2, 3, 1, 0, 6, 7, 5, 4, 8, 9, 7, 6, 3, 2, 9, 8, 10, 11, 4, 5, 0, 1, 11, 10, 7, 9, 10, 5, 9, 2, 0, 10, 3, 8, 11, 1, 8, 6, 4, 11]
40+
point3f[] points = [(0.5, -0.5, 4), (-0.5, -0.5, 4), (0.5, 0.5, 4), (-0.5, 0.5, 4), (-0.5, -0.5, 0), (0.5, -0.5, 0), (-0.5, 0.5, 0), (0.5, 0.5, 0), (-0.5, 0.5, 2), (0.5, 0.5, 2), (0.5, -0.5, 2), (-0.5, -0.5, 2)]
41+
matrix4d primvars:skel:geomBindTransform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) )
42+
int[] primvars:skel:jointIndices = [2, 2, 2, 2, 0, 0, 0, 0, 1, 1, 1, 1] (
43+
elementSize = 1
44+
interpolation = "vertex"
45+
)
46+
float[] primvars:skel:jointWeights = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] (
47+
elementSize = 1
48+
interpolation = "vertex"
49+
)
50+
rel skel:skeleton = </Model/Skel>
51+
}
7352
}
53+

contrib/IECoreUSD/test/IECoreUSD/data/shaderNameConflict.usda

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#usda 1.0
2+
(
3+
upAxis = "Y"
4+
)
25

3-
def Xform "shaderLocation"
6+
def Xform "shaderLocation" (
7+
prepend apiSchemas = ["MaterialBindingAPI"]
8+
)
49
{
5-
rel material:binding = </shaderLocation/materials/testMat>
610
custom float arnold:surface = 7
11+
rel material:binding = </shaderLocation/materials/testMat>
712

813
def Scope "materials"
914
{

src/IECoreImage/DisplayDriverServer.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class DisplayDriverServer::PrivateData : public RefCounted
175175

176176
void openPort( DisplayDriverServer::Port portNumber )
177177
{
178-
m_endpoint = boost::asio::ip::tcp::endpoint( tcp::v4(), portNumber );
178+
m_endpoint = boost::asio::ip::tcp::endpoint( tcp::v6(), portNumber );
179179
m_acceptor.open( m_endpoint.protocol() );
180180
#ifdef _MSC_VER
181181
m_acceptor.set_option( boost::asio::ip::tcp::acceptor::reuse_address( false ) );
@@ -184,6 +184,7 @@ class DisplayDriverServer::PrivateData : public RefCounted
184184
#else
185185
m_acceptor.set_option( boost::asio::ip::tcp::acceptor::reuse_address( true ) );
186186
#endif
187+
m_acceptor.set_option( boost::asio::ip::v6_only( false ) );
187188
m_acceptor.bind( m_endpoint );
188189
m_acceptor.listen();
189190
}

0 commit comments

Comments
 (0)