OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

UsdExpiredPrimAccessError in UsdImagingStageSceneIndex::_ApplyPendingResyncs

Open lanierd-adsk opened this issue 2 years ago • 4 comments

Description of Issue

In USD 23.02 There are 2 issues :

  1. In UsdImagingStageSceneIndex::_ApplyPendingResyncs, when doing : UsdPrim prim = _stage->GetPrimAtPath(_usdPrimsToResync[i]); We don't check if the prim is valid/expired
  2. It throws later a UsdExpiredPrimAccessError.

Steps to Reproduce

I am providing a cpp file to repro (it was under Windows 10 with some Microsoft Visual Studio specific features but is easily portable)

  1. I load a stage (the file will be shared later)
  2. I create a UsdImagingStageSceneIndex which is monitoring this stage
  3. I create a scope primitive in the stage
  4. I rename that scope prim
  5. I call UsdImagingStageSceneIndex::ApplyPendingUpdates() and it throws an UsdExpiredPrimAccessError

System Information (OS, Hardware)

Windows 10.

Package Versions

Build Flags

lanierd-adsk avatar Jun 26 '23 09:06 lanierd-adsk

The stage file to use to repro :

#usda 1.0 ( doc = """Generated from Composed Stage of root layer c:\Users\lanierd\Documents\maya\projects\default\scenes\stageShape1-layer1.usd """ )

