DescriptionHi Brecht,
I wanted to tackle a more complicated node and gave Normal Node a try.
(and failed *cough* ;)
I created a new NodeNormal for storage of the Normal, and whatever I put as default in the node_shader_normal.c::node_shader_init_normal() is passed to the shader correctly.
The problem now is to hook up the interface normal values to the cycles storage node.
Maybe I don't need a storage node and could use the bNodeSocketValueVector directly in blender_shader.cpp. I don't know if it's possible (and the way to go).
Another idea was to create a custom get function in the RNA def_normal for the direction and point this to the bNodeSocketValueVector. Again, I don't know if is the correct way or even possible.
FInal Notes:
---------
My ultimate goal was to port the RGBCurves node to cycles, so I decided to start with a 'similar' but simpler one. I used the SkyTexture for some of the
Also, I was testing with a sample file created before I added the storage node in node_shader_init_normal. That was crashing on blender_shader.cpp (get_float3(b_normal_node.direction());) and I couldn't figure out why. Luckily I had the insight of remove the node and create it again :)
Thanks for any feedback and review.
OSL comes once those problems are sorted out.
#committed on 42669
Patch Set 1 #Patch Set 2 : Final Patch, removing DNA and RNA as per Lukas orientation. Notes in code coming next #
Total comments: 10
MessagesTotal messages: 5
|