has that type been defined as a TfType? #383
Replies: 5 comments 2 replies
-
|
Hi @huangbinbin48070, thank you for posting your question. This USD API is used to check whether a registered schema has the property that can be applied with other API schemas. Examples of how this is used is as follows: registry = Usd.SchemaRegistry()
# Single-apply API schemas (can only be applied once per prim)
print("Single-Apply API Schemas:")
print(f"MaterialBindingAPI: {registry.IsMultipleApplyAPISchema('UsdShadeMaterialBindingAPI')}") # False
print(f"PhysicsRigidBodyAPI: {registry.IsMultipleApplyAPISchema('PhysicsRigidBodyAPI')}") # False
print(f"ModelAPI: {registry.IsMultipleApplyAPISchema('UsdModelAPI')}") # False
# Multiple-apply API schemas (can be applied multiple times with different instance names)
print("\nMultiple-Apply API Schemas:")
print(f"CollectionAPI: {registry.IsMultipleApplyAPISchema('UsdCollectionAPI')}") # False
print(f"PhysicsLimitAPI: {registry.IsMultipleApplyAPISchema('PhysicsLimitAPI')}") # True
print(f"PhysicsDriveAPI: {registry.IsMultipleApplyAPISchema('PhysicsDriveAPI')}") # TrueSo you can use it after you have registered your custom schema to check whether it has that property. Does that answer your question? |
Beta Was this translation helpful? Give feedback.
-
|
IsMultipleApplyAPISchema should work with string type paramters as well as schema class type. |
Beta Was this translation helpful? Give feedback.
-
|
when i build my usd schema , linker using usd_tf.lib in when i load usd plugin ,runtime usd_tf.dll in but even i copy and covered , this probolm still exists . |
Beta Was this translation helpful? Give feedback.
-
|
remove compiler option /Zc:inline |
Beta Was this translation helpful? Give feedback.
-
|
Can you try: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
i have load my usd schema and registe it as well as use it to set attributes defined in .usda file
but it can't work with
Usd.SchemaRegistry().IsMultipleApplyAPISchemarun this pytho code snippt in my usd schema extention
output :
I googled this log but found no results
Has anyone encountered this problem?
Beta Was this translation helpful? Give feedback.
All reactions