On 08/08/2017 at 02:32, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform: Windows ;
Language(s) : C++ ;
---------
Hey guys,
I am currently doing a lot of scene parsing and need to identify objects between different passes.
I noticed, that GUID (GetGUID()) are actually not globally unique. I've found objects with the same GUID in different caches (GetCache()). In this example, they are all different Cube objects (apparently with the same setting, but at different locations/hierarchy in the scene). Different caches have a PolygonObject with the identical GUID. So I cannot rely on the GUID to identify them!
I now have so many different approaches to persistently and globally identify objects across different parsing passes but it's now at a state that has only fringe cases and no working normal case.
How can I uniqely identify objects in Cinema 4D that survives document cloning and generator updates?
I am parsing the Scene using a Hierarchy derived class.
Here's a excerpt form my log: Notice how 4b1f714b50e82730 as GUID shows up several times.
" Cubes <Null> [tachyon id: 9] (IP: 0) GUID: 2d8cafd00775eb9"
" Cube <Cube> [tachyon id: 10] (IP: 0) (control object) GUID: f477d54c6fb6c0e2"
" Cube <Polygon> [tachyon id: 11] CACHED GUID: 99be06871203b0ed"
" Cube.1 <Cube> [tachyon id: 12] (IP: 0) (control object) GUID: e7bf04001d4713f7"
" Cube.3 <Cube> [tachyon id: 13] (IP: 0) (control object) GUID: 291b1c6c76497667"
" Cube.3 <Polygon> [tachyon id: 14] CACHED ADDED GUID: 4b1f714b50e82730"
" Cube.1 <Polygon> [tachyon id: 15] CACHED GUID: edb96c535e457807"
" Cube.2 <Cube> [tachyon id: 16] (IP: 0) (control object) GUID: fde0836b0541a662"
" Cube.3 <Cube> [tachyon id: 17] (IP: 0) (control object) GUID: 8a1bf116c387044a"
" Cube.3 <Polygon> [tachyon id: 14] CACHED ADDED GUID: 4b1f714b50e82730"
" Cube.2 <Polygon> [tachyon id: 15] CACHED ADDED GUID: edb96c535e457807"
" Disc <Disc> [tachyon id: 18] (IP: 0) (control object) GUID: f4e712ea7f50171e"
" Disc <Polygon> [tachyon id: 19] CACHED GUID: 91dcd02f1ff6391d"
" Transforms <Null> [tachyon id: 20] (IP: 0) GUID: 5e81f406e2c53450"
" roated_cube <Polygon> [tachyon id: 21] (IP: 0) GUID: 97d092171cec6a79"
" rotated_cube_top <Polygon> [tachyon id: 22] (IP: 0) GUID: b3f5d4b7071c2e5e"
" roated_cube <Polygon> [tachyon id: 23] (IP: 0) GUID: a397640e1f0359b6"
" rotated_cube_top <Polygon> [tachyon id: 24] (IP: 0) GUID: 83a0776a00658095"
" roated_cube <Polygon> [tachyon id: 25] (IP: 0) GUID: 5f31384399b1069a"
" rotated_cube_top <Polygon> [tachyon id: 26] (IP: 0) GUID: ae898e933fbe4981"
" roated_cube <Polygon> [tachyon id: 27] (IP: 0) GUID: f3c2a611f0abfa94"
" rotated_cube_top <Polygon> [tachyon id: 28] (IP: 0) GUID: 7b159faec312eae9"
" Instances <Null> [tachyon id: 29] (IP: 0) GUID: 73c064e77b243bd6"
" Platonic <Polygon> [tachyon id: 30] (IP: 0) GUID: 1330ea8421bf03f7"
" Platonic Instance <Instance> [tachyon id: 216] (IP: 0) GUID: 1239cddc0645b377"
" Platonic Instance <Instance> [tachyon id: 217] (IP: 0) GUID: d6d49c38675cfe5b"
" Cloth Surface <Cloth Surface> [tachyon id: 31] (IP: 0) (control object) GUID: bda8395b7e07eedc"
" cloth base-1.1 <Polygon> [tachyon id: 32] (IP: 0) (control object) GUID: 7be07e6f7c1fc70c"
" cloth base-1.1 <Null> [tachyon id: 5] CACHED GUID: 171a5cd795410cdf"
" cloth base-1.1 <Polygon> [tachyon id: 33] CACHED (IP: 1) GUID: a65e706f4f5413d7"
" Subdivision Surface <Subdivision Surface> [tachyon id: 34] (IP: 0) (control object) GUID: 5af996a4082be520"
" subdiv-base <Cube> [tachyon id: 35] (IP: 0) (control object) GUID: f22ea4d687d56aec"
" subdiv-base <Polygon> [tachyon id: 14] CACHED (control object) GUID: 4b1f714b50e82730"
" subdiv-base <Polygon> [tachyon id: 36] CACHED GUID: 9a14fc7b254e33cc"
" displaced-plane-parent <Null> [tachyon id: 37] (IP: 0) GUID: e546b3bdebf8fc7"
" displaced-plane <Plane> [tachyon id: 38] (IP: 0) (control object) GUID: 8ba76ad96aee805e"
" Twist <Twist> [tachyon id: 39] (IP: 0) GUID: e7f35e39d62a0f70"
" Displacer <Displacer> [tachyon id: 39] (dirty) (IP: 0) GUID: dac77b01a3468647"
" displaced-plane <Polygon> [tachyon id: 40] CACHED (control object) GUID: 6234c4a36df28952"
" displaced-plane <Polygon> [tachyon id: 41] (dirty) CACHED GUID: e234129dad8b3e5b"
" Visibility <Null> [tachyon id: 42] (IP: 0) GUID: a04fc4d58d77da9c"
" vis.cube.1 <Cube> [tachyon id: 43] (IP: 0) (control object) GUID: af852c6b6888025a"
" vis.cube.2 <Cube> [tachyon id: 44] (hidden) (IP: 0) (control object) GUID: 11599b0d69eb05ef"
" vis.cube.3 <Cube> [tachyon id: 45] (hidden) (IP: 0) (control object) GUID: 3194f419e734775a"
" vis.cube.3 <Polygon> [tachyon id: 14] (hidden) CACHED GUID: 4b1f714b50e82730"
" vis.cube.4 <Cube> [tachyon id: 45] (IP: 0) (control object) GUID: fc6388f59208063f"
" vis.cube.4 <Polygon> [tachyon id: 14] CACHED GUID: 4b1f714b50e82730"
" vis.cube.5 <Cube> [tachyon id: 45] (hidden) (IP: 0) (control object) GUID: a14399de90fd95c5"
" vis.cube.5 <Polygon> [tachyon id: 14] (hidden) CACHED GUID: 4b1f714b50e82730"
" vis.cube.2 <Polygon> [tachyon id: 14] (hidden) CACHED GUID: 4b1f714b50e82730"
" vis.cube.1 <Polygon> [tachyon id: 14] CACHED ADDED GUID: 4b1f714b50e82730"