def Mesh "pSphere1" ( kind = "component" ) { uniform bool doubleSided = 1 float3[] extent = [(-1.0000002, -1, -1.0000005), (1, 1, 1.0000001)] int[] faceVertexCounts = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3] int[] faceVertexIndices = [0, 1, 21, 20, 1, 2, 22, 21, 2, 3, 23, 22, 3, 4, 24, 23, 4, 5, 25, 24, 5, 6, 26, 25, 6, 7, 27, 26, 7, 8, 28, 27, 8, 9, 29, 28, 9, 10, 30, 29, 10, 11, 31, 30, 11, 12, 32, 31, 12, 13, 33, 32, 13, 14, 34, 33, 14, 15, 35, 34, 15, 16, 36, 35, 16, 17, 37, 36, 17, 18, 38, 37, 18, 19, 39, 38, 19, 0, 20, 39, 20, 21, 41, 40, 21, 22, 42, 41, 22, 23, 43, 42, 23, 24, 44, 43, 24, 25, 45, 44, 25, 26, 46, 45, 26, 27, 47, 46, 27, 28, 48, 47, 28, 29, 49, 48, 29, 30, 50, 49, 30, 31, 51, 50, 31, 32, 52, 51, 32, 33, 53, 52, 33, 34, 54, 53, 34, 35, 55, 54, 35, 36, 56, 55, 36, 37, 57, 56, 37, 38, 58, 57, 38, 39, 59, 58, 39, 20, 40, 59, 40, 41, 61, 60, 41, 42, 62, 61, 42, 43, 63, 62, 43, 44, 64, 63, 44, 45, 65, 64, 45, 46, 66, 65, 46, 47, 67, 66, 47, 48, 68, 67, 48, 49, 69, 68, 49, 50, 70, 69, 50, 51, 71, 70, 51, 52, 72, 71, 52, 53, 73, 72, 53, 54, 74, 73, 54, 55, 75, 74, 55, 56, 76, 75, 56, 57, 77, 76, 57, 58, 78, 77, 58, 59, 79, 78, 59, 40, 60, 79, 60, 61, 81, 80, 61, 62, 82, 81, 62, 63, 83, 82, 63, 64, 84, 83, 64, 65, 85, 84, 65, 66, 86, 85, 66, 67, 87, 86, 67, 68, 88, 87, 68, 69, 89, 88, 69, 70, 90, 89, 70, 71, 91, 90, 71, 72, 92, 91, 72, 73, 93, 92, 73, 74, 94, 93, 74, 75, 95, 94, 75, 76, 96, 95, 76, 77, 97, 96, 77, 78, 98, 97, 78, 79, 99, 98, 79, 60, 80, 99, 80, 81, 101, 100, 81, 82, 102, 101, 82, 83, 103, 102, 83, 84, 104, 103, 84, 85, 105, 104, 85, 86, 106, 105, 86, 87, 107, 106, 87, 88, 108, 107, 88, 89, 109, 108, 89, 90, 110, 109, 90, 91, 111, 110, 91, 92, 112, 111, 92, 93, 113, 112, 93, 94, 114, 113, 94, 95, 115, 114, 95, 96, 116, 115, 96, 97, 117, 116, 97, 98, 118, 117, 98, 99, 119, 118, 99, 80, 100, 119, 100, 101, 121, 120, 101, 102, 122, 121, 102, 103, 123, 122, 103, 104, 124, 123, 104, 105, 125, 124, 105, 106, 126, 125, 106, 107, 127, 126, 107, 108, 128, 127, 108, 109, 129, 128, 109, 110, 130, 129, 110, 111, 131, 130, 111, 112, 132, 131, 112, 113, 133, 132, 113, 114, 134, 133, 114, 115, 135, 134, 115, 116, 136, 135, 116, 117, 137, 136, 117, 118, 138, 137, 118, 119, 139, 138, 119, 100, 120, 139, 120, 121, 141, 140, 121, 122, 142, 141, 122, 123, 143, 142, 123, 124, 144, 143, 124, 125, 145, 144, 125, 126, 146, 145, 126, 127, 147, 146, 127, 128, 148, 147, 128, 129, 149, 148, 129, 130, 150, 149, 130, 131, 151, 150, 131, 132, 152, 151, 132, 133, 153, 152, 133, 134, 154, 153, 134, 135, 155, 154, 135, 136, 156, 155, 136, 137, 157, 156, 137, 138, 158, 157, 138, 139, 159, 158, 139, 120, 140, 159, 140, 141, 161, 160, 141, 142, 162, 161, 142, 143, 163, 162, 143, 144, 164, 163, 144, 145, 165, 164, 145, 146, 166, 165, 146, 147, 167, 166, 147, 148, 168, 167, 148, 149, 169, 168, 149, 150, 170, 169, 150, 151, 171, 170, 151, 152, 172, 171, 152, 153, 173, 172, 153, 154, 174, 173, 154, 155, 175, 174, 155, 156, 176, 175, 156, 157, 177, 176, 157, 158, 178, 177, 158, 159, 179, 178, 159, 140, 160, 179, 160, 161, 181, 180, 161, 162, 182, 181, 162, 163, 183, 182, 163, 164, 184, 183, 164, 165, 185, 184, 165, 166, 186, 185, 166, 167, 187, 186, 167, 168, 188, 187, 168, 169, 189, 188, 169, 170, 190, 189, 170, 171, 191, 190, 171, 172, 192, 191, 172, 173, 193, 192, 173, 174, 194, 193, 174, 175, 195, 194, 175, 176, 196, 195, 176, 177, 197, 196, 177, 178, 198, 197, 178, 179, 199, 198, 179, 160, 180, 199, 180, 181, 201, 200, 181, 182, 202, 201, 182, 183, 203, 202, 183, 184, 204, 203, 184, 185, 205, 204, 185, 186, 206, 205, 186, 187, 207, 206, 187, 188, 208, 207, 188, 189, 209, 208, 189, 190, 210, 209, 190, 191, 211, 210, 191, 192, 212, 211, 192, 193, 213, 212, 193, 194, 214, 213, 194, 195, 215, 214, 195, 196, 216, 215, 196, 197, 217, 216, 197, 198, 218, 217, 198, 199, 219, 218, 199, 180, 200, 219, 200, 201, 221, 220, 201, 202, 222, 221, 202, 203, 223, 222, 203, 204, 224, 223, 204, 205, 225, 224, 205, 206, 226, 225, 206, 207, 227, 226, 207, 208, 228, 227, 208, 209, 229, 228, 209, 210, 230, 229, 210, 211, 231, 230, 211, 212, 232, 231, 212, 213, 233, 232, 213, 214, 234, 233, 214, 215, 235, 234, 215, 216, 236, 235, 216, 217, 237, 236, 217, 218, 238, 237, 218, 219, 239, 238, 219, 200, 220, 239, 220, 221, 241, 240, 221, 222, 242, 241, 222, 223, 243, 242, 223, 224, 244, 243, 224, 225, 245, 244, 225, 226, 246, 245, 226, 227, 247, 246, 227, 228, 248, 247, 228, 229, 249, 248, 229, 230, 250, 249, 230, 231, 251, 250, 231, 232, 252, 251, 232, 233, 253, 252, 233, 234, 254, 253, 234, 235, 255, 254, 235, 236, 256, 255, 236, 237, 257, 256, 237, 238, 258, 257, 238, 239, 259, 258, 239, 220, 240, 259, 240, 241, 261, 260, 241, 242, 262, 261, 242, 243, 263, 262, 243, 244, 264, 263, 244, 245, 265, 264, 245, 246, 266, 265, 246, 247, 267, 266, 247, 248, 268, 267, 248, 249, 269, 268, 249, 250, 270, 269, 250, 251, 271, 270, 251, 252, 272, 271, 252, 253, 273, 272, 253, 254, 274, 273, 254, 255, 275, 274, 255, 256, 276, 275, 256, 257, 277, 276, 257, 258, 278, 277, 258, 259, 279, 278, 259, 240, 260, 279, 260, 261, 281, 280, 261, 262, 282, 281, 262, 263, 283, 282, 263, 264, 284, 283, 264, 265, 285, 284, 265, 266, 286, 285, 266, 267, 287, 286, 267, 268, 288, 287, 268, 269, 289, 288, 269, 270, 290, 289, 270, 271, 291, 290, 271, 272, 292, 291, 272, 273, 293, 292, 273, 274, 294, 293, 274, 275, 295, 294, 275, 276, 296, 295, 276, 277, 297, 296, 277, 278, 298, 297, 278, 279, 299, 298, 279, 260, 280, 299, 280, 281, 301, 300, 281, 282, 302, 301, 282, 283, 303, 302, 283, 284, 304, 303, 284, 285, 305, 304, 285, 286, 306, 305, 286, 287, 307, 306, 287, 288, 308, 307, 288, 289, 309, 308, 289, 290, 310, 309, 290, 291, 311, 310, 291, 292, 312, 311, 292, 293, 313, 312, 293, 294, 314, 313, 294, 295, 315, 314, 295, 296, 316, 315, 296, 297, 317, 316, 297, 298, 318, 317, 298, 299, 319, 318, 299, 280, 300, 319, 300, 301, 321, 320, 301, 302, 322, 321, 302, 303, 323, 322, 303, 304, 324, 323, 304, 305, 325, 324, 305, 306, 326, 325, 306, 307, 327, 326, 307, 308, 328, 327, 308, 309, 329, 328, 309, 310, 330, 329, 310, 311, 331, 330, 311, 312, 332, 331, 312, 313, 333, 332, 313, 314, 334, 333, 314, 315, 335, 334, 315, 316, 336, 335, 316, 317, 337, 336, 317, 318, 338, 337, 318, 319, 339, 338, 319, 300, 320, 339, 320, 321, 341, 340, 321, 322, 342, 341, 322, 323, 343, 342, 323, 324, 344, 343, 324, 325, 345, 344, 325, 326, 346, 345, 326, 327, 347, 346, 327, 328, 348, 347, 328, 329, 349, 348, 329, 330, 350, 349, 330, 331, 351, 350, 331, 332, 352, 351, 332, 333, 353, 352, 333, 334, 354, 353, 334, 335, 355, 354, 335, 336, 356, 355, 336, 337, 357, 356, 337, 338, 358, 357, 338, 339, 359, 358, 339, 320, 340, 359, 340, 341, 361, 360, 341, 342, 362, 361, 342, 343, 363, 362, 343, 344, 364, 363, 344, 345, 365, 364, 345, 346, 366, 365, 346, 347, 367, 366, 347, 348, 368, 367, 348, 349, 369, 368, 349, 350, 370, 369, 350, 351, 371, 370, 351, 352, 372, 371, 352, 353, 373, 372, 353, 354, 374, 373, 354, 355, 375, 374, 355, 356, 376, 375, 356, 357, 377, 376, 357, 358, 378, 377, 358, 359, 379, 378, 359, 340, 360, 379, 1, 0, 380, 2, 1, 380, 3, 2, 380, 4, 3, 380, 5, 4, 380, 6, 5, 380, 7, 6, 380, 8, 7, 380, 9, 8, 380, 10, 9, 380, 11, 10, 380, 12, 11, 380, 13, 12, 380, 14, 13, 380, 15, 14, 380, 16, 15, 380, 17, 16, 380, 18, 17, 380, 19, 18, 380, 0, 19, 380, 360, 361, 381, 361, 362, 381, 362, 363, 381, 363, 364, 381, 364, 365, 381, 365, 366, 381, 366, 367, 381, 367, 368, 381, 368, 369, 381, 369, 370, 381, 370, 371, 381, 371, 372, 381, 372, 373, 381, 373, 374, 381, 374, 375, 381, 375, 376, 381, 376, 377, 381, 377, 378, 381, 378, 379, 381, 379, 360, 381] point3f[] points = [(0.14877813, -0.98768836, -0.048340943), (0.12655823, -0.98768836, -0.09194993), (0.09194993, -0.98768836, -0.12655823), (0.048340935, -0.98768836, -0.14877811), (0, -0.98768836, -0.15643455), (-0.048340935, -0.98768836, -0.1487781), (-0.09194992, -0.98768836, -0.1265582), (-0.12655818, -0.98768836, -0.0919499), (-0.14877807, -0.98768836, -0.048340924), (-0.15643452, -0.98768836, 0), (-0.14877807, -0.98768836, 0.048340924), (-0.12655818, -0.98768836, 0.091949895), (-0.091949895, -0.98768836, 0.12655817), (-0.048340924, -0.98768836, 0.14877805), (-4.6621107e-9, -0.98768836, 0.15643449), (0.04834091, -0.98768836, 0.14877804), (0.09194988, -0.98768836, 0.12655815), (0.12655815, -0.98768836, 0.09194989), (0.14877804, -0.98768836, 0.048340913), (0.15643448, -0.98768836, 0), (0.29389283, -0.95105654, -0.095491566), (0.25000018, -0.95105654, -0.18163574), (0.18163574, -0.95105654, -0.25000015), (0.09549155, -0.95105654, -0.2938928), (0, -0.95105654, -0.30901715), (-0.09549155, -0.95105654, -0.29389277), (-0.18163571, -0.95105654, -0.2500001), (-0.2500001, -0.95105654, -0.1816357), (-0.2938927, -0.95105654, -0.09549153), (-0.30901706, -0.95105654, 0), (-0.2938927, -0.95105654, 0.09549153), (-0.25000006, -0.95105654, 0.18163568), (-0.18163568, -0.95105654, 0.25000006), (-0.09549153, -0.95105654, 0.29389268), (-9.209424e-9, -0.95105654, 0.30901703), (0.0954915, -0.95105654, 0.29389265), (0.18163563, -0.95105654, 0.25000003), (0.25, -0.95105654, 0.18163565), (0.29389265, -0.95105654, 0.095491506), (0.309017, -0.95105654, 0), (0.43177092, -0.8910065, -0.14029087), (0.3672863, -0.8910065, -0.2668491), (0.2668491, -0.8910065, -0.36728626), (0.14029086, -0.8910065, -0.43177086), (0, -0.8910065, -0.45399073), (-0.14029086, -0.8910065, -0.43177083), (-0.26684904, -0.8910065, -0.36728618), (-0.36728615, -0.8910065, -0.266849), (-0.43177077, -0.8910065, -0.14029081), (-0.45399064, -0.8910065, 0), (-0.43177077, -0.8910065, 0.14029081), (-0.36728612, -0.8910065, 0.26684898), (-0.26684898, -0.8910065, 0.36728612), (-0.14029081, -0.8910065, 0.4317707), (-1.3529972e-8, -0.8910065, 0.45399058), (0.14029078, -0.8910065, 0.43177068), (0.26684892, -0.8910065, 0.3672861), (0.36728606, -0.8910065, 0.26684895), (0.43177065, -0.8910065, 0.1402908), (0.45399052, -0.8910065, 0), (0.55901736, -0.809017, -0.18163574), (0.47552857, -0.809017, -0.3454917), (0.3454917, -0.809017, -0.47552854), (0.18163572, -0.809017, -0.5590173), (0, -0.809017, -0.58778554), (-0.18163572, -0.809017, -0.55901724), (-0.34549165, -0.809017, -0.47552842), (-0.4755284, -0.809017, -0.3454916), (-0.5590171, -0.809017, -0.18163566), (-0.58778536, -0.809017, 0), (-0.5590171, -0.809017, 0.18163566), (-0.47552836, -0.809017, 0.34549156), (-0.34549156, -0.809017, 0.47552833), (-0.18163566, -0.809017, 0.55901706), (-1.7517365e-8, -0.809017, 0.5877853), (0.18163562, -0.809017, 0.55901706), (0.3454915, -0.809017, 0.4755283), (0.47552827, -0.809017, 0.34549153), (0.559017, -0.809017, 0.18163563), (0.58778524, -0.809017, 0), (0.67249894, -0.70710677, -0.21850814), (0.5720618, -0.70710677, -0.41562718), (0.41562718, -0.70710677, -0.5720617), (0.21850812, -0.70710677, -0.6724989), (0, -0.70710677, -0.7071071), (-0.21850812, -0.70710677, -0.6724988), (-0.4156271, -0.70710677, -0.5720616), (-0.57206154, -0.70710677, -0.41562706), (-0.6724987, -0.70710677, -0.21850805), (-0.70710695, -0.70710677, 0), (-0.6724987, -0.70710677, 0.21850805), (-0.57206154, -0.70710677, 0.415627), (-0.415627, -0.70710677, 0.5720615), (-0.21850805, -0.70710677, 0.6724986), (-2.1073424e-8, -0.70710677, 0.7071068), (0.21850799, -0.70710677, 0.6724986), (0.4156269, -0.70710677, 0.5720614), (0.5720614, -0.70710677, 0.41562697), (0.6724985, -0.70710677, 0.21850802), (0.70710677, -0.70710677, 0), (0.7694214, -0.58778524, -0.25000015), (0.65450895, -0.58778524, -0.47552854), (0.47552854, -0.58778524, -0.6545089), (0.25000012, -0.58778524, -0.7694213), (0, -0.58778524, -0.80901736), (-0.25000012, -0.58778524, -0.7694212), (-0.47552845, -0.58778524, -0.65450877), (-0.6545087, -0.58778524, -0.4755284), (-0.7694211, -0.58778524, -0.25000006), (-0.8090172, -0.58778524, 0), (-0.7694211, -0.58778524, 0.25000006), (-0.65450865, -0.58778524, 0.47552836), (-0.47552836, -0.58778524, 0.6545086), (-0.25000006, -0.58778524, 0.769421), (-2.4110586e-8, -0.58778524, 0.8090171), (0.24999999, -0.58778524, 0.769421), (0.47552827, -0.58778524, 0.65450853), (0.65450853, -0.58778524, 0.4755283), (0.7694209, -0.58778524, 0.25), (0.809017, -0.58778524, 0), (0.8473981, -0.45399052, -0.27533633), (0.7208399, -0.45399052, -0.5237208), (0.5237208, -0.45399052, -0.72083986), (0.2753363, -0.45399052, -0.847398), (0, -0.45399052, -0.89100695), (-0.2753363, -0.45399052, -0.847398), (-0.5237207, -0.45399052, -0.7208397), (-0.7208396, -0.45399052, -0.5237206), (-0.8473978, -0.45399052, -0.2753362), (-0.89100677, -0.45399052, 0), (-0.8473978, -0.45399052, 0.2753362), (-0.7208396, -0.45399052, 0.5237206), (-0.5237206, -0.45399052, 0.72083956), (-0.2753362, -0.45399052, 0.8473977), (-2.6554064e-8, -0.45399052, 0.89100665), (0.27533615, -0.45399052, 0.8473976), (0.5237205, -0.45399052, 0.7208395), (0.72083944, -0.45399052, 0.52372056), (0.84739757, -0.45399052, 0.27533618), (0.8910065, -0.45399052, 0), (0.9045091, -0.30901697, -0.2938928), (0.7694214, -0.30901697, -0.55901736), (0.55901736, -0.30901697, -0.76942134), (0.29389277, -0.30901697, -0.904509), (0, -0.30901697, -0.951057), (-0.29389277, -0.30901697, -0.90450895), (-0.55901724, -0.30901697, -0.7694212), (-0.76942116, -0.30901697, -0.5590172), (-0.90450877, -0.30901697, -0.2938927), (-0.9510568, -0.30901697, 0), (-0.90450877, -0.30901697, 0.2938927), (-0.7694211, -0.30901697, 0.5590171), (-0.5590171, -0.30901697, 0.76942104), (-0.2938927, -0.30901697, 0.90450865), (-2.8343694e-8, -0.30901697, 0.95105666), (0.29389262, -0.30901697, 0.9045086), (0.559017, -0.30901697, 0.769421), (0.7694209, -0.30901697, 0.55901706), (0.90450853, -0.30901697, 0.29389265), (0.95105654, -0.30901697, 0), (0.93934804, -0.15643437, -0.30521268), (0.7990572, -0.15643437, -0.580549), (0.580549, -0.15643437, -0.7990571), (0.30521265, -0.15643437, -0.9393479), (0, -0.15643437, -0.98768884), (-0.30521265, -0.15643437, -0.93934786), (-0.5805489, -0.15643437, -0.79905695), (-0.7990569, -0.15643437, -0.5805488), (-0.9393477, -0.15643437, -0.30521256), (-0.9876886, -0.15643437, 0), (-0.9393477, -0.15643437, 0.30521256), (-0.7990568, -0.15643437, 0.58054876), (-0.58054876, -0.15643437, 0.79905677), (-0.30521256, -0.15643437, 0.93934757), (-2.9435407e-8, -0.15643437, 0.9876885), (0.30521247, -0.15643437, 0.93934757), (0.58054864, -0.15643437, 0.7990567), (0.79905665, -0.15643437, 0.5805487), (0.9393475, -0.15643437, 0.3052125), (0.98768836, -0.15643437, 0), (0.95105714, 0, -0.30901718), (0.80901754, 0, -0.5877856), (0.5877856, 0, -0.8090175), (0.30901715, 0, -0.951057), (0, 0, -1.0000005), (-0.30901715, 0, -0.95105696), (-0.5877855, 0, -0.8090173), (-0.80901724, 0, -0.5877854), (-0.9510568, 0, -0.30901706), (-1.0000002, 0, 0), (-0.9510568, 0, 0.30901706), (-0.8090172, 0, 0.58778536), (-0.58778536, 0, 0.8090171), (-0.30901706, 0, 0.95105666), (-2.9802322e-8, 0, 1.0000001), (0.30901697, 0, 0.9510566), (0.58778524, 0, 0.80901706), (0.809017, 0, 0.5877853), (0.95105654, 0, 0.309017), (1, 0, 0), (0.93934804, 0.15643437, -0.30521268), (0.7990572, 0.15643437, -0.580549), (0.580549, 0.15643437, -0.7990571), (0.30521265, 0.15643437, -0.9393479), (0, 0.15643437, -0.98768884), (-0.30521265, 0.15643437, -0.93934786), (-0.5805489, 0.15643437, -0.79905695), (-0.7990569, 0.15643437, -0.5805488), (-0.9393477, 0.15643437, -0.30521256), (-0.9876886, 0.15643437, 0), (-0.9393477, 0.15643437, 0.30521256), (-0.7990568, 0.15643437, 0.58054876), (-0.58054876, 0.15643437, 0.79905677), (-0.30521256, 0.15643437, 0.93934757), (-2.9435407e-8, 0.15643437, 0.9876885), (0.30521247, 0.15643437, 0.93934757), (0.58054864, 0.15643437, 0.7990567), (0.79905665, 0.15643437, 0.5805487), (0.9393475, 0.15643437, 0.3052125), (0.98768836, 0.15643437, 0), (0.9045091, 0.30901697, -0.2938928), (0.7694214, 0.30901697, -0.55901736), (0.55901736, 0.30901697, -0.76942134), (0.29389277, 0.30901697, -0.904509), (0, 0.30901697, -0.951057), (-0.29389277, 0.30901697, -0.90450895), (-0.55901724, 0.30901697, -0.7694212), (-0.76942116, 0.30901697, -0.5590172), (-0.90450877, 0.30901697, -0.2938927), (-0.9510568, 0.30901697, 0), (-0.90450877, 0.30901697, 0.2938927), (-0.7694211, 0.30901697, 0.5590171), (-0.5590171, 0.30901697, 0.76942104), (-0.2938927, 0.30901697, 0.90450865), (-2.8343694e-8, 0.30901697, 0.95105666), (0.29389262, 0.30901697, 0.9045086), (0.559017, 0.30901697, 0.769421), (0.7694209, 0.30901697, 0.55901706), (0.90450853, 0.30901697, 0.29389265), (0.95105654, 0.30901697, 0), (0.8473981, 0.45399052, -0.27533633), (0.7208399, 0.45399052, -0.5237208), (0.5237208, 0.45399052, -0.72083986), (0.2753363, 0.45399052, -0.847398), (0, 0.45399052, -0.89100695), (-0.2753363, 0.45399052, -0.847398), (-0.5237207, 0.45399052, -0.7208397), (-0.7208396, 0.45399052, -0.5237206), (-0.8473978, 0.45399052, -0.2753362), (-0.89100677, 0.45399052, 0), (-0.8473978, 0.45399052, 0.2753362), (-0.7208396, 0.45399052, 0.5237206), (-0.5237206, 0.45399052, 0.72083956), (-0.2753362, 0.45399052, 0.8473977), (-2.6554064e-8, 0.45399052, 0.89100665), (0.27533615, 0.45399052, 0.8473976), (0.5237205, 0.45399052, 0.7208395), (0.72083944, 0.45399052, 0.52372056), (0.84739757, 0.45399052, 0.27533618), (0.8910065, 0.45399052, 0), (0.7694214, 0.58778524, -0.25000015), (0.65450895, 0.58778524, -0.47552854), (0.47552854, 0.58778524, -0.6545089), (0.25000012, 0.58778524, -0.7694213), (0, 0.58778524, -0.80901736), (-0.25000012, 0.58778524, -0.7694212), (-0.47552845, 0.58778524, -0.65450877), (-0.6545087, 0.58778524, -0.4755284), (-0.7694211, 0.58778524, -0.25000006), (-0.8090172, 0.58778524, 0), (-0.7694211, 0.58778524, 0.25000006), (-0.65450865, 0.58778524, 0.47552836), (-0.47552836, 0.58778524, 0.6545086), (-0.25000006, 0.58778524, 0.769421), (-2.4110586e-8, 0.58778524, 0.8090171), (0.24999999, 0.58778524, 0.769421), (0.47552827, 0.58778524, 0.65450853), (0.65450853, 0.58778524, 0.4755283), (0.7694209, 0.58778524, 0.25), (0.809017, 0.58778524, 0), (0.67249894, 0.70710677, -0.21850814), (0.5720618, 0.70710677, -0.41562718), (0.41562718, 0.70710677, -0.5720617), (0.21850812, 0.70710677, -0.6724989), (0, 0.70710677, -0.7071071), (-0.21850812, 0.70710677, -0.6724988), (-0.4156271, 0.70710677, -0.5720616), (-0.57206154, 0.70710677, -0.41562706), (-0.6724987, 0.70710677, -0.21850805), (-0.70710695, 0.70710677, 0), (-0.6724987, 0.70710677, 0.21850805), (-0.57206154, 0.70710677, 0.415627), (-0.415627, 0.70710677, 0.5720615), (-0.21850805, 0.70710677, 0.6724986), (-2.1073424e-8, 0.70710677, 0.7071068), (0.21850799, 0.70710677, 0.6724986), (0.4156269, 0.70710677, 0.5720614), (0.5720614, 0.70710677, 0.41562697), (0.6724985, 0.70710677, 0.21850802), (0.70710677, 0.70710677, 0), (0.55901736, 0.809017, -0.18163574), (0.47552857, 0.809017, -0.3454917), (0.3454917, 0.809017, -0.47552854), (0.18163572, 0.809017, -0.5590173), (0, 0.809017, -0.58778554), (-0.18163572, 0.809017, -0.55901724), (-0.34549165, 0.809017, -0.47552842), (-0.4755284, 0.809017, -0.3454916), (-0.5590171, 0.809017, -0.18163566), (-0.58778536, 0.809017, 0), (-0.5590171, 0.809017, 0.18163566), (-0.47552836, 0.809017, 0.34549156), (-0.34549156, 0.809017, 0.47552833), (-0.18163566, 0.809017, 0.55901706), (-1.7517365e-8, 0.809017, 0.5877853), (0.18163562, 0.809017, 0.55901706), (0.3454915, 0.809017, 0.4755283), (0.47552827, 0.809017, 0.34549153), (0.559017, 0.809017, 0.18163563), (0.58778524, 0.809017, 0), (0.43177092, 0.8910065, -0.14029087), (0.3672863, 0.8910065, -0.2668491), (0.2668491, 0.8910065, -0.36728626), (0.14029086, 0.8910065, -0.43177086), (0, 0.8910065, -0.45399073), (-0.14029086, 0.8910065, -0.43177083), (-0.26684904, 0.8910065, -0.36728618), (-0.36728615, 0.8910065, -0.266849), (-0.43177077, 0.8910065, -0.14029081), (-0.45399064, 0.8910065, 0), (-0.43177077, 0.8910065, 0.14029081), (-0.36728612, 0.8910065, 0.26684898), (-0.26684898, 0.8910065, 0.36728612), (-0.14029081, 0.8910065, 0.4317707), (-1.3529972e-8, 0.8910065, 0.45399058), (0.14029078, 0.8910065, 0.43177068), (0.26684892, 0.8910065, 0.3672861), (0.36728606, 0.8910065, 0.26684895), (0.43177065, 0.8910065, 0.1402908), (0.45399052, 0.8910065, 0), (0.29389283, 0.95105654, -0.095491566), (0.25000018, 0.95105654, -0.18163574), (0.18163574, 0.95105654, -0.25000015), (0.09549155, 0.95105654, -0.2938928), (0, 0.95105654, -0.30901715), (-0.09549155, 0.95105654, -0.29389277), (-0.18163571, 0.95105654, -0.2500001), (-0.2500001, 0.95105654, -0.1816357), (-0.2938927, 0.95105654, -0.09549153), (-0.30901706, 0.95105654, 0), (-0.2938927, 0.95105654, 0.09549153), (-0.25000006, 0.95105654, 0.18163568), (-0.18163568, 0.95105654, 0.25000006), (-0.09549153, 0.95105654, 0.29389268), (-9.209424e-9, 0.95105654, 0.30901703), (0.0954915, 0.95105654, 0.29389265), (0.18163563, 0.95105654, 0.25000003), (0.25, 0.95105654, 0.18163565), (0.29389265, 0.95105654, 0.095491506), (0.309017, 0.95105654, 0), (0.14877813, 0.98768836, -0.048340943), (0.12655823, 0.98768836, -0.09194993), (0.09194993, 0.98768836, -0.12655823), (0.048340935, 0.98768836, -0.14877811), (0, 0.98768836, -0.15643455), (-0.048340935, 0.98768836, -0.1487781), (-0.09194992, 0.98768836, -0.1265582), (-0.12655818, 0.98768836, -0.0919499), (-0.14877807, 0.98768836, -0.048340924), (-0.15643452, 0.98768836, 0), (-0.14877807, 0.98768836, 0.048340924), (-0.12655818, 0.98768836, 0.091949895), (-0.091949895, 0.98768836, 0.12655817), (-0.048340924, 0.98768836, 0.14877805), (-4.6621107e-9, 0.98768836, 0.15643449), (0.04834091, 0.98768836, 0.14877804), (0.09194988, 0.98768836, 0.12655815), (0.12655815, 0.98768836, 0.09194989), (0.14877804, 0.98768836, 0.048340913), (0.15643448, 0.98768836, 0), (0, -1, 0), (0, 1, 0)] color3f[] primvars:displayColor = [(0.13320851, 0.13320851, 0.13320851)] ( customData = { dictionary Maya = { bool generated = 1 } } ) texCoord2f[] primvars:st = [(0, 0.05), (0.05, 0.05), (0.1, 0.05), (0.15, 0.05), (0.2, 0.05), (0.25, 0.05), (0.3, 0.05), (0.35000002, 0.05), (0.40000004, 0.05), (0.45000005, 0.05), (0.50000006, 0.05), (0.5500001, 0.05), (0.6000001, 0.05), (0.6500001, 0.05), (0.7000001, 0.05), (0.7500001, 0.05), (0.80000013, 0.05), (0.85000014, 0.05), (0.90000015, 0.05), (0.95000017, 0.05), (1.0000001, 0.05), (0, 0.1), (0.05, 0.1), (0.1, 0.1), (0.15, 0.1), (0.2, 0.1), (0.25, 0.1), (0.3, 0.1), (0.35000002, 0.1), (0.40000004, 0.1), (0.45000005, 0.1), (0.50000006, 0.1), (0.5500001, 0.1), (0.6000001, 0.1), (0.6500001, 0.1), (0.7000001, 0.1), (0.7500001, 0.1), (0.80000013, 0.1), (0.85000014, 0.1), (0.90000015, 0.1), (0.95000017, 0.1), (1.0000001, 0.1), (0, 0.15), (0.05, 0.15), (0.1, 0.15), (0.15, 0.15), (0.2, 0.15), (0.25, 0.15), (0.3, 0.15), (0.35000002, 0.15), (0.40000004, 0.15), (0.45000005, 0.15), (0.50000006, 0.15), (0.5500001, 0.15), (0.6000001, 0.15), (0.6500001, 0.15), (0.7000001, 0.15), (0.7500001, 0.15), (0.80000013, 0.15), (0.85000014, 0.15), (0.90000015, 0.15), (0.95000017, 0.15), (1.0000001, 0.15), (0, 0.2), (0.05, 0.2), (0.1, 0.2), (0.15, 0.2), (0.2, 0.2), (0.25, 0.2), (0.3, 0.2), (0.35000002, 0.2), (0.40000004, 0.2), (0.45000005, 0.2), (0.50000006, 0.2), (0.5500001, 0.2), (0.6000001, 0.2), (0.6500001, 0.2), (0.7000001, 0.2), (0.7500001, 0.2), (0.80000013, 0.2), (0.85000014, 0.2), (0.90000015, 0.2), (0.95000017, 0.2), (1.0000001, 0.2), (0, 0.25), (0.05, 0.25), (0.1, 0.25), (0.15, 0.25), (0.2, 0.25), (0.25, 0.25), (0.3, 0.25), (0.35000002, 0.25), (0.40000004, 0.25), (0.45000005, 0.25), (0.50000006, 0.25), (0.5500001, 0.25), (0.6000001, 0.25), (0.6500001, 0.25), (0.7000001, 0.25), (0.7500001, 0.25), (0.80000013, 0.25), (0.85000014, 0.25), (0.90000015, 0.25), (0.95000017, 0.25), (1.0000001, 0.25), (0, 0.3), (0.05, 0.3), (0.1, 0.3), (0.15, 0.3), (0.2, 0.3), (0.25, 0.3), (0.3, 0.3), (0.35000002, 0.3), (0.40000004, 0.3), (0.45000005, 0.3), (0.50000006, 0.3), (0.5500001, 0.3), (0.6000001, 0.3), (0.6500001, 0.3), (0.7000001, 0.3), (0.7500001, 0.3), (0.80000013, 0.3), (0.85000014, 0.3), (0.90000015, 0.3), (0.95000017, 0.3), (1.0000001, 0.3), (0, 0.35000002), (0.05, 0.35000002), (0.1, 0.35000002), (0.15, 0.35000002), (0.2, 0.35000002), (0.25, 0.35000002), (0.3, 0.35000002), (0.35000002, 0.35000002), (0.40000004, 0.35000002), (0.45000005, 0.35000002), (0.50000006, 0.35000002), (0.5500001, 0.35000002), (0.6000001, 0.35000002), (0.6500001, 0.35000002), (0.7000001, 0.35000002), (0.7500001, 0.35000002), (0.80000013, 0.35000002), (0.85000014, 0.35000002), (0.90000015, 0.35000002), (0.95000017, 0.35000002), (1.0000001, 0.35000002), (0, 0.40000004), (0.05, 0.40000004), (0.1, 0.40000004), (0.15, 0.40000004), (0.2, 0.40000004), (0.25, 0.40000004), (0.3, 0.40000004), (0.35000002, 0.40000004), (0.40000004, 0.40000004), (0.45000005, 0.40000004), (0.50000006, 0.40000004), (0.5500001, 0.40000004), (0.6000001, 0.40000004), (0.6500001, 0.40000004), (0.7000001, 0.40000004), (0.7500001, 0.40000004), (0.80000013, 0.40000004), (0.85000014, 0.40000004), (0.90000015, 0.40000004), (0.95000017, 0.40000004), (1.0000001, 0.40000004), (0, 0.45000005), (0.05, 0.45000005), (0.1, 0.45000005), (0.15, 0.45000005), (0.2, 0.45000005), (0.25, 0.45000005), (0.3, 0.45000005), (0.35000002, 0.45000005), (0.40000004, 0.45000005), (0.45000005, 0.45000005), (0.50000006, 0.45000005), (0.5500001, 0.45000005), (0.6000001, 0.45000005), (0.6500001, 0.45000005), (0.7000001, 0.45000005), (0.7500001, 0.45000005), (0.80000013, 0.45000005), (0.85000014, 0.45000005), (0.90000015, 0.45000005), (0.95000017, 0.45000005), (1.0000001, 0.45000005), (0, 0.50000006), (0.05, 0.50000006), (0.1, 0.50000006), (0.15, 0.50000006), (0.2, 0.50000006), (0.25, 0.50000006), (0.3, 0.50000006), (0.35000002, 0.50000006), (0.40000004, 0.50000006), (0.45000005, 0.50000006), (0.50000006, 0.50000006), (0.5500001, 0.50000006), (0.6000001, 0.50000006), (0.6500001, 0.50000006), (0.7000001, 0.50000006), (0.7500001, 0.50000006), (0.80000013, 0.50000006), (0.85000014, 0.50000006), (0.90000015, 0.50000006), (0.95000017, 0.50000006), (1.0000001, 0.50000006), (0, 0.5500001), (0.05, 0.5500001), (0.1, 0.5500001), (0.15, 0.5500001), (0.2, 0.5500001), (0.25, 0.5500001), (0.3, 0.5500001), (0.35000002, 0.5500001), (0.40000004, 0.5500001), (0.45000005, 0.5500001), (0.50000006, 0.5500001), (0.5500001, 0.5500001), (0.6000001, 0.5500001), (0.6500001, 0.5500001), (0.7000001, 0.5500001), (0.7500001, 0.5500001), (0.80000013, 0.5500001), (0.85000014, 0.5500001), (0.90000015, 0.5500001), (0.95000017, 0.5500001), (1.0000001, 0.5500001), (0, 0.6000001), (0.05, 0.6000001), (0.1, 0.6000001), (0.15, 0.6000001), (0.2, 0.6000001), (0.25, 0.6000001), (0.3, 0.6000001), (0.35000002, 0.6000001), (0.40000004, 0.6000001), (0.45000005, 0.6000001), (0.50000006, 0.6000001), (0.5500001, 0.6000001), (0.6000001, 0.6000001), (0.6500001, 0.6000001), (0.7000001, 0.6000001), (0.7500001, 0.6000001), (0.80000013, 0.6000001), (0.85000014, 0.6000001), (0.90000015, 0.6000001), (0.95000017, 0.6000001), (1.0000001, 0.6000001), (0, 0.6500001), (0.05, 0.6500001), (0.1, 0.6500001), (0.15, 0.6500001), (0.2, 0.6500001), (0.25, 0.6500001), (0.3, 0.6500001), (0.35000002, 0.6500001), (0.40000004, 0.6500001), (0.45000005, 0.6500001), (0.50000006, 0.6500001), (0.5500001, 0.6500001), (0.6000001, 0.6500001), (0.6500001, 0.6500001), (0.7000001, 0.6500001), (0.7500001, 0.6500001), (0.80000013, 0.6500001), (0.85000014, 0.6500001), (0.90000015, 0.6500001), (0.95000017, 0.6500001), (1.0000001, 0.6500001), (0, 0.7000001), (0.05, 0.7000001), (0.1, 0.7000001), (0.15, 0.7000001), (0.2, 0.7000001), (0.25, 0.7000001), (0.3, 0.7000001), (0.35000002, 0.7000001), (0.40000004, 0.7000001), (0.45000005, 0.7000001), (0.50000006, 0.7000001), (0.5500001, 0.7000001), (0.6000001, 0.7000001), (0.6500001, 0.7000001), (0.7000001, 0.7000001), (0.7500001, 0.7000001), (0.80000013, 0.7000001), (0.85000014, 0.7000001), (0.90000015, 0.7000001), (0.95000017, 0.7000001), (1.0000001, 0.7000001), (0, 0.7500001), (0.05, 0.7500001), (0.1, 0.7500001), (0.15, 0.7500001), (0.2, 0.7500001), (0.25, 0.7500001), (0.3, 0.7500001), (0.35000002, 0.7500001), (0.40000004, 0.7500001), (0.45000005, 0.7500001), (0.50000006, 0.7500001), (0.5500001, 0.7500001), (0.6000001, 0.7500001), (0.6500001, 0.7500001), (0.7000001, 0.7500001), (0.7500001, 0.7500001), (0.80000013, 0.7500001), (0.85000014, 0.7500001), (0.90000015, 0.7500001), (0.95000017, 0.7500001), (1.0000001, 0.7500001), (0, 0.80000013), (0.05, 0.80000013), (0.1, 0.80000013), (0.15, 0.80000013), (0.2, 0.80000013), (0.25, 0.80000013), (0.3, 0.80000013), (0.35000002, 0.80000013), (0.40000004, 0.80000013), (0.45000005, 0.80000013), (0.50000006, 0.80000013), (0.5500001, 0.80000013), (0.6000001, 0.80000013), (0.6500001, 0.80000013), (0.7000001, 0.80000013), (0.7500001, 0.80000013), (0.80000013, 0.80000013), (0.85000014, 0.80000013), (0.90000015, 0.80000013), (0.95000017, 0.80000013), (1.0000001, 0.80000013), (0, 0.85000014), (0.05, 0.85000014), (0.1, 0.85000014), (0.15, 0.85000014), (0.2, 0.85000014), (0.25, 0.85000014), (0.3, 0.85000014), (0.35000002, 0.85000014), (0.40000004, 0.85000014), (0.45000005, 0.85000014), (0.50000006, 0.85000014), (0.5500001, 0.85000014), (0.6000001, 0.85000014), (0.6500001, 0.85000014), (0.7000001, 0.85000014), (0.7500001, 0.85000014), (0.80000013, 0.85000014), (0.85000014, 0.85000014), (0.90000015, 0.85000014), (0.95000017, 0.85000014), (1.0000001, 0.85000014), (0, 0.90000015), (0.05, 0.90000015), (0.1, 0.90000015), (0.15, 0.90000015), (0.2, 0.90000015), (0.25, 0.90000015), (0.3, 0.90000015), (0.35000002, 0.90000015), (0.40000004, 0.90000015), (0.45000005, 0.90000015), (0.50000006, 0.90000015), (0.5500001, 0.90000015), (0.6000001, 0.90000015), (0.6500001, 0.90000015), (0.7000001, 0.90000015), (0.7500001, 0.90000015), (0.80000013, 0.90000015), (0.85000014, 0.90000015), (0.90000015, 0.90000015), (0.95000017, 0.90000015), (1.0000001, 0.90000015), (0, 0.95000017), (0.05, 0.95000017), (0.1, 0.95000017), (0.15, 0.95000017), (0.2, 0.95000017), (0.25, 0.95000017), (0.3, 0.95000017), (0.35000002, 0.95000017), (0.40000004, 0.95000017), (0.45000005, 0.95000017), (0.50000006, 0.95000017), (0.5500001, 0.95000017), (0.6000001, 0.95000017), (0.6500001, 0.95000017), (0.7000001, 0.95000017), (0.7500001, 0.95000017), (0.80000013, 0.95000017), (0.85000014, 0.95000017), (0.90000015, 0.95000017), (0.95000017, 0.95000017), (1.0000001, 0.95000017), (0.025, 0), (0.075, 0), (0.125, 0), (0.17500001, 0), (0.22500001, 0), (0.275, 0), (0.32500002, 0), (0.375, 0), (0.425, 0), (0.47500002, 0), (0.525, 0), (0.575, 0), (0.625, 0), (0.675, 0), (0.72499996, 0), (0.775, 0), (0.825, 0), (0.875, 0), (0.925, 0), (0.97499996, 0), (0.025, 1), (0.075, 1), (0.125, 1), (0.17500001, 1), (0.22500001, 1), (0.275, 1), (0.32500002, 1), (0.375, 1), (0.425, 1), (0.47500002, 1), (0.525, 1), (0.575, 1), (0.625, 1), (0.675, 1), (0.72499996, 1), (0.775, 1), (0.825, 1), (0.875, 1), (0.925, 1), (0.97499996, 1)] ( customData = { dictionary Maya = { token name = "map1" } } interpolation = "faceVarying" ) int[] primvars:st:indices = [0, 1, 22, 21, 1, 2, 23, 22, 2, 3, 24, 23, 3, 4, 25, 24, 4, 5, 26, 25, 5, 6, 27, 26, 6, 7, 28, 27, 7, 8, 29, 28, 8, 9, 30, 29, 9, 10, 31, 30, 10, 11, 32, 31, 11, 12, 33, 32, 12, 13, 34, 33, 13, 14, 35, 34, 14, 15, 36, 35, 15, 16, 37, 36, 16, 17, 38, 37, 17, 18, 39, 38, 18, 19, 40, 39, 19, 20, 41, 40, 21, 22, 43, 42, 22, 23, 44, 43, 23, 24, 45, 44, 24, 25, 46, 45, 25, 26, 47, 46, 26, 27, 48, 47, 27, 28, 49, 48, 28, 29, 50, 49, 29, 30, 51, 50, 30, 31, 52, 51, 31, 32, 53, 52, 32, 33, 54, 53, 33, 34, 55, 54, 34, 35, 56, 55, 35, 36, 57, 56, 36, 37, 58, 57, 37, 38, 59, 58, 38, 39, 60, 59, 39, 40, 61, 60, 40, 41, 62, 61, 42, 43, 64, 63, 43, 44, 65, 64, 44, 45, 66, 65, 45, 46, 67, 66, 46, 47, 68, 67, 47, 48, 69, 68, 48, 49, 70, 69, 49, 50, 71, 70, 50, 51, 72, 71, 51, 52, 73, 72, 52, 53, 74, 73, 53, 54, 75, 74, 54, 55, 76, 75, 55, 56, 77, 76, 56, 57, 78, 77, 57, 58, 79, 78, 58, 59, 80, 79, 59, 60, 81, 80, 60, 61, 82, 81, 61, 62, 83, 82, 63, 64, 85, 84, 64, 65, 86, 85, 65, 66, 87, 86, 66, 67, 88, 87, 67, 68, 89, 88, 68, 69, 90, 89, 69, 70, 91, 90, 70, 71, 92, 91, 71, 72, 93, 92, 72, 73, 94, 93, 73, 74, 95, 94, 74, 75, 96, 95, 75, 76, 97, 96, 76, 77, 98, 97, 77, 78, 99, 98, 78, 79, 100, 99, 79, 80, 101, 100, 80, 81, 102, 101, 81, 82, 103, 102, 82, 83, 104, 103, 84, 85, 106, 105, 85, 86, 107, 106, 86, 87, 108, 107, 87, 88, 109, 108, 88, 89, 110, 109, 89, 90, 111, 110, 90, 91, 112, 111, 91, 92, 113, 112, 92, 93, 114, 113, 93, 94, 115, 114, 94, 95, 116, 115, 95, 96, 117, 116, 96, 97, 118, 117, 97, 98, 119, 118, 98, 99, 120, 119, 99, 100, 121, 120, 100, 101, 122, 121, 101, 102, 123, 122, 102, 103, 124, 123, 103, 104, 125, 124, 105, 106, 127, 126, 106, 107, 128, 127, 107, 108, 129, 128, 108, 109, 130, 129, 109, 110, 131, 130, 110, 111, 132, 131, 111, 112, 133, 132, 112, 113, 134, 133, 113, 114, 135, 134, 114, 115, 136, 135, 115, 116, 137, 136, 116, 117, 138, 137, 117, 118, 139, 138, 118, 119, 140, 139, 119, 120, 141, 140, 120, 121, 142, 141, 121, 122, 143, 142, 122, 123, 144, 143, 123, 124, 145, 144, 124, 125, 146, 145, 126, 127, 148, 147, 127, 128, 149, 148, 128, 129, 150, 149, 129, 130, 151, 150, 130, 131, 152, 151, 131, 132, 153, 152, 132, 133, 154, 153, 133, 134, 155, 154, 134, 135, 156, 155, 135, 136, 157, 156, 136, 137, 158, 157, 137, 138, 159, 158, 138, 139, 160, 159, 139, 140, 161, 160, 140, 141, 162, 161, 141, 142, 163, 162, 142, 143, 164, 163, 143, 144, 165, 164, 144, 145, 166, 165, 145, 146, 167, 166, 147, 148, 169, 168, 148, 149, 170, 169, 149, 150, 171, 170, 150, 151, 172, 171, 151, 152, 173, 172, 152, 153, 174, 173, 153, 154, 175, 174, 154, 155, 176, 175, 155, 156, 177, 176, 156, 157, 178, 177, 157, 158, 179, 178, 158, 159, 180, 179, 159, 160, 181, 180, 160, 161, 182, 181, 161, 162, 183, 182, 162, 163, 184, 183, 163, 164, 185, 184, 164, 165, 186, 185, 165, 166, 187, 186, 166, 167, 188, 187, 168, 169, 190, 189, 169, 170, 191, 190, 170, 171, 192, 191, 171, 172, 193, 192, 172, 173, 194, 193, 173, 174, 195, 194, 174, 175, 196, 195, 175, 176, 197, 196, 176, 177, 198, 197, 177, 178, 199, 198, 178, 179, 200, 199, 179, 180, 201, 200, 180, 181, 202, 201, 181, 182, 203, 202, 182, 183, 204, 203, 183, 184, 205, 204, 184, 185, 206, 205, 185, 186, 207, 206, 186, 187, 208, 207, 187, 188, 209, 208, 189, 190, 211, 210, 190, 191, 212, 211, 191, 192, 213, 212, 192, 193, 214, 213, 193, 194, 215, 214, 194, 195, 216, 215, 195, 196, 217, 216, 196, 197, 218, 217, 197, 198, 219, 218, 198, 199, 220, 219, 199, 200, 221, 220, 200, 201, 222, 221, 201, 202, 223, 222, 202, 203, 224, 223, 203, 204, 225, 224, 204, 205, 226, 225, 205, 206, 227, 226, 206, 207, 228, 227, 207, 208, 229, 228, 208, 209, 230, 229, 210, 211, 232, 231, 211, 212, 233, 232, 212, 213, 234, 233, 213, 214, 235, 234, 214, 215, 236, 235, 215, 216, 237, 236, 216, 217, 238, 237, 217, 218, 239, 238, 218, 219, 240, 239, 219, 220, 241, 240, 220, 221, 242, 241, 221, 222, 243, 242, 222, 223, 244, 243, 223, 224, 245, 244, 224, 225, 246, 245, 225, 226, 247, 246, 226, 227, 248, 247, 227, 228, 249, 248, 228, 229, 250, 249, 229, 230, 251, 250, 231, 232, 253, 252, 232, 233, 254, 253, 233, 234, 255, 254, 234, 235, 256, 255, 235, 236, 257, 256, 236, 237, 258, 257, 237, 238, 259, 258, 238, 239, 260, 259, 239, 240, 261, 260, 240, 241, 262, 261, 241, 242, 263, 262, 242, 243, 264, 263, 243, 244, 265, 264, 244, 245, 266, 265, 245, 246, 267, 266, 246, 247, 268, 267, 247, 248, 269, 268, 248, 249, 270, 269, 249, 250, 271, 270, 250, 251, 272, 271, 252, 253, 274, 273, 253, 254, 275, 274, 254, 255, 276, 275, 255, 256, 277, 276, 256, 257, 278, 277, 257, 258, 279, 278, 258, 259, 280, 279, 259, 260, 281, 280, 260, 261, 282, 281, 261, 262, 283, 282, 262, 263, 284, 283, 263, 264, 285, 284, 264, 265, 286, 285, 265, 266, 287, 286, 266, 267, 288, 287, 267, 268, 289, 288, 268, 269, 290, 289, 269, 270, 291, 290, 270, 271, 292, 291, 271, 272, 293, 292, 273, 274, 295, 294, 274, 275, 296, 295, 275, 276, 297, 296, 276, 277, 298, 297, 277, 278, 299, 298, 278, 279, 300, 299, 279, 280, 301, 300, 280, 281, 302, 301, 281, 282, 303, 302, 282, 283, 304, 303, 283, 284, 305, 304, 284, 285, 306, 305, 285, 286, 307, 306, 286, 287, 308, 307, 287, 288, 309, 308, 288, 289, 310, 309, 289, 290, 311, 310, 290, 291, 312, 311, 291, 292, 313, 312, 292, 293, 314, 313, 294, 295, 316, 315, 295, 296, 317, 316, 296, 297, 318, 317, 297, 298, 319, 318, 298, 299, 320, 319, 299, 300, 321, 320, 300, 301, 322, 321, 301, 302, 323, 322, 302, 303, 324, 323, 303, 304, 325, 324, 304, 305, 326, 325, 305, 306, 327, 326, 306, 307, 328, 327, 307, 308, 329, 328, 308, 309, 330, 329, 309, 310, 331, 330, 310, 311, 332, 331, 311, 312, 333, 332, 312, 313, 334, 333, 313, 314, 335, 334, 315, 316, 337, 336, 316, 317, 338, 337, 317, 318, 339, 338, 318, 319, 340, 339, 319, 320, 341, 340, 320, 321, 342, 341, 321, 322, 343, 342, 322, 323, 344, 343, 323, 324, 345, 344, 324, 325, 346, 345, 325, 326, 347, 346, 326, 327, 348, 347, 327, 328, 349, 348, 328, 329, 350, 349, 329, 330, 351, 350, 330, 331, 352, 351, 331, 332, 353, 352, 332, 333, 354, 353, 333, 334, 355, 354, 334, 335, 356, 355, 336, 337, 358, 357, 337, 338, 359, 358, 338, 339, 360, 359, 339, 340, 361, 360, 340, 341, 362, 361, 341, 342, 363, 362, 342, 343, 364, 363, 343, 344, 365, 364, 344, 345, 366, 365, 345, 346, 367, 366, 346, 347, 368, 367, 347, 348, 369, 368, 348, 349, 370, 369, 349, 350, 371, 370, 350, 351, 372, 371, 351, 352, 373, 372, 352, 353, 374, 373, 353, 354, 375, 374, 354, 355, 376, 375, 355, 356, 377, 376, 357, 358, 379, 378, 358, 359, 380, 379, 359, 360, 381, 380, 360, 361, 382, 381, 361, 362, 383, 382, 362, 363, 384, 383, 363, 364, 385, 384, 364, 365, 386, 385, 365, 366, 387, 386, 366, 367, 388, 387, 367, 368, 389, 388, 368, 369, 390, 389, 369, 370, 391, 390, 370, 371, 392, 391, 371, 372, 393, 392, 372, 373, 394, 393, 373, 374, 395, 394, 374, 375, 396, 395, 375, 376, 397, 396, 376, 377, 398, 397, 1, 0, 399, 2, 1, 400, 3, 2, 401, 4, 3, 402, 5, 4, 403, 6, 5, 404, 7, 6, 405, 8, 7, 406, 9, 8, 407, 10, 9, 408, 11, 10, 409, 12, 11, 410, 13, 12, 411, 14, 13, 412, 15, 14, 413, 16, 15, 414, 17, 16, 415, 18, 17, 416, 19, 18, 417, 20, 19, 418, 378, 379, 419, 379, 380, 420, 380, 381, 421, 381, 382, 422, 382, 383, 423, 383, 384, 424, 384, 385, 425, 385, 386, 426, 386, 387, 427, 387, 388, 428, 388, 389, 429, 389, 390, 430, 390, 391, 431, 391, 392, 432, 392, 393, 433, 393, 394, 434, 394, 395, 435, 395, 396, 436, 396, 397, 437, 397, 398, 438] }

