2.5 Particle edit:

* Fixed cursor poll, so the cursor won't show up outside the 3d view
This commit is contained in:
Nicholas Bishop
2009-08-17 17:34:15 +00:00
parent b0508659f6
commit 77f60458e2

View File

@@ -109,7 +109,8 @@ static int PE_poll(bContext *C)
static int PE_poll_3dview(bContext *C)
{
return PE_poll(C) && CTX_wm_region_view3d(C);
return PE_poll(C) && CTX_wm_area(C)->spacetype == SPACE_VIEW3D &&
CTX_wm_region(C)->regiontype == RGN_TYPE_WINDOW;
}
static void PE_free_particle_edit(ParticleSystem *psys)
@@ -2260,7 +2261,7 @@ static void toggle_particle_cursor(bContext *C, int enable)
pset->paintcursor = NULL;
}
else if(enable)
pset->paintcursor= WM_paint_cursor_activate(CTX_wm_manager(C), PE_poll, brush_drawcursor, NULL);
pset->paintcursor= WM_paint_cursor_activate(CTX_wm_manager(C), PE_poll_3dview, brush_drawcursor, NULL);
}
/********************* radial control operator *********************/