This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float val = noise(@P * chf("smoothness") + chf("seed")); | |
float ang = val * $PI * chf("num_wave"); | |
float tval = fit(sin(ang), -1.0, 1.0, 0, 1.0); | |
@Cd = set(tval, tval, tval); | |
@P += @N * fit(tval, 0, 1.0, 0, chf("offset")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float sigma = chf("sigma"); | |
int res = chi("res"); | |
int resn = floor(res / 2.0); | |
float weightTotal = 0; | |
float valTotal = 0; | |
for(int i=-resn; i<=resn; i++){ | |
for(int n=-resn; n<=resn; n++){ | |
for(int t=-resn; t<=resn; t++){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float sigma = chf("sigma"); | |
int res = chi("res"); | |
int resx = chi("resx"); | |
int resy = chi("resy"); | |
int resn = floor(res / 2.0); | |
float weightTotal = 0; | |
float valTotal = 0; | |
for(int i=-resn; i<=resn; i++){ | |
for(int n=-resn; n<=resn; n++){ | |
float ix = @ptnum % resx + i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hou | |
import time | |
import os | |
editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) | |
dir = os.path.dirname(hou.hipFile.path()) | |
items = hou.selectedItems() | |
editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) | |
for item in items: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hou | |
import os | |
items = hou.selectedItems() | |
editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) | |
dir = os.path.dirname(hou.hipFile.path()) | |
file = open(dir + '/params.txt', 'a') | |
for item in items: | |
seps = item.comment().split('-') | |
if len(seps) == 2 and seps[1] == "1": | |
file.write('== '+seps[0]+'\n\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hou | |
items = hou.selectedItems() | |
editor = hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor) | |
images = list(editor.backgroundImages()) | |
for item in items: | |
if isinstance(item, hou.NetworkBox): | |
nodes = item.nodes() | |
nodes = hou.sortedNodes(nodes) | |
for i in range(len(nodes)): | |
node = nodes[i] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"room_requisites" : | |
[ | |
{ | |
"id" : 0, | |
"name" : "dining", | |
"type" : "social", | |
"min_width" : 3.0, | |
"max_width" : 30.0, | |
"min_length" : 3.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("video").setAttribute("style", $("video").getAttribute("style") + "filter: brightness(200%);"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void RunScript(List<Point3d> pts, List<object> objs, double thresh, ref object A, ref object B) | |
{ | |
DataTree<object> tree = new DataTree<object>(); | |
List<int> usedList = new List<int>(); | |
List<Point3d> centers = new List<Point3d>(); | |
for(int i = 0; i < pts.Count; i++){ | |
var pt1 = pts[i]; | |
if(!usedList.Contains(i)){ | |
GH_Path path = new GH_Path(i); | |
tree.Add(objs[i], path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rhinoscriptsyntax as rs | |
for i in range(3): | |
for n in range(8): | |
for t in range(2): | |
name = 'model'+str(i)+'_'+str(n)+'_'+str(t) | |
ids = rs.ObjectsByLayer(name) | |
rs.UnselectAllObjects() | |
rs.SelectObjects(ids) |