Jump to content

Stalkerx777

Members
  • Content count

    450
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    15

Stalkerx777 last won the day on February 12

Stalkerx777 had the most liked content!

Community Reputation

164 Excellent

About Stalkerx777

  • Rank
    Illusionist
  • Birthday 03/02/1984

Contact Methods

  • Skype
    alexx_houdini

Personal Information

  • Name
    Alex Rusev
  • Location
    Vancouver, Canada

Recent Profile Visitors

10,186 profile views
  1. How to change HDA asset name?

    Asset Manager -> Right Click-> Duplicate
  2. Noob Syntax question

    This is called casting in C/C++ more specifically a static upcast. This form is an old C style casing, C++ also adds static_cast syntax which does the same. parent = static_cast<OP_Network*>(OPgetDirector()->findNode("/obj")); Static means it's a compile time procedure and upcast means you get a pointer to the the parent base class which is higher in class hierarchy (therefore upcast). This is very common in C++.
  3. Houdini Engine as a javascript library?

    Houdini Engine is a C API, so it's possible to write a Node.js extension, but it won't be possible to use it in a browser because the engine uses Houdini dynamic libraries, and browsers can't load arbitrary user libraries. You would need to build a front end in JavaScript and a backend in any language that can talk to Houdini Engine.
  4. Getting Houdini Global Vars With Python

    Aaha, nice!
  5. Tree panel from HOU module

    hou.ui.selectFromTree() https://www.sidefx.com/docs/houdini/hom/hou/ui.html
  6. Getting Houdini Global Vars With Python

    I don't think there's a way to get the list of hip variables. A quick and dirty solution that comes in mind is parsing the text block of the hip file. In shell it would be: strings scene.hip | grep 'set -g' Same can be done from within Houdini with Python given the hip has been saved: import re with open(hou.hipFile.path(), 'rb') as f: for var, val in re.findall(r".*set -g (.+?)\s=\s\'(.*)\'", f.read()): print(var, val)
  7. OPmenu issue

    labelExpression should be used when you want to dynamically show/hide menu items, main script should go under scriptCode or scriptPath tags
  8. How to compile vfl library files to use in wrangles

    Drop a SOP/Attribute VOP and check out the Compiler parameter. All wrangle nodes compile you code once and it's very fast. You won't get any execution performance benefits from pre-compiling. I don't know the size of your code, but the one I once worked with was a couple of thousand LOC in a header file and wrangle nodes chewed them almost instantly. Cheers.
  9. How to compile vfl library files to use in wrangles

    cvex is sort of generalized context ( computational vex - not sure if it's real of I made this up ) it could be useful for some times to abstract from context (SOP, DOP, Shaders) but if you don't have a strong requirement to make it so general, just stick to regular functions, save them to a .h file and then #include it. Houdini will compile it for you. You won't get any benefits from pre-compile your code manually with vcc For reference: https://www.sidefx.com/forum/topic/41253/
  10. Howdy!

    Hey old-timers It's been 13 years since I joined, oh man, time flies huh?
  11. Listen globally for display flag event

    https://www.sidefx.com/docs/houdini/hom/hou/nodeEventType.html FlagChanged is what you're looking for. Also, read "Node event handler files" section from here https://www.sidefx.com/docs/houdini/hom/locations.html and use OnCreated.py instaed of pythonrc.py
  12. How to get a callback event on cook?

    You might want to use Object/Python Script or Sop/Python SOP nodes for this. Or create a new "Python based" operator via File -> New Asset > Python type and you'll be able to put your cooking code into the Code section of the operator
  13. how to update a menu items (not using menu script)

    This is what I did when I needed something like this. I added a callback to my menu A and used an intermediate data storage, so when I trigger menu A, it would update the storage and trigger the callback for menu B. Example of A -> B dependency Menu A parameter callback: def changed(): # Since Menu B depends on value of Menu A, we calculate the values for Menu B in this callback and push them to the "storage" values_for_menu_b = [1, 'a', 2, 'b', 3, 'c'] # setUserData wants a string (setCachedUserData can take any Python object, but only lives within the session) kwargs['node'].setUserData('storage', str(values_for_menu_b)) # Trigger menu_b, this will cause the menu script to evaluate kwargs['node'].parm('menu_b').pressButton() Menu B menu script: def menu_items(): # eval'ing the string into a list of tuples for the menu return eval(kwargs['node'].userData('storage')) Hope this helps
  14. Setting Default Scene File

    https://www.sidefx.com/docs/houdini/hom/locations.html Add this to $HOME/houdini18.5/scripts/123.py: hou.hipFile.load("your_scene.hip")
  15. Parameter Expression by Python

    0. Switch expression language to Python (you've done that already) 1. Set a keyframe on the string parameter. This is required! 2. Set your expression like this: hou.expandString("$HIPNAME").split('_')[0]
×