Page MenuHome

Patch implementing python function 'makeCyclic()' (CurNurb, Blender Python API)
Closed, ResolvedPublicPATCH



I was asked to put the patch from my email
'[Bf-committers] help needed to cleanup bezier code "makeCyclic()"'
( )
on the patch tracker ... so here it is :)

Please read the email before considering to apply the patch!


- clean up 'makecyclicNurb2()'
from code not needed in the python implementation of 'makeCyclic()'

or even better - for avoiding code duplication:

- generalise the original code of 'makecyclicNurb()'
in file 'source/blender/src/editcurve.c'
and use the generalised code in the implementation of 'CurNurb_makeCyclic()'

I appended two files:

- the path itself: make-cyclic-patch.txt
- an example script using the patch:

Thanks :)


Here a protocol with the patch applied:

blender -P


>>>[0].isCyclic(): False
>>>[0].isCyclic(): True

Note that the bezier handles of the point where the bezier
was closed have to be adjusted after making it cyclic.

Event Timeline

This works in our new api.[0].use_cyclic_u = True


Campbell Barton (campbellbarton) changed the task status from Unknown Status to Resolved.May 26 2012, 1:37 PM