Skip to content

Instantly share code, notes, and snippets.

Created November 23, 2016 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/59671db75f62361af3242da23275df78 to your computer and use it in GitHub Desktop.
Save anonymous/59671db75f62361af3242da23275df78 to your computer and use it in GitHub Desktop.
to do later?
{
"export_version": "0.062",
"framed_nodes": {},
"groups": {},
"nodes": {
"Scripted Node Lite": {
"bl_idname": "SvScriptNodeLite",
"color": [
0.0,
0.800000011920929,
0.949999988079071
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-166.96636962890625,
-106.84063720703125
],
"params": {
"script_name": "draw_override_complex.py",
"script_str": "\"\"\"\nin floats_in s .=[] n=0.0\nout floats_out s\ndraw curve_draw\nui = my_temp_material, RGB Curves\n\"\"\"\n\nimport bpy\n\nfrom sverchok.utils.snlite_utils import get_valid_evaluate_function as get_evaluator\n\n# currently the node noame (here 'RGB Curves') must be uniqe per material.\n# copying nodes within the same nodetree does not automatically 'bump' the nodename\n# to the next available. You must be aware of this current implementation limitation.\nevaluate = get_evaluator('my_temp_material', 'RGB Curves')\n\ndef curve_draw(self, context, layout):\n m = bpy.data.materials.get('my_temp_material')\n if not m:\n return\n tnode = m.node_tree.nodes['RGB Curves']\n layout.template_curve_mapping(tnode, \"mapping\", type=\"NONE\")\n\n\nfloats_out = []\nfor flist in floats_in:\n floats_out.append([evaluate(v) for v in flist])"
},
"snlite_ui": [
"{\"node_name\": \"RGB Curves\", \"mat_name\": \"my_temp_material\", \"bl_idname\": \"ShaderNodeRGBCurve\", \"data\": [[[\"AUTO\", [0.0, 0.0]], [\"AUTO\", [1.0, 1.0]]], [[\"AUTO\", [0.0, 0.0]], [\"AUTO\", [1.0, 1.0]]], [[\"AUTO\", [0.0, 0.0]], [\"AUTO\", [1.0, 1.0]]], [[\"AUTO\", [0.0, 0.0]], [\"AUTO\", [0.34183675050735474, 0.6562504172325134]], [\"AUTO\", [1.0, 1.0]]]]}"
],
"width": 216.14822387695312
}
},
"update_lists": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment