def test_ShaderProperties(self): """ Test property correctness on the "TestShaderPropertiesNodeOSL" node. See shaderParserTestUtils TestShaderPropertiesNode method for detailed description of the test. """ URI = "TestShaderPropertiesNodeOSL.oso" sourceCode = "" metadata = {} blindData = "" discoveryResult = Ndr.NodeDiscoveryResult( "TestShaderPropertiesNodeOSL", # Identifier Ndr.Version(), # Version "TestShaderPropertiesNodeOSL", # Name "", # Family "oso", # Discovery type (extension) "OSL", # Source type URI, # URI URI, # Resolved URI sourceCode, # sourceCode metadata, # metadata blindData # blindData ) node = SdrOsl.OslParser().Parse(discoveryResult) assert node is not None utils.TestShaderPropertiesNode(node)
def test_testSplitShaderIdentifier(self): SSI = UsdShade.ShaderDefUtils.SplitShaderIdentifier self.assertEqual(SSI('Primvar'), ('Primvar', 'Primvar', Ndr.Version())) self.assertEqual(SSI('Primvar_float2'), ('Primvar', 'Primvar_float2', Ndr.Version())) self.assertEqual(SSI('Primvar_float2_3'), ('Primvar', 'Primvar_float2', Ndr.Version(3, 0))) self.assertEqual(SSI('Primvar_float_3_4'), ('Primvar', 'Primvar_float', Ndr.Version(3, 4))) self.assertIsNone(SSI('Primvar_float2_3_nonNumber')) self.assertIsNone(SSI('Primvar_4_nonNumber'))
def test_testSplitShaderIdentifier(self): self.assertEqual(Ndr.FsHelpersSplitShaderIdentifier('Primvar'), ('Primvar', 'Primvar', Ndr.Version())) self.assertEqual(Ndr.FsHelpersSplitShaderIdentifier('Primvar_float2'), ('Primvar', 'Primvar_float2', Ndr.Version())) self.assertEqual( Ndr.FsHelpersSplitShaderIdentifier('Primvar_float2_3'), ('Primvar', 'Primvar_float2', Ndr.Version(3, 0))) self.assertEqual( Ndr.FsHelpersSplitShaderIdentifier('Primvar_float_3_4'), ('Primvar', 'Primvar_float', Ndr.Version(3, 4))) self.assertIsNone( Ndr.FsHelpersSplitShaderIdentifier('Primvar_float2_3_nonNumber')) self.assertIsNone( Ndr.FsHelpersSplitShaderIdentifier('Primvar_4_nonNumber'))
def test_Version(self): """ Test NdrVersion. """ # Invalid version. v = Ndr.Version() self.assertFalse(v) self.assertFalse(v.IsDefault()) self.relationalTestsEqual(v, Ndr.Version()) self.reprTests(v) self.assertEqual(str(v), "<invalid version>") # Invalid default version. u = v.GetAsDefault() self.assertFalse(u) self.assertTrue(u.IsDefault()) self.relationalTestsEqual(u, Ndr.Version()) self.reprTests(u) self.assertEqual(str(u), "<invalid version>") # Valid versions. v1 = Ndr.Version(1) v1_0 = Ndr.Version(1, 0).GetAsDefault() v1_1 = Ndr.Version(1, 1) v2_0 = Ndr.Version(2, 0) self.assertTrue(v1) self.assertTrue(v1_0) self.assertTrue(v1_1) self.assertTrue(v2_0) self.assertFalse(v1.IsDefault()) self.assertTrue(v1_0.IsDefault()) self.assertFalse(v1_1.IsDefault()) self.assertFalse(v2_0.IsDefault()) self.assertEqual(str(v1), "1") self.assertEqual(str(v1_0), "1") self.assertEqual(str(v1_1), "1.1") self.assertEqual(str(v2_0), "2") self.assertEqual(v1.GetStringSuffix(), "_1") self.assertEqual(v1_0.GetStringSuffix(), "") self.assertEqual(v1_1.GetStringSuffix(), "_1.1") self.assertEqual(v2_0.GetStringSuffix(), "_2") self.relationalTestsEqual(v1, v1) self.relationalTestsEqual(v1_0, v1_0) self.relationalTestsEqual(v1, v1_0) self.relationalTestsEqual(v1_1, v1_1) self.relationalTestsEqual(v2_0, v2_0) self.relationalTestsLess(v1, v1_1) self.relationalTestsLess(v1_0, v1_1) self.relationalTestsLess(v1_0, v2_0) self.relationalTestsLess(v1_1, v2_0) self.reprTests(v1) self.reprTests(v1_0) self.reprTests(v1_1) self.reprTests(v2_0)
def setUpClass(cls): cls.URI = "TestNodeOSL.oso" cls.sourceCode = "TestNode source code" cls.metadata = {"extra": "extraMetadata", "primvars": "a|b|c"} cls.blindData = "unused blind data" discoveryResult = Ndr.NodeDiscoveryResult( "TestNodeOSL", # Identifier Ndr.Version(), # Version "TestNodeOSL", # Name "", # Family "oso", # Discovery type (extension) "OSL", # Source type cls.URI, # URI cls.URI, # Resolved URI sourceCode=cls.sourceCode, metadata=cls.metadata, blindData=cls.blindData) cls.node = SdrOsl.OslParser().Parse(discoveryResult) assert cls.node is not None
def test_ShaderDefParser(self, useForwardedAPI=True): stage = Usd.Stage.CreateNew( 'shaderDef.usda' if useForwardedAPI else 'shaderDef2.usda') shaderPrim = UsdShade.Shader.Define(stage, "/Primvar_float_2") if useForwardedAPI: # UsdShadeShader has API that covers UsdShadeNodeDefAPI methods; # test that they work. nodeDefAPI = shaderPrim else: # Use the methods as implemented on UsdShadeNodeDefAPI. nodeDefAPI = UsdShade.NodeDefAPI(shaderPrim) shaderPrim.SetSdrMetadataByKey(Sdr.NodeMetadata.Role, Sdr.NodeRole.Primvar) nodeDefAPI.GetImplementationSourceAttr().Set( UsdShade.Tokens.sourceAsset) # Create the files referenced by the sourceAsset attributes. osoPath = os.path.normpath(os.path.join(os.getcwd(), 'primvar_2.oso')) glslfxPath = os.path.normpath( os.path.join(os.getcwd(), 'primvar_2.glslfx')) # Create the files referenced by the sourceAsset attributes. # These files need to exist for node discovery to succeed. open(osoPath, "a").close() open(glslfxPath, "a").close() nodeDefAPI.SetSourceAsset(Sdf.AssetPath(osoPath), "OSL") nodeDefAPI.SetSourceAsset(Sdf.AssetPath(glslfxPath), "glslfx") primvarNameInput = shaderPrim.CreateInput('primvarName', Sdf.ValueTypeNames.Token) primvarNameInput.SetConnectability(UsdShade.Tokens.interfaceOnly) primvarNameInput.SetSdrMetadataByKey('primvarProperty', "1") primvarFileInput = shaderPrim.CreateInput('primvarFile', Sdf.ValueTypeNames.Asset) primvarFileInput.SetConnectability(UsdShade.Tokens.interfaceOnly) fallbackInput = shaderPrim.CreateInput('fallback', Sdf.ValueTypeNames.Float) fallbackInput.SetSdrMetadataByKey('defaultInput', "1") # Create dummy inputs of other types for testing. float2Input = shaderPrim.CreateInput('float2Val', Sdf.ValueTypeNames.Float2) float3Input = shaderPrim.CreateInput('float3Val', Sdf.ValueTypeNames.Float3) float4Input = shaderPrim.CreateInput('float4Val', Sdf.ValueTypeNames.Float4) colorInput = shaderPrim.CreateInput('someColor', Sdf.ValueTypeNames.Color3f) vectorInput = shaderPrim.CreateInput('someVector', Sdf.ValueTypeNames.Vector3f) normalInput = shaderPrim.CreateInput('normalVector', Sdf.ValueTypeNames.Normal3f) matrixInput = shaderPrim.CreateInput('someVector', Sdf.ValueTypeNames.Matrix4d) resultOutput = shaderPrim.CreateOutput('result', Sdf.ValueTypeNames.Float) result2Output = shaderPrim.CreateOutput('result2', Sdf.ValueTypeNames.Float2) discoveryResults = UsdShade.ShaderDefUtils.GetNodeDiscoveryResults( shaderPrim, stage.GetRootLayer().realPath) self.assertEqual(len(discoveryResults), 2) parserPlugin = UsdShade.ShaderDefParserPlugin() nodes = [ parserPlugin.Parse(discResult) for discResult in discoveryResults ] self.assertEqual(len(nodes), 2) for n in nodes: self.assertEqual(n.GetVersion(), Ndr.Version(2, 0)) self.assertTrue(n.IsValid()) self.assertEqual(n.GetFamily(), 'Primvar') self.assertEqual(n.GetIdentifier(), 'Primvar_float_2') self.assertEqual(n.GetImplementationName(), 'Primvar_float') self.assertEqual(n.GetRole(), Sdr.NodeRole.Primvar) assetIdentifierInputNames = n.GetAssetIdentifierInputNames() self.assertEqual(len(assetIdentifierInputNames), 1) self.assertEqual(n.GetDefaultInput().GetName(), 'fallback') self.assertEqual(assetIdentifierInputNames[0], 'primvarFile') self.assertEqual(n.GetMetadata(), { 'primvars': '$primvarName', 'role': 'primvar' }) self.assertEqual(n.GetInputNames(), [ 'fallback', 'float2Val', 'float3Val', 'float4Val', 'normalVector', 'primvarFile', 'primvarName', 'someColor', 'someVector' ]) self.assertEqual(n.GetOutputNames(), ['result', 'result2']) if n.GetSourceType() == "OSL": self.assertEqual( os.path.normcase(n.GetResolvedImplementationURI()), os.path.normcase(osoPath)) elif n.GetSourceType() == "glslfx": self.assertEqual( os.path.normcase(n.GetResolvedImplementationURI()), os.path.normcase(glslfxPath)) # Clean-up files. os.remove(stage.GetRootLayer().realPath) os.remove(osoPath) os.remove(glslfxPath)
def test_NdrFilesystemDiscovery(self): """ Ensure the discovery process works correctly, including finding nested directories and nodes with the same name. """ fsPlugin = Ndr._FilesystemDiscoveryPlugin() context = Ndr._FilesystemDiscoveryPlugin.Context() discoveryResults = fsPlugin.DiscoverNodes(context) discoveredNodeNames = [(result.identifier, result.name, result.family, result.version) for result in discoveryResults] assert len(discoveryResults) == 13 assert set(discoveredNodeNames) == { ("TestNodeARGS", "TestNodeARGS", "TestNodeARGS", Ndr.Version()), ("TestNodeOSL", "TestNodeOSL", "TestNodeOSL", Ndr.Version()), ("NestedTestARGS", "NestedTestARGS", "NestedTestARGS", Ndr.Version()), ("NestedTestOSL", "NestedTestOSL", "NestedTestOSL", Ndr.Version()), ("TestNodeSameName", "TestNodeSameName", "TestNodeSameName", Ndr.Version()), ("Primvar", "Primvar", "Primvar", Ndr.Version()), ("Primvar_float", "Primvar_float", "Primvar", Ndr.Version()), ("Primvar_float_3", "Primvar_float", "Primvar", Ndr.Version(3, 0)), ("Primvar_float_3_4", "Primvar_float", "Primvar", Ndr.Version(3, 4)), ("Primvar_float2", "Primvar_float2", "Primvar", Ndr.Version()), ("Primvar_float2_3", "Primvar_float2", "Primvar", Ndr.Version(3, 0)), ("Primvar_float2_3_4", "Primvar_float2", "Primvar", Ndr.Version(3, 4)) } # Verify that the discovery files helper returns the same URIs as # full discovery plugin when run on the same search path and allowed # extensions. discoveryUris = Ndr.FsHelpersDiscoverFiles([os.getcwd()], ["oso", "args"], True) assert len(discoveryResults) == 13 for result, uris in zip(discoveryResults, discoveryUris): assert result.uri == uris.uri assert result.resolvedUri == result.resolvedUri
def test_NodeDiscovery(self): """ Test MaterialX node discovery. """ # Let the plugin discover our nodes. searchPath = os.getcwd() os.environ['PXR_USDMTLX_PLUGIN_SEARCH_PATHS'] = searchPath registry = Sdr.Registry() # Check node indentifiers. names = sorted( registry.GetNodeIdentifiers('UsdMtlxTestNode', Ndr.VersionFilterAllVersions)) self.assertEqual(names, [ 'pxr_nd_float', 'pxr_nd_integer', 'pxr_nd_string', 'pxr_nd_vector', 'pxr_nd_vector_2', 'pxr_nd_vector_2_1', 'pxr_nd_vector_noversion' ]) # Check node names. names = sorted(registry.GetNodeNames('UsdMtlxTestNode')) self.assertEqual(names, [ 'pxr_nd_float', 'pxr_nd_integer', 'pxr_nd_string', 'pxr_nd_vector' ]) # Get by family. Non-default versions should be dropped. # # Because pxr_nd_vector_noversion has no version at all the # discovery assumes it's the default version despite appearances # to the human eye. nodes = registry.GetNodesByFamily('UsdMtlxTestNode') names = sorted([node.GetIdentifier() for node in nodes]) self.assertEqual(names, [ 'pxr_nd_float', 'pxr_nd_integer', 'pxr_nd_string', 'pxr_nd_vector_2', 'pxr_nd_vector_noversion' ]) # Check all versions. # Note that this sorting depends on how unique identifiers are # constructed so the order of items on the right hand side of # the assertion must stay in sync with that. names = sorted([ name for name in registry.GetNodeIdentifiers( filter=Ndr.VersionFilterAllVersions) if name.startswith('pxr_') ]) nodes = [registry.GetNodeByIdentifier(name) for name in names] versions = [node.GetVersion() for node in nodes] self.assertEqual(versions, [ Ndr.Version(), Ndr.Version(), Ndr.Version(), Ndr.Version(1), Ndr.Version(2, 0), Ndr.Version(2, 1), Ndr.Version() ]) # Check default versions. names = sorted([ name for name in registry.GetNodeIdentifiers( filter=Ndr.VersionFilterDefaultOnly) if name.startswith('pxr_') ]) self.assertEqual(names, [ 'pxr_nd_float', 'pxr_nd_integer', 'pxr_nd_string', 'pxr_nd_vector_2', 'pxr_nd_vector_noversion' ]) nodes = [registry.GetNodeByIdentifier(name) for name in names] versions = [node.GetVersion() for node in nodes] self.assertEqual(versions, [ Ndr.Version(), Ndr.Version(), Ndr.Version(), Ndr.Version(2, 0), Ndr.Version() ])
def test_NodeDiscovery(self): """ Test MaterialX node discovery. """ registry = Sdr.Registry() # Check node identifiers. names = sorted( registry.GetNodeIdentifiers('UsdMtlxTestNode', Ndr.VersionFilterAllVersions)) self.assertEqual(names, [ 'pxr_nd_boolean', 'pxr_nd_float', 'pxr_nd_integer', 'pxr_nd_string', 'pxr_nd_vector', 'pxr_nd_vector_2', 'pxr_nd_vector_2_1', 'pxr_nd_vector_noversion' ]) # Check node names. names = sorted(registry.GetNodeNames('UsdMtlxTestNode')) self.assertEqual(names, [ 'pxr_nd_boolean', 'pxr_nd_float', 'pxr_nd_integer', 'pxr_nd_string', 'pxr_nd_vector' ]) # Get by family. Non-default versions should be dropped. # # Because pxr_nd_vector_noversion has no version at all the # discovery assumes it's the default version despite appearances # to the human eye. nodes = registry.GetNodesByFamily('UsdMtlxTestNode') names = sorted([node.GetIdentifier() for node in nodes]) self.assertEqual(names, [ 'pxr_nd_boolean', 'pxr_nd_float', 'pxr_nd_integer', 'pxr_nd_string', 'pxr_nd_vector_2', 'pxr_nd_vector_noversion' ]) # Check all versions. # Note that this sorting depends on how unique identifiers are # constructed so the order of items on the right hand side of # the assertion must stay in sync with that. names = sorted([ name for name in registry.GetNodeIdentifiers( filter=Ndr.VersionFilterAllVersions) if name.startswith('pxr_') ]) nodes = [registry.GetNodeByIdentifier(name) for name in names] versions = [node.GetVersion() for node in nodes] self.assertEqual(versions, [ Ndr.Version(), Ndr.Version(), Ndr.Version(), Ndr.Version(), Ndr.Version(), Ndr.Version(1), Ndr.Version(2, 0), Ndr.Version(2, 1), Ndr.Version() ]) # Check default versions. names = sorted([ name for name in registry.GetNodeIdentifiers( filter=Ndr.VersionFilterDefaultOnly) if name.startswith('pxr_') ]) self.assertEqual(names, [ 'pxr_nd_boolean', 'pxr_nd_booleanDefaults', 'pxr_nd_float', 'pxr_nd_integer', 'pxr_nd_string', 'pxr_nd_vector_2', 'pxr_nd_vector_noversion' ]) nodes = [registry.GetNodeByIdentifier(name) for name in names] versions = [node.GetVersion() for node in nodes] self.assertEqual(versions, [ Ndr.Version(), Ndr.Version(), Ndr.Version(), Ndr.Version(), Ndr.Version(), Ndr.Version(2, 0), Ndr.Version() ]) # Check default values of boolean inputs: node = registry.GetNodeByIdentifier("pxr_nd_booleanDefaults") self.assertTrue(node) trueInput = node.GetInput("inTrue") self.assertTrue(trueInput.GetDefaultValue()) self.assertTrue(trueInput.GetDefaultValueAsSdfType()) falseInput = node.GetInput("inFalse") self.assertFalse(falseInput.GetDefaultValue()) self.assertFalse(falseInput.GetDefaultValueAsSdfType())
def TestShaderPropertiesNode(node): """ Tests property correctness on the specified shader node, which must be one of the following pre-defined nodes: * 'TestShaderPropertiesNodeOSL' * 'TestShaderPropertiesNodeARGS' * 'TestShaderPropertiesNodeUSD' These pre-defined nodes have a property of every type that Sdr supports. Property correctness is defined as: * The shader property has the expected SdrPropertyType * The shader property has the expected SdfValueTypeName * If the shader property has a default value, the default value's type matches the shader property's type """ # This test should only be run on the following allowed node names # -------------------------------------------------------------------------- allowedNodeNames = [ "TestShaderPropertiesNodeOSL", "TestShaderPropertiesNodeARGS", "TestShaderPropertiesNodeUSD" ] # If this assertion on the name fails, then this test was called with the # wrong node. assert node.GetName() in allowedNodeNames # If we have the correct node name, double check that the source type is # also correct if node.GetName() == "TestShaderPropertiesNodeOSL": assert node.GetSourceType() == "OSL" elif node.GetName() == "TestShaderPropertiesNodeARGS": assert node.GetSourceType() == "RmanCpp" elif node.GetName() == "TestShaderPropertiesNodeUSD": assert node.GetSourceType() == "glslfx" nodeInputs = { propertyName: node.GetShaderInput(propertyName) for propertyName in node.GetInputNames() } nodeOutputs = { propertyName: node.GetShaderOutput(propertyName) for propertyName in node.GetOutputNames() } # For each property, we test that: # * The property has the expected SdrPropertyType # * The property has the expected TfType (from SdfValueTypeName) # * The property's type and default value's type match property = nodeInputs["inputInt"] assert property.GetType() == Sdr.PropertyTypes.Int assert GetType(property) == Tf.Type.FindByName("int") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputString"] assert property.GetType() == Sdr.PropertyTypes.String assert GetType(property) == Tf.Type.FindByName("string") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputFloat"] assert property.GetType() == Sdr.PropertyTypes.Float assert GetType(property) == Tf.Type.FindByName("float") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputColor"] assert property.GetType() == Sdr.PropertyTypes.Color assert GetType(property) == Tf.Type.FindByName("GfVec3f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputPoint"] assert property.GetType() == Sdr.PropertyTypes.Point assert GetType(property) == Tf.Type.FindByName("GfVec3f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputNormal"] assert property.GetType() == Sdr.PropertyTypes.Normal assert GetType(property) == Tf.Type.FindByName("GfVec3f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputVector"] assert property.GetType() == Sdr.PropertyTypes.Vector assert GetType(property) == Tf.Type.FindByName("GfVec3f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputMatrix"] assert property.GetType() == Sdr.PropertyTypes.Matrix assert GetType(property) == Tf.Type.FindByName("GfMatrix4d") assert Ndr._ValidateProperty(node, property) if node.GetName() != "TestShaderPropertiesNodeUSD": # XXX Note that 'struct' and 'vstruct' types are currently unsupported # by the UsdShadeShaderDefParserPlugin, which parses shaders defined in # usd files. Please see UsdShadeShaderDefParserPlugin implementation for # details. property = nodeInputs["inputStruct"] assert property.GetType() == Sdr.PropertyTypes.Struct assert GetType(property) == Tf.Type.FindByName("TfToken") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputVstruct"] assert property.GetType() == Sdr.PropertyTypes.Vstruct assert GetType(property) == Tf.Type.FindByName("TfToken") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputIntArray"] assert property.GetType() == Sdr.PropertyTypes.Int assert GetType(property) == Tf.Type.FindByName("VtArray<int>") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputStringArray"] assert property.GetType() == Sdr.PropertyTypes.String assert GetType(property) == Tf.Type.FindByName("VtArray<string>") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputFloatArray"] assert property.GetType() == Sdr.PropertyTypes.Float assert GetType(property) == Tf.Type.FindByName("VtArray<float>") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputColorArray"] assert property.GetType() == Sdr.PropertyTypes.Color assert GetType(property) == Tf.Type.FindByName("VtArray<GfVec3f>") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputPointArray"] assert property.GetType() == Sdr.PropertyTypes.Point assert GetType(property) == Tf.Type.FindByName("VtArray<GfVec3f>") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputNormalArray"] assert property.GetType() == Sdr.PropertyTypes.Normal assert GetType(property) == Tf.Type.FindByName("VtArray<GfVec3f>") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputVectorArray"] assert property.GetType() == Sdr.PropertyTypes.Vector assert GetType(property) == Tf.Type.FindByName("VtArray<GfVec3f>") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputMatrixArray"] assert property.GetType() == Sdr.PropertyTypes.Matrix assert GetType(property) == Tf.Type.FindByName("VtArray<GfMatrix4d>") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputFloat2"] assert property.GetType() == Sdr.PropertyTypes.Float assert GetType(property) == Tf.Type.FindByName("GfVec2f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputFloat3"] assert property.GetType() == Sdr.PropertyTypes.Float assert GetType(property) == Tf.Type.FindByName("GfVec3f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputFloat4"] assert property.GetType() == Sdr.PropertyTypes.Float assert GetType(property) == Tf.Type.FindByName("GfVec4f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputAsset"] assert property.GetType() == Sdr.PropertyTypes.String assert GetType(property) == Tf.Type.FindByName("SdfAssetPath") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputAssetArray"] assert property.GetType() == Sdr.PropertyTypes.String assert GetType(property) == Tf.Type.FindByName("VtArray<SdfAssetPath>") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputColorRoleNone"] assert property.GetType() == Sdr.PropertyTypes.Float assert GetType(property) == Tf.Type.FindByName("GfVec3f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputPointRoleNone"] assert property.GetType() == Sdr.PropertyTypes.Float assert GetType(property) == Tf.Type.FindByName("GfVec3f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputNormalRoleNone"] assert property.GetType() == Sdr.PropertyTypes.Float assert GetType(property) == Tf.Type.FindByName("GfVec3f") assert Ndr._ValidateProperty(node, property) property = nodeInputs["inputVectorRoleNone"] assert property.GetType() == Sdr.PropertyTypes.Float assert GetType(property) == Tf.Type.FindByName("GfVec3f") assert Ndr._ValidateProperty(node, property) property = nodeOutputs["outputSurface"] assert property.GetType() == Sdr.PropertyTypes.Terminal assert GetType(property) == Tf.Type.FindByName("TfToken") assert Ndr._ValidateProperty(node, property)