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
| (node,) = hou.selectedNodes() | |
| node.setColor(hou.Color(.302, .525, .114)) | |
| parent = node.parent() | |
| merge = parent.createNode('object_merge', '%s_MERGE' % node.name().upper()) | |
| merge.setPosition(hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor).cursorPosition()) | |
| merge.parm('objpath1').set(merge.relativePathTo(node)) | |
| merge.setColor(hou.Color(.475,.812,.204)) |
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 binomial(i, n): | |
| """Binomial coefficient""" | |
| return math.factorial(n) / float( | |
| math.factorial(i) * math.factorial(n - i)) | |
| def bernstein(t, i, n): | |
| """Bernstein polynom""" | |
| return binomial(i, n) * (t ** i) * ((1 - t) ** (n - i)) |
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
| // This is the point we want to find barycentric coordinates of | |
| vector p = point(0, "P", 3); | |
| // These are the vertices of the main triangle we want to find coordinates for | |
| vector v1 = point(0, "P", 0), | |
| v2 = point(0, "P", 1), | |
| v3 = point(0, "P", 2); | |
| // Edge Vectors of the main triangle | |
| vector e1 = v3 - v2, |
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
| import lx | |
| import lxu | |
| import modo | |
| import sys | |
| def get_selected_weight_maps(): | |
| """ | |
| Get the selected weight maps from the scene | |
| :return: List of selected weight maps |
OlderNewer