lanierd-adsk avatar Jun 26 '23 09:06 lanierd-adsk

The cpp file to use to repro : // USDExample.cpp : This file contains the 'main' function. Program execution begins and ends there. //

//Include #define NOMINMAX //Don't use min and max macros from Windows.h #include //Usage of std::cout (optional) #pragma warning (push) #pragma warning (disable : 4244 4305) //Disable a few warnings

#define TBB_USE_ASSERT 0 //Defines I needed for TBB to compile #define TBB_USE_THREADING_TOOLS 0 #define TBB_USE_PERFORMANCE_WARNINGS 0 #define __TBB_STATISTICS 0

//USD/Hydra headers #include <pxr/base/tf/diagnostic.h> #include <pxr/usd/usd/usdfileFormat.h> #include <pxr/usd/usd/prim.h> #include <pxr/usd/usd/stage.h> #include <pxr/usdImaging/usdImaging/stageSceneIndex.h> #pragma warning (pop) //Enable all warnings

//Link to these USD libraries (is Microsoft Visual Studio specific) #pragma comment(lib, "usd_sdf.lib") #pragma comment(lib, "usd_tf.lib") #pragma comment(lib, "usd_usd.lib") #pragma comment(lib, "usd_arch.lib") #pragma comment(lib, "usd_usdimaging.lib")

