Implemented general functions to store view context like viewport width/height
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 31 Jan 2012 18:33:31 +0000 (18:33 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 31 Jan 2012 18:33:31 +0000 (18:33 +0000)
commitdb79c8b01e67e8707aa3810cb727997c9ea3c250
tree9901a0588df91f92ed4a631a46d81cdcd89ec563
parent23db21e2c17052ba756a68eb7450fedacc14c555
Implemented general functions to store view context like viewport width/height
and projection matrix, so operators which depends on such things can easily save
settings in operator properties in invoke and then reuse them in exec callback.

This will fix: #24767: Knife tool last operations panel doesn't cause changes even though F6 pop-up does.
               #27129: Problem with knife cuts/midpoint type in quad view

Usage is pretty simple:
- From operator template declaration function call ED_view3d_operator_properties_viewmat()
  to register all needed properties in operator.
- From invoke callback call ED_view3d_operator_properties_viewmat_set to
  store all needed settings in operator properties().
- To access this settings from exec callback, use function
  ED_view3d_operator_properties_viewmat_get().

Additional change:
added function apply_project_float() which does the same as
project_float() but accepts actual values for viewport width/height and
projection matrix.
source/blender/editors/include/ED_view3d.h
source/blender/editors/mesh/editmesh_loop.c
source/blender/editors/space_view3d/view3d_view.c