Skip to content

node path completion like built in editor/shell #4

Description

@drichardson

Implement object node completion that works like the build in editor/shell. For example, in Python shell, when you enter hou.node("/obj/ a list of objects from that HIP file appear.

In VEX, this would be triggered by functions marked as taking a node path parameter, like ch.

Questions

  • What HIP file (if any) is current being edited?
  • How to specify a HIP file for auto-completion if Vim was not started from Houdini as an external editor (i.e., you are just editing a VEX file on disk directly)?
  • How does the Python, HScript Textport, built-in VEX editor perform node name completion? Are they in the same process as Houdini or are they communicating with it via some IPC mechanism?

Things to Look Into

hou.node.glob

A Python IPC server running in the HIP file could use hou.node.glob to implement node name completion.

Example:

>>> [n.name() for n in hou.root().glob("/*")]
['obj', 'out', 'ch', 'shop', 'img', 'vex', 'mat']
>>> [n.name() for n in hou.root().glob("/o*")]
['obj', 'out']
>>> [n.name() for n in hou.root().glob("/obj/*")]
['terrain', 'Scatter', 'Overlap_Grain_Solve', 'Scatter_Objects']

Houdini Environment Variables

Houdini's Environment Variables contain information that may be useful to give context, for example the HFS and HIP variables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions