Jump to content


  • Posts

  • Joined

  • Last visited

Personal Information

  • Name
    JJ FX

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

JJ FX's Achievements


Newbie (1/14)

  • Reacting Well Rare
  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done Rare

Recent Badges



  1. Hi So when redirecting POST: hwebserver.redirect(request, path) It's received as GET. Usually you pass code 307 to redirect POST. But this functionality seems to be misssing. Is it possible to redirect POST request with hwebserver?
  2. Ideally I want to use headless Houdini version with hython. Where are the commandline tools located?
  3. Hi, Can I run on Windows Houdini with cmd or powershell without manually lauching Houdini and then going to Windows > Shell?
  4. Here's my solution straight from hell. It's not fully cleaned up yet. Using PrettyPrinter because it's difficult to tell if it's even working. I guess I'd have to plug it into the another endpoint to see if it's working for me. import pprint pp = pprint.PrettyPrinter(indent=4) # [1] Settings node = hou.pwd().input(0) # tested with python sop excluded_folders = ['Top Folder One', 'Top Folder Two', 'Another Not Used Folder'] use_folders = ['Settings', 'Another Folder Name'] # [2] Defs # parm object example parm_obj_template = { "name": "parm_name", "label": "parm_label", "type": "type", "min": 0, "max": 0, "value": 0 } # folder object example folder_obj_template = { "name": "folder_name", "label": "parm_label", "type": "type", "folders": [], "parms": [] } parm_types = [hou.parmTemplateType.Float, hou.parmTemplateType.Int, hou.parmTemplateType.Toggle] folder_types = [hou.folderType.Collapsible, hou.folderType.Simple, hou.folderType.Tabs] def __is_parm(parm): return parm.type() in parm_types def __is_folder(parm): return parm.type() == hou.parmTemplateType.Folder def __get_parms(folder): return [parm for parm in folder.parmTemplates() if parm.type() in parm_types] def __get_folders(folder): return [parm for parm in folder.parmTemplates() if parm.type() == hou.parmTemplateType.Folder] def __get_parm_obj(parm): data = {} data['name'] = parm.name() data['label'] = parm.label() data['type'] = parm.type() data['min'] = parm.minValue() data['max'] = parm.maxValue() data['value'] = node.parm(parm.name()).eval() return data def __get_folder_obj(folder): data = {} data['name'] = folder.name() data['label'] = folder.label() data['type'] = folder.folderType() data['parms'] = [] for parm in __get_parms(folder): data['parms'].append(__get_parm_obj(parm)) pass data['folders'] = [] for subfolder in __get_folders(folder): if __is_folder(subfolder): data['folders'].append(__get_folder_obj(subfolder)) pass return data # [3] Run group = node.parmTemplateGroup() top_folders = [folder for folder in group.entries() if folder.type() == hou.parmTemplateType.Folder] included = [folder for folder in top_folders if folder.label() not in excluded_folders] def node_obj(): data = { 'name' : node.name() } folders = [] for folder in included: folders.append(__get_folder_obj(folder)) pass data['folders'] = folders return data print('\n-> Start') pp.pprint(node_obj()) print('End <-')
  5. Hi, I need to get all parms of a node structured like an object, going from top folder down. Here's a pseudo-code structure I'm looking for: parm_obj = { "name": "parm_name", "type": int/float/bool, "min": value, "max": value, "value": some_value } folder_obj = { "name": "folder_name", "type": tab/collapsable/simple "folders": [folder_obj_1, folder_obj_2, ...], "parms": [parm_obj_1, parm_obj_2, ...] } node_parms_obj = { "name": "node name", "folders": [folder_obj_1, folder_obj_2, ...],, "parms": [parm_obj_1, parm_obj_2, ...] } Because folders contain more folders it gets quite tricky. So I need recursive functions for that. But I'm failing so far. I've looked into docs and I'm surprised that there's no method for that already! Or am I missing something? Maybe there is? Do you guys have any tips on how to deal with it?
  6. So here's the solution: before subdiv > uvflatten (using the edge group) > subdivide > splituvseams > group (edge, unshared edges)
  7. Hi, How would you transfer edge groups using subdivision? I can't figure it out...
  8. Hi guys, So I cannot find anything in docs about how to have the ramp maximize using python... You can set the rampParmTemplate().setShowControls(True), but the maximize button is missing? I mean this exact button...
  9. Hi, So I cannot figure out how with python create a relative referenced ramp. The closest I got is to this: # pseudocode controller = 'my_controller_node' target = 'polyextrude_node' path = target.relativePathTo(controller) # or the other way around controllerRamp = controller.parm('thicknessramp') targetRamp = target.parm('thicknessramp') # store the current ramp: keys = targetRamp.evalAsRamp().keys() values = targetRamp.evalAsRamp().values() # set the expression on the thicknessramp parameter expression = 'ch("' + path + '/' + controllerRamp.name() + '")' targetRamp.setExpression(expression) # now the ramp is all broken, so I'm restoring the control points and give them expressions too for i in range(len(keys)): key = targetRamp.name() + str(i+1) + 'pos' value = targetRamp.name() + str(i+1) + 'value' interp = targetRamp.name() + str(i+1) + 'interp' # set the keys, values and interpolations controller.parm(key).set(keys[i]) controller.parm(value).set(values[i]) controller.parm(interp).set(2) # and finally expressions expression = 'ch("' + path + '/' + key + '")' target.parm(key).setExpression(expression) expression = 'ch("' + path + '/' + value + '")' target.parm(value).setExpression(expression) expression = 'ch("' + path + '/' + interp + '")' target.parm(interp).setExpression(expression) So this works fine as long I don't add new points to the controller node. Then ofcourse ramp creates new parameter names 'parmname15pos' etc... So the whole thing is not working properly. This seams to be quite overengineered already... What am I missing that I have to use to do the copy / paste relative references for a ramp parameter?
  10. Hi guys, How to add a drop down list option for a string parameter? Like in Group SOP?
  11. @Librarian cool thanks, will dive into this!
  12. Hi, Has anyone tried to directly import .blend files to Houdini?
  • Create New...