PXR_NAMESPACE_USING_DIRECTIVE

namespace { //Functions copy/pasted from maya-usd plugin to mimic what maya-usd does for a rename of a prim in a stage void duplicateLoadRules( UsdStage& stage, const SdfPath& fromPath, const SdfPath& destPath) { // Note: get a copy of the rules since we are going to insert new rules as we iterate. auto loadRules = stage.GetLoadRules();

    // Retrieve the effective rule for the source path.
    //
    // The reason we retrieve the effective rule is that even
    // though we will modify all rules specific to that path,
    // its actual effective rule might be dictated by an ancestor.
    //
    // For example, there might be *no* rules at all for the path
    // while its parent has a rule to unload it. So its effective
    // rule would be "unloaded".
    //
    // In that case, we will have to reproduce that rule at the
    // destination as a path-specific rule.
    const auto desiredRule = loadRules.GetEffectiveRuleForPath(fromPath);

    // Analyze the reasons the source path was loaded or unloaded and
    // replicate them to the destination.
    //
    // The case we need to explicitly handle is when the path is controlled
    // by a rule on itself or a descendent and not from an ancestor. Then we
    // need to duplicate the load or unload rule.
    //
    // We do this by iterating over all rules and duplicating all rules that
    // contain the source path to create rules with the destination path.

