Only search projects.blender.org
Log In
New Account
Home
My Page
Projects
Blender 2.x BF release
Summary
Activity
Tracker
SCM
Files
Blender 2.4x Bug Tracker: Browse
[#1014] IPOCurve.addBezier creates bad handles
Date:
2004-02-20 14:00
Priority:
3
State:
Closed
Submitted by:
Roland Hess (
harkyman
)
Assigned to:
Stephen Swaney (stiv)
Group:
Resolution:
Fixed
Category:
Python
Summary:
IPOCurve.addBezier creates bad handles
Detailed description
When creating bezier points in the IPOCurve module of the Python API,
the addBezier method as it currently stands creates useless handles
that lead to non-smooth animation regardless of the curve's
interpolation type. This makes creating smooth IPOCurves via Python
impossible. The addBezier functionality should mimic what happens
when you ctrl-click in the IPO window to add new points. I have heard
from two other Python scripters who had to abandon projects because
of this lack of functionality.
I have a two line patch for this problem, but obviously no commit
priveleges. I've posted this fix to the bf-Python board but seen no
action, so I'm posting it here.
Code snippet, with my fix, from IpoCurve_addBezier in bf-blender/
blender/source/blender/python/api2_2x/ipocurve.c:
bzt = icu->bezt + npoints;
bzt->vec[0][0] = x-1;
bzt->vec[1][0] = x;
bzt->vec[2][0] = x+1;
bzt->vec[0][1] = y-1;
bzt->vec[1][1] = y;
bzt->vec[2][1] = y+1;
bzt->h1= HD_AUTO; // new line - my fix
bzt->h2= HD_AUTO; // new line - my fix
Py_INCREF(Py_None);
return Py_None;
These two lines set the just-created handles to the Autosmooth type.
Using this fix, smooth curves can be achieved via the Python API.
Followup
No Followups Have Been Posted
Attached Files:
No Files Currently Attached
Changes:
Field
Old Value
Date
By
Resolution
New
2004-03-05 09:22
stiv
close_date
None
2004-03-05 09:22
stiv
assigned_to
michel
2004-03-05 09:22
stiv
status_id
Open
2004-03-05 09:22
stiv
Category
None
2004-02-25 14:40
michel
assigned_to
none
2004-02-25 14:40
michel