Created by: spamrakuen
Addressed problem description
Blender does not allow to add a curve editor in an addon UI. This makes dificult to "draw" a 2D line shape and then sample values from that line.
Sverchok already supports curve UI via SNLite and "Fcurve sampler", this is just another way to do the same. SNLite needs node name to be unique per material but this node does not. "Fcurve sampler" is very powerful but quite different.
Solution description
This node allows to sample data from a Material's RGB Curve or ColorRamp nodes.
Solution is based on this thread of stackexchange.com https://blender.stackexchange.com/questions/61618/add-a-custom-curve-mapping-property-for-an-add-on
In order to work, a material that use nodes should be created, then just drop a RGB Curves or ColorRamp node.
This new node will sample values from that curve(s). Just choose the material and type the node's name.
Preflight checklist
Put an x letter in each brackets when you're done this item:
-
Code changes complete. -
Code documentation complete. -
Documentation for users complete (or not required, if user never sees these changes). -
Manual testing done. -
Unit-tests implemented. -
Ready for merge.