    auto oldRules = loadRules.GetRules();
    for (const auto& rule : oldRules) {
        const SdfPath& rulePath = rule.first;
        if (rulePath.HasPrefix(fromPath)) {
            const auto newPath = rulePath.ReplacePrefix(fromPath, destPath);
            loadRules.AddRule(newPath, rule.second);
        }
    }

    // Verify if the effective rule at the destination was covered by the
    // modified rules above. If not, add a specific rule that will give us
    // the desired behaviour.
    //
    // The reason we don't simply add this specific rule for all cases and
    // avoid the above work is that sub-paths might have rules and we need
    // to preserve those rules. So we would need to do the above work anyway.
    //
    // Given that, a common case is that we don't need to add an additional
    // rule. Always adding it would add unnecessary rules.
    //
    // Note: the UsdStageLoadRules has a Minimize function that simplifies
    // rules, but we don't want to change rules the user might have set.
    // The user may expect those rules to exist for some future purpose
    // even though they are not currently used. As a general principle
    // we try to not change user data unless necessary.
    if (desiredRule != loadRules.GetEffectiveRuleForPath(destPath)) {
        loadRules.AddRule(destPath, desiredRule);
    }

    // Update the rules in the load rules object and then in the stage
    // since we were operating on a copy.
    stage.SetLoadRules(loadRules);
}

}//end of global namespace

