I have written a plugin in H11 that added multiple volume primitives a while back but for some reason the same code isn't working anymore. All I get is one primitive with the name set to “C” which I suspect is overriding the previous primitive. I think the build() function is either failing to increase the primitive count or not effectively adding a primitive. I can only suspect an HDK change that is causing this but I could be wrong. Here's a code sample:
// code begin
gdp->addPrimAttrib(“name”, sizeof(UT_String), GB_ATTRIB_INDEX, 0);
gdp->addVariableName(“name”, “name”);
GEO_AttributeHandle HANDLE = gdp->getPrimAttribute(“name”);
GU_PrimVolume *volumeA = (GU_PrimVolume*)GU_PrimVolume::build(gdp);
GU_PrimVolume *volumeB = (GU_PrimVolume*)GU_PrimVolume::build(gdp);
GU_PrimVolume *volumeC = (GU_PrimVolume*)GU_PrimVolume::build(gdp);
UT_VoxelArrayWriteHandleF handleA = volumeA->getVoxelWriteHandle();
UT_VoxelArrayWriteHandleF handleB = volumeB->getVoxelWriteHandle();
UT_VoxelArrayWriteHandleF handleC = volumeC->getVoxelWriteHandle();
HANDLE.setElement(volumeA);
HANDLE.setString(“A”);
HANDLE.setElement(volumeB);
HANDLE.setString(“B”);
HANDLE.setElement(volumeC);
HANDLE.setString(“C”);
// code end
Any ideas why this isn't working?
Cheers,
Ron
hdk multiple volume primitives problem
2633 2 1- rony
- Member
- 48 posts
- Joined: July 2005
- Offline
- Ratmann
- Member
- 110 posts
- Joined:
- Offline
Hey Rony,
Yes there was a few changes in the HDK for 11, specifically when working with attributes.
Check out this section in the docs on how to update your code:
http://www.sidefx.com/docs/hdk11.0/hdk_changes_11_0.html#HDKC11_0_GB_AttributeRef [sidefx.com]
-Rick
Yes there was a few changes in the HDK for 11, specifically when working with attributes.
Check out this section in the docs on how to update your code:
http://www.sidefx.com/docs/hdk11.0/hdk_changes_11_0.html#HDKC11_0_GB_AttributeRef [sidefx.com]
-Rick
- rony
- Member
- 48 posts
- Joined: July 2005
- Offline
Hi Rick,
Thanks for the reply. I am aware of the GB_Attribute changes from 10 to 11. The issue I'm having is that the code used to work in a previous build of Houdini 11 and I was wondering if anything changed with GU_PrimVolume.
Actually, the only real difference is that I'm compiling it under windows with a newer Houdini build.
I forgot to include the info so here are the specs:
Windows 7 64bit
Visual Studio Standard 2005
Houdini build version 11.0.658
using hcustom to compile.
Thanks for the reply. I am aware of the GB_Attribute changes from 10 to 11. The issue I'm having is that the code used to work in a previous build of Houdini 11 and I was wondering if anything changed with GU_PrimVolume.
Actually, the only real difference is that I'm compiling it under windows with a newer Houdini build.
I forgot to include the info so here are the specs:
Windows 7 64bit
Visual Studio Standard 2005
Houdini build version 11.0.658
using hcustom to compile.
-
- Quick Links