[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52732] trunk/blender: fix [#33389] Curve points restricted to 0..1 range,
Campbell Barton
ideasman42 at gmail.com
Mon Dec 3 08:10:34 CET 2012
Revision: 52732
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52732
Author: campbellbarton
Date: 2012-12-03 07:10:31 +0000 (Mon, 03 Dec 2012)
Log Message:
-----------
fix [#33389] Curve points restricted to 0..1 range,
also added note on python3.3's faulthandler module.
Modified Paths:
--------------
trunk/blender/doc/python_api/rst/info_gotcha.rst
trunk/blender/source/blender/editors/interface/interface_templates.c
Modified: trunk/blender/doc/python_api/rst/info_gotcha.rst
===================================================================
--- trunk/blender/doc/python_api/rst/info_gotcha.rst 2012-12-03 05:40:48 UTC (rev 52731)
+++ trunk/blender/doc/python_api/rst/info_gotcha.rst 2012-12-03 07:10:31 UTC (rev 52732)
@@ -537,7 +537,14 @@
* 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
---------
Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_templates.c 2012-12-03 05:40:48 UTC (rev 52731)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c 2012-12-03 07:10:31 UTC (rev 52732)
@@ -2021,10 +2021,16 @@
}
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 */
More information about the Bf-blender-cvs
mailing list