2008-01-01 18:29:19 +00:00
|
|
|
/**
|
|
|
|
* $Id:
|
|
|
|
*
|
|
|
|
* ***** 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
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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,
|
|
|
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
#ifndef ED_OBJECT_H
|
|
|
|
#define ED_OBJECT_H
|
|
|
|
|
2008-12-23 19:47:33 +00:00
|
|
|
struct wmWindowManager;
|
2008-12-30 13:16:14 +00:00
|
|
|
struct Scene;
|
2008-12-23 19:47:33 +00:00
|
|
|
struct Object;
|
2008-12-29 12:15:42 +00:00
|
|
|
struct bContext;
|
|
|
|
struct Base;
|
2009-01-05 15:19:31 +00:00
|
|
|
struct View3D;
|
2009-01-10 19:34:23 +00:00
|
|
|
struct bConstraint;
|
2.5: Space Image ported back
Organized as follows:
uvedit/
uv editing related code
uvedit_draw.c: drawing code
uvedit_ops.c: operators, just a few done
uvedit_unwrap_ops.c: will be operators for unwrapping
uvedit_paramatrizer.c: lscm/abf/stretch/pack
space_image/
space_image.c: registration and common getter/setters
image_draw.c: drawing code, mostly functional
image_panels.c: panels, all commented out
image_render.c: render callbacks, non functional
image_ops.c: operators, only view navigation done
image_header.c: header, menus mostly done but missing buttons
Notes:
* Header menus consist only of Operator and RNA buttons, if they
are not implemented they're displayed grayed out. Ideally the full
header could work like this, but std_libbuttons looks problematic.
* Started using view2d code more than the old code, but for now it
still does own view2d management due to some very specific
requirements that the image window has. The drawing code however
is more clear hopefully, it only uses view2d, and there is no
switching between 'p' and 'f' view2d's anymore, it is always 'f'.
* In order to make uvedit operators more independent I move some
image space settings to scene toolsettings, and the current image
and its buffer is in the context. Especially sync selection and
select mode belonged there anyway as this cannot work correct with
different spaces having different settings anyway.
* Image paint is not back yet, did not want to put that together with
uvedit because there's really no code sharing.. perhaps vertex paint,
image paint and sculpt would be good to have in one module to share
brush code, partial redraw, etc better.
2009-01-15 04:38:18 +00:00
|
|
|
struct KeyBlock;
|
|
|
|
struct Lattice;
|
|
|
|
struct Mesh;
|
|
|
|
struct Curve;
|
2008-12-23 19:47:33 +00:00
|
|
|
|
|
|
|
void ED_operatortypes_object(void);
|
|
|
|
void ED_keymap_object(struct wmWindowManager *wm);
|
|
|
|
|
2008-12-29 12:15:42 +00:00
|
|
|
/* send your own notifier for select! */
|
|
|
|
void ED_base_object_select(struct Base *base, short mode);
|
|
|
|
/* includes notifier */
|
2008-12-29 13:02:18 +00:00
|
|
|
void ED_base_object_activate(struct bContext *C, struct Base *base);
|
2008-12-29 12:15:42 +00:00
|
|
|
|
2008-12-30 13:16:14 +00:00
|
|
|
void ED_base_object_free_and_unlink(struct Scene *scene, struct Base *base);
|
|
|
|
|
2009-01-05 15:19:31 +00:00
|
|
|
void ED_object_apply_obmat(struct Object *ob);
|
|
|
|
|
|
|
|
|
2009-01-01 18:05:12 +00:00
|
|
|
/* bitflags for enter/exit editmode */
|
|
|
|
#define EM_FREEDATA 1
|
|
|
|
#define EM_FREEUNDO 2
|
|
|
|
#define EM_WAITCURSOR 4
|
|
|
|
void ED_object_exit_editmode(struct bContext *C, int flag);
|
|
|
|
void ED_object_enter_editmode(struct bContext *C, int flag);
|
2008-12-30 13:16:14 +00:00
|
|
|
|
2.5
View3D has been split now in a local part (RegionView3D) and a
per-area part (old View3D). Currently local is:
- view transform
- camera zoom/offset
- gpencil (todo)
- custom clipping planes
Rest is in Area still, like active camera, draw type, layers,
localview, custom centers, around-settings, transform widget,
gridlines, and so on (mostly stuff as available in header).
To see it work; also added new feature for region split,
press SHIFT+ALT+CTRL+S for four-split.
The idea is to make a preset 4-split, configured to stick
to top/right/front views for three views.
Another cool idea to explore is to then box-clip all drawing
based on these 3 views.
Note about the code:
- currently view3d still stores some depricated settings, to
convert from older files. Not all settings are copied over
though, like custom clip planes or the 'lock view to object'.
- since some view3d ops are now on area level, the operators
for it should keep track of that.
Bugfix in transform: quat initialize in operator-invoke missed
one zero.
Als brought back GE to compile for missing Ipos and channels.
2009-01-19 16:54:41 +00:00
|
|
|
void ED_object_base_init_from_view(struct bContext *C, struct Base *base);
|
2009-01-05 15:19:31 +00:00
|
|
|
|
2008-12-23 19:47:33 +00:00
|
|
|
/* cleanup */
|
|
|
|
int object_data_is_libdata(struct Object *ob);
|
2008-01-01 18:29:19 +00:00
|
|
|
|
2009-01-10 19:34:23 +00:00
|
|
|
/* constraints */
|
|
|
|
struct bConstraint *add_new_constraint (short type);
|
|
|
|
void add_constraint_to_object (struct bConstraint *con, struct Object *ob);
|
|
|
|
|
2009-01-13 15:18:41 +00:00
|
|
|
/* editlattice.c */
|
|
|
|
void mouse_lattice(struct bContext *C, short mval[2], int extend);
|
2009-01-24 13:45:24 +00:00
|
|
|
void undo_push_lattice(struct bContext *C, char *name);
|
2009-01-13 15:18:41 +00:00
|
|
|
|
2009-01-14 12:26:45 +00:00
|
|
|
/* editkey.c */
|
2009-01-13 15:18:41 +00:00
|
|
|
void insert_shapekey(struct Scene *scene, struct Object *ob);
|
|
|
|
void delete_key(struct Scene *scene, struct Object *ob);
|
2009-01-14 12:26:45 +00:00
|
|
|
void key_to_mesh(struct KeyBlock *kb, struct Mesh *me);
|
|
|
|
void mesh_to_key(struct Mesh *me, struct KeyBlock *kb);
|
|
|
|
void key_to_latt(struct KeyBlock *kb, struct Lattice *lt);
|
|
|
|
void latt_to_key(struct Lattice *lt, struct KeyBlock *kb);
|
|
|
|
void key_to_curve(struct KeyBlock *kb, struct Curve *cu, struct ListBase *nurb);
|
|
|
|
void curve_to_key(struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb);
|
|
|
|
|
|
|
|
|
2009-01-10 19:34:23 +00:00
|
|
|
|
2008-01-01 18:29:19 +00:00
|
|
|
#endif /* ED_OBJECT_H */
|
|
|
|
|