void removeRulesForPath(UsdStage& stage, const SdfPath& path) { // Note: get a copy of the rules since we are going to remove rules. auto loadRules = stage.GetLoadRules(); auto rules = loadRules.GetRules();

// Remove all rules that match the given path.
auto newEnd = std::remove_if(rules.begin(), rules.end(), [&path](const auto& rule) {
    const SdfPath& rulePath = rule.first;
    return rulePath.HasPrefix(path);
});
rules.erase(newEnd, rules.end());

// Update the rules in the load rules object and then in the stage
// since we were operating on a copy.
loadRules.SetRules(rules);
stage.SetLoadRules(loadRules);

}

//USD File to load const std::string stagePath ("D:/usdstage.usda"); int main() { std::cout << "Usd Example !\n";

//1. Load the usd file
UsdStageRefPtr pStage = UsdStage::Open(stagePath);
if( ! pStage){
    std::cout << "Error the usd file doesn't exist!\n";
    return 1;
}

//Exporting the stage as .usda for debugging purpose
SdfLayer::FileFormatArguments fileFormatArgs;
fileFormatArgs[UsdUsdFileFormatTokens->FormatArg] = "usda";
pStage->Export("d:/usdstageBeforeAnything.txt", true, fileFormatArgs);//Write .usda file from current stage to disk

