#include "BIF_verse.h"
#endif
+#ifndef DISABLE_PYTHON
#include "BPY_extern.h"
#include "BPY_menus.h"
+#endif
#include "blendef.h"
#include "multires.h"
persptoetsen(PAD0);
G.qual &= ~LR_CTRLKEY;
} else {
+ /* store settings of current view before allowing overwriting with camera view */
+ /* this is a copy of the code in toets.c */
+ if(G.vd->persp != V3D_CAMOB) {
+ QUATCOPY(G.vd->lviewquat, G.vd->viewquat);
+ G.vd->lview= G.vd->view;
+ G.vd->lpersp= G.vd->persp;
+ }
+
for( base = FIRSTBASE; base; base = base->next ) {
if (base->object->type == OB_CAMERA) {
i++;
return block;
}
+#ifndef DISABLE_PYTHON
static void do_view3d_view_spacehandlers(void *arg, int event)
{
Text *text = G.main->text.first;
return block;
}
+#endif /* DISABLE_PYTHON */
static void do_view3d_viewmenu(void *arg, int event)
{
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Back Animation|Alt A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 13, "");
+#ifndef DISABLE_PYTHON
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBlockBut(block, view3d_view_spacehandlers, NULL, ICON_RIGHTARROW_THIN, "Space Handler Scripts", 0, yco-=20, 120, 19, "");
+#endif
if(curarea->headertype==HEADERTOP) {
uiBlockSetDirection(block, UI_DOWN);
void do_view3d_select_faceselmenu(void *arg, int event)
{
/* events >= 6 are registered bpython scripts */
+#ifndef DISABLE_PYTHON
if (event >= 6) BPY_menu_do_python(PYMENU_FACESELECT, event - 6);
-
+#endif
+
switch(event) {
case 0: /* border select */
borderselect();
{
uiBlock *block;
short yco= 0, menuwidth=120;
+#ifndef DISABLE_PYTHON
BPyMenu *pym;
+#endif
int i = 0;
block= uiNewBlock(&curarea->uiblocks, "view3d_select_faceselmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Linked Faces|Ctrl L", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
+#ifndef DISABLE_PYTHON
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
/* note that we account for the 6 previous entries with i+6: */
menuwidth, 19, NULL, 0.0, 0.0, 1, i+6,
pym->tooltip?pym->tooltip:pym->filename);
}
-
+#endif
+
if(curarea->headertype==HEADERTOP) {
uiBlockSetDirection(block, UI_DOWN);
}
return block;
}
+#ifndef DISABLE_PYTHON
static void do_view3d_edit_object_scriptsmenu(void *arg, int event)
{
BPY_menu_do_python(PYMENU_OBJECT, event);
return block;
}
+#endif /* DISABLE_PYTHON */
#ifdef WITH_VERSE
extern ListBase session_list;
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Move to Layer...|M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
uiDefIconTextBlockBut(block, view3d_edit_object_showhidemenu, NULL, ICON_RIGHTARROW_THIN, "Show/Hide Objects", 0, yco-=20, 120, 19, "");
+#ifndef DISABLE_PYTHON
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBlockBut(block, view3d_edit_object_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Scripts", 0, yco-=20, 120, 19, "");
-
+#endif
if(curarea->headertype==HEADERTOP) {
uiBlockSetDirection(block, UI_DOWN);
return block;
}
+#ifndef DISABLE_PYTHON
static void do_view3d_edit_mesh_scriptsmenu(void *arg, int event)
{
BPY_menu_do_python(PYMENU_MESH, event);
return block;
}
+#endif /* DISABLE_PYTHON */
static void do_view3d_edit_meshmenu(void *arg, int event)
{
uiDefIconTextBlockBut(block, view3d_edit_mesh_showhidemenu, NULL, ICON_RIGHTARROW_THIN, "Show/Hide Vertices", 0, yco-=20, 120, 19, "");
+#ifndef DISABLE_PYTHON
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBlockBut(block, view3d_edit_mesh_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Scripts", 0, yco-=20, 120, 19, "");
-
+#endif
+
if(curarea->headertype==HEADERTOP) {
uiBlockSetDirection(block, UI_DOWN);
}
}
-
+#ifndef DISABLE_PYTHON
static void do_view3d_scripts_armaturemenu(void *arg, int event)
{
BPY_menu_do_python(PYMENU_ARMATURE, event);
return block;
}
+#endif /* DISABLE_PYTHON */
static void do_view3d_armature_settingsmenu(void *arg, int event)
{
uiDefIconTextBlockBut(block, view3d_edit_armature_parentmenu, NULL, ICON_RIGHTARROW_THIN, "Parent", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_armature_settingsmenu, NULL, ICON_RIGHTARROW_THIN, "Bone Settings", 0, yco-=20, 120, 19, "");
+#ifndef DISABLE_PYTHON
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBlockBut(block, view3d_scripts_armaturemenu, NULL, ICON_RIGHTARROW_THIN, "Scripts", 0, yco-=20, 120, 19, "");
-
+#endif
if(curarea->headertype==HEADERTOP) {
uiBlockSetDirection(block, UI_DOWN);
}
static void do_view3d_vpaintmenu(void *arg, int event)
{
/* events >= 3 are registered bpython scripts */
+#ifndef DISABLE_PYTHON
if (event >= 3) BPY_menu_do_python(PYMENU_VERTEXPAINT, event - 3);
-
+#endif
switch(event) {
case 0: /* undo vertex painting */
BIF_undo();
{
uiBlock *block;
short yco= 0, menuwidth=120;
+#ifndef DISABLE_PYTHON
BPyMenu *pym;
+#endif
int i=0;
block= uiNewBlock(&curarea->uiblocks, "view3d_paintmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Vertex Colors|Shift K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Shaded Vertex Colors", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+#ifndef DISABLE_PYTHON
/* note that we account for the 3 previous entries with i+3:
even if the last item isnt displayed, it dosent matter */
for (pym = BPyMenuTable[PYMENU_VERTEXPAINT]; pym; pym = pym->next, i++) {
menuwidth, 19, NULL, 0.0, 0.0, 1, i+3,
pym->tooltip?pym->tooltip:pym->filename);
}
-
+#endif
+
if(curarea->headertype==HEADERTOP) {
uiBlockSetDirection(block, UI_DOWN);
}
Object *ob= OBACT;
/* events >= 3 are registered bpython scripts */
+#ifndef DISABLE_PYTHON
if (event >= 4) BPY_menu_do_python(PYMENU_WEIGHTPAINT, event - 4);
-
+#endif
switch(event) {
case 0: /* undo weight painting */
BIF_undo();
{
uiBlock *block;
short yco= 0, menuwidth=120, menunr=1;
+#ifndef DISABLE_PYTHON
BPyMenu *pym;
+#endif
int i=0;
block= uiNewBlock(&curarea->uiblocks, "view3d_paintmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
menunr++;
}
-
+
+#ifndef DISABLE_PYTHON
/* note that we account for the 4 previous entries with i+4:
even if the last item isnt displayed, it dosent matter */
for (pym = BPyMenuTable[PYMENU_WEIGHTPAINT]; pym; pym = pym->next, i++) {
menuwidth, 19, NULL, 0.0, 0.0, 1, i+4,
pym->tooltip?pym->tooltip:pym->filename);
}
-
+#endif
+
if(curarea->headertype==HEADERTOP) {
uiBlockSetDirection(block, UI_DOWN);
}
void do_view3d_select_particlemenu(void *arg, int event)
{
/* events >= 6 are registered bpython scripts */
+#ifndef DISABLE_PYTHON
if (event >= 6) BPY_menu_do_python(PYMENU_FACESELECT, event - 6);
-
+#endif
switch(event) {
case 0:
PE_borderselect();