mark attribute expressions with colors (as in the IDE)

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  09 September 2017
mark attribute expressions with colors (as in the IDE)


i have an issue with color markings for the attribute expressions. that concerns both hscript as python.

the problem is that in all tutorials they have the code marked with different colors like you would use the IDE inside of houdini. my code consists of white letter only. 

(another problem related to this is that houdini doesn't keep my values. for example 4.4 is 4.39000001 or 4.40000004 or something else - - i... level tutorial)

any help would be very appreciated

Last edited by michaelgfx : 09 September 2017 at 05:06 PM.
  09 September 2017
There is syntax color highlighting, but it only works in the VEXpression parameter field (on the wrangle nodes: point wrangle, attribute wrangle, and volume wrangle) where you are expected to enter VEX, HScript, or Python code. I think it's helpful to mention exactly which tutorials where you are seeing this, so people who are trying to help you can find an answer quicker. "In all tutorials" is rather vague, which costs time in figuring out things, so if you have a specific question, please include specific details if you can.

As for the display of numbers in Houdini, you are seeing the result of using floating point numbers. You are typing 4.4 but Houdini can only store that value as 4.39000001 or 4.40000004 due to how floating point numbers work on computers.

Originally Posted by ndickson: A “float” (or floating-point number) is any real number, but represented with finite precision (usually either 32 or 64 bits, though sometimes 16 bits). One thing to note about floats that surprises a lot of people is that many numbers that look simple in decimal, like 0.1, are not exactly that value when represented in floating-point, so you have to be careful when checking whether two float values are equal, to instead check if they're approximately equal. You might have to be careful about accumulating roundoff error in some cases, too.
  09 September 2017
thanks for the help pomru. i was watching "Houdini - Introduction to FX using Houdini with Saber Jlassi" form CGSociety. on the very beginning of the week2 there is something like this (applied from the sphere node to the torus node):

ch("/obj/geo1/sphere1/radx") * 2

when editing the field, the colors show, just how depicted in the screenshot here:

mine stays all black no matter what (i'm using Houdini 16)

i was thinking why i don't have same effect using same node.
  09 September 2017
Here is one possible solution.

Originally Posted by jsmack: Assuming you are referring to syntax highlighting, keywords will appear in the appropriate color when entered to a text field that is for entering code. If you have entered text into a wrangle code box, and it still appears all white, you have probably toggled the expression for the parameter. left click the label of the parameter, or right click the label or text box and select “Toggle Expression.” This will return the field from expression evaluation mode to standard mode, which allows for highlighting.
  09 September 2017
thanks, but toggling only switches between the code and the output value, doesn't change anything in the coloring department. but using your keywords i was able to find this: (i will try my luck with it since all the script highlights are turned on in the preferences)

i also found and already installed this: (it's not the same though as having those colors in the original fields already. i'm an absolute beginner in scripting/programming so that sort of stuff would help me a lot to not get lost even in the simple code)

it works fine but only in a separate tab:

Last edited by michaelgfx : 09 September 2017 at 01:49 PM.
  09 September 2017
If all those options you found fail for you, there is the option of contacting Saber Jlassi and asking about the syntax highlighting.
reply share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 02:42 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.