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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user