zł0+

Cubic Bezier Spline in Maya (Free Python script)

4 ratings
I want this!

Cubic Bezier Spline in Maya (Free Python script)

zł0+
4 ratings

Concept of a cubic Bezier spline in Maya. You can use this script to investigate how to create a Bezier spline using simple python code, or modify it to fit your needs.

Usage: 
Open an empty scene, and launch the script in the script editor in the Python tab. The script should generate a simple spline. 

At the bottom of the script you can specify the required parameters:

spline = SimpleSpline(num_points=3, cubes_per_segment=23, handle_size=8, distance_between_points = 30.0)

Such as the number of points, how many cubes should be in the segment, the distance between points, and the distance from the handle (red sphere) to the point (yellow sphere).

The update of a spline happens when the translate attribute of any control points changes.

To use the script in actual production it's preferable to do the refactoring, and put the logic in a custom node. 

Tested in Maya 2022.5

Thanks!


I want this!

a python script

Size
8.41 KB
Copy product URL

Ratings

5
(4 ratings)
5 stars
100%
4 stars
0%
3 stars
0%
2 stars
0%
1 star
0%