[Bf-python] adding curve.isCyclic(int=0), curnurb.isCyclic()
Toni Alatalo
antont at kyperjokki.fi
Mon Jan 3 17:41:15 CET 2005
hi,
happened to notice this thread on blender.org where some company/group had
analyzed using Blender for game dev., the usual exporting models to their
engine etc. see
http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=5300&start=15&postdays=0&postorder=asc&highlight=
one problem they had was unability to check whether curves were open or
closed via Python. i figured it's pretty trivial to do especially for
someone who's been working on the API, and said that on the thread, asking
if someone was doing it already .. no responses, so tried now myself,
seemingly with success (thanks to the help on #blendercoders) .. first
time touching the C-side in Blender so lot to learn
added curve.isCyclic(int=0) and curnurb.isCyclic() mostly just by
copy-pasting from the pre-existing .isNurbs equivalents. there is some
ambiquity: curve.isCyclic, which can be given the index of the spline, or
else it defaults to the first (often only) one, returns 0 or 1 as an int,
but the curnurb one returns a python boolean. not that it matters really
-- the python booleans are not that different from numbers anyhow as you
probably know .. perhaps they didn't exist when curve.isNurbs was made
diffs / patches are http://an.org/blender/isCyclic-to-Curve.c.1.21.patch
and http://an.org/blender/isCyclic-to-CurNurb.c.1.4.patch
.. if there are no problems (worked fine in my test,
http://an.org/blender/curve.blend), perhaps someone can add to cvs? oh and
the doc diff is in http://an.org/blender/isCyclic-to-Curve.py.patch
the thread seems to discuss many other things too, but at least in the
original that seemed to be the only one about Python (perhaps there were
others later, don't remember now)
so please someone take this further, and/or report back problems
preventing that
~Toni
btw: is someone putting the current doc on-line?
More information about the Bf-python
mailing list