diff options
Diffstat (limited to 'glsl_builders.py')
-rw-r--r-- | glsl_builders.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/glsl_builders.py b/glsl_builders.py index 57aaed5f9f..0926212e50 100644 --- a/glsl_builders.py +++ b/glsl_builders.py @@ -29,6 +29,10 @@ def include_file_in_rd_header(filename, header_data, depth): while line: + index = line.find("//") + if index != -1: + line = line[:index] + if line.find("#[vertex]") != -1: header_data.reading = "vertex" line = fs.readline() @@ -55,7 +59,14 @@ def include_file_in_rd_header(filename, header_data, depth): import os.path - included_file = os.path.relpath(os.path.dirname(filename) + "/" + includeline) + included_file = "" + + if includeline.startswith("thirdparty/"): + included_file = os.path.relpath(includeline) + + else: + included_file = os.path.relpath(os.path.dirname(filename) + "/" + includeline) + if not included_file in header_data.vertex_included_files and header_data.reading == "vertex": header_data.vertex_included_files += [included_file] if include_file_in_rd_header(included_file, header_data, depth + 1) is None: |