From 00bbf5a72ff9b9816973fa6caf36ede912046bad Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 26 Jun 2012 10:18:53 +0000 Subject: [PATCH 1/3] Fix issue with resetting active nurb when sawing from edit mode Issue was caused by loading editNurb into normal nurbs when saving, this used to set active nurb to NULL. This isn't actually needed, because active nurb would be set properly on making editNurb and even if one accessed to active spline via PY API when object is in object it'll be completely harmless. --- source/blender/editors/curve/editcurve.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index f5f013cb354..032b999c60f 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1199,8 +1199,6 @@ void load_editNurb(Object *obedit) if (obedit == NULL) return; - set_actNurb(obedit, NULL); - if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { Curve *cu = obedit->data; Nurb *nu, *newnu; @@ -1222,8 +1220,6 @@ void load_editNurb(Object *obedit) BKE_nurbList_free(&oldnurb); } - - set_actNurb(obedit, NULL); } /* make copy in cu->editnurb */ @@ -1234,7 +1230,6 @@ void make_editNurb(Object *obedit) Nurb *nu, *newnu, *nu_act = NULL; KeyBlock *actkey; - set_actNurb(obedit, NULL); if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { From e32c4677137b4915115de91306d2376d414dc326 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 26 Jun 2012 14:49:49 +0000 Subject: [PATCH 2/3] mathutils.Vector(kw=value) wasn't raising an error as it should. --- source/blender/python/mathutils/mathutils_Vector.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 8fb3a3f74d6..8c316807660 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -54,11 +54,18 @@ static int row_vector_multiplication(float rvec[MAX_DIMENSIONS], VectorObject *v /* Supports 2D, 3D, and 4D vector objects both int and float values * accepted. Mixed float and int values accepted. Ints are parsed to float */ -static PyObject *Vector_new(PyTypeObject *type, PyObject *args, PyObject *UNUSED(kwds)) +static PyObject *Vector_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { float *vec = NULL; int size = 3; /* default to a 3D vector */ + if (kwds && PyDict_Size(kwds)) { + PyErr_SetString(PyExc_TypeError, + "Vector(): " + "takes no keyword args"); + return NULL; + } + switch (PyTuple_GET_SIZE(args)) { case 0: vec = PyMem_Malloc(size * sizeof(float)); From de00723049b9cd03250e335385e0c9dfa4a6c835 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 26 Jun 2012 15:26:16 +0000 Subject: [PATCH 3/3] Fix for crash of keying screen node in cases when there's no triangulation generated for tracks setup --- .../compositor/operations/COM_KeyingScreenOperation.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp index 0341fe9ddac..53572162b9e 100644 --- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp @@ -218,9 +218,13 @@ void *KeyingScreenOperation::initializeTileData(rcti *rect, MemoryBuffer **memor unlockMutex(); } + triangulation = this->m_cachedTriangulation; + + if (!triangulation) + return NULL; + BLI_init_rctf(&rect_float, rect->xmin, rect->xmax, rect->ymin, rect->ymax); - triangulation = this->m_cachedTriangulation; tile_data = (TileData *) MEM_callocN(sizeof(TileData), "keying screen tile data"); for (i = 0; i < triangulation->triangles_total; i++) {