Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node path completion like built in editor/shell #4

Open
drichardson opened this issue Jun 1, 2019 · 0 comments
Open

node path completion like built in editor/shell #4

drichardson opened this issue Jun 1, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@drichardson
Copy link
Owner

drichardson commented Jun 1, 2019

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.

@drichardson drichardson added enhancement New feature or request help wanted Extra attention is needed labels Jun 1, 2019
@drichardson drichardson changed the title Houdini node completion like built in editor/shell node path completion like built in editor/shell Jun 1, 2019
@drichardson drichardson removed the help wanted Extra attention is needed label Jun 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant