Jump to content

How to...


Recommended Posts

How to print entiry vector or matrix to console?

I use "deb.output("Origin = %f %f %f\n",origin[0],origin[1],origin[2]);" for now.

How to make primitive attribute "Local" as it makes Attribute sop?

I have few Primitive attributes...and i just want to use it by name $RADIUS

Currenlty i use prim(....) expression.

Hmmm...probably not hdk related...How to atach handles to parameters? :unsure:

Link to comment
Share on other sites

Hmmm...probably not hdk related...How to atach handles to parameters?  :unsure:

13674[/snapback]

Not sure how to do it with in the HDK itself, but you can edit a copy of the $HIH/OPbindings file and put it somewhere in the path.

The problem is that it doesnt read ALL OPbindings in your path and doesnt support preprocessor statements like #include. If this was the case, you could just add an OPbindings earlier in your path with only your new operator and #include the system one in $HIH if need be. Ultimately just having Houdini read all OPbindings files in the PATH would be a lot better, IMHO.

The current way, you're not receiving the handles to new OPs or whatever as new versions of Houdini get released. You have to re-edit the OPbindings file for every (signficant) release. Also, you cannot have an OPbindings files in parrallel locations to custom DSOs, so if you have permutations of certain custom OPs being loaded by certain shows, you still have to maintain one master OPbindings file which will print errors for OPs you're trying to bind handles to which are not defined.

Link to comment
Share on other sites

Guest xionmark
How to print entiry vector or matrix to console?

I use "deb.output("Origin = %f %f %f\n",origin[0],origin[1],origin[2]);" for now.

How to make primitive attribute "Local" as it makes Attribute sop?

I have few Primitive attributes...and i just want to use it by name $RADIUS

Currenlty i use prim(....) expression.

Link to comment
Share on other sites

Thank You so much Jason!

Drop it to odWicki pls :)

Hey Mark!

I only started to study C++ & HDK, therefore i set probably silly questions :)

I mean outputing debug info to Houdini console.

i use standart (i hope) procedure declared in UT_Debug.h

For example...if You want to print debinfo on Vector in VEX u use

printf("Origin = %f\n", Origin); without worrying about splitting on components.

And...hmmmm....i like this "less typing" style:)

There are many examples on how to localize "POINT" attributes..even doc page,

but no words about "PRIMITIVE" attributes. :(:unsure:

Link to comment
Share on other sites

Guest xionmark
I mean outputing debug info to Houdini console.

i use standart (i hope) procedure declared in UT_Debug.h

For example...if You want to print debinfo on Vector in VEX u use

printf("Origin = %f\n", Origin); without worrying about splitting on components.

And...hmmmm....i like this "less typing" style:)

There are many examples on how to localize "POINT" attributes..even doc page,

but no words about "PRIMITIVE" attributes. :(  :unsure:

13685[/snapback]

Oh, I've never seen the UT_Debug class, looks pretty slim, appears to be a simple "wrapper" around printf/cout functionality.

As far as point attributes vs. primitive attributes (and detail attributes for that matter), you do almost the same operations as for points, you just look into a different part of the gdp structure.

I may be able to find an example later if you need it.

--Mark

Link to comment
Share on other sites

I assumed that, but have probably made something wrong,

because at attempt to refer to a variable

Houdini spoke that it does not exist.

YES!!! Please post as much examples as You can!!!

From Doc:

"The easiest way to start writing code is to grab a copy of

one of the samples and start modifying the code.

It's really not that difficult".....It is my case for now :)

Link to comment
Share on other sites

How to print entiry vector or matrix to console?

I use "deb.output("Origin = %f %f %f\n",origin[0],origin[1],origin[2]);" for now.

13674[/snapback]

As it is stated in UT_Debug.h, you need to have the UT_DEBUG macro defined. An easy way without twiddling compiler switches is to add:

#define UT_DEBUG

at the top of your .C file before you include UT_Debug.h

While we're on debugging, using UT_Assert.h (and the UT_ASSERT macro) is also a good idea.

Link to comment
Share on other sites

  • 3 weeks later...

I`m trying to create something like rhino`s Unroll Developable Surface op.

At the current moment i`m in a stage of understanding

of the collected math info...pretty understandable indeed :coffee1:

First that comes to mind is:

I should use breakpoints when deal with NURBS surface for this kind of operation

Should i worry about trims and profiles if surface has it?

What headers should i eat to be a "master of primitive breakpoints" (not CVs)? :euro:

Few strings of code on how to get breakpoint coords, set breakpoint coords

would be great help. :notworthy:

Link to comment
Share on other sites

Yes, "Maslo" mean "butter" and "oil". But in this case is "oil"  :D

Aviation and butter are not too compatible  :lol:

13999[/snapback]

Wouldn't it be great if butter + oxygen = explosion, that would get you going in the morning...... get some bread make some toast, get the butter out of the fridge.... :blink: :nuke: boom!

Link to comment
Share on other sites

There, now you've done it.

Expect a Cease & Desist from the makers of "butter-explodo-puffs" crunchy morning cereal . (Part of this nutritious breakfast).

:P

Cheers,

G

Wouldn't it be great if butter + oxygen = explosion, that would get you going in the morning......  get some bread make some toast, get the butter out of the fridge....  :blink:  :nuke:  boom!

14005[/snapback]

Link to comment
Share on other sites

Yes, "Maslo" mean "butter" and "oil". But in this case is "oil"  :D

Aviation and butter are not too compatible  :lol:

13999[/snapback]

Oh no no no!!!

Aviation and butter are very much compatible!

Because the daily norm of butter of the military pilot

twice is more than for infantryman :rolleyes:

As we spoke: "Son i Pitanie - osnova letanija"

it means "Sleeping and Eating - basis of flight" :sleep1: :coffee1:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...