2
$\begingroup$

I am trying to (re)create an OSL shader in Blender, but I receive an error "error: could not find include file: node_texture.h" when compiling.

I've Googled it up, but can find nothing. Where can I find this file, or change the search path?

$\endgroup$
3
  • $\begingroup$ you should have that file too in your directory $\endgroup$
    – Chebhou
    Commented Jan 8, 2015 at 21:49
  • $\begingroup$ @Chebhou could you provide a little more detail on your answer? $\endgroup$ Commented Jan 8, 2015 at 23:32
  • $\begingroup$ go to this link [openshading.com/osl/example-shaders/#] and download the example_shaders put the file that you need (node_texture.h) with your osl script file $\endgroup$
    – Chebhou
    Commented Jan 9, 2015 at 12:54

1 Answer 1

3
$\begingroup$

The change happened before 2.72 was released and I still haven't got around to looking into whether the change came from blender or OSL 1.5. It is a matter of search paths and I think they need to be changed in code.

The file you are looking for is included with blender, it is installed in 2.72/scripts/addons/cycles/shader/ You can also find it in blender's source tree at intern/cycles/kernel/shaders/node_texture.h

The solution for now is to place a copy of it in the same folder as the osl script that wants to include it.

$\endgroup$
1
  • $\begingroup$ Thanks @sambler! That was the solution. Also, thanks for sharing your code and knowledge. I copied and pasted the node_texture.h file into the appropriate folder. $\endgroup$ Commented Jan 9, 2015 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .