Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2009-03-28 23:46:38 +0300
committerMartin Poirier <theeth@yahoo.com>2009-03-28 23:46:38 +0300
commit145a44135704fa08974cac36de0a87aeb9cc696d (patch)
treede69c72ae1d644d39a6fbb0614252a229e89a591 /source/blender/editors/transform/transform_constraints.c
parenta5f32714f77ed2ba7b42163fb55a3dfed6bd29af (diff)
Correctly cancel operator is there's no transform data.
Don't access RegionView3D if region is of the wrong type. Correctly draw extra transform stuff (like snap and pet circles) in multiple 3d regions.
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r--source/blender/editors/transform/transform_constraints.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index 4d081405aa8..510351446cd 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -710,7 +710,7 @@ void BIF_setDualAxisConstraint(float vec1[3], float vec2[3], char *text) {
/*----------------- DRAWING CONSTRAINTS -------------------*/
-void drawConstraint(TransInfo *t)
+void drawConstraint(const struct bContext *C, TransInfo *t)
{
TransCon *tc = &(t->con);
@@ -769,17 +769,16 @@ void drawConstraint(TransInfo *t)
}
/* called from drawview.c, as an extra per-window draw option */
-void drawPropCircle(TransInfo *t)
+void drawPropCircle(const struct bContext *C, TransInfo *t)
{
if (t->flag & T_PROP_EDIT) {
+ RegionView3D *rv3d = CTX_wm_region_view3d(C);
float tmat[4][4], imat[4][4];
UI_ThemeColor(TH_GRID);
- if(t->spacetype == SPACE_VIEW3D)
+ if(t->spacetype == SPACE_VIEW3D && rv3d != NULL)
{
- RegionView3D *rv3d = t->ar->regiondata;
-
Mat4CpyMat4(tmat, rv3d->viewmat);
Mat4Invert(imat, tmat);
}