Skip to content

Instantly share code, notes, and snippets.

View tpoveda's full-sized avatar
🏠
Working from home

Tomás Poveda tpoveda

🏠
Working from home
View GitHub Profile
"""
Functions for generating spline weights.
Usage:
This modules functions each take curve parameters and output control point weights. The weights are generated using
a modified version of de Boor's algorithm. These weights can be used to create a weighted sum to find a point or
tangent on a spline.
While these functions are written for usage in Autodesk Maya, they don't actually have any Maya-specific libraries.
Additionally none of these functions actually care about the data type of provided control points. This way these
@yamahigashi
yamahigashi / add_corner_widget_to_maya_main_menu.py
Last active September 15, 2023 03:31
Add corner widget to maya main menu bar.
from Qt import QtWidgets
def getMayaMainWindow():
# type: () -> QtWidgets.QWidget
for obj in QtWidgets.qApp.topLevelWidgets():
if obj.objectName() == 'MayaWindow':
return obj
else: