2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2008-12-13 17:44:30 +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
|
|
|
|
|
* 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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-12-13 17:44:30 +00:00
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
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
|
|
|
|
2011-02-27 20:29:51 +00:00
|
|
|
/** \file blender/editors/space_image/image_intern.h
|
|
|
|
|
* \ingroup spimage
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2008-12-13 17:44:30 +00:00
|
|
|
#ifndef ED_IMAGE_INTERN_H
|
|
|
|
|
#define ED_IMAGE_INTERN_H
|
|
|
|
|
|
|
|
|
|
/* internal exports only */
|
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 bContext;
|
|
|
|
|
struct ARegion;
|
2009-05-19 17:13:33 +00:00
|
|
|
struct ARegionType;
|
2009-02-21 15:31:01 +00:00
|
|
|
struct ScrArea;
|
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 SpaceImage;
|
|
|
|
|
struct Object;
|
|
|
|
|
struct Image;
|
|
|
|
|
struct ImBuf;
|
|
|
|
|
struct wmOperatorType;
|
|
|
|
|
struct Scene;
|
2009-02-21 18:33:09 +00:00
|
|
|
struct bNodeTree;
|
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
|
|
|
|
2009-02-21 15:31:01 +00:00
|
|
|
/* space_image.c */
|
|
|
|
|
struct ARegion *image_has_buttons_region(struct ScrArea *sa);
|
2010-01-19 01:32:06 +00:00
|
|
|
struct ARegion *image_has_scope_region(struct ScrArea *sa);
|
2009-02-21 15:31:01 +00:00
|
|
|
|
2011-02-15 14:38:43 +00:00
|
|
|
extern const char *image_context_dir[]; /* doc access */
|
|
|
|
|
|
2009-01-30 12:58:00 +00:00
|
|
|
void IMAGE_OT_toolbox(struct wmOperatorType *ot);
|
|
|
|
|
|
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
|
|
|
/* image_draw.c */
|
|
|
|
|
void draw_image_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene);
|
2009-08-30 13:32:08 +00:00
|
|
|
void draw_image_grease_pencil(struct bContext *C, short onlyv2d);
|
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
|
|
|
|
|
|
|
|
/* image_ops.c */
|
2009-01-30 12:58:00 +00:00
|
|
|
int space_image_main_area_poll(struct bContext *C);
|
|
|
|
|
|
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
|
|
|
void IMAGE_OT_view_all(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_view_pan(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_view_selected(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_view_zoom(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_view_zoom_in(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_view_zoom_out(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_view_zoom_ratio(struct wmOperatorType *ot);
|
2011-06-25 18:51:29 +00:00
|
|
|
void IMAGE_OT_view_ndof(struct wmOperatorType *ot);
|
2008-12-13 17:44:30 +00:00
|
|
|
|
2009-02-10 23:17:58 +00:00
|
|
|
void IMAGE_OT_new(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_open(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_replace(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_reload(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_save(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_save_as(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_save_sequence(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_pack(struct wmOperatorType *ot);
|
|
|
|
|
void IMAGE_OT_unpack(struct wmOperatorType *ot);
|
2009-02-11 19:16:14 +00:00
|
|
|
|
2011-02-23 12:02:43 +00:00
|
|
|
void IMAGE_OT_invert(struct wmOperatorType *ot);
|
|
|
|
|
|
2010-02-09 19:37:37 +00:00
|
|
|
void IMAGE_OT_cycle_render_slot(struct wmOperatorType *ot);
|
|
|
|
|
|
2009-02-10 23:17:58 +00:00
|
|
|
void IMAGE_OT_sample(struct wmOperatorType *ot);
|
2010-03-23 01:22:33 +00:00
|
|
|
void IMAGE_OT_sample_line(struct wmOperatorType *ot);
|
2009-03-29 02:15:13 +00:00
|
|
|
void IMAGE_OT_curves_point_set(struct wmOperatorType *ot);
|
2009-02-10 23:17:58 +00:00
|
|
|
|
|
|
|
|
void IMAGE_OT_record_composite(struct wmOperatorType *ot);
|
|
|
|
|
|
2009-02-21 15:31:01 +00:00
|
|
|
/* image_panels.c */
|
2009-02-21 18:33:09 +00:00
|
|
|
struct ImageUser *ntree_get_active_iuser(struct bNodeTree *ntree);
|
2009-05-19 17:13:33 +00:00
|
|
|
void image_buttons_register(struct ARegionType *art);
|
2009-02-21 15:31:01 +00:00
|
|
|
void IMAGE_OT_properties(struct wmOperatorType *ot);
|
2010-01-19 01:32:06 +00:00
|
|
|
void IMAGE_OT_scopes(struct wmOperatorType *ot);
|
2009-02-21 15:31:01 +00:00
|
|
|
|
2008-12-13 17:44:30 +00:00
|
|
|
#endif /* ED_IMAGE_INTERN_H */
|
|
|
|
|
|