When I attach a SOP Geometry to serveral objects,
and,i make this geometry's topology all the same between objs(but i didnt use share..), and give these objs a solver(which is hdk built), in this solver's solveObjectsSubclass() func, I modify their geometry data to make them different, But they are still the same geometry
,geometries still have same unique ID.
Geometry seems to be the result of last modification.
How can i initialize all obj's geo data to different data instance in a solver?
I didnt see anything about this issue on hdk documentation,did i miss something?
HDK question, DOP solver,DOP data(SOLVED)
2217 3 0- xiaolin liu
- Member
- 19 posts
- Joined: June 2013
- Offline
- xiaolin liu
- Member
- 19 posts
- Joined: June 2013
- Offline
- derrick
- Staff
- 329 posts
- Joined: July 2005
- Offline
xiaolin liu
How can i initialize all obj's geo data to different data instance in a solver?
I didnt see anything about this issue on hdk documentation,did i miss something?
Unsharing should happen when your solver attempts to get a writeable handle to the geometry. It should look something like this:
SIM_GeometryCopy *geo = SIM_DATA_CREATE(object, SIM_GEOMETRY_DATANAME, SIM_GeometryCopy, SIM_DATA_RETURN_EXISTING | SIM_DATA_ADOPT_EXISTING_ON_DELETE);
GU_DetailHandleAutoWriteLock gdl(geo->lockGeometry());
GU_Detail *gdp = gdl.getGdp();
- xiaolin liu
- Member
- 19 posts
- Joined: June 2013
- Offline
derrick
Unsharing should happen when your solver attempts to get a writeable handle to the geometry. It should look something like this:
SIM_GeometryCopy *geo = SIM_DATA_CREATE(object, SIM_GEOMETRY_DATANAME, SIM_GeometryCopy, SIM_DATA_RETURN_EXISTING | SIM_DATA_ADOPT_EXISTING_ON_DELETE);
GU_DetailHandleAutoWriteLock gdl(geo->lockGeometry());
GU_Detail *gdp = gdl.getGdp();
Thanyou very much Derrick :wink: , you're a nice guy!
It's difficult to realize,hope hdk's doc become more detailed.
-
- Quick Links