2008-12-13 17:44:30 +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 *****
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
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
|
|
|
#include "DNA_object_types.h"
|
|
|
|
|
#include "DNA_mesh_types.h"
|
|
|
|
|
#include "DNA_customdata_types.h"
|
2008-12-13 17:44:30 +00:00
|
|
|
#include "DNA_space_types.h"
|
|
|
|
|
#include "DNA_scene_types.h"
|
|
|
|
|
#include "DNA_screen_types.h"
|
|
|
|
|
#include "DNA_windowmanager_types.h"
|
|
|
|
|
|
|
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
|
|
|
|
|
#include "BLI_blenlib.h"
|
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
|
|
|
#include "BLI_editVert.h"
|
2008-12-13 17:44:30 +00:00
|
|
|
|
2008-12-18 02:56:48 +00:00
|
|
|
#include "BKE_context.h"
|
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
|
|
|
#include "BKE_customdata.h"
|
|
|
|
|
#include "BKE_image.h"
|
2009-04-20 15:06:46 +00:00
|
|
|
#include "BKE_mesh.h"
|
2008-12-13 17:44:30 +00:00
|
|
|
#include "BKE_screen.h"
|
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
|
|
|
#include "BKE_utildefines.h"
|
2008-12-13 17:44:30 +00:00
|
|
|
|
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
|
|
|
#include "IMB_imbuf.h"
|
|
|
|
|
#include "IMB_imbuf_types.h"
|
|
|
|
|
|
2009-02-09 20:58:31 +00:00
|
|
|
#include "ED_image.h"
|
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
|
|
|
#include "ED_mesh.h"
|
2008-12-13 17:44:30 +00:00
|
|
|
#include "ED_screen.h"
|
2009-07-08 16:17:47 +00:00
|
|
|
#include "ED_transform.h"
|
2008-12-19 12:48:30 +00:00
|
|
|
#include "ED_types.h"
|
2008-12-13 17:44:30 +00:00
|
|
|
#include "ED_util.h"
|
|
|
|
|
|
|
|
|
|
#include "WM_api.h"
|
|
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
|
|
|
|
#include "BIF_gl.h"
|
|
|
|
|
#include "BIF_glutil.h"
|
|
|
|
|
|
|
|
|
|
#include "UI_interface.h"
|
|
|
|
|
#include "UI_resources.h"
|
|
|
|
|
#include "UI_view2d.h"
|
|
|
|
|
|
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
|
|
|
#include "RNA_access.h"
|
2008-12-13 17:44:30 +00:00
|
|
|
|
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
|
|
|
#include "RE_pipeline.h"
|
|
|
|
|
|
|
|
|
|
#include "image_intern.h"
|
2008-12-13 17:44:30 +00:00
|
|
|
|
|
|
|
|
/* ************************ header area region *********************** */
|
|
|
|
|
|
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
|
|
|
#define B_NOP -1
|
|
|
|
|
#define B_REDR 1
|
|
|
|
|
#define B_SIMAGEPAINTTOOL 4
|
|
|
|
|
#define B_SIMA_USE_ALPHA 5
|
|
|
|
|
#define B_SIMA_SHOW_ALPHA 6
|
|
|
|
|
#define B_SIMA_SHOW_ZBUF 7
|
|
|
|
|
#define B_SIMA_RECORD 8
|
|
|
|
|
#define B_SIMA_PLAY 9
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
static void do_image_imagemenu(void *arg, int event)
|
|
|
|
|
{
|
|
|
|
|
/* events >=20 are registered bpython scripts */
|
|
|
|
|
#ifndef DISABLE_PYTHON
|
|
|
|
|
if (event >= 20) BPY_menu_do_python(PYMENU_IMAGE, event - 20);
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifndef DISABLE_PYTHON
|
|
|
|
|
{
|
|
|
|
|
BPyMenu *pym;
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
/* note that we acount for the N previous entries with i+20: */
|
|
|
|
|
for (pym = BPyMenuTable[PYMENU_IMAGE]; pym; pym = pym->next, i++) {
|
|
|
|
|
|
|
|
|
|
uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20, menuwidth, 19,
|
|
|
|
|
NULL, 0.0, 0.0, 1, i+20,
|
|
|
|
|
pym->tooltip?pym->tooltip:pym->filename);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
#ifndef DISABLE_PYTHON
|
|
|
|
|
static void do_image_uvs_scriptsmenu(void *arg, int event)
|
|
|
|
|
{
|
|
|
|
|
BPY_menu_do_python(PYMENU_UV, event);
|
|
|
|
|
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
2008-12-13 17:44:30 +00:00
|
|
|
}
|
|
|
|
|
|
2.5: UI & Menus
* Cleaned up UI_interface.h a bit, and added some comments to
organize things a bit and indicate what should be used when.
* uiMenu* functions can now be used to create menus for headers
too, this is done with a uiDefMenuBut, which takes a pointer
to a uiMenuCreateFunc, that will then call uiMenu* functions.
* Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are
specific to making popup menus. Will convert the other
conformation popup menu functions to use this too so we can
remove some code.
* Extended uiMenu functions, now there is is also:
BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator.
* Converted image window headers to use uiMenu functions, simplifies
menu code further here. Did not remove the uiDefMenu functions as
they are used in sequencer/view3d in some places now (will fix).
* Also tried to simplify and fix bounds computation a bit better
for popup menus. It tried to find out in advance what the size
of the menu was but this is difficult with keymap strings in
there, now uiPopupBoundsBlock can figure this out afterwards and
ensure the popup is within the window bounds. Will convert some
other functions to use this too.
2009-01-30 12:18:08 +00:00
|
|
|
static void image_uvs_scriptsmenu (void *args_unused)
|
2008-12-13 17:44:30 +00:00
|
|
|
{
|
|
|
|
|
uiBlock *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
|
|
|
BPyMenu *pym;
|
|
|
|
|
int i= 0;
|
|
|
|
|
short yco = 20, menuwidth = 120;
|
2008-12-13 17:44:30 +00:00
|
|
|
|
2.5
More cleanup!
- removed old UI font completely, including from uiBeginBlock
- emboss hints for uiBlock only have three types now;
Regular, Pulldown, or "Nothing" (only icon/text)
- removed old font path from Userdef
- removed all old button theme hinting
- removed old "auto block" to merge buttons in groups
(was only in use for radiosity buttons)
And went over all warnings. One hooray for make giving clean output :)
Well, we need uniform definitions for warnings, so people at least fix
them... here's the real bad bugs I found:
- in mesh code, a call to editmesh mixed *em and *me
- in armature, ED_util.h was not included, so no warnings for wrong call
to ED_undo_push()
- The extern Py api .h was not included in the bpy_interface.c, showing
a several calls using different args.
Further just added the missing includes, and removed unused vars.
2009-04-14 15:59:52 +00:00
|
|
|
block= uiNewBlock(&curarea->uiblocks, "image_uvs_scriptsmenu", UI_EMBOSSP);
|
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
|
|
|
uiBlockSetButmFunc(block, do_image_uvs_scriptsmenu, NULL);
|
2008-12-13 17:44:30 +00:00
|
|
|
|
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
|
|
|
/* note that we acount for the N previous entries with i+20: */
|
|
|
|
|
for (pym = BPyMenuTable[PYMENU_UV]; pym; pym = pym->next, i++) {
|
|
|
|
|
|
|
|
|
|
uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20, menuwidth, 19,
|
|
|
|
|
NULL, 0.0, 0.0, 1, i,
|
|
|
|
|
pym->tooltip?pym->tooltip:pym->filename);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uiBlockSetDirection(block, UI_RIGHT);
|
|
|
|
|
uiTextBoundsBlock(block, 60);
|
2008-12-13 17:44:30 +00:00
|
|
|
|
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
|
|
|
return block;
|
|
|
|
|
}
|
|
|
|
|
#endif /* DISABLE_PYTHON */
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if 0
|
2008-12-13 17:44:30 +00:00
|
|
|
static void do_image_buttons(bContext *C, void *arg, int event)
|
|
|
|
|
{
|
|
|
|
|
switch(event) {
|
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
|
|
|
case B_REDR:
|
|
|
|
|
ED_area_tag_redraw(CTX_wm_area(C));
|
|
|
|
|
break;
|
2008-12-14 12:16:55 +00:00
|
|
|
}
|
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
|
|
|
|
|
|
|
|
ToolSettings *settings= G.scene->toolsettings;
|
|
|
|
|
ID *id, *idtest;
|
|
|
|
|
int nr;
|
|
|
|
|
|
|
|
|
|
if(curarea->win==0) return;
|
|
|
|
|
|
|
|
|
|
if(event<=100) {
|
|
|
|
|
if(event<=50) do_global_buttons2(event);
|
|
|
|
|
else do_global_buttons(event);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch(event) {
|
|
|
|
|
case B_SIMABROWSE:
|
|
|
|
|
if(sima->imanr== -2) {
|
|
|
|
|
if(G.qual & LR_CTRLKEY) {
|
|
|
|
|
activate_databrowse_imasel((ID *)sima->image, ID_IM, 0, B_SIMABROWSE,
|
|
|
|
|
&sima->imanr, do_image_buttons);
|
|
|
|
|
} else {
|
|
|
|
|
activate_databrowse((ID *)sima->image, ID_IM, 0, B_SIMABROWSE,
|
|
|
|
|
&sima->imanr, do_image_buttons);
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(sima->imanr < 0) break;
|
|
|
|
|
|
|
|
|
|
nr= 1;
|
|
|
|
|
id= (ID *)sima->image;
|
|
|
|
|
|
|
|
|
|
idtest= BLI_findlink(&G.main->image, sima->imanr-1);
|
|
|
|
|
if(idtest==NULL) { /* no new */
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(idtest!=id) {
|
|
|
|
|
sima->image= (Image *)idtest;
|
|
|
|
|
if(idtest->us==0) idtest->us= 1;
|
|
|
|
|
BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
}
|
|
|
|
|
/* also when image is the same: assign! 0==no tileflag: */
|
|
|
|
|
image_changed(sima, (Image *)idtest);
|
|
|
|
|
BIF_undo_push("Assign image UV");
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMAGETILE:
|
|
|
|
|
image_set_tile(sima, 1); /* 1: only tileflag */
|
|
|
|
|
allqueue(REDRAWVIEW3D, 0);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMA3DVIEWDRAW:
|
|
|
|
|
allqueue(REDRAWVIEW3D, 0);
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMA_REDR_IMA_3D:
|
|
|
|
|
allqueue(REDRAWVIEW3D, 0);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case B_SIMAPACKIMA:
|
|
|
|
|
pack_image_sima();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case B_SIMA_REPACK:
|
|
|
|
|
BKE_image_memorypack(sima->image);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case B_SIMA_USE_ALPHA:
|
|
|
|
|
sima->flag &= ~(SI_SHOW_ALPHA|SI_SHOW_ZBUF);
|
|
|
|
|
scrarea_queue_winredraw(curarea);
|
|
|
|
|
scrarea_queue_headredraw(curarea);
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMA_SHOW_ALPHA:
|
|
|
|
|
sima->flag &= ~(SI_USE_ALPHA|SI_SHOW_ZBUF);
|
|
|
|
|
scrarea_queue_winredraw(curarea);
|
|
|
|
|
scrarea_queue_headredraw(curarea);
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMA_SHOW_ZBUF:
|
|
|
|
|
sima->flag &= ~(SI_SHOW_ALPHA|SI_USE_ALPHA);
|
|
|
|
|
scrarea_queue_winredraw(curarea);
|
|
|
|
|
scrarea_queue_headredraw(curarea);
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMARELOAD:
|
|
|
|
|
reload_image_sima();
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMAGELOAD:
|
|
|
|
|
open_image_sima(0);
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMANAME:
|
|
|
|
|
if(sima->image) {
|
|
|
|
|
Image *ima;
|
|
|
|
|
char str[FILE_MAXDIR+FILE_MAXFILE];
|
|
|
|
|
|
|
|
|
|
/* name in ima has been changed by button! */
|
|
|
|
|
BLI_strncpy(str, sima->image->name, sizeof(str));
|
|
|
|
|
ima= BKE_add_image_file(str);
|
|
|
|
|
if(ima) {
|
|
|
|
|
BKE_image_signal(ima, &sima->iuser, IMA_SIGNAL_RELOAD);
|
|
|
|
|
image_changed(sima, ima);
|
|
|
|
|
}
|
|
|
|
|
BIF_undo_push("Load image");
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMAMULTI:
|
|
|
|
|
if(sima && sima->image) {
|
|
|
|
|
BKE_image_multilayer_index(sima->image->rr, &sima->iuser);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case B_TRANS_IMAGE:
|
|
|
|
|
image_editvertex_buts(NULL);
|
|
|
|
|
break;
|
|
|
|
|
case B_CURSOR_IMAGE:
|
|
|
|
|
image_editcursor_buts(NULL);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case B_TWINANIM:
|
|
|
|
|
{
|
|
|
|
|
Image *ima;
|
|
|
|
|
int nr;
|
|
|
|
|
|
|
|
|
|
ima = sima->image;
|
|
|
|
|
if (ima) {
|
|
|
|
|
if(ima->flag & IMA_TWINANIM) {
|
|
|
|
|
nr= ima->xrep*ima->yrep;
|
|
|
|
|
if(ima->twsta>=nr) ima->twsta= 1;
|
|
|
|
|
if(ima->twend>=nr) ima->twend= nr-1;
|
|
|
|
|
if(ima->twsta>ima->twend) ima->twsta= 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
allqueue(REDRAWVIEW3D, 0);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case B_SIMACLONEBROWSE:
|
|
|
|
|
if(settings->imapaint.brush) {
|
|
|
|
|
Brush *brush= settings->imapaint.brush;
|
|
|
|
|
|
|
|
|
|
if(sima->menunr== -2) {
|
|
|
|
|
if(G.qual & LR_CTRLKEY) {
|
|
|
|
|
activate_databrowse_imasel((ID *)brush->clone.image, ID_IM, 0, B_SIMACLONEBROWSE,
|
|
|
|
|
&sima->menunr, do_image_buttons);
|
|
|
|
|
} else {
|
|
|
|
|
activate_databrowse((ID *)brush->clone.image, ID_IM, 0, B_SIMACLONEBROWSE,
|
|
|
|
|
&sima->menunr, do_image_buttons);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if(sima->menunr < 0) break;
|
|
|
|
|
|
|
|
|
|
if(brush_clone_image_set_nr(brush, sima->menunr))
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case B_SIMACLONEDELETE:
|
|
|
|
|
if (settings->imapaint.brush)
|
|
|
|
|
if (brush_clone_image_delete(settings->imapaint.brush))
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case B_SIMABRUSHCHANGE:
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
allqueue(REDRAWBUTSEDIT, 0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case B_SIMACURVES:
|
|
|
|
|
curvemapping_do_ibuf(sima->cumap, imagewindow_get_ibuf(sima));
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case B_SIMARANGE:
|
|
|
|
|
curvemapping_set_black_white(sima->cumap, NULL, NULL);
|
|
|
|
|
curvemapping_do_ibuf(sima->cumap, imagewindow_get_ibuf(sima));
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case B_SIMABRUSHBROWSE:
|
|
|
|
|
if(sima->menunr==-2) {
|
|
|
|
|
activate_databrowse((ID*)settings->imapaint.brush, ID_BR, 0, B_SIMABRUSHBROWSE, &sima->menunr, do_global_buttons);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else if(sima->menunr < 0) break;
|
|
|
|
|
|
|
|
|
|
if(brush_set_nr(&settings->imapaint.brush, sima->menunr)) {
|
|
|
|
|
BIF_undo_push("Browse Brush");
|
|
|
|
|
allqueue(REDRAWBUTSEDIT, 0);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMABRUSHDELETE:
|
|
|
|
|
if(brush_delete(&settings->imapaint.brush)) {
|
|
|
|
|
BIF_undo_push("Unlink Brush");
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
allqueue(REDRAWBUTSEDIT, 0);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case B_KEEPDATA:
|
|
|
|
|
brush_toggled_fake_user(settings->imapaint.brush);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
allqueue(REDRAWBUTSEDIT, 0);
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMABRUSHLOCAL:
|
|
|
|
|
if(settings->imapaint.brush && settings->imapaint.brush->id.lib) {
|
|
|
|
|
if(okee("Make local")) {
|
|
|
|
|
make_local_brush(settings->imapaint.brush);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
allqueue(REDRAWBUTSEDIT, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMABTEXBROWSE:
|
|
|
|
|
if(settings->imapaint.brush) {
|
|
|
|
|
Brush *brush= settings->imapaint.brush;
|
|
|
|
|
|
|
|
|
|
if(sima->menunr==-2) {
|
|
|
|
|
MTex *mtex= brush->mtex[brush->texact];
|
|
|
|
|
ID *id= (ID*)((mtex)? mtex->tex: NULL);
|
|
|
|
|
if(G.qual & LR_CTRLKEY) {
|
|
|
|
|
activate_databrowse_imasel(id, ID_TE, 0, B_SIMABTEXBROWSE, &sima->menunr, do_image_buttons);
|
|
|
|
|
} else {
|
|
|
|
|
activate_databrowse(id, ID_TE, 0, B_SIMABTEXBROWSE, &sima->menunr, do_image_buttons);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else if(sima->menunr < 0) break;
|
|
|
|
|
|
|
|
|
|
if(brush_texture_set_nr(brush, sima->menunr)) {
|
|
|
|
|
BIF_undo_push("Browse Brush Texture");
|
|
|
|
|
allqueue(REDRAWBUTSSHADING, 0);
|
|
|
|
|
allqueue(REDRAWBUTSEDIT, 0);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMABTEXDELETE:
|
|
|
|
|
if(settings->imapaint.brush) {
|
|
|
|
|
if (brush_texture_delete(settings->imapaint.brush)) {
|
|
|
|
|
BIF_undo_push("Unlink Brush Texture");
|
|
|
|
|
allqueue(REDRAWBUTSSHADING, 0);
|
|
|
|
|
allqueue(REDRAWBUTSEDIT, 0);
|
|
|
|
|
allqueue(REDRAWIMAGE, 0);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMA_PLAY:
|
|
|
|
|
play_anim(0);
|
|
|
|
|
break;
|
|
|
|
|
case B_SIMA_RECORD:
|
|
|
|
|
imagespace_composite_flipbook(curarea);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2008-12-13 17:44:30 +00:00
|
|
|
|
2009-01-30 12:58:00 +00:00
|
|
|
/********************** toolbox operator *********************/
|
|
|
|
|
|
|
|
|
|
static int toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
|
|
|
|
{
|
2009-07-28 16:33:02 +00:00
|
|
|
SpaceImage *sima= CTX_wm_space_image(C);
|
2009-01-30 12:58:00 +00:00
|
|
|
Object *obedit= CTX_data_edit_object(C);
|
2009-04-22 18:39:44 +00:00
|
|
|
uiPopupMenu *pup;
|
|
|
|
|
uiLayout *layout;
|
2009-01-30 12:58:00 +00:00
|
|
|
int show_uvedit;
|
|
|
|
|
|
2009-02-09 20:58:31 +00:00
|
|
|
show_uvedit= ED_space_image_show_uvedit(sima, obedit);
|
2009-01-30 12:58:00 +00:00
|
|
|
|
UI: Layout Engine
* Buttons are now created first, and after that the layout is computed.
This means the layout engine now works at button level, and makes it
easier to write templates. Otherwise you had to store all info and
create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
These can contain regular buttons, and can be put in a Free layout,
which means you can specify manual coordinates, but still get nested
correct inside other layouts.
* API was changed to allow better nesting. Previously items were added
in the last added layout specifier, i.e. one level up in the layout
hierarchy. This doesn't work well in always, so now when creating things
like rows or columns it always returns a layout which you have to add
the items in. All py scripts were updated to follow this.
* Computing the layout now goes in two passes, first estimating the
required width/height of all nested layouts, and then in the second
pass using the results of that to decide on the actual locations.
* Enum and array buttons now follow the direction of the layout, i.e.
they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
buttons).
* Moved some more space variables into Style.
2009-05-15 11:19:59 +00:00
|
|
|
pup= uiPupMenuBegin(C, "Toolbox", 0);
|
2009-04-22 18:39:44 +00:00
|
|
|
layout= uiPupMenuLayout(pup);
|
2009-01-30 12:58:00 +00:00
|
|
|
|
2009-07-08 21:31:28 +00:00
|
|
|
uiItemM(layout, C, NULL, 0, "IMAGE_MT_view");
|
|
|
|
|
if(show_uvedit) uiItemM(layout, C, NULL, 0, "IMAGE_MT_select");
|
|
|
|
|
uiItemM(layout, C, NULL, 0, "IMAGE_MT_image");
|
|
|
|
|
if(show_uvedit) uiItemM(layout, C, NULL, 0, "IMAGE_MT_uvs");
|
2009-01-30 12:58:00 +00:00
|
|
|
|
2009-04-22 18:39:44 +00:00
|
|
|
uiPupMenuEnd(C, pup);
|
2009-01-30 12:58:00 +00:00
|
|
|
|
|
|
|
|
return OPERATOR_CANCELLED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void IMAGE_OT_toolbox(wmOperatorType *ot)
|
|
|
|
|
{
|
|
|
|
|
/* identifiers */
|
|
|
|
|
ot->name= "Toolbox";
|
|
|
|
|
ot->idname= "IMAGE_OT_toolbox";
|
|
|
|
|
|
|
|
|
|
/* api callbacks */
|
|
|
|
|
ot->invoke= toolbox_invoke;
|
|
|
|
|
ot->poll= space_image_main_area_poll;
|
|
|
|
|
}
|
|
|
|
|
|