Jump to content

defc0n1

Members
  • Content count

    20
  • Joined

  • Last visited

Community Reputation

0 Neutral

About defc0n1

  • Rank
    Peon

Personal Information

  • Name
    Vijin Ravindran
  • Location
    UK
  1. Hey guys I have a python library that does not work well in the Houdini python environment. However, it works fine in my system environment. Is there a way to run a .py file from disk from a python node? If yes, can it be made to use the system environment? Thanks!
  2. Hi guys I have a file node writing out a bgeo of a geometry, and I need the filename and path to be taken from a detail attribute. Is this possible? I have a detail attribute called filename, with the string that contains a path I selected earlier. Thanks.
  3. Global variable using python

    Thanks for the help guys. I managed to do what I wanted by just passing around some detail attributes. Seemed much simpler!
  4. Never mind. Stupid question.
  5. Right....how do I call this from using callback script? Do I just do hou.pwd().hdaModule().modify_geo(geo)?
  6. Global variable using python

    Hi Luke Doesn't seem to work - SyntaxWarning: name 'foo' is assigned to before global declaration
  7. Global variable using python

    Hi guys Can you set global variables using python within an HDA? I have an ordered menu that is being populated by a python menu script. Is it possible to set a global variable from in there? Thanks!
  8. Hey everyone I have an ordered menu in my HDA that gets populated by a python script based on an attribute. The name of the menu is data_source: if (geo.attribValue('nHDU') > 1): return ("0", "Primary", "1", "Extension") else: return ("0", "Primary") I'm trying to access this token value from an internal python node using this: value = hou.evalParm("../data_source") Now I know for sure that the nHDU value is >1 and the two menu items are being populated. Problem is, no matter what I select on the menu, I always get a value 0. It works if I add it directly to the ordered menu without using a script. But that defeats the purpose because it should depend on the attribute nHDU. Could someone tell me what's happening here? Thanks.
  9. He Alex..sorry I hit a wall again. My internal python node adds detail attributes so when I define the same code within the HDA python module, it says that the geometry is read-only. I read somewhere that you can't modify geometry from within an HDA's python module? My function examines a binary file and adds some attributes based on the parameters it finds in the file. Problem is, the file is HUGE and I don't want it to cook every time I change the file to be analysed.
  10. Oh wait does it mean I can call a function in an internal Python SOP from within the python module in the HDA?
  11. Right. I'll need to fix that. Could you explain that last part - '...even from within Python SOPs inside, if you wish so.'?
  12. Hey guys I have an HDA with 2 python SOPs inside. I need a button on the HDA that would trigger a function in one of the python SOPs. I looked at how callback scripts work but it was too confusing. Appreciate it if someone could help me out. Thanks! Cheers defc0n1
  13. Hi guys Here's my problem - I need to work with openVDB volumes and I need to code using a python node. The problem is, even after successfully installing openVDB, I am not able to import the pyopenvdb module in Houdini. I can access it from the shell in my Mac, and can create/manipulate volumes etc., but not from Houdini. When I try import pyopenvdb as vdb in the python node or shell, it just says that it cannot find the module. Please help. Thanks.
  14. String parsing in Font SOP

    Good idea. Now why didn't I think of that? I'll check it out. Thanks fsimerey.
×