Skip to content

Instantly share code, notes, and snippets.

/ArtRageConvert
Created Apr 30, 2017

Embed
What would you like to do?
to do later?
{
"export_version": "0.064",
"framed_nodes": {},
"groups": {},
"nodes": {
"Circle": {
"bl_idname": "SvCircleNode",
"color": [
0.9200000166893005,
0.9200000166893005,
0.9200000166893005
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1315.35205078125,
-610.9752197265625
],
"params": {},
"width": 140.0
},
"List Join": {
"bl_idname": "ListJoinNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
968.2359619140625,
-694.62939453125
],
"params": {
"JoinLevel": 2,
"mix_check": 0,
"wrap_check": 0
},
"width": 140.0
},
"List Join.001": {
"bl_idname": "ListJoinNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
789.8155517578125,
-902.0780029296875
],
"params": {
"JoinLevel": 2,
"mix_check": 0,
"wrap_check": 0
},
"width": 140.0
},
"List Slice": {
"bl_idname": "ListSliceNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-371.3764953613281,
113.02001953125
],
"params": {
"level": 0,
"start": 3,
"stop": 9
},
"width": 140.0
},
"List Slice.001": {
"bl_idname": "ListSliceNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
46.42486572265625,
-140.40145874023438
],
"params": {
"level": 0,
"start": 3,
"stop": 9
},
"width": 140.0
},
"Map Range": {
"bl_idname": "SvMapRangeNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
259.45123291015625,
-858.7907104492188
],
"params": {
"new_max": 1.6700000762939453,
"new_min": 0.4599999785423279
},
"width": 140.0
},
"Math": {
"bl_idname": "ScalarMathNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
986.365966796875,
-907.8663330078125
],
"params": {
"items_": "MUL",
"y": 0.10000000149011612
},
"width": 140.0
},
"Matrix in": {
"bl_idname": "SvMatrixGenNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1275.4775390625,
-822.337646484375
],
"params": {},
"width": 140.0
},
"Object ID Out MK2": {
"bl_idname": "SvObjectToMeshNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
818.7400512695312,
115.38078308105469
],
"params": {
"modifiers": 1
},
"width": 184.1724853515625
},
"Polyline Viewer MK1": {
"bl_idname": "SvPolylineViewerNodeMK1",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
549.034912109375,
244.61688232421875
],
"params": {
"basemesh_name": "Alpha",
"bspline": 0,
"depth": 0.07999999821186066,
"hide": 0,
"hide_render": 0,
"material": "ONELVXE|Disney Surface.BETA",
"resolution": 2,
"select": 0,
"selected_mode": "Multi",
"show_wire": 0,
"use_smooth": 1
},
"width": 209.46044921875
},
"Randomize input vertices": {
"bl_idname": "SvRandomizeVerticesNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1086.1197509765625,
234.507568359375
],
"params": {
"random_seed_": 97,
"random_x_": 0.009999999776482582,
"random_y_": 0.009999999776482582,
"random_z_": 0.009999999776482582
},
"width": 140.0
},
"Reroute": {
"bl_idname": "NodeReroute",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
437.8951110839844,
-944.6580810546875
],
"params": {},
"width": 16.0
},
"Scripted Node Lite": {
"bl_idname": "SvScriptNodeLite",
"color": [
0.0,
0.800000011920929,
0.949999988079071
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-628.8807983398438,
57.22736740112305
],
"params": {
"float_list": [
2.0,
3.0,
0.0,
0.12999999523162842,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"inject_params": 0,
"injected_state": 0,
"int_list": [
0,
0,
300,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"script_name": "SNL_artrage_convert",
"script_str": "\"\"\"\nin matrices m d=[[]] n=0\nout points v\nout pressures s\n\"\"\"\n\nimport os\nimport xml.etree.ElementTree as etree\nimport bpy\n\n# source the file\n\nbase_dir = '/Users/jimmygunawan/Desktop/_PINEAPPLE_FILES'\nfilename = 'blend.xml'\n\ntree = etree.parse( os.path.join(base_dir, filename ))\n\n# root and tag\nroot = tree.getroot()\n\nmylist = []\n\nfor child in root:\n #print(child)\n for i in child:\n #print(i)\n #print(i.tail)\n mylist.append(i.tail)\n #for e in i:\n #if e.tag == 'Recorded':\n # print(e.text)\n \n \n# clean up tail\nmypointlist = []\n\nfor item in mylist:\n mypointlist.append( item.lstrip().rstrip('\\n\\n').split('\\n\\t'))\n \n \n# Get Pressure Strength\n\npressureListAll = []\n\nfor i in range(len(mypointlist)):\n\n pressureList = []\n\n for item in mypointlist[i]:\n blah = item.split('\\t')\n #print(blah)\n pressure = blah[2].split(': ')[1]\n\n pressureList.append(float(pressure))\n\n #coor = coordinate.lstrip('(').rstrip(')').split(',')\n\n #print(coor[0], coor[1])\n \n pressureListAll.append(pressureList)\n\npressures = pressureListAll\n\n# Get XY Coordinate and pass it out as Vector\n\ncoordinateAll = []\n\nfor i in range(len(mypointlist)):\n\n listCoordinate = []\n\n for item in mypointlist[i]:\n blah = item.split('\\t')\n\n coordinate = blah[1].split(': ')[1]\n\n coor = coordinate.lstrip('(').rstrip(')').split(',')\n\n listCoordinate.append([float(coor[0]), float(coor[1]), 0.0])\n \n coordinateAll.append(listCoordinate)\n \npoints = coordinateAll"
},
"snlite_ui": [],
"width": 140.0
},
"UV Connection": {
"bl_idname": "LineConnectNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
47.222084045410156,
123.00045776367188
],
"params": {
"polygons": "Edges"
},
"width": 140.0
},
"Vector Math": {
"bl_idname": "SvVectorMathNodeMK2",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
-150.78402709960938,
118.01746368408203
],
"params": {
"amount": 0.009999999776482582,
"current_op": "SCALAR"
},
"width": 140.0
},
"Vector in": {
"bl_idname": "GenVectorsNode",
"color": [
0.6079999804496765,
0.6079999804496765,
0.6079999804496765
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
618.3294677734375,
-883.842529296875
],
"params": {},
"width": 100.0
},
"Viewer BMesh": {
"bl_idname": "SvBmeshViewerNodeMK2",
"color": [
0.6284880042076111,
0.931007981300354,
1.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1462.453125,
47.85493087768555
],
"params": {
"basemesh_name": "Beta",
"hide": 0,
"lp": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"material": "ONELVXE|Disney Surface.BETA"
},
"width": 140.0
},
"Viewer Draw": {
"bl_idname": "ViewerNode2",
"color": [
0.6284880042076111,
0.931007981300354,
1.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1473.824462890625,
310.7594299316406
],
"params": {
"activate": 1,
"display_edges": 0,
"display_verts": 0,
"shading": 1
},
"width": 140.0
},
"Viewer Draw.001": {
"bl_idname": "ViewerNode2",
"color": [
0.6284880042076111,
0.931007981300354,
1.0
],
"height": 100.0,
"hide": false,
"label": "",
"location": [
1518.2872314453125,
-686.4737548828125
],
"params": {
"activate": 1,
"display_edges": 0,
"display_verts": 0,
"face_colors": [
0.8990011215209961,
0.2662924528121948,
0.5543515682220459
],
"shading": 1
},
"width": 140.0
}
},
"update_lists": [
[
"Scripted Node Lite",
"points",
"List Slice",
"Data"
],
[
"List Slice",
"Slice",
"Vector Math",
"A"
],
[
"Vector Math",
"Out",
"UV Connection",
"vertices"
],
[
"Scripted Node Lite",
"pressures",
"List Slice.001",
"Data"
],
[
"UV Connection",
"vertices",
"Polyline Viewer MK1",
"vertices"
],
[
"List Slice.001",
"Slice",
"Polyline Viewer MK1",
"radii"
],
[
"Polyline Viewer MK1",
"object",
"Object ID Out MK2",
"Objects"
],
[
"UV Connection",
"vertices",
"List Join",
"data"
],
[
"Scripted Node Lite",
"pressures",
"Map Range",
"Value"
],
[
"Map Range",
"Value",
"Reroute",
"Input"
],
[
"Reroute",
"Output",
"Vector in",
"X"
],
[
"Reroute",
"Output",
"Vector in",
"Y"
],
[
"Reroute",
"Output",
"Vector in",
"Z"
],
[
"Vector in",
"Vectors",
"List Join.001",
"data"
],
[
"List Join.001",
"data",
"Math",
"X"
],
[
"List Join",
"data",
"Matrix in",
"Location"
],
[
"Math",
"float",
"Matrix in",
"Scale"
],
[
"Object ID Out MK2",
"Vertices",
"Randomize input vertices",
"Vertices"
],
[
"Randomize input vertices",
"Vertices",
"Viewer Draw",
"vertices"
],
[
"Object ID Out MK2",
"Polygons",
"Viewer Draw",
"edg_pol"
],
[
"Randomize input vertices",
"Vertices",
"Viewer BMesh",
"vertices"
],
[
"Object ID Out MK2",
"Polygons",
"Viewer BMesh",
"faces"
],
[
"Circle",
"Vertices",
"Viewer Draw.001",
"vertices"
],
[
"Circle",
"Polygons",
"Viewer Draw.001",
"edg_pol"
],
[
"Matrix in",
"Matrix",
"Viewer Draw.001",
"matrix"
]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.