Page MenuHome

Curves: Add RNA access to evaluated normals per control point
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Tue, Jan 17, 7:09 PM.

Details

Summary

Add an RNA API function that gives an array of the normals for every control point.
The normals depend on the normal_mode attribute, which can currently be
minumum twist or Z-up, though more options are planned. Normals are currently
evaluated on the evaluated points and then sampled back to the control points.
Because that can be expensive, a normal mode that only does a first evaluation
on control points may be important

The function is intended to be used by Cycles, so it doesn't have to implement
the calculation of normals itself. They can be interpolated between control points
and normalized.

For best performance, the function should only be called once, since it does the
full calculation for every control point every time it is called.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Tue, Jan 17, 7:09 PM
Hans Goudey (HooglyBoogly) created this revision.
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/editors/include/ED_curves.h
24

[...] and the tilt

source/blender/makesrna/intern/rna_curves.c
281

should -> can

This revision is now accepted and ready to land.Wed, Jan 18, 12:36 AM
Hans Goudey (HooglyBoogly) marked 2 inline comments as done.Fri, Jan 20, 12:44 AM
source/blender/makesrna/intern/rna_curves.c
397

Does this mean that the elements can't be accessed via indices, but only iterator?