2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2008-01-07 18:03:41 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2018-06-01 18:19:39 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2008-01-07 18:03:41 +00:00
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-01-07 18:03:41 +00:00
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
2018-06-01 18:19:39 +02:00
|
|
|
*
|
2008-01-07 18:03:41 +00:00
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
2011-02-27 20:29:51 +00:00
|
|
|
|
|
|
|
|
/** \file blender/editors/space_view3d/view3d_intern.h
|
|
|
|
|
* \ingroup spview3d
|
|
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __VIEW3D_INTERN_H__
|
|
|
|
|
#define __VIEW3D_INTERN_H__
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2008-12-23 19:47:33 +00:00
|
|
|
#include "ED_view3d.h"
|
|
|
|
|
|
2008-01-07 18:03:41 +00:00
|
|
|
/* internal exports only */
|
|
|
|
|
|
2.5
New: Custom region draw callbacks.
For Martin: an example is now in space_view3d/view3d_edit.c
On middlemouse rotate view, it draws a small square in center.
It works likes this:
#include "ED_space_api.h"
handle= ED_region_draw_cb_activate(region->type, drawfunc, type)
and to stop it:
ED_region_draw_cb_exit(region->type, handle)
drawfunc is of type (const bContext *C, ARegion *ar)
currently it gets called only as type REGION_DRAW_POST, later we
can add more (PRE, POST_XRAY, POST_2D, etc).
For correct usage, these calls should return leaving view transform
unaltered.
2009-01-09 15:04:52 +00:00
|
|
|
struct ARegion;
|
2012-02-27 13:47:53 +00:00
|
|
|
struct ARegionType;
|
2017-11-09 15:44:56 -02:00
|
|
|
struct Base;
|
2008-12-19 12:14:58 +00:00
|
|
|
struct BoundBox;
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph;
|
2019-01-28 21:08:24 +11:00
|
|
|
struct GPUBatch;
|
|
|
|
|
struct Mesh;
|
2012-02-27 13:47:53 +00:00
|
|
|
struct Object;
|
2012-10-10 14:28:47 +00:00
|
|
|
struct SmokeDomainSettings;
|
2019-01-28 21:08:24 +11:00
|
|
|
struct ViewLayer;
|
Cleanup of MotionPaths+Ghosts (AnimViz) - Part 1
This commit sets up some of the groundwork necessary to extend the animation visualisation capabilities, previously only available for bones in PoseMode, to Objects as well. Also, some of the other goals of this refactor is to make future visualisation goodies (i.e. editable paths) more feasible...
(There's really nothing to see here yet. The following log notes are really just for my own reference to keep track of things.)
Currently, the following things have been done:
* New datastructures + settings have been tidied up, ready for usage
* Added these new types into the Object and PoseBone code as necessary, with freeing/adding/copying accounted for
* File IO code for the new data, including version patching to convert the old system to the new one.
* Set up the drawing system for motionpaths based on the old armature path drawing code. Armatures still draw using the old system, since the two systems use different storage systems.
* Started setting up the motionpath 'baking' code, but the core of this still needs to be coded...
Next Steps (after some semi-urgent Durian Driver changes):
* Port the ghosting/onionskinning code over too
* Finish motionpath baking code
* RNA wrapping for the new types
* Hooking up all the new code into the operators, etc.
2010-01-01 12:24:16 +00:00
|
|
|
struct bAnimVizSettings;
|
2012-02-27 13:47:53 +00:00
|
|
|
struct bContext;
|
Cleanup of MotionPaths+Ghosts (AnimViz) - Part 1
This commit sets up some of the groundwork necessary to extend the animation visualisation capabilities, previously only available for bones in PoseMode, to Objects as well. Also, some of the other goals of this refactor is to make future visualisation goodies (i.e. editable paths) more feasible...
(There's really nothing to see here yet. The following log notes are really just for my own reference to keep track of things.)
Currently, the following things have been done:
* New datastructures + settings have been tidied up, ready for usage
* Added these new types into the Object and PoseBone code as necessary, with freeing/adding/copying accounted for
* File IO code for the new data, including version patching to convert the old system to the new one.
* Set up the drawing system for motionpaths based on the old armature path drawing code. Armatures still draw using the old system, since the two systems use different storage systems.
* Started setting up the motionpath 'baking' code, but the core of this still needs to be coded...
Next Steps (after some semi-urgent Durian Driver changes):
* Port the ghosting/onionskinning code over too
* Finish motionpath baking code
* RNA wrapping for the new types
* Hooking up all the new code into the operators, etc.
2010-01-01 12:24:16 +00:00
|
|
|
struct bMotionPath;
|
2012-02-27 13:47:53 +00:00
|
|
|
struct bPoseChannel;
|
2018-07-14 23:49:00 +02:00
|
|
|
struct wmGizmoGroupType;
|
|
|
|
|
struct wmGizmoType;
|
2019-01-28 21:08:24 +11:00
|
|
|
struct wmKeyConfig;
|
|
|
|
|
struct wmOperatorType;
|
2017-11-11 02:43:04 +11:00
|
|
|
struct wmWindowManager;
|
2008-12-19 12:14:58 +00:00
|
|
|
|
2008-12-18 17:38:21 +00:00
|
|
|
/* drawing flags: */
|
2012-06-10 10:15:49 +00:00
|
|
|
enum {
|
|
|
|
|
DRAW_PICKING = (1 << 0),
|
|
|
|
|
DRAW_CONSTCOLOR = (1 << 1),
|
2019-01-15 23:57:49 +11:00
|
|
|
DRAW_SCENESET = (1 << 2),
|
2012-06-10 10:15:49 +00:00
|
|
|
};
|
2008-12-18 17:38:21 +00:00
|
|
|
|
2008-12-12 18:47:12 +00:00
|
|
|
/* view3d_header.c */
|
2018-06-08 16:12:25 +02:00
|
|
|
void VIEW3D_OT_toggle_matcap_flip(struct wmOperatorType *ot);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
2008-12-19 17:14:02 +00:00
|
|
|
/* view3d_ops.c */
|
|
|
|
|
void view3d_operatortypes(void);
|
|
|
|
|
|
|
|
|
|
/* view3d_edit.c */
|
2009-03-29 02:15:13 +00:00
|
|
|
void VIEW3D_OT_zoom(struct wmOperatorType *ot);
|
2011-04-22 15:34:07 +00:00
|
|
|
void VIEW3D_OT_dolly(struct wmOperatorType *ot);
|
2011-02-23 06:48:47 +00:00
|
|
|
void VIEW3D_OT_zoom_camera_1_to_1(struct wmOperatorType *ot);
|
2009-09-25 10:24:42 +00:00
|
|
|
void VIEW3D_OT_move(struct wmOperatorType *ot);
|
|
|
|
|
void VIEW3D_OT_rotate(struct wmOperatorType *ot);
|
2016-08-18 00:21:55 -04:00
|
|
|
#ifdef WITH_INPUT_NDOF
|
2011-07-26 22:43:07 +00:00
|
|
|
void VIEW3D_OT_ndof_orbit(struct wmOperatorType *ot);
|
2012-12-29 12:33:24 +00:00
|
|
|
void VIEW3D_OT_ndof_orbit_zoom(struct wmOperatorType *ot);
|
2011-07-26 22:43:07 +00:00
|
|
|
void VIEW3D_OT_ndof_pan(struct wmOperatorType *ot);
|
2012-08-19 13:52:36 +00:00
|
|
|
void VIEW3D_OT_ndof_all(struct wmOperatorType *ot);
|
2016-08-18 00:21:55 -04:00
|
|
|
#endif /* WITH_INPUT_NDOF */
|
2009-07-09 08:39:58 +00:00
|
|
|
void VIEW3D_OT_view_all(struct wmOperatorType *ot);
|
2018-07-05 16:54:30 +02:00
|
|
|
void VIEW3D_OT_view_axis(struct wmOperatorType *ot);
|
|
|
|
|
void VIEW3D_OT_view_camera(struct wmOperatorType *ot);
|
2010-01-13 22:17:56 +00:00
|
|
|
void VIEW3D_OT_view_selected(struct wmOperatorType *ot);
|
2012-05-05 16:38:23 +00:00
|
|
|
void VIEW3D_OT_view_lock_clear(struct wmOperatorType *ot);
|
|
|
|
|
void VIEW3D_OT_view_lock_to_active(struct wmOperatorType *ot);
|
2009-11-22 23:11:32 +00:00
|
|
|
void VIEW3D_OT_view_center_cursor(struct wmOperatorType *ot);
|
2013-03-25 01:11:16 +00:00
|
|
|
void VIEW3D_OT_view_center_pick(struct wmOperatorType *ot);
|
2010-07-03 20:47:03 +00:00
|
|
|
void VIEW3D_OT_view_center_camera(struct wmOperatorType *ot);
|
2013-07-19 10:54:02 +00:00
|
|
|
void VIEW3D_OT_view_center_lock(struct wmOperatorType *ot);
|
2009-02-03 03:54:03 +00:00
|
|
|
void VIEW3D_OT_view_pan(struct wmOperatorType *ot);
|
|
|
|
|
void VIEW3D_OT_view_persportho(struct wmOperatorType *ot);
|
2013-12-03 03:14:09 -02:00
|
|
|
void VIEW3D_OT_navigate(struct wmOperatorType *ot);
|
2010-12-08 11:42:11 +00:00
|
|
|
void VIEW3D_OT_background_image_add(struct wmOperatorType *ot);
|
|
|
|
|
void VIEW3D_OT_background_image_remove(struct wmOperatorType *ot);
|
2009-02-03 03:54:03 +00:00
|
|
|
void VIEW3D_OT_view_orbit(struct wmOperatorType *ot);
|
2013-08-31 08:18:08 +00:00
|
|
|
void VIEW3D_OT_view_roll(struct wmOperatorType *ot);
|
2019-01-21 11:05:15 +11:00
|
|
|
void VIEW3D_OT_clip_border(struct wmOperatorType *ot);
|
2008-12-26 19:07:31 +00:00
|
|
|
void VIEW3D_OT_cursor3d(struct wmOperatorType *ot);
|
2008-12-27 01:29:56 +00:00
|
|
|
void VIEW3D_OT_render_border(struct wmOperatorType *ot);
|
2012-10-16 11:57:46 +00:00
|
|
|
void VIEW3D_OT_clear_render_border(struct wmOperatorType *ot);
|
2009-03-29 02:15:13 +00:00
|
|
|
void VIEW3D_OT_zoom_border(struct wmOperatorType *ot);
|
2018-07-05 12:28:03 +02:00
|
|
|
void VIEW3D_OT_toggle_shading(struct wmOperatorType *ot);
|
2018-11-22 06:44:09 +11:00
|
|
|
void VIEW3D_OT_toggle_xray(struct wmOperatorType *ot);
|
2008-12-19 17:14:02 +00:00
|
|
|
|
2018-10-16 13:18:03 +11:00
|
|
|
void view3d_boxview_copy(struct ScrArea *sa, struct ARegion *ar);
|
|
|
|
|
void view3d_boxview_sync(struct ScrArea *sa, struct ARegion *ar);
|
2010-10-25 02:30:16 +00:00
|
|
|
|
2015-12-23 05:04:52 +11:00
|
|
|
void view3d_orbit_apply_dyn_ofs(
|
|
|
|
|
float r_ofs[3], const float ofs_old[3], const float viewquat_old[4],
|
|
|
|
|
const float viewquat_new[4], const float dyn_ofs[3]);
|
|
|
|
|
|
2016-08-18 00:21:55 -04:00
|
|
|
#ifdef WITH_INPUT_NDOF
|
|
|
|
|
struct wmNDOFMotionData;
|
|
|
|
|
|
2014-02-19 21:19:13 +11:00
|
|
|
void view3d_ndof_fly(
|
|
|
|
|
const struct wmNDOFMotionData *ndof,
|
|
|
|
|
struct View3D *v3d, struct RegionView3D *rv3d,
|
|
|
|
|
const bool use_precision, const short protectflag,
|
|
|
|
|
bool *r_has_translate, bool *r_has_rotate);
|
2016-08-18 00:21:55 -04:00
|
|
|
#endif /* WITH_INPUT_NDOF */
|
2014-02-19 21:19:13 +11:00
|
|
|
|
2010-10-25 02:30:16 +00:00
|
|
|
/* view3d_fly.c */
|
2010-10-25 17:08:40 +00:00
|
|
|
void view3d_keymap(struct wmKeyConfig *keyconf);
|
2010-10-25 02:30:16 +00:00
|
|
|
void VIEW3D_OT_fly(struct wmOperatorType *ot);
|
2.5
Smaller jobs, all in one commit!
- Moved object_do_update out of view3d drawing, into
the event system (currently after notifiers).
Depsgraph calls for setting update flags will have to
keep track of each Screen's needs, so a UI showing only
a Sequencer doesn't do objects.
- Added button in "Properties region" in 3D window to set
or disable 4-split, including the 3 options it has.
(lock, box, clip)
- Restored legacy code for UI, to make things work like
bone rename, autocomplete.
- Node editor now shows Curves widgets again
- Bugfix: composite job increased Viewer user id count
- Bugfix: Node editor, not "Enable nodes" still called
a Job, which didn't do anything
- Various code cleaning, unused vars and prototypes.
2009-02-11 16:54:55 +00:00
|
|
|
|
2013-12-03 03:14:09 -02:00
|
|
|
/* view3d_walk.c */
|
|
|
|
|
void VIEW3D_OT_walk(struct wmOperatorType *ot);
|
|
|
|
|
|
2008-12-19 12:14:58 +00:00
|
|
|
/* drawobject.c */
|
2018-05-24 20:35:51 +02:00
|
|
|
void draw_object_backbufsel(
|
2018-06-08 14:38:57 +02:00
|
|
|
struct Depsgraph *depsgraph, Scene *scene,
|
|
|
|
|
View3D *v3d, RegionView3D *rv3d, struct Object *ob,
|
2018-05-24 20:35:51 +02:00
|
|
|
short select_mode);
|
2016-10-21 17:26:42 +00:00
|
|
|
|
2016-05-22 16:23:26 +02:00
|
|
|
int view3d_effective_drawtype(const struct View3D *v3d);
|
|
|
|
|
|
2008-12-18 17:38:21 +00:00
|
|
|
/* view3d_draw.c */
|
2015-11-28 17:14:45 +01:00
|
|
|
void view3d_main_region_draw(const struct bContext *C, struct ARegion *ar);
|
2018-10-25 11:47:37 +02:00
|
|
|
void view3d_draw_region_info(const struct bContext *C, struct ARegion *ar);
|
2016-10-04 20:00:46 +00:00
|
|
|
|
2017-04-27 02:36:56 +10:00
|
|
|
void ED_view3d_draw_depth(
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph *depsgraph,
|
2017-05-03 00:05:57 +10:00
|
|
|
struct ARegion *ar, View3D *v3d, bool alphaoverride);
|
2017-04-27 01:01:20 +10:00
|
|
|
|
2016-10-04 20:00:46 +00:00
|
|
|
/* view3d_draw_legacy.c */
|
2018-10-16 13:18:03 +11:00
|
|
|
void ED_view3d_draw_depth_gpencil(struct Depsgraph *depsgraph, Scene *scene, struct ARegion *ar, View3D *v3d);
|
2017-04-27 01:01:20 +10:00
|
|
|
|
2017-03-10 03:15:58 +11:00
|
|
|
void ED_view3d_draw_select_loop(
|
2018-10-16 13:18:03 +11:00
|
|
|
struct Depsgraph *depsgraph, ViewContext *vc, Scene *scene, struct ViewLayer *view_layer, View3D *v3d, struct ARegion *ar,
|
2017-03-10 03:15:58 +11:00
|
|
|
bool use_obedit_skip, bool use_nearest);
|
|
|
|
|
|
2017-08-16 12:45:11 +10:00
|
|
|
void ED_view3d_draw_depth_loop(
|
2018-10-16 13:18:03 +11:00
|
|
|
struct Depsgraph *depsgraph, Scene *scene, struct ARegion *ar, View3D *v3d);
|
2017-04-27 01:01:20 +10:00
|
|
|
|
2010-10-21 07:38:09 +00:00
|
|
|
void view3d_update_depths_rect(struct ARegion *ar, struct ViewDepths *d, struct rcti *rect);
|
|
|
|
|
float view3d_depth_near(struct ViewDepths *d);
|
2008-12-18 17:38:21 +00:00
|
|
|
|
2008-12-21 11:05:43 +00:00
|
|
|
/* view3d_select.c */
|
2008-12-26 11:11:21 +00:00
|
|
|
void VIEW3D_OT_select(struct wmOperatorType *ot);
|
2009-03-29 02:15:13 +00:00
|
|
|
void VIEW3D_OT_select_circle(struct wmOperatorType *ot);
|
2018-10-05 10:27:04 +10:00
|
|
|
void VIEW3D_OT_select_box(struct wmOperatorType *ot);
|
2009-03-29 02:15:13 +00:00
|
|
|
void VIEW3D_OT_select_lasso(struct wmOperatorType *ot);
|
2012-01-11 03:40:20 +00:00
|
|
|
void VIEW3D_OT_select_menu(struct wmOperatorType *ot);
|
2008-12-21 11:05:43 +00:00
|
|
|
|
2018-11-25 09:50:34 -02:00
|
|
|
/* view3d_view.c */
|
2008-12-26 18:15:46 +00:00
|
|
|
void VIEW3D_OT_smoothview(struct wmOperatorType *ot);
|
2011-11-14 03:54:23 +00:00
|
|
|
void VIEW3D_OT_camera_to_view(struct wmOperatorType *ot);
|
|
|
|
|
void VIEW3D_OT_camera_to_view_selected(struct wmOperatorType *ot);
|
2010-07-24 01:32:03 +00:00
|
|
|
void VIEW3D_OT_object_as_camera(struct wmOperatorType *ot);
|
2018-11-25 09:50:34 -02:00
|
|
|
void VIEW3D_OT_localview(struct wmOperatorType *ot);
|
2018-11-29 23:44:37 -02:00
|
|
|
void VIEW3D_OT_localview_remove_from(struct wmOperatorType *ot);
|
2008-12-26 18:15:46 +00:00
|
|
|
|
2015-03-21 22:34:20 +11:00
|
|
|
bool ED_view3d_boundbox_clip_ex(const RegionView3D *rv3d, const struct BoundBox *bb, float obmat[4][4]);
|
2014-03-20 12:17:44 +11:00
|
|
|
bool ED_view3d_boundbox_clip(RegionView3D *rv3d, const struct BoundBox *bb);
|
2008-12-19 12:14:58 +00:00
|
|
|
|
2015-12-23 02:47:34 +11:00
|
|
|
typedef struct V3D_SmoothParams {
|
|
|
|
|
struct Object *camera_old, *camera;
|
|
|
|
|
const float *ofs, *quat, *dist, *lens;
|
2015-12-23 05:04:52 +11:00
|
|
|
/* alternate rotation center (ofs = must be NULL) */
|
|
|
|
|
const float *dyn_ofs;
|
2015-12-23 02:47:34 +11:00
|
|
|
} V3D_SmoothParams;
|
|
|
|
|
|
2014-04-17 22:54:10 +10:00
|
|
|
void ED_view3d_smooth_view_ex(
|
2018-05-20 19:10:16 +02:00
|
|
|
const struct Depsgraph *depsgraph,
|
2014-04-17 22:54:10 +10:00
|
|
|
struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *sa,
|
2015-12-23 02:47:34 +11:00
|
|
|
struct View3D *v3d, struct ARegion *ar, const int smooth_viewtx,
|
|
|
|
|
const V3D_SmoothParams *sview);
|
2014-04-17 22:54:10 +10:00
|
|
|
|
|
|
|
|
void ED_view3d_smooth_view(
|
|
|
|
|
struct bContext *C,
|
2015-12-23 02:47:34 +11:00
|
|
|
struct View3D *v3d, struct ARegion *ar, const int smooth_viewtx,
|
|
|
|
|
const V3D_SmoothParams *sview);
|
2008-12-18 17:38:21 +00:00
|
|
|
|
2016-05-05 01:51:25 +10:00
|
|
|
void ED_view3d_smooth_view_force_finish(
|
2016-05-04 03:38:20 +10:00
|
|
|
struct bContext *C,
|
|
|
|
|
struct View3D *v3d, struct ARegion *ar);
|
|
|
|
|
|
2018-01-23 11:24:44 +11:00
|
|
|
void view3d_winmatrix_set(
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph *depsgraph,
|
2018-10-16 13:18:03 +11:00
|
|
|
struct ARegion *ar, const View3D *v3d, const rcti *rect);
|
2018-01-23 11:24:44 +11:00
|
|
|
void view3d_viewmatrix_set(
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph *depsgraph, Scene *scene,
|
2018-01-23 11:24:44 +11:00
|
|
|
const View3D *v3d, RegionView3D *rv3d, const float rect_scale[2]);
|
2008-01-07 18:03:41 +00:00
|
|
|
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
void fly_modal_keymap(struct wmKeyConfig *keyconf);
|
2013-12-03 03:14:09 -02:00
|
|
|
void walk_modal_keymap(struct wmKeyConfig *keyconf);
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
void viewrotate_modal_keymap(struct wmKeyConfig *keyconf);
|
|
|
|
|
void viewmove_modal_keymap(struct wmKeyConfig *keyconf);
|
|
|
|
|
void viewzoom_modal_keymap(struct wmKeyConfig *keyconf);
|
2011-05-22 11:36:56 +00:00
|
|
|
void viewdolly_modal_keymap(struct wmKeyConfig *keyconf);
|
2009-09-23 11:26:16 +00:00
|
|
|
|
2009-02-10 15:38:00 +00:00
|
|
|
/* view3d_buttons.c */
|
|
|
|
|
void VIEW3D_OT_properties(struct wmOperatorType *ot);
|
2018-07-05 21:28:25 +02:00
|
|
|
void VIEW3D_OT_object_mode_pie_or_toggle(struct wmOperatorType *ot);
|
2009-05-19 17:13:33 +00:00
|
|
|
void view3d_buttons_register(struct ARegionType *art);
|
2009-02-10 15:38:00 +00:00
|
|
|
|
2013-11-28 15:01:53 +11:00
|
|
|
/* view3d_camera_control.c */
|
2014-08-13 08:38:16 +10:00
|
|
|
struct View3DCameraControl *ED_view3d_cameracontrol_acquire(
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph *depsgraph, Scene *scene, View3D *v3d, RegionView3D *rv3d,
|
2013-11-28 15:01:53 +11:00
|
|
|
const bool use_parent_root);
|
|
|
|
|
void ED_view3d_cameracontrol_update(
|
|
|
|
|
struct View3DCameraControl *vctrl,
|
|
|
|
|
const bool use_autokey,
|
|
|
|
|
struct bContext *C, const bool do_rotate, const bool do_translate);
|
|
|
|
|
void ED_view3d_cameracontrol_release(
|
|
|
|
|
struct View3DCameraControl *vctrl,
|
|
|
|
|
const bool restore);
|
2017-12-16 03:57:20 +11:00
|
|
|
struct Object *ED_view3d_cameracontrol_object_get(
|
2013-11-28 15:01:53 +11:00
|
|
|
struct View3DCameraControl *vctrl);
|
|
|
|
|
|
2009-07-02 11:23:19 +00:00
|
|
|
/* view3d_toolbar.c */
|
2010-01-12 07:50:14 +00:00
|
|
|
void VIEW3D_OT_toolshelf(struct wmOperatorType *ot);
|
2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
shows the last operator, if appropriate.
Nkey properties moved to the other side.
A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;
- Buttons now all have a complete set of colors, based on button classifications
(See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types.
Currently colors are defined for Window, Header, List/Channels and
for Button/Tool views.
The screen manager handles this btw, so a TH_BACK will always pick the
right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
Only Panel font, widget font and widget-label work now. The 'group label'
will be for templates mostly.
Style settings will be expanded with spacing defaults, label conventions,
etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
Same goes for Panel title color.
Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
|
|
|
|
2009-02-14 13:07:09 +00:00
|
|
|
/* view3d_snap.c */
|
2013-03-20 23:14:18 +00:00
|
|
|
bool ED_view3d_minmax_verts(struct Object *obedit, float min[3], float max[3]);
|
2009-02-14 13:07:09 +00:00
|
|
|
|
|
|
|
|
void VIEW3D_OT_snap_selected_to_grid(struct wmOperatorType *ot);
|
|
|
|
|
void VIEW3D_OT_snap_selected_to_cursor(struct wmOperatorType *ot);
|
2016-07-15 17:07:18 +10:00
|
|
|
void VIEW3D_OT_snap_selected_to_active(struct wmOperatorType *ot);
|
2009-02-14 13:07:09 +00:00
|
|
|
void VIEW3D_OT_snap_cursor_to_grid(struct wmOperatorType *ot);
|
2010-01-13 22:17:56 +00:00
|
|
|
void VIEW3D_OT_snap_cursor_to_center(struct wmOperatorType *ot);
|
2009-02-14 13:07:09 +00:00
|
|
|
void VIEW3D_OT_snap_cursor_to_selected(struct wmOperatorType *ot);
|
|
|
|
|
void VIEW3D_OT_snap_cursor_to_active(struct wmOperatorType *ot);
|
|
|
|
|
|
2009-02-10 15:38:00 +00:00
|
|
|
/* space_view3d.c */
|
2018-10-16 13:18:03 +11:00
|
|
|
struct ARegion *view3d_has_buttons_region(struct ScrArea *sa);
|
|
|
|
|
struct ARegion *view3d_has_tools_region(struct ScrArea *sa);
|
2009-02-10 15:38:00 +00:00
|
|
|
|
2011-02-15 14:38:43 +00:00
|
|
|
extern const char *view3d_context_dir[]; /* doc access */
|
|
|
|
|
|
2017-04-07 00:35:57 +10:00
|
|
|
/* view3d_widgets.c */
|
2018-07-15 14:24:10 +02:00
|
|
|
void VIEW3D_GGT_lamp_spot(struct wmGizmoGroupType *gzgt);
|
|
|
|
|
void VIEW3D_GGT_lamp_area(struct wmGizmoGroupType *gzgt);
|
|
|
|
|
void VIEW3D_GGT_lamp_target(struct wmGizmoGroupType *gzgt);
|
|
|
|
|
void VIEW3D_GGT_camera(struct wmGizmoGroupType *gzgt);
|
|
|
|
|
void VIEW3D_GGT_camera_view(struct wmGizmoGroupType *gzgt);
|
|
|
|
|
void VIEW3D_GGT_force_field(struct wmGizmoGroupType *gzgt);
|
|
|
|
|
void VIEW3D_GGT_empty_image(struct wmGizmoGroupType *gzgt);
|
|
|
|
|
void VIEW3D_GGT_armature_spline(struct wmGizmoGroupType *gzgt);
|
|
|
|
|
void VIEW3D_GGT_navigate(struct wmGizmoGroupType *gzgt);
|
2018-09-09 16:11:02 +10:00
|
|
|
void VIEW3D_GGT_mesh_preselect_elem(struct wmGizmoGroupType *gzgt);
|
2018-08-21 19:02:28 +10:00
|
|
|
void VIEW3D_GGT_mesh_preselect_edgering(struct wmGizmoGroupType *gzgt);
|
2018-07-15 14:24:10 +02:00
|
|
|
|
|
|
|
|
void VIEW3D_GGT_ruler(struct wmGizmoGroupType *gzgt);
|
|
|
|
|
void VIEW3D_GT_ruler_item(struct wmGizmoType *gzt);
|
2017-11-11 02:43:04 +11:00
|
|
|
void VIEW3D_OT_ruler_add(struct wmOperatorType *ot);
|
|
|
|
|
|
2018-07-15 14:24:10 +02:00
|
|
|
void VIEW3D_GT_navigate_rotate(struct wmGizmoType *gzt);
|
2017-12-16 03:57:20 +11:00
|
|
|
|
2012-03-01 12:20:18 +00:00
|
|
|
/* workaround for trivial but noticeable camera bug caused by imprecision
|
2011-07-21 01:30:26 +00:00
|
|
|
* between view border calculation in 2D/3D space, workaround for bug [#28037].
|
2014-08-13 09:33:46 +10:00
|
|
|
* without this define we get the old behavior which is to try and align them
|
2011-07-21 01:30:26 +00:00
|
|
|
* both which _mostly_ works fine, but when the camera moves beyond ~1000 in
|
|
|
|
|
* any direction it starts to fail */
|
|
|
|
|
#define VIEW3D_CAMERA_BORDER_HACK
|
|
|
|
|
#ifdef VIEW3D_CAMERA_BORDER_HACK
|
2012-06-06 18:00:08 +00:00
|
|
|
extern unsigned char view3d_camera_border_hack_col[3];
|
2013-03-20 23:14:18 +00:00
|
|
|
extern bool view3d_camera_border_hack_test;
|
2011-07-21 01:30:26 +00:00
|
|
|
#endif
|
2009-02-10 15:38:00 +00:00
|
|
|
|
2016-10-07 03:33:50 +02:00
|
|
|
#endif /* __VIEW3D_INTERN_H__ */
|