Python API
---------- Forgot to put sentinel at end of Curve_getseters, probably the cause of crashes on OSX (thanks Stephen!). Also add doc strings for attributes, add missing "taperob" attribute to python docs.
This commit is contained in:
@@ -1264,68 +1264,70 @@ static PyGetSetDef Curve_getseters[] = {
|
||||
GENERIC_LIB_GETSETATTR,
|
||||
{"pathlen",
|
||||
(getter)Curve_getPathLen, (setter)Curve_newsetPathLen,
|
||||
"",
|
||||
"The path length, used to set the number of frames for an animation (not the physical length)",
|
||||
NULL},
|
||||
{"totcol",
|
||||
(getter)Curve_getTotcol, (setter)NULL,
|
||||
"",
|
||||
"The maximum number of linked materials",
|
||||
NULL},
|
||||
{"flag",
|
||||
(getter)Curve_getMode, (setter)Curve_newsetMode,
|
||||
"",
|
||||
"The flag bitmask",
|
||||
NULL},
|
||||
{"bevresol",
|
||||
(getter)Curve_getBevresol, (setter)Curve_newsetBevresol,
|
||||
"",
|
||||
"The bevel resolution",
|
||||
NULL},
|
||||
{"resolu",
|
||||
(getter)Curve_getResolu, (setter)Curve_newsetResolu,
|
||||
"",
|
||||
"The resolution in U direction",
|
||||
NULL},
|
||||
{"resolv",
|
||||
(getter)Curve_getResolv, (setter)Curve_newsetResolv,
|
||||
"",
|
||||
"The resolution in V direction",
|
||||
NULL},
|
||||
{"width",
|
||||
(getter)Curve_getWidth, (setter)Curve_newsetWidth,
|
||||
"",
|
||||
"The curve width",
|
||||
NULL},
|
||||
{"ext1",
|
||||
(getter)Curve_getExt1, (setter)Curve_newsetExt1,
|
||||
"",
|
||||
"The extent1 value (for bevels)",
|
||||
NULL},
|
||||
{"ext2",
|
||||
(getter)Curve_getExt2, (setter)Curve_newsetExt2,
|
||||
"",
|
||||
"The extent2 value (for bevels)",
|
||||
NULL},
|
||||
{"loc",
|
||||
(getter)Curve_getLoc, (setter)Curve_newsetLoc,
|
||||
"",
|
||||
"The data location (from the center)",
|
||||
NULL},
|
||||
{"rot",
|
||||
(getter)Curve_getRot, (setter)Curve_newsetRot,
|
||||
"",
|
||||
"The data rotation (from the center)",
|
||||
NULL},
|
||||
{"size",
|
||||
(getter)Curve_getSize, (setter)Curve_newsetSize,
|
||||
"",
|
||||
"The data size (from the center)",
|
||||
NULL},
|
||||
{"bevob",
|
||||
(getter)Curve_getBevOb, (setter)Curve_newsetBevOb,
|
||||
"",
|
||||
"The bevel object",
|
||||
NULL},
|
||||
{"taperob",
|
||||
(getter)Curve_getTaperOb, (setter)Curve_newsetTaperOb,
|
||||
"",
|
||||
"The taper object",
|
||||
NULL},
|
||||
{"key",
|
||||
(getter)Curve_getKey, (setter)NULL,
|
||||
"",
|
||||
"The shape key for the curve (if any)",
|
||||
NULL},
|
||||
{"materials",
|
||||
(getter)Curve_getMaterials, (setter)Curve_setMaterials,
|
||||
"",
|
||||
NULL}
|
||||
"The materials associated with the curve",
|
||||
NULL},
|
||||
{NULL,NULL,NULL,NULL,NULL} /* Sentinel */
|
||||
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -127,6 +127,8 @@ class Curve:
|
||||
@type size: list of 3 floats
|
||||
@ivar bevob: The Curve Bevel Object
|
||||
@type bevob: Blender L{Object<Object.Object>} or None
|
||||
@ivar taperob: The Curve Taper Object
|
||||
@type taperob: Blender L{Object<Object.Object>} or None
|
||||
@ivar key: The Key object associated with this Curve, if any.
|
||||
@type key: Blender L{Key<Key.Key>}
|
||||
@ivar materials: The curves's materials. Each curve can reference up to
|
||||
@@ -684,6 +686,12 @@ class SurfNurb:
|
||||
@ivar orderV: The order setting for the V direction. Values are clamped
|
||||
to the range [2:6] and not greater than the V dimension.
|
||||
@type orderV: int
|
||||
@ivar knotsU: The knot vector in the U direction. The tuple will be empty
|
||||
if the curve isn't a NURB or doesn't have knots in this direction.
|
||||
@type knotsU: tuple of floats
|
||||
@ivar knotsV: The knot vector in the V direction. The tuple will be empty
|
||||
if the curve isn't a NURB or doesn't have knots in this direction.
|
||||
@type knotsV: tuple of floats
|
||||
"""
|
||||
|
||||
def __setitem__( n, point ):
|
||||
|
||||
Reference in New Issue
Block a user