//2. Create a UsdImagingStagesceneIndex that monitors the stage
UsdImagingStageSceneIndexRefPtr pImagingStageSI = UsdImagingStageSceneIndex::New();
pImagingStageSI->SetStage(pStage);

//3. Create a new scope prim named "Scope1"
const SdfPath oldPath("/Scope1");
const TfToken primToken("Scope");
UsdPrim primWithOldName = pStage->DefinePrim(oldPath, primToken);
if (! primWithOldName.IsValid()){
    TF_RUNTIME_ERROR("Failed to create new prim type: %s", primToken.GetText());
}
pImagingStageSI->ApplyPendingUpdates();//Apply pending updates in the scene index with the recent changes from the stage
pStage->Export("d:/usdstageAfterScopeCreation.txt", true, fileFormatArgs);//Write .usda file from current stage to disk

//4. Rename the Scope prim from "Scope1" to "mat"
{
    SdfChangeBlock changeBlock;

    const SdfPath newPath("/mat");

    // Make sure the load state of the renamed prim will be preserved.
    // We copy all rules that applied to it specifically and remove the rules
    // that applied to it specifically.
    auto fromPath = oldPath;
    auto destPath = newPath;
    duplicateLoadRules(*pStage, fromPath, destPath);
    removeRulesForPath(*pStage, fromPath);

    const SdfLayerHandleVector layersStack = pStage->GetLayerStack();
    SdfPrimSpecHandleVector primSpecs;
    for (const SdfLayerHandle& layer : layersStack) {
        const SdfPrimSpecHandle primSpec = layer->GetPrimAtPath(primWithOldName.GetPath());
        if (primSpec){
            primSpecs.push_back(primSpec);
        }
    }

    const std::string newName("mat");
    for (auto primSpec : primSpecs) {
        primSpec->SetName(newName);
    }
}//end of rename block and SdfChangeBlock will apply the changes

pImagingStageSI->ApplyPendingUpdates();//Apply pending updates in the scene index with the recent changes from the stage ---> CRASHES with 
pStage->Export("d:/usdstageAfterRename.txt", true, fileFormatArgs);//Write .usda file from current stage to disk

}

lanierd-adsk avatar Jun 26 '23 09:06 lanierd-adsk

Filed as internal issue #USD-8438

jesschimein avatar Jun 26 '23 16:06 jesschimein

I can't reproduce this in current USD. When refactoring the UsdImaging_AdapterManager in May 2023, I added a check that the prim is valid ["if (!prim) { return ...; }"] to UsdImaging_AdapterManager::LookupAdapters. I think that this actually fixes the issue you are seeing.

@lanierd-adsk Can you confirm that the issue you are seeing doesn't repro in more recent USD versions?

unhyperbolic avatar Mar 11 '24 18:03 unhyperbolic