-
Notifications
You must be signed in to change notification settings - Fork 18
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
Ctags parse header #27
base: master
Are you sure you want to change the base?
Conversation
ctags? Interesting. :) I might use this for other things too, didn't know this existed. Can you give some examples of what it failed on before, and what it looks like now? |
the current
I won't paste the generated file of Running it against classes like One thing to note: I'm only including methods that exist in |
It's lacking a ton of stuff, so it won't get us all the way there. But if it helps.. But, why do we need to involve maya.OpenMaya here at all? :O Sorry I haven't looked more closely at the contents of this PR yet. But I would have thought all we need are the C++ headers? If we can use maya.OpenMaya, could we not fetch members and argument signatures directly from there via Python? |
haha That was my quick way of filtering out some garbage that ctags was picking up on, I thought maya.OpenMaya was feature complete. |
So, I went down a rabbit hole...
parse_header.py
was failing on some header files required for #25.I tried upgrading it but didn't feel like handling a billion edge cases like manually parsing C++ seems to be like
I ended up relying on Universal Ctags which outputs a list of all the classes, methods, etc. that are in a given file.
It's not perfect but it works on all the files I've tested so far
Some things that are not supported yet:
I'll probably leave it at that for this PR though and we can improve on that as we need.
I've made a separate
parse_header_ctags.py
script in caseparse_header.py
still produces better results on some filesAnd of course,
ctags
needs to be installed and available in your path