This file contains hidden or 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
def checkConnectivity(e1, e2): | |
chk = e1.points()[0].number == e2.points()[0].number | |
chk = chk or e1.points()[0].number == e2.points()[1].number | |
chk = chk or e1.points()[1].number == e2.points()[0].number | |
chk = chk or e1.points()[1].number == e2.points()[1].number | |
return chk | |
node = hou.pwd() | |
geo = node.geometry() |
This file contains hidden or 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
/* Input1 is 'Geometry to Transfer Attribute to' */ | |
/* Input2 is 'Geometry to Transfer Attribute from' */ | |
string attrib_name = 'attrib_name'; | |
float search_lim = 0.5; | |
float accum = point(0, attrib_name, @ptnum); | |
for(int i=0; i<nprimitives(1); i++) | |
{ | |
vector bbxmin, bbxmax; | |
getbbox(1, itoa(i), bbxmin, bbxmax); |
This file contains hidden or 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
/* Initialize */ | |
float curvelength = primintrinsic(1, 'arclength', 0); | |
if( curvelength == 0 ) | |
curvelength = primintrinsic(1, 'measuredperimeter', 0); | |
float dist = @P.z / curvelength + ch('offset'); | |
vector2 uv = set(dist, 0); | |
// PRIMUV_UNITLEN_TO_UNIT = 7 | |
vector2 posuv = primuvconvert(@OpInput2, uv, 0, 7); |
This file contains hidden or 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 angle = ch('angle') * -1; | |
float range = ch('range'); | |
if(angle==0.0 || range==0.0) return; | |
angle = radians(angle / range); | |
int limit = chi('limit'); | |
vector origin = chv('orig'); | |
vector dir = normalize( chv('dir') ); | |
vector up = normalize( chv('up') ); | |
vector rotaxis = cross(up, dir); |
This file contains hidden or 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
/** | |
* @param {Layer} layer | |
* @param {Array} point - array of numbers | |
* @param {Number} [t] | |
* @return {Array} - array of numbers | |
*/ | |
var toWorld = function(layer, point, t) { | |
var comp = layer.containingComp, | |
dammyLayer = comp.layers.addNull(), | |
dammySource = dammyLayer.source, |
NewerOlder