patch [#33609] Syntax highlighting for OSL in Text Editor

from Patrick Boelens (senshi). with modifications to split it into its own function.

also added C style multi-line comment support /* ... */

I've left out the part of this patch that sets the language in the space, since I think this might be better stored in the text block.

For now it simply uses OSL syntax highlighting when the extension is '.osl'.
This commit is contained in:
2012-12-29 18:25:03 +00:00
parent 14ea084580
commit e9c7aaaa3c
13 changed files with 391 additions and 8 deletions

View File

@@ -612,6 +612,10 @@ def pyfunc2sphinx(ident, fw, identifier, py_func, is_class=True):
'''
function or class method to sphinx
'''
if type(py_func) == type(bpy.types.Space.draw_handler_add):
return
arg_str = inspect.formatargspec(*inspect.getargspec(py_func))
if not is_class: