{"action":"created","issue":{"url":"https://api.github.com/repos/PixarAnimationStudios/OpenSubdiv/issues/387","labels_url":"https://api.github.com/repos/PixarAnimationStudios/OpenSubdiv/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/PixarAnimationStudios/OpenSubdiv/issues/387/comments","events_url":"https://api.github.com/repos/PixarAnimationStudios/OpenSubdiv/issues/387/events","html_url":"https://github.com/PixarAnimationStudios/OpenSubdiv/issues/387","id":55435649,"number":387,"title":"hbr deprecation advice","user":{"login":"nyue","id":486172,"avatar_url":"https://avatars.githubusercontent.com/u/486172?v=3","gravatar_id":"","url":"https://api.github.com/users/nyue","html_url":"https://github.com/nyue","followers_url":"https://api.github.com/users/nyue/followers","following_url":"https://api.github.com/users/nyue/following{/other_user}","gists_url":"https://api.github.com/users/nyue/gists{/gist_id}","starred_url":"https://api.github.com/users/nyue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyue/subscriptions","organizations_url":"https://api.github.com/users/nyue/orgs","repos_url":"https://api.github.com/users/nyue/repos","events_url":"https://api.github.com/users/nyue/events{/privacy}","received_events_url":"https://api.github.com/users/nyue/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PixarAnimationStudios/OpenSubdiv/labels/example%20code","name":"example code","color":"02e10c"},{"url":"https://api.github.com/repos/PixarAnimationStudios/OpenSubdiv/labels/hbr","name":"hbr","color":"3366FF"},{"url":"https://api.github.com/repos/PixarAnimationStudios/OpenSubdiv/labels/question","name":"question","color":"DDDDDD"}],"state":"open","locked":false,"assignee":{"login":"manuelk","id":1672752,"avatar_url":"https://avatars.githubusercontent.com/u/1672752?v=3","gravatar_id":"","url":"https://api.github.com/users/manuelk","html_url":"https://github.com/manuelk","followers_url":"https://api.github.com/users/manuelk/followers","following_url":"https://api.github.com/users/manuelk/following{/other_user}","gists_url":"https://api.github.com/users/manuelk/gists{/gist_id}","starred_url":"https://api.github.com/users/manuelk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuelk/subscriptions","organizations_url":"https://api.github.com/users/manuelk/orgs","repos_url":"https://api.github.com/users/manuelk/repos","events_url":"https://api.github.com/users/manuelk/events{/privacy}","received_events_url":"https://api.github.com/users/manuelk/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-01-25T23:42:54Z","updated_at":"2015-01-28T00:22:34Z","closed_at":null,"body":"Hi,\r\n\r\n  I am porting some old 2.x code which uses the HbrFace class\r\n\r\n  Here the relevant snippet of how I get the u,v via the GetFVarData() call\r\n\r\n  What is the current way to access a vertex UV at the ptex face level ? Which tutorial example would be relevant as a reference starting point ?\r\n\r\n```\r\n\ttypedef OpenSubdiv::HbrMesh<Vertex>      Hmesh;\r\n\ttypedef OpenSubdiv::HbrFace<Vertex>      Hface;\r\n\ttypedef OpenSubdiv::HbrVertex<Vertex>    Hvertex;\r\n\ttypedef OpenSubdiv::HbrHalfedge<Vertex>  Hhalfedge;\r\n```\r\n```\r\n\t\tHface *face = hmesh->GetFace( faceIndex );\r\n\t\tassert(face);\r\n\t\tbool faceIsExtraordinary = hmesh->GetSubdivision()->FaceIsExtraordinary(hmesh, face);\r\n\t\tint faceDepth = face->GetDepth();\r\n\t\tint ptex_index = face->GetPtexIndex();\r\n\t\t// We only accumulate information from non-Extraordinary faces AND depth==1 (refined)\r\n\t\tprintf(\"buildFace2PtexTableFromHmesh() faceIsExtraordinary = \\\"%s\\\" faceIndex = %d ptex_index = %d faceDepth = %d depth_of_interest = %d\\n\",\r\n\t\t\t\t(faceIsExtraordinary?\"true\":\"false\"),faceIndex,ptex_index,faceDepth,depth_of_interest);\r\n\t\tif (!faceIsExtraordinary && faceDepth==depth_of_interest)\r\n\t\t{\r\n\t\t\tprintf(\"buildFace2PtexTableFromHmesh() ptex_index = %d\\n\",ptex_index);\r\n\t\t\tbool ptex_index_found = o_f2pinfo.ptexuvs_map.find(ptex_index)!=o_f2pinfo.ptexuvs_map.end();\r\n\t\t\tif (!ptex_index_found)\r\n\t\t\t{\r\n\t\t\t\tint numFaceVertices = face->GetNumVertices();\r\n\t\t\t\tif (numFaceVertices != 4)\r\n\t\t\t\t{\r\n\t\t\t\t\tLOG(ERROR) << \"Non-quad after Hbr refinement\";\r\n\t\t\t\t\tthrow std::runtime_error(\"Non-quad after Hbr refinement\");\r\n\t\t\t\t}\r\n\t\t\t\tUVsContainer ptex_uvs;\r\n\t\t\t\tfor (int faceVerticesIndex=0;faceVerticesIndex<numFaceVertices;faceVerticesIndex++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfloat *uValue = face->GetFVarData(faceVerticesIndex).GetData(0);\r\n\t\t\t\t\tfloat *vValue = face->GetFVarData(faceVerticesIndex).GetData(1);\r\n```\r\nCheers"},"comment":{"url":"https://api.github.com/repos/PixarAnimationStudios/OpenSubdiv/issues/comments/71757838","html_url":"https://github.com/PixarAnimationStudios/OpenSubdiv/issues/387#issuecomment-71757838","issue_url":"https://api.github.com/repos/PixarAnimationStudios/OpenSubdiv/issues/387","id":71757838,"user":{"login":"nyue","id":486172,"avatar_url":"https://avatars.githubusercontent.com/u/486172?v=3","gravatar_id":"","url":"https://api.github.com/users/nyue","html_url":"https://github.com/nyue","followers_url":"https://api.github.com/users/nyue/followers","following_url":"https://api.github.com/users/nyue/following{/other_user}","gists_url":"https://api.github.com/users/nyue/gists{/gist_id}","starred_url":"https://api.github.com/users/nyue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyue/subscriptions","organizations_url":"https://api.github.com/users/nyue/orgs","repos_url":"https://api.github.com/users/nyue/repos","events_url":"https://api.github.com/users/nyue/events{/privacy}","received_events_url":"https://api.github.com/users/nyue/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T00:22:34Z","updated_at":"2015-01-28T00:22:34Z","body":"Yes, please close. Thank you.\r\n"}}