fix [#33389] Curve points restricted to 0..1 range,

also added note on python3.3's faulthandler module.
This commit is contained in:
Campbell Barton 2012-12-03 07:10:31 +00:00
parent 671b871e7f
commit ca25fd0307
2 changed files with 15 additions and 2 deletions

@ -537,6 +537,13 @@ Here are some general hints to avoid running into these problems.
* Crashes may not happen every time, they may happen more on some configurations/operating-systems.
.. note::
To find the line of your script that crashes you can use the ``faulthandler`` module.
See `faulthandler docs<http://docs.python.org/dev/library/faulthandler.html>`_.
While the crash may be in Blenders C/C++ code, this can help a lot to track down the area of the script that causes the crash.
Undo/Redo
---------

@ -2021,10 +2021,16 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
}
if (cmp) {
const float range_clamp[2] = {0.0f, 1.0f};
const float range_unclamp[2] = {-1000.0f, 1000.0f}; /* arbitrary limits here */
const float *range = (cumap->flag & CUMA_DO_CLIP) ? range_clamp : range_unclamp;
uiLayoutRow(layout, TRUE);
uiBlockSetNFunc(block, curvemap_buttons_update, MEM_dupallocN(cb), cumap);
bt = uiDefButF(block, NUM, 0, "X", 0, 2 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, &cmp->x, 0.0f, 1.0f, 1, 5, "");
bt = uiDefButF(block, NUM, 0, "Y", 0, 1 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y, &cmp->y, 0.0f, 1.0f, 1, 5, "");
bt = uiDefButF(block, NUM, 0, "X", 0, 2 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y,
&cmp->x, range[0], range[1], 1, 5, "");
bt = uiDefButF(block, NUM, 0, "Y", 0, 1 * UI_UNIT_Y, UI_UNIT_X * 10, UI_UNIT_Y,
&cmp->y, range[0], range[1], 1, 5, "");
}
/* black/white levels */