Jump to content

Recommended Posts

Guest mantragora

WTF, right ?! Yeah, I bet your first reaction for this title was the same as my when I saw this number :)

I found this diamond while browsing HDK examples and I would really, REALLY, like to know how I could ever, EVER, possibly figure it out on my own.

Basically, you bind selector to operator and this => "0x000000ff" <= is the 8 argument that you pass to "bindSelector()" method as prim/point mask selection.

Q1: Is there anyone that could explain me what it means and where I could find more info about it ?.

Q2: Are there any other magic numbers that I should be aware of ?



I found it in this example http://www.sidefx.co..._c-example.html

Edited by mantragora

Share this post

Link to post
Share on other sites
Guest mantragora

1. looks like standard hexadecimal. converting this to decimal should be (16*15)+15 = 255

more info here:


2. Yes, all numbers in hexadecimal look like this, you can use


I know how it looks.I don't know WHY it's there and WHAT it means for the code. Can I write there any number ? Or is there some specified code table that should be used there ? If I find in the middle of the code some number most of the time I prefer to know why it's there. Especially when it specifies prim/point mask selection and is not commented anywhere.

Edited by mantragora

Share this post

Link to post
Share on other sites

The primmask refers to *_FILEID enums in GEO_PrimTypeCompat.h. A regular GEO_PrimTypeCompat mask can be used if you first convert it using GEO_PrimTypeCompat::convertToFileFromMask(). I've better documented the bindSelector() method for the next major Houdini release.

Share this post

Link to post
Share on other sites
Guest mantragora

Oh, there is one more thing.

I looked into PrimTypeCompat.h that is delivered with my Houdini build (12.5.393) and there is no Enum with this code specified inside. I got 20 positions to choose from:

0x00000001, // Polygon
0x00000002, // NURB Curve
0x00000004, // Rational Bezier Curve
0x00000010, // Linear patch
0x00000020, // NURB Surface
0x00000040, // Rational Bezier Surface
0x00000f00, // TPsurf Paste Hierarchy
0x00001000, // Ellipse/Circle
0x00002000, // Ellipsoid/Sphere
0x00004000, // Cylinder
0x00008000, // Particle
0x00100000, // Meta-ball
0x00200000, // Super quadric
0x00300000, // Meta-line
0x00400000, // Meta-bezier
0x00500000, // Meta-triangle
0x10000000, // Triangle fans
0x20000000, // Generalized triangle strips
0x30000000, // Triangular beziers
0x40000000, // Voxel volume

Online verion of this file contains even less positions http://www.sidefx.co..._8h_source.html. Is it mean that the code example contains deprecated number or it's just omission in the code?

Edited by mantragora

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