Jump to content
MrScienceOfficer

InlineCPP

Recommended Posts

import inlinecpp


inlinecpp.extendClass(hou.Geometry, "geo_merge_HOM_ext", "", ["""
void mergePrimGroup(GU_Detail* gdp, const GU_Detail* src, const char* prim_grp)
{
    gdp->merge(*src, src->findPrimitiveGroup(prim_grp));
}
"""])

"AttributeError: function ?mergePrimGroupy...yadadada not found"

This error only occurs when "src" is const, or gdp isn't const.  Basically if the const-ness of the GU_Detail args are mismatched the function "can't be found".  Does anyone know anything about this?

 

Thanks

 

Share this post


Link to post
Share on other sites

Are you on Windows? I recall this being a Windows issue with how it handled args when compiling.  I can't remember if there was any solution. Do things work better if you put the prim_group arg in between the detail args?

Share this post


Link to post
Share on other sites
1 hour ago, graham said:

Are you on Windows?

Sorry, yes... of course, sigh...

 

1 hour ago, graham said:

Do things work better if you put the prim_group arg in between the detail args?

Truly a noble effort but alas no.

 

I suppose the only thing left to do is send in a bug report just in case, and just take the geometry as a SOP_Node instead.

 

Thanks Graham.

Share this post


Link to post
Share on other sites

I found that I had submitted 51276 for this issue 48 months ago!  Originally based on 

 

Share this post


Link to post
Share on other sites

I updated my bug report to mention yours.  4 years is a long time, Microsoft must be doing something weird. :o

And here I was thinking inlinecpp was gonna be all fun and games...

 

Thanks for finding that, I appreciate it :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×