diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-09 10:03:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-09 14:20:07 +0400 |
commit | 75348e6c132bca89aa70c2eb7e093ec55c07ad73 (patch) | |
tree | 58a35bcf92085dc09c16dae69ed7bbaa3c430028 /source/blender/editors/uvedit/uvedit_unwrap_ops.c | |
parent | 793b73edc269e7e801c2e72f4ae6d11951608f74 (diff) |
View3D API: rename view3d_camera_get to ED_view3d_camera_data_get
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_unwrap_ops.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index d6bd6f466b9..ebfef08c284 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -1254,18 +1254,6 @@ void UV_OT_unwrap(wmOperatorType *ot) RNA_def_float_factor(ot->srna, "margin", 0.001f, 0.0f, 1.0f, "Margin", "Space between islands", 0.0f, 1.0f); } -/* NOTE: could be generic function */ -static Camera *view3d_camera_get(View3D *v3d, RegionView3D *rv3d) -{ - /* establish the camera object, so we can default to view mapping if anything is wrong with it */ - if ((rv3d->persp == RV3D_CAMOB) && (v3d->camera) && (v3d->camera->type == OB_CAMERA)) { - return v3d->camera->data; - } - else { - return NULL; - } -} - /**************** Project From View operator **************/ static int uv_from_view_exec(bContext *C, wmOperator *op); @@ -1273,7 +1261,7 @@ static int uv_from_view_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE { View3D *v3d = CTX_wm_view3d(C); RegionView3D *rv3d = CTX_wm_region_view3d(C); - Camera *camera = view3d_camera_get(v3d, rv3d); + Camera *camera = ED_view3d_camera_data_get(v3d, rv3d); PropertyRNA *prop; prop = RNA_struct_find_property(op->ptr, "camera_bounds"); @@ -1292,7 +1280,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op) ARegion *ar = CTX_wm_region(C); View3D *v3d = CTX_wm_view3d(C); RegionView3D *rv3d = CTX_wm_region_view3d(C); - Camera *camera = view3d_camera_get(v3d, rv3d); + Camera *camera = ED_view3d_camera_data_get(v3d, rv3d); BMFace *efa; BMLoop *l; BMIter iter, liter; @@ -1326,9 +1314,6 @@ static int uv_from_view_exec(bContext *C, wmOperator *op) struct ProjCameraInfo *uci = BLI_uvproject_camera_info(v3d->camera, obedit->obmat, camera_bounds ? (scene->r.xsch * scene->r.xasp) : 1.0f, camera_bounds ? (scene->r.ysch * scene->r.yasp) : 1.0f); - - - // BLI_uvproject_camera_info_scale if (uci) { BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { |