Jump to content

Christoph_H

Members
  • Content count

    55
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Christoph_H

  • Rank
    Peon

Personal Information

  • Name
    Christoph
  • Location
    Germany
  1. How to get viewport handles for created points with addpoint()

    Hi, I have to ask again for help. I have recently started with python and therefore still have Problems. This script is placed in the | type proberties | interactive | viewer state |: 1. By adding newer points the effect changes only if I press apply at viewer state 2. Somehow the program did not accept the relative path to the parameter. How does that work? 3. and I haven't been able to create new handles yet I would be interested in how a clean structure of such a script would be written help would be great. many thanks. import hou import viewerstate.utils as su picker_folder = str(hou.evalParm('/obj/geo1/picker/folder0')) #Somehow the program did not accept the relative path to the parameter. How does that work? pickerx = "picker"+picker_folder+"x" pickery = "picker"+picker_folder+"y" pickerz = "picker"+picker_folder+"z" print(pickerx,pickery,pickerz) #print(picker_folder) class State(object): def __init__(self, state_name, scene_viewer): self.state_name = state_name self.scene_viewer = scene_viewer self.translate_handle = hou.Handle(self.scene_viewer, "Translate") def onEnter(self, kwargs): self.translate_handle.show(True) def onHandleToState(self, kwargs): """ Used with bound dynamic handles to implement the state action when a handle is modified. """ handle = kwargs["handle"] parms = kwargs["parms"] mod_parms = kwargs["mod_parms"] prev_parms = kwargs["prev_parms"] ui_event = kwargs["ui_event"] self.log(parms) def onStateToHandle(self, kwargs): """ Used with bound dynamic handles to implement the handle action when a state node parm is modified. """ handle = kwargs["handle"] parms = kwargs["parms"] node = kwargs["node"] def createViewerStateTemplate(): """ Mandatory entry point to create and return the viewer state template to register. """ state_typename = kwargs["type"].definition().sections()["DefaultState"].contents() state_label = "picker" state_cat = hou.sopNodeTypeCategory() template = hou.ViewerStateTemplate(state_typename, state_label, state_cat) template.bindFactory(State) template.bindIcon(kwargs["type"].icon()) # bind a static handle to node parameters. template.bindHandleStatic( "translate", "Translate", [ (pickerx, "tx"), (pickery, "ty"), (pickerz, "tz") ]) return template
  2. How to get viewport handles for created points with addpoint()

    thanks. Hi, I have try it. But it's not perfect or flexible. Maybe you can help a little bit? I have problems to use it with multiparm block lists. handles_pts.hdanc
  3. Else if command

    Has Hsript no integer type?
  4. Hi, how to get viewport handles for created points with addpoint() ?
  5. How to create a geometry parameter in own function?

    Thanks. I'm wondering a bit, because I can't find the syntax on the corresponding page like this. https://www.sidefx.com/docs/houdini/vex/vcc.html How can I find that out, except on forums?
  6. Select color precisly from @Cd (keying, vex, RGB)

    Hi, you can do this to pick the exact color value: H or this: if (@Cd == {1,0.5,0.2} ) { @P.y = 1; } with pcfind() you can create a picker.
  7. How to create a geometry parameter in own function?

    Thanks. Is this generally the way to solve this possibility during programming?
  8. Hi, how to create a geometry parameter in own function? In this example the parameter „geo“ should be read a string or an integer. How is this possible? Because the point function can also read a string or an integer. function vector TEST (string geo or int geo) { vector Ret = point(geo,"ABC",10); return Ret; } Possibility 1: v@R = TEST("op:../wrangler1''); Possibility 2: v@R = TEST(1);
  9. Hi, how is it possible to bake the rounded Edge shader to normal map in houdini? thanks.
  10. thank you so far. hopefully the last question: I want add setName to my created nodes, but it doesn't work. import csv with open('path', 'rb') as f: doc = csv.reader(f) for row in doc: node = hou.node('/obj').createNode('hda') node.parm('w').set(row[0]) node.parm('t').set(row[1]) node.parm('angle').set(row[2]) node.setName("test_") node.moveToGoodPosition()
  11. Thank you. It's really helpfull. But I have two questions: How exactly do I set the HDA? I could not use the asset name in my scene. Or do I have to specify the directory path of the hda? How do I define the selection of certain vertical columns in combination with horizontal rows? thank you.
  12. Hi, whats the best way? I have a digital asset with 4 parameters. I want to create some copies of this based of different parameter values from a table file. It would be cool to read and create automatically geos. My python skills are very very rough. I don't know how to begin. Can you help me? thanks.
  13. Double Lines / Edges

    Great! Thanks for your help.
×