Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2005-08-03 22:48:22 +0400
committerDaniel Dunbar <daniel@zuster.org>2005-08-03 22:48:22 +0400
commitb03a20d2721c938f0e65bf9a426fd44028c4592a (patch)
tree21d5a1f1d1bb5924b6cceec5eb1e34c1afea491f
parent2cc6d565cbc9da005e1c13828c6b3a3d46cd32cb (diff)
- got rid of silly #define ..._BIT, #define ... (1<<..._BIT) stuff
- switched almost all uiDefBut(..., TOG|BIT|..) to use UiDefButBit and the name of the actual bit define instead of just a magic constant, this makes searching the code much nicer. most of the credit here goes to LetterRip who did almost all of the conversions, I mostly just checked them over.
-rw-r--r--source/blender/blenkernel/BKE_global.h41
-rw-r--r--source/blender/include/blendef.h7
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h17
-rw-r--r--source/blender/makesdna/DNA_armature_types.h20
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h5
-rw-r--r--source/blender/makesdna/DNA_nla_types.h6
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h7
-rw-r--r--source/blender/makesdna/DNA_sound_types.h32
-rw-r--r--source/blender/src/buttons_editing.c111
-rw-r--r--source/blender/src/buttons_logic.c146
-rw-r--r--source/blender/src/buttons_object.c62
-rw-r--r--source/blender/src/buttons_scene.c90
-rw-r--r--source/blender/src/buttons_script.c2
-rw-r--r--source/blender/src/buttons_shading.c248
-rw-r--r--source/blender/src/drawimage.c6
-rw-r--r--source/blender/src/drawipo.c2
-rw-r--r--source/blender/src/drawnla.c6
-rw-r--r--source/blender/src/drawseq.c10
-rw-r--r--source/blender/src/drawview.c4
-rw-r--r--source/blender/src/editscreen.c4
-rw-r--r--source/blender/src/header_action.c4
-rw-r--r--source/blender/src/header_buttonswin.c4
-rw-r--r--source/blender/src/header_filesel.c16
-rw-r--r--source/blender/src/header_image.c20
-rw-r--r--source/blender/src/header_info.c38
-rw-r--r--source/blender/src/header_ipo.c4
-rw-r--r--source/blender/src/header_nla.c4
-rw-r--r--source/blender/src/header_oops.c30
-rw-r--r--source/blender/src/header_script.c4
-rw-r--r--source/blender/src/header_seq.c4
-rw-r--r--source/blender/src/header_sound.c4
-rw-r--r--source/blender/src/header_text.c4
-rw-r--r--source/blender/src/header_time.c4
-rw-r--r--source/blender/src/header_view3d.c30
-rw-r--r--source/blender/src/interface.c8
-rw-r--r--source/blender/src/previewrender.c4
-rw-r--r--source/blender/src/space.c8
-rw-r--r--source/blender/src/toets.c2
-rw-r--r--source/blender/src/toolbox.c8
-rw-r--r--source/blender/src/vpaint.c6
40 files changed, 468 insertions, 564 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 6dd0cfbbd9a..000878d5b6a 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -141,7 +141,7 @@ typedef struct Global {
/* G.f */
#define G_DISABLE_OK (1 << 0)
#define G_PLAYANIM (1 << 1)
-#define G_TEST_DUPLI (1 << 2)
+/* also uses G_FILE_AUTOPLAY */
#define G_SIMULATION (1 << 3)
#define G_BACKBUFSEL (1 << 4)
#define G_PICKSEL (1 << 5)
@@ -171,30 +171,17 @@ typedef struct Global {
/* G.fileflags */
-#define G_AUTOPACK_BIT 0
-#define G_FILE_COMPRESS_BIT 1
-#define G_FILE_AUTOPLAY_BIT 2
-#define G_FILE_ENABLE_ALL_FRAMES_BIT 3
-#define G_FILE_SHOW_DEBUG_PROPS_BIT 4
-#define G_FILE_SHOW_FRAMERATE_BIT 5
-#define G_FILE_SHOW_PROFILE_BIT 6
-#define G_FILE_LOCK_BIT 7
-#define G_FILE_SIGN_BIT 8
-#define G_FILE_PUBLISH_BIT 9
-#define G_FILE_NO_UI_BIT 10
-
-
-#define G_AUTOPACK (1 << G_AUTOPACK_BIT)
-#define G_FILE_COMPRESS (1 << G_FILE_COMPRESS_BIT)
-#define G_FILE_AUTOPLAY (1 << G_FILE_AUTOPLAY_BIT)
-#define G_FILE_ENABLE_ALL_FRAMES (1 << G_FILE_ENABLE_ALL_FRAMES_BIT)
-#define G_FILE_SHOW_DEBUG_PROPS (1 << G_FILE_SHOW_DEBUG_PROPS_BIT)
-#define G_FILE_SHOW_FRAMERATE (1 << G_FILE_SHOW_FRAMERATE_BIT)
-#define G_FILE_SHOW_PROFILE (1 << G_FILE_SHOW_PROFILE_BIT)
-#define G_FILE_LOCK (1 << G_FILE_LOCK_BIT)
-#define G_FILE_SIGN (1 << G_FILE_SIGN_BIT)
-#define G_FILE_PUBLISH (1 << G_FILE_PUBLISH_BIT)
-#define G_FILE_NO_UI (1 << G_FILE_NO_UI_BIT)
+#define G_AUTOPACK (1 << 0)
+#define G_FILE_COMPRESS (1 << 1)
+#define G_FILE_AUTOPLAY (1 << 2)
+#define G_FILE_ENABLE_ALL_FRAMES (1 << 3)
+#define G_FILE_SHOW_DEBUG_PROPS (1 << 4)
+#define G_FILE_SHOW_FRAMERATE (1 << 5)
+#define G_FILE_SHOW_PROFILE (1 << 6)
+#define G_FILE_LOCK (1 << 7)
+#define G_FILE_SIGN (1 << 8)
+#define G_FILE_PUBLISH (1 << 9)
+#define G_FILE_NO_UI (1 << 10)
/* G.windowstate */
#define G_WINDOWSTATE_USERDEF 0
@@ -207,10 +194,6 @@ typedef struct Global {
#define G_QUIT 8
#define G_SETSCENE 16
-/* G.flags: double? */
-#define G_FLAGS_AUTOPLAY_BIT 2
-#define G_FLAGS_AUTOPLAY (1 << G_FLAGS_AUTOPLAY_BIT)
-
/* G.qual */
#define R_SHIFTKEY 1
#define L_SHIFTKEY 2
diff --git a/source/blender/include/blendef.h b/source/blender/include/blendef.h
index 9f7ad98a1bc..42d6238be4e 100644
--- a/source/blender/include/blendef.h
+++ b/source/blender/include/blendef.h
@@ -389,4 +389,11 @@
#define R_DISPLAYWIN 1
#define R_DISPLAYAUTO 2
+ /* Gvp.flag */
+#define VP_COLINDEX 1
+#define VP_AREA 2
+#define VP_SOFT 4
+#define VP_NORMALS 8
+
+
#endif
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 40a6c4a80a0..7bb367cc244 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -306,16 +306,10 @@ typedef struct FreeCamera {
#define ACT_GROUP_SET 6
/* ipoactuator->flag */
-#define ACT_IPOFORCE_BIT 0
-#define ACT_IPOEND_BIT 1
-#define ACT_IPOFORCE_LOCAL_BIT 2
-// unused: 3
-#define ACT_IPOCHILD_BIT 4
-
-#define ACT_IPOFORCE (1 << ACT_IPOFORCE_BIT)
-#define ACT_IPOEND (1 << ACT_IPOEND_BIT)
-#define ACT_IPOFORCE_LOCAL (1 << ACT_IPOFORCE_LOCAL_BIT)
-#define ACT_IPOCHILD (1 << ACT_IPOCHILD_BIT)
+#define ACT_IPOFORCE (1 << 0)
+#define ACT_IPOEND (1 << 1)
+#define ACT_IPOFORCE_LOCAL (1 << 2)
+#define ACT_IPOCHILD (1 << 4)
/* ipoactuator->flag for k2k */
#define ACT_K2K_PREV 1
@@ -399,8 +393,7 @@ typedef struct FreeCamera {
/* visibilityact->flag */
/* Set means the object will become invisible */
-#define ACT_VISIBILITY_INVISIBLE_BIT 0
-#define ACT_VISIBILITY_INVISIBLE (1 << ACT_VISIBILITY_INVISIBLE_BIT)
+#define ACT_VISIBILITY_INVISIBLE (1 << 0)
#endif
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index cda8751a30b..014e6925d56 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -80,13 +80,6 @@ typedef struct bArmature {
}bArmature;
/* armature->flag */
-#define ARM_RESTPOSBIT 0
-
-#define ARM_DRAWAXESBIT 2
-#define ARM_DRAWNAMESBIT 3
-#define ARM_POSEBIT 4
-#define ARM_EDITBIT 5
-#define ARM_DELAYBIT 6
/* dont use bit 7, was saved in files to disable stuff */
/* armature->flag */
@@ -131,19 +124,6 @@ typedef struct bArmature {
enum {
BONE_SKINNABLE = 0,
BONE_UNSKINNABLE,
- BONE_HEAD,
- BONE_NECK,
- BONE_BACK,
- BONE_SHOULDER,
- BONE_ARM,
- BONE_HAND,
- BONE_FINGER,
- BONE_THUMB,
- BONE_PELVIS,
- BONE_LEG,
- BONE_FOOT,
- BONE_TOE,
- BONE_TENTACLE
};
#endif
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index cfb180cf33d..95c1053ba8e 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -178,11 +178,6 @@ typedef struct bStretchToConstraint{
#define CONSTRAINT_DISABLE 0x00000004
#define CONSTRAINT_LOOPTESTED 0x00000008
-
-#define CONSTRAINT_EXPAND_BIT 0
-#define CONSTRAINT_DONE_BIT 1
-#define CONSTRAINT_DISABLE_BIT 2
-
/* bConstraintChannel.flag */
#define CONSTRAINT_CHANNEL_SELECT 0x00000001
diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h
index 8c3c4d7a7a3..49c8363192c 100644
--- a/source/blender/makesdna/DNA_nla_types.h
+++ b/source/blender/makesdna/DNA_nla_types.h
@@ -57,15 +57,9 @@ typedef struct bActionStrip {
#define ACTSTRIPMODE_ADD 1
#define ACTSTRIP_SELECT 0x00000001
-
#define ACTSTRIP_USESTRIDE 0x00000002
#define ACTSTRIP_BLENDTONEXT 0x00000004
#define ACTSTRIP_HOLDLASTFRAME 0x00000008
-#define ACTSTRIP_SELECTBIT 0
-#define ACTSTRIP_USESTRIDEBIT 1
-#define ACTSTRIP_BLENDTONEXTBIT 2
-#define ACTSTRIP_HOLDLASTFRAMEBIT 3
-
#endif
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
index c56fe81ca19..4df3ecb5a11 100644
--- a/source/blender/makesdna/DNA_sensor_types.h
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -213,11 +213,8 @@ typedef struct bJoystickSensor {
#define SENS_NEG_PULSE_MODE 4
/* sensor->suppress */
-#define SENS_SUPPRESS_POSITIVE_BIT 0
-#define SENS_SUPPRESS_NEGATIVE_BIT 1
-
-#define SENS_SUPPRESS_POSITIVE (1 << SENS_SUPPRESS_POSITIVE_BIT)
-#define SENS_SUPPRESS_NEGATIVE (1 << SENS_SUPPRESS_NEGATIVE_BIT)
+#define SENS_SUPPRESS_POSITIVE (1 << 0)
+#define SENS_SUPPRESS_NEGATIVE (1 << 1)
/* collision, ray sensor modes: */
/* A little bit fake: when property is active, the first bit is
diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h
index 82b457ac003..1ec788976df 100644
--- a/source/blender/makesdna/DNA_sound_types.h
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -169,29 +169,15 @@ enum SAMPLE_FileTypes {
#define SOUND_CHANNELS_LEFT 1
#define SOUND_CHANNELS_RIGHT 2
-enum SOUND_FLAGS_BITS {
- SOUND_FLAGS_LOOP_BIT = 0,
- SOUND_FLAGS_FIXED_VOLUME_BIT,
- SOUND_FLAGS_FIXED_PANNING_BIT,
- SOUND_FLAGS_3D_BIT,
- SOUND_FLAGS_BIDIRECTIONAL_LOOP_BIT,
- SOUND_FLAGS_PRIORITY_BIT,
- SOUND_FLAGS_SEQUENCE_BIT
-};
-
-#define SOUND_FLAGS_LOOP (1 << SOUND_FLAGS_LOOP_BIT)
-#define SOUND_FLAGS_FIXED_VOLUME (1 << SOUND_FLAGS_FIXED_VOLUME_BIT)
-#define SOUND_FLAGS_FIXED_PANNING (1 << SOUND_FLAGS_FIXED_PANNING_BIT)
-#define SOUND_FLAGS_3D (1 << SOUND_FLAGS_3D_BIT)
-#define SOUND_FLAGS_BIDIRECTIONAL_LOOP (1 << SOUND_FLAGS_BIDIRECTIONAL_LOOP_BIT)
-#define SOUND_FLAGS_PRIORITY (1 << SOUND_FLAGS_PRIORITY_BIT)
-#define SOUND_FLAGS_SEQUENCE (1 << SOUND_FLAGS_SEQUENCE_BIT)
-
-enum SAMPLE_FLAGS_BITS {
- SAMPLE_NEEDS_SAVE_BIT = 0
-};
-
-#define SAMPLE_NEEDS_SAVE (1 << SAMPLE_NEEDS_SAVE_BIT)
+#define SOUND_FLAGS_LOOP (1 << 0)
+#define SOUND_FLAGS_FIXED_VOLUME (1 << 1)
+#define SOUND_FLAGS_FIXED_PANNING (1 << 2)
+#define SOUND_FLAGS_3D (1 << 3)
+#define SOUND_FLAGS_BIDIRECTIONAL_LOOP (1 << 4)
+#define SOUND_FLAGS_PRIORITY (1 << 5)
+#define SOUND_FLAGS_SEQUENCE (1 << 6)
+
+#define SAMPLE_NEEDS_SAVE (1 << 0)
/* to DNA_sound_types.h*/
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index e17a59821f9..9b2d8d2bc60 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -440,12 +440,12 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me)
if( uiNewPanel(curarea, block, "Mesh", "Editing", 320, 0, 318, 204)==0) return;
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|5, REDRAWVIEW3D, "Auto Smooth",10,180,154,19, &me->flag, 0, 0, 0, 0, "Treats all set-smoothed faces with angles less than Degr: as 'smooth' during render");
+ uiDefButBitS(block, TOG, ME_AUTOSMOOTH, REDRAWVIEW3D, "Auto Smooth",10,180,154,19, &me->flag, 0, 0, 0, 0, "Treats all set-smoothed faces with angles less than Degr: as 'smooth' during render");
uiDefButS(block, NUM, B_DIFF, "Degr:", 10,160,154,19, &me->smoothresh, 1, 80, 0, 0, "Defines maximum angle between face normals that 'Auto Smooth' will operate on");
uiBlockBeginAlign(block);
uiBlockSetCol(block, TH_AUTO);
- uiDefButS(block, TOG|BIT|8, B_SUBSURFTYPE, "Optimal", 10, 94,154,19, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe");
+ uiDefButBitS(block, TOG, ME_OPT_EDGES, B_SUBSURFTYPE, "Optimal", 10, 94,154,19, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe");
uiBlockBeginAlign(block);
@@ -497,8 +497,8 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me)
uiDefBut(block, BUT,B_DOCENTRECURSOR, "Centre Cursor", 275, 55, 130, 19, 0, 0, 0, 0, 0, "Shifts object's origin to cursor location");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|2, REDRAWVIEW3D, "Double Sided", 275,30,130,19, &me->flag, 0, 0, 0, 0, "Toggles selected faces as doublesided or single-sided");
- uiDefButS(block, TOG|BIT|1, REDRAWVIEW3D, "No V.Normal Flip",275,10,130,19, &me->flag, 0, 0, 0, 0, "Disables flipping of vertexnormals during render");
+ uiDefButBitS(block, TOG, ME_TWOSIDED, REDRAWVIEW3D, "Double Sided", 275,30,130,19, &me->flag, 0, 0, 0, 0, "Toggles selected faces as doublesided or single-sided");
+ uiDefButBitS(block, TOG, ME_NOPUNOFLIP, REDRAWVIEW3D, "No V.Normal Flip",275,10,130,19, &me->flag, 0, 0, 0, 0, "Disables flipping of vertexnormals during render");
uiBlockEndAlign(block);
}
@@ -823,8 +823,8 @@ static void editing_panel_font_type(Object *ob, Curve *cu)
uiDefBut(block, BUT, B_LOAD3DTEXT, "Insert Text", 480, 165, 90, 20, 0, 0, 0, 0, 0, "Insert text file at cursor");
uiDefBut(block, BUT, B_LOREM, "Lorem", 575, 165, 70, 20, 0, 0, 0, 0, 0, "Insert a paragraph of Lorem Ipsum at cursor");
uiBlockBeginAlign(block);
- uiDefButC(block, TOG|BIT|0,B_STYLETOSEL, "B", 752,165,20,20, &(cu->curinfo.flag), 0,0, 0, 0, "");
- uiDefButC(block, TOG|BIT|1,B_STYLETOSEL, "i", 772,165,20,20, &(cu->curinfo.flag), 0, 0, 0, 0, "");
+ uiDefButBitC(block, TOG, CU_BOLD, B_STYLETOSEL, "B", 752,165,20,20, &(cu->curinfo.flag), 0,0, 0, 0, "");
+ uiDefButBitC(block, TOG, CU_ITALIC, B_STYLETOSEL, "i", 772,165,20,20, &(cu->curinfo.flag), 0, 0, 0, 0, "");
uiBlockEndAlign(block);
MEM_freeN(strp);
@@ -837,7 +837,7 @@ static void editing_panel_font_type(Object *ob, Curve *cu)
uiDefButS(block, ROW,B_MAKEFONT, "Flush", 668,135,47,20, &cu->spacemode, 0.0,4.0, 0, 0, "Always fill to maximum textframe width");
uiDefBut(block, BUT, B_TOUPPER, "ToUpper", 715,135,78,20, 0, 0, 0, 0, 0, "Toggle between upper and lower case in editmode");
uiBlockEndAlign(block);
- uiDefButS(block, TOG|BIT|9,B_FASTFONT, "Fast Edit", 715,105,78,20, &cu->flag, 0, 0, 0, 0, "Don't fill polygons while editing");
+ uiDefButBitS(block, TOG, CU_FAST, B_FASTFONT, "Fast Edit", 715,105,78,20, &cu->flag, 0, 0, 0, 0, "Don't fill polygons while editing");
uiDefIDPoinBut(block, test_obpoin_but, B_TEXTONCURVE, "TextOnCurve:", 480,105,220,19, &cu->textoncurve, "Apply a deforming curve to the text");
uiDefBut(block, TEX,REDRAWVIEW3D, "Ob Family:", 480,84,220,19, cu->family, 0.0, 20.0, 0, 0, "Blender uses font from selfmade objects");
@@ -1113,9 +1113,9 @@ static void editing_panel_curve_type(Object *ob, Curve *cu)
block= uiNewBlock(&curarea->uiblocks, "editing_panel_curve_type", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Curve and Surface", "Editing", 320, 0, 318, 204)==0) return;
- uiDefButS(block, TOG|BIT|5, 0, "UV Orco", 600,160,150,19, &cu->flag, 0, 0, 0, 0, "Forces to use UV coordinates for texture mapping 'orco'");
+ uiDefButBitS(block, TOG, CU_UV_ORCO, 0, "UV Orco", 600,160,150,19, &cu->flag, 0, 0, 0, 0, "Forces to use UV coordinates for texture mapping 'orco'");
if(ob->type==OB_SURF)
- uiDefButS(block, TOG|BIT|6, REDRAWVIEW3D, "No Puno Flip", 600,140,150,19, &cu->flag, 0, 0, 0, 0, "Don't flip vertex normals while render");
+ uiDefButBitS(block, TOG, CU_NOPUNOFLIP, REDRAWVIEW3D, "No Puno Flip", 600,140,150,19, &cu->flag, 0, 0, 0, 0, "Don't flip vertex normals while render");
uiBlockBeginAlign(block);
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 600, 115, 150, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
@@ -1142,10 +1142,10 @@ static void editing_panel_curve_type(Object *ob, Curve *cu)
uiBlockBeginAlign(block);
uiDefButS(block, NUM, B_RECALCPATH, "PathLen:", 600,50,150,19, &cu->pathlen, 1.0, 9000.0, 0, 0, "If no speed Ipo was set, the amount of frames of the path");
- uiDefButS(block, TOG|BIT|3, B_RECALCPATH, "CurvePath", 600,30,75,19 , &cu->flag, 0, 0, 0, 0, "Enables curve to become translation path");
- uiDefButS(block, TOG|BIT|4, REDRAWVIEW3D, "CurveFollow",675,30,75,19, &cu->flag, 0, 0, 0, 0, "Makes curve path children to rotate along path");
- uiDefButS(block, TOG|BIT|7, B_CURVECHECK, "CurveStretch", 600,10,150,19, &cu->flag, 0, 0, 0, 0, "Option for curve-deform: makes deformed child to stretch along entire path");
- uiDefButS(block, TOG|BIT|8, REDRAWVIEW3D, "PathDist Offs", 600,-10,150,19, &cu->flag, 0, 0, 0, 0, "Children will use TimeOffs value as path distance offset");
+ uiDefButBitS(block, TOG, CU_PATH, B_RECALCPATH, "CurvePath", 600,30,75,19 , &cu->flag, 0, 0, 0, 0, "Enables curve to become translation path");
+ uiDefButBitS(block, TOG, CU_FOLLOW, REDRAWVIEW3D, "CurveFollow",675,30,75,19, &cu->flag, 0, 0, 0, 0, "Makes curve path children to rotate along path");
+ uiDefButBitS(block, TOG, CU_STRETCH, B_CURVECHECK, "CurveStretch", 600,10,150,19, &cu->flag, 0, 0, 0, 0, "Option for curve-deform: makes deformed child to stretch along entire path");
+ uiDefButBitS(block, TOG, CU_OFFS_PATHDIST, REDRAWVIEW3D, "PathDist Offs", 600,-10,150,19, &cu->flag, 0, 0, 0, 0, "Children will use TimeOffs value as path distance offset");
uiBlockEndAlign(block);
}
@@ -1164,9 +1164,9 @@ static void editing_panel_curve_type(Object *ob, Curve *cu)
uiBlockBeginAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButS(block, TOG|BIT|2, B_MAKEDISP, "Back", 760,130,50,19, &cu->flag, 0, 0, 0, 0, "Draw filled back for curves");
- uiDefButS(block, TOG|BIT|1, B_MAKEDISP, "Front",810,130,50,19, &cu->flag, 0, 0, 0, 0, "Draw filled front for curves");
- uiDefButS(block, TOG|BIT|0, B_CU3D, "3D", 860,130,50,19, &cu->flag, 0, 0, 0, 0, "Allow Curve Object to be 3d, it doesn't fill then");
+ uiDefButBitS(block, TOG, CU_BACK, B_MAKEDISP, "Back", 760,130,50,19, &cu->flag, 0, 0, 0, 0, "Draw filled back for curves");
+ uiDefButBitS(block, TOG, CU_FRONT, B_MAKEDISP, "Front",810,130,50,19, &cu->flag, 0, 0, 0, 0, "Draw filled front for curves");
+ uiDefButBitS(block, TOG, CU_3D, B_CU3D, "3D", 860,130,50,19, &cu->flag, 0, 0, 0, 0, "Allow Curve Object to be 3d, it doesn't fill then");
}
@@ -1202,8 +1202,8 @@ static void editing_panel_camera_type(Object *ob, Camera *cam)
uiDefButS(block, TOG, REDRAWVIEW3D, "Ortho", 470,29,61,60, &cam->type, 0, 0, 0, 0, "Render orthogonally");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|0,REDRAWVIEW3D, "ShowLimits", 533,59,97,30, &cam->flag, 0, 0, 0, 0, "Draw the field of view");
- uiDefButS(block, TOG|BIT|1,REDRAWVIEW3D, "Show Mist", 533,29,97,30, &cam->flag, 0, 0, 0, 0, "Draw a line that indicates the mist area");
+ uiDefButBitS(block, TOG, CAM_SHOWLIMITS, REDRAWVIEW3D, "ShowLimits", 533,59,97,30, &cam->flag, 0, 0, 0, 0, "Draw the field of view");
+ uiDefButBitS(block, TOG, CAM_SHOWMIST, REDRAWVIEW3D, "Show Mist", 533,29,97,30, &cam->flag, 0, 0, 0, 0, "Draw a line that indicates the mist area");
uiBlockEndAlign(block);
}
@@ -1220,7 +1220,7 @@ static void editing_panel_camera_yafraydof(Object *ob, Camera *cam)
uiDefButF(block, NUM, REDRAWVIEW3D, "DoFDist:", 10, 147, 180, 20, &cam->YF_dofdist, 0.0, 5000.0, 50, 0, "Sets distance to point of focus (use camera 'ShowLimits' to make visible in 3Dview)");
uiDefButF(block, NUM, B_DIFF, "Aperture:", 10, 125, 180, 20, &cam->YF_aperture, 0.0, 2.0, 1, 0, "Sets lens aperture, the larger, the more blur (use small values, 0 is no DoF)");
- uiDefButS(block, TOG|BIT|2, B_DIFF, "Random sampling", 10, 90, 180, 20, &cam->flag, 0, 0, 0, 0, "Use noisy random Lens sampling instead of QMC");
+ uiDefButBitS(block, TOG, CAM_YF_NO_QMC, B_DIFF, "Random sampling", 10, 90, 180, 20, &cam->flag, 0, 0, 0, 0, "Use noisy random Lens sampling instead of QMC");
uiDefBut(block, LABEL, 0, "Bokeh", 10, 60, 180, 19, 0, 0.0, 0.0, 0, 0, "");
mst1 = "Bokeh Type%t|Disk1%x0|Disk2%x1|Triangle%x2|Square%x3|Pentagon%x4|Hexagon%x5|Ring%x6";
@@ -1319,8 +1319,8 @@ static void editing_panel_mball_tools(Object *ob, MetaBall *mb)
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|1, B_RECALCMBALL, "Negative",753,16,125,19, &lastelem->flag, 0, 0, 0, 0, "Make active meta creating holes");
- uiDefButS(block, TOG|BIT|3, B_RECALCMBALL, "Hide",878,16,125,19, &lastelem->flag, 0, 0, 0, 0, "Make active meta invisible");
+ uiDefButBitS(block, TOG, MB_NEGATIVE, B_RECALCMBALL, "Negative",753,16,125,19, &lastelem->flag, 0, 0, 0, 0, "Make active meta creating holes");
+ uiDefButBitS(block, TOG, MB_HIDE, B_RECALCMBALL, "Hide",878,16,125,19, &lastelem->flag, 0, 0, 0, 0, "Make active meta invisible");
uiBlockEndAlign(block);
}
@@ -1397,7 +1397,7 @@ static void editing_panel_lattice_type(Object *ob, Lattice *lt)
uiDefBut(block, BUT, B_RESIZELAT, "Make Regular", 469,98,102,31, 0, 0, 0, 0, 0, "Make Lattice regular");
uiClearButLock();
- uiDefButS(block, TOG|BIT|1, B_LATTCHANGED, "Outside", 571,98,122,31, &lt->flag, 0, 0, 0, 0, "Only draw, and take into account, the outer vertices");
+ uiDefButBitS(block, TOG, LT_OUTSIDE, B_LATTCHANGED, "Outside", 571,98,122,31, &lt->flag, 0, 0, 0, 0, "Only draw, and take into account, the outer vertices");
if(lt->key) {
uiDefButS(block, NUM, B_DIFF, "Slurph:", 469,60,120,19, &(lt->key->slurph), -500.0, 500.0, 0, 0, "Set time value to denote 'slurph' (sequential delay) vertices with key framing");
@@ -1543,19 +1543,18 @@ static void editing_panel_armature_type(Object *ob, bArmature *arm)
if(uiNewPanel(curarea, block, "Armature", "Editing", 320, 0, 318, 204)==0) return;
uiBlockBeginAlign(block);
- but = uiDefButI(block, TOG|BIT|ARM_RESTPOSBIT,REDRAWVIEW3D,
+ but = uiDefButBitI(block, TOG, ARM_RESTPOS, REDRAWVIEW3D,
"Rest Position", 10,180,150,20, &arm->flag, 0, 0, 0, 0, "Disable all animation for this object");
uiButSetFunc(but, armature_recalc_func, ob, NULL);
- uiDefButI(block, TOG|BIT|ARM_DELAYBIT,REDRAWVIEW3D, "Delay Deform", 160, 180,150,20, &arm->flag, 0, 0, 0, 0, "Don't deform children when manipulating bones in pose mode");
-
+ uiDefButBitI(block, TOG, ARM_DELAYDEFORM, REDRAWVIEW3D, "Delay Deform", 160, 180,150,20, &arm->flag, 0, 0, 0, 0, "Don't deform children when manipulating bones in pose mode");
uiBlockBeginAlign(block);
uiDefButI(block, ROW, REDRAWVIEW3D, "Octahedron", 10, 140,100,20, &arm->drawtype, 0, ARM_OCTA, 0, 0, "Draw bone as octahedra");
uiDefButI(block, ROW, REDRAWVIEW3D, "Sticks", 110, 140,100,20, &arm->drawtype, 0, ARM_LINE, 0, 0, "Draw bone as simple 2d lines with dots");
uiDefButI(block, ROW, REDRAWVIEW3D, "B-Bones", 210, 140,100,20, &arm->drawtype, 0, ARM_B_BONE, 0, 0, "Draw bone as boxes, showing subdivision and b-splines");
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|ARM_DRAWAXESBIT,REDRAWVIEW3D, "Draw Axes", 10, 110,100,20, &arm->flag, 0, 0, 0, 0, "Draw bone axes");
- uiDefButI(block, TOG|BIT|ARM_DRAWNAMESBIT,REDRAWVIEW3D, "Draw Names", 110,110,100,20, &arm->flag, 0, 0, 0, 0, "Draw bone names");
+ uiDefButBitI(block, TOG, ARM_DRAWAXES, REDRAWVIEW3D, "Draw Axes", 10, 110,100,20, &arm->flag, 0, 0, 0, 0, "Draw bone axes");
+ uiDefButBitI(block, TOG, ARM_DRAWNAMES, REDRAWVIEW3D, "Draw Names", 110,110,100,20, &arm->flag, 0, 0, 0, 0, "Draw bone names");
uiDefButBitC(block, TOG, OB_DRAWXRAY,REDRAWVIEW3D, "X-Ray", 210,110,100,20, &ob->dtx, 0, 0, 0, 0, "Draw armature in front of solid objects");
}
@@ -1613,7 +1612,7 @@ static void editing_panel_armature_bones(Object *ob, bArmature *arm)
/* bone types */
uiDefButBitI(block, TOG, BONE_HINGE, REDRAWVIEW3D, "Hinge", bx-10,by-38,117,18, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Don't inherit rotation or scale from parent Bone");
- uiDefButS(block, TOGN|BIT|0,REDRAWVIEW3D, "Skinnable", bx+110, by-38, 105, 18, &curBone->boneclass, 0.0, 0.0, 0.0, 0.0, "Indicate if Bone is included in automatic creation of vertex groups");
+ uiDefButBitS(block, TOGN, 1,REDRAWVIEW3D, "Skinnable", bx+110, by-38, 105, 18, &curBone->boneclass, 0.0, 0.0, 0.0, 0.0, "Indicate if Bone is included in automatic creation of vertex groups");
/* Hide in posemode flag */
uiDefButBitI(block, TOG, BONE_HIDDEN, REDRAWVIEW3D, "Hide", bx+223,by-38,110,18, &curBone->flag, 0, 0, 0, 0, "Toggles display of this bone in posemode");
@@ -1653,7 +1652,7 @@ static void editing_panel_pose_bones(Object *ob, bArmature *arm)
for (pchan=ob->pose->chanbase.first, index=0; pchan; pchan=pchan->next, index++){
curBone= pchan->bone;
if (curBone->flag & (BONE_SELECTED)) {
-
+
/* Bone naming button */
uiBlockBeginAlign(block);
but=uiDefBut(block, TEX, REDRAWVIEW3D, "BO:", bx-10,by,117,18, &curBone->name, 0, 24, 0, 0, "Change the bone name");
@@ -1673,10 +1672,9 @@ static void editing_panel_pose_bones(Object *ob, bArmature *arm)
/* bone types */
but= uiDefButBitI(block, TOG, BONE_HINGE, REDRAWVIEW3D, "Hinge", bx-10,by-38,117,18, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Don't inherit rotation or scale from parent Bone");
uiButSetFunc(but, armature_recalc_func, ob, NULL);
- uiDefButS(block, TOGN|BIT|0,REDRAWVIEW3D, "Skinnable", bx+110, by-38, 105, 18, &curBone->boneclass, 0.0, 0.0, 0.0, 0.0, "Indicate if Bone is included in automatic creation of vertex groups");
+ uiDefButBitS(block, TOGN, 1,REDRAWVIEW3D, "Skinnable", bx+110, by-38, 105, 18, &curBone->boneclass, 0.0, 0.0, 0.0, 0.0, "Indicate if Bone is included in automatic creation of vertex groups");
/* Hide in posemode flag */
uiDefButBitI(block, TOG, BONE_HIDDEN, REDRAWVIEW3D, "Hide", bx+223,by-38,110,18, &curBone->flag, 0, 0, 0, 0, "Toggles display of this bone in posemode");
-
uiBlockEndAlign(block);
by-=60;
@@ -1907,8 +1905,8 @@ static void editing_panel_mesh_tools(Object *ob, Mesh *me)
if(uiNewPanel(curarea, block, "Mesh Tools", "Editing", 640, 0, 318, 204)==0) return;
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|2, 0, "Beauty", 10,195,40,19, &editbutflag, 0, 0, 0, 0, "Causes 'Subdivide' to split faces in halves instead of quarters using Long Edges Unless short is selected");
- uiDefButS(block, TOG|BIT|4, 0, "Short", 50,195,40,19, &editbutflag, 0, 0, 0, 0, "Causes 'Subdivide' to split faces in halves instead of quarters using Short Edges");
+ uiDefButBitS(block, TOG, B_BEAUTY, 0, "Beauty", 10,195,40,19, &editbutflag, 0, 0, 0, 0, "Causes 'Subdivide' to split faces in halves instead of quarters using Long Edges Unless short is selected");
+ uiDefButBitS(block, TOG, B_BEAUTY_SHORT, 0, "Short", 50,195,40,19, &editbutflag, 0, 0, 0, 0, "Causes 'Subdivide' to split faces in halves instead of quarters using Short Edges");
uiDefBut(block, BUT,B_SUBDIV,"Subdivide", 90,195,80,19, 0, 0, 0, 0, 0, "Splits selected faces into halves or quarters");
uiDefBut(block, BUT,B_FRACSUBDIV, "Fract Subd", 170,195,85,19, 0, 0, 0, 0, 0, "Subdivides selected faces with a random factor");
@@ -1936,8 +1934,8 @@ static void editing_panel_mesh_tools(Object *ob, Mesh *me)
uiDefButS(block, NUM, B_DIFF, "Degr:", 10,55,80,19, &degr,10.0,360.0, 0, 0, "Specifies the number of degrees 'Spin' revolves");
uiDefButS(block, NUM, B_DIFF, "Steps:", 90,55,80,19, &step,1.0,180.0, 0, 0, "Specifies the total number of 'Spin' slices");
uiDefButS(block, NUM, B_DIFF, "Turns:", 170,55,85,19, &turn,1.0,360.0, 0, 0, "Specifies the number of revolutions the screw turns");
- uiDefButS(block, TOG|BIT|1, B_DIFF, "Keep Original",10,35,160,19, &editbutflag, 0, 0, 0, 0, "Keeps a copy of the original vertices and faces after executing tools");
- uiDefButS(block, TOG|BIT|0, B_DIFF, "Clockwise", 170,35,85,19, &editbutflag, 0, 0, 0, 0, "Specifies the direction for 'Screw' and 'Spin'");
+ uiDefButBitS(block, TOG, B_KEEPORIG, B_DIFF, "Keep Original",10,35,160,19, &editbutflag, 0, 0, 0, 0, "Keeps a copy of the original vertices and faces after executing tools");
+ uiDefButBitS(block, TOG, B_CLOCKWISE, B_DIFF, "Clockwise", 170,35,85,19, &editbutflag, 0, 0, 0, 0, "Specifies the direction for 'Screw' and 'Spin'");
uiBlockBeginAlign(block);
uiDefBut(block, BUT,B_EXTREP, "Extrude Dup", 10,10,120,19, 0, 0, 0, 0, 0, "Creates copies of the selected vertices in a straight line away from the current viewport");
@@ -2099,7 +2097,7 @@ static void editing_panel_links(Object *ob)
if(ob->type==OB_MESH) poin= &( ((Mesh *)ob->data)->texflag );
else if(ob->type==OB_MBALL) poin= &( ((MetaBall *)ob->data)->texflag );
else poin= &( ((Curve *)ob->data)->texflag );
- uiDefButI(block, TOG|BIT|0, B_AUTOTEX, "AutoTexSpace", 143,15,140,19, poin, 0, 0, 0, 0, "Adjusts active object's texture space automatically when transforming object");
+ uiDefButBitI(block, TOG, AUTOSPACE, B_AUTOTEX, "AutoTexSpace", 143,15,140,19, poin, 0, 0, 0, 0, "Adjusts active object's texture space automatically when transforming object");
sprintf(str,"%d Mat ", ob->totcol);
if(ob->totcol) min= 1.0; else min= 0.0;
@@ -2366,10 +2364,10 @@ static void editing_panel_mesh_paint(void)
uiDefButS(block, ROW, B_DIFF, "Filter", 1212, 80,63,19, &Gvp.mode, 1.0, 4.0, 0, 0, "Mix the colours with an alpha factor");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|1, 0, "Area", 979,50,81,19, &Gvp.flag, 0, 0, 0, 0, "Vertex paint evaluates the area of the face the brush covers (otherwise vertices only)");
- uiDefButS(block, TOG|BIT|2, 0, "Soft", 1061,50,112,19, &Gvp.flag, 0, 0, 0, 0, "Use a soft brush");
- uiDefButS(block, TOG|BIT|3, 0, "Normals", 1174,50,102,19, &Gvp.flag, 0, 0, 0, 0, "Vertex paint applies the vertex normal before painting");
-
+ uiDefButBitS(block, TOG, VP_AREA, 0, "Area", 979,50,81,19, &Gvp.flag, 0, 0, 0, 0, "Vertex paint evaluates the area of the face the brush covers (otherwise vertices only)");
+ uiDefButBitS(block, TOG, VP_SOFT, 0, "Soft", 1061,50,112,19, &Gvp.flag, 0, 0, 0, 0, "Use a soft brush");
+ uiDefButBitS(block, TOG, VP_NORMALS, 0, "Normals", 1174,50,102,19, &Gvp.flag, 0, 0, 0, 0, "Vertex paint applies the vertex normal before painting");
+
uiBlockBeginAlign(block);
uiDefBut(block, BUT, B_VPGAMMA, "Set", 979,30,81,19, 0, 0, 0, 0, 0, "Apply Mul and Gamma to vertex colours");
uiDefButF(block, NUM, B_DIFF, "Mul:", 1061,30,112,19, &Gvp.mul, 0.1, 50.0, 10, 0, "Set the number to multiply vertex colours with");
@@ -2394,22 +2392,23 @@ static void editing_panel_mesh_texface(void)
if(lasttface) {
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|2, B_REDR_3D_IMA, "Tex", 600,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Render face with texture");
- uiDefButS(block, TOG|BIT|7, B_REDR_3D_IMA, "Tiles", 660,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use tilemode for face");
- uiDefButS(block, TOG|BIT|4, REDRAWVIEW3D, "Light", 720,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use light for face");
- uiDefButS(block, TOG|BIT|10, REDRAWVIEW3D, "Invisible",780,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Make face invisible");
- uiDefButS(block, TOG|BIT|0, REDRAWVIEW3D, "Collision", 840,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use face for collision detection");
+ uiDefButBitS(block, TOG, TF_TEX, B_REDR_3D_IMA, "Tex", 600,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Render face with texture");
+ uiDefButBitS(block, TOG, TF_TILES, B_REDR_3D_IMA, "Tiles", 660,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use tilemode for face");
+ uiDefButBitS(block, TOG, TF_LIGHT, REDRAWVIEW3D, "Light", 720,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use light for face");
+ uiDefButBitS(block, TOG, TF_INVISIBLE, REDRAWVIEW3D, "Invisible",780,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Make face invisible");
+ uiDefButBitS(block, TOG, TF_DYNAMIC, REDRAWVIEW3D, "Collision", 840,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use face for collision detection");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|6, REDRAWVIEW3D, "Shared", 600,135,60,19, &lasttface->mode, 0, 0, 0, 0, "Blend vertex colours across face when vertices are shared");
- uiDefButS(block, TOG|BIT|9, REDRAWVIEW3D, "Twoside",660,135,60,19, &lasttface->mode, 0, 0, 0, 0, "Render face twosided");
- uiDefButS(block, TOG|BIT|11, REDRAWVIEW3D, "ObColor",720,135,60,19, &lasttface->mode, 0, 0, 0, 0, "Use ObColor instead of vertex colours");
+ uiDefButBitS(block, TOG, TF_SHAREDCOL, REDRAWVIEW3D, "Shared", 600,135,60,19, &lasttface->mode, 0, 0, 0, 0, "Blend vertex colours across face when vertices are shared");
+ uiDefButBitS(block, TOG, TF_TWOSIDE, REDRAWVIEW3D, "Twoside",660,135,60,19, &lasttface->mode, 0, 0, 0, 0, "Render face twosided");
+ uiDefButBitS(block, TOG, TF_OBCOL, REDRAWVIEW3D, "ObColor",720,135,60,19, &lasttface->mode, 0, 0, 0, 0, "Use ObColor instead of vertex colours");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|8, B_TFACE_HALO, "Halo", 600,110,60,19, &lasttface->mode, 0, 0, 0, 0, "Screen aligned billboard");
- uiDefButS(block, TOG|BIT|12, B_TFACE_BILLB, "Billboard",660,110,60,19, &lasttface->mode, 0, 0, 0, 0, "Billboard with Z-axis constraint");
- uiDefButS(block, TOG|BIT|13, REDRAWVIEW3D, "Shadow", 720,110,60,19, &lasttface->mode, 0, 0, 0, 0, "Face is used for shadow");
- uiDefButS(block, TOG|BIT|14, REDRAWVIEW3D, "Text", 780,110,60,19, &lasttface->mode, 0, 0, 0, 0, "Enable bitmap text on face");
+
+ uiDefButBitS(block, TOG, TF_BILLBOARD, B_TFACE_HALO, "Halo", 600,110,60,19, &lasttface->mode, 0, 0, 0, 0, "Screen aligned billboard");
+ uiDefButBitS(block, TOG, TF_BILLBOARD2, B_TFACE_BILLB, "Billboard",660,110,60,19, &lasttface->mode, 0, 0, 0, 0, "Billboard with Z-axis constraint");
+ uiDefButBitS(block, TOG, TF_SHADOW, REDRAWVIEW3D, "Shadow", 720,110,60,19, &lasttface->mode, 0, 0, 0, 0, "Face is used for shadow");
+ uiDefButBitS(block, TOG, TF_BMFONT, REDRAWVIEW3D, "Text", 780,110,60,19, &lasttface->mode, 0, 0, 0, 0, "Enable bitmap text on face");
uiBlockBeginAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
@@ -2489,10 +2488,10 @@ static void editing_panel_mesh_uvautocalculation(void)
row-= 2*butHB+butS;
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|7, REDRAWVIEW3D, "Draw Faces", 100,row,200,butH, &G.f, 0, 0, 0, 0, "Displays all faces as shades");
- uiDefButI(block,TOG|BIT|18,REDRAWVIEW3D,"Draw Edges",100,row-butHB,200,butH,&G.f, 2.0, 0, 0, 0, "Displays edges of visible faces");
- uiDefButI(block,TOG|BIT|21,REDRAWVIEW3D,"Draw Hidden Edges",100,row-2*butHB,200,butH,&G.f, 2.0, 1.0, 0, 0, "Displays edges of hidden faces");
- uiDefButI(block,TOG|BIT|20,REDRAWVIEW3D,"Draw Seams",100,row-3*butHB,200,butH,&G.f, 2.0, 2.0, 0, 0, "Displays UV unwrapping seams");
+ uiDefButBitI(block, TOG, G_DRAWFACES, REDRAWVIEW3D, "Draw Faces", 100,row,200,butH, &G.f, 0, 0, 0, 0, "Displays all faces as shades");
+ uiDefButBitI(block,TOG, G_DRAWEDGES, REDRAWVIEW3D,"Draw Edges",100,row-butHB,200,butH,&G.f, 2.0, 0, 0, 0, "Displays edges of visible faces");
+ uiDefButBitI(block,TOG, G_HIDDENEDGES, REDRAWVIEW3D,"Draw Hidden Edges",100,row-2*butHB,200,butH,&G.f, 2.0, 1.0, 0, 0, "Displays edges of hidden faces");
+ uiDefButBitI(block,TOG, G_DRAWSEAMS, REDRAWVIEW3D,"Draw Seams",100,row-3*butHB,200,butH,&G.f, 2.0, 2.0, 0, 0, "Displays UV unwrapping seams");
uiBlockEndAlign(block);
row-= 4*butHB+butS;
diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c
index 82f93e9665e..5a870aec255 100644
--- a/source/blender/src/buttons_logic.c
+++ b/source/blender/src/buttons_logic.c
@@ -945,7 +945,7 @@ static void set_col_sensor(int type, int medium)
}
/**
- * Draws a toggle for pulse mode, a frequency fiels and a toggle to invert
+ * Draws a toggle for pulse mode, a frequency field and a toggle to invert
* the value of this sensor. Operates on the shared data block of sensors.
*/
static void draw_default_sensor_header(bSensor *sens,
@@ -955,11 +955,11 @@ static void draw_default_sensor_header(bSensor *sens,
short w)
{
/* Pulsing and frequency */
- uiDefIconButS(block, TOG|BIT|0, 1, ICON_DOTSUP,
+ uiDefIconButBitS(block, TOG, SENS_PULSE_CONT, 1, ICON_DOTSUP,
(short)(x + 10), (short)(y - 19), (short)(0.15 * (w-20)), 19,
&sens->pulse, 0.0, 0.0, 0, 0,
"Activate TRUE pulse mode");
- uiDefIconButS(block, TOG|BIT|2, 1, ICON_DOTSDOWN,
+ uiDefIconButBitS(block, TOG, SENS_NEG_PULSE_MODE, 1, ICON_DOTSDOWN,
(short)(x + 10 + 0.15 * (w-20)), (short)(y - 19), (short)(0.15 * (w-20)), 19,
&sens->pulse, 0.0, 0.0, 0, 0,
"Activate FALSE pulse mode");
@@ -1042,7 +1042,8 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
/* The collision sensor will become a generic collision (i.e. it */
/* absorb the old touch sensor). */
- uiDefButS(block, TOG|BIT|0, B_REDR, "M/P",(short)(xco + 10),(short)(yco - 44),
+
+ uiDefButBitS(block, TOG, SENS_COLLISION_MATERIAL, B_REDR, "M/P",(short)(xco + 10),(short)(yco - 44),
(short)(0.20 * (width-20)), 19, &cs->mode, 0.0, 0.0, 0, 0,
"Toggle collision on material or property.");
@@ -1143,7 +1144,7 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
/* part of line 1 */
uiBlockSetCol(block, TH_BUT_SETTING2);
- uiDefButS(block, TOG|BIT|0, 0, "All keys", xco+40+(width/2), yco-44, (width/2)-50, 19,
+ uiDefButBitS(block, TOG, 1, 0, "All keys", xco+40+(width/2), yco-44, (width/2)-50, 19,
&ks->type, 0, 0, 0, 0, "");
/* line 4: toggle property for string logging mode */
@@ -1254,7 +1255,7 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
raySens = sens->data;
/* 1. property or material */
- uiDefButS(block, TOG|BIT|0, B_REDR, "M/P",
+ uiDefButBitS(block, TOG, SENS_COLLISION_MATERIAL, B_REDR, "M/P",
xco + 10,yco - 44, 0.20 * (width-20), 19,
&raySens->mode, 0.0, 0.0, 0, 0,
"Toggle collision on material or property.");
@@ -1529,14 +1530,14 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
uiDefButF(block, NUM, 0, "", xco+45+wval, yco-125, wval, 19, oa->angularvelocity+1, -10000.0, 10000.0, 10, 0, "");
uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-125, wval, 19, oa->angularvelocity+2, -10000.0, 10000.0, 10, 0, "");
- uiDefButI(block, TOG|BIT|0, 0, "L", xco+45+3*wval, yco-22, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
- uiDefButI(block, TOG|BIT|1, 0, "L", xco+45+3*wval, yco-41, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
- uiDefButI(block, TOG|BIT|2, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
- uiDefButI(block, TOG|BIT|3, 0, "L", xco+45+3*wval, yco-83, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
- uiDefButI(block, TOG|BIT|4, 0, "L", xco+45+3*wval, yco-106, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
- uiDefButI(block, TOG|BIT|5, 0, "L", xco+45+3*wval, yco-125, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitI(block, TOG, ACT_FORCE_LOCAL, 0, "L", xco+45+3*wval, yco-22, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitI(block, TOG, ACT_TORQUE_LOCAL, 0, "L", xco+45+3*wval, yco-41, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitI(block, TOG, ACT_DLOC_LOCAL, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitI(block, TOG, ACT_DROT_LOCAL, 0, "L", xco+45+3*wval, yco-83, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitI(block, TOG, ACT_LIN_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-106, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
+ uiDefButBitI(block, TOG, ACT_ANG_VEL_LOCAL, 0, "L", xco+45+3*wval, yco-125, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
- uiDefButI(block, TOG|BIT|6, 0, "add",xco+45+3*wval+15, yco-106, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV");
+ uiDefButBitI(block, TOG, ACT_ADD_LIN_VEL, 0, "add",xco+45+3*wval+15, yco-106, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV");
yco-= ysize;
break;
@@ -1594,10 +1595,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
{
ia= act->data;
- if(ia->type==ACT_IPO_KEY2KEY)
- ysize= 72;
- else
- ysize= 52;
+ ysize= 52;
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
@@ -1605,23 +1603,11 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
str = "Ipo types %t|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6";
uiDefButS(block, MENU, B_REDR, str, xco+20, yco-24, width-40 - (width-40)/3, 19, &ia->type, 0, 0, 0, 0, "");
- uiDefButS(block, TOG|BIT|ACT_IPOCHILD_BIT, B_REDR,
+ uiDefButBitS(block, TOG, ACT_IPOCHILD, B_REDR,
"Child", xco+20+0.666*(width-40), yco-24, (width-40)/3, 19,
&ia->flag, 0, 0, 0, 0,
"Add all children Objects as well");
- /*
- Key2key was disabled.... the settings below should not be reused without
- thought, because they interfere with other variables.
-
- if(ia->type==ACT_IPO_KEY2KEY) {
-
- uiDefButS(block, TOG|BIT|0, 0, "Prev", xco+20, yco-44, (width-40)/3, 19, &ia->flag, 0, 0, 0, 0, "Play backwards");
- uiDefButS(block, TOG|BIT|1, 0, "Cycl", xco+20+(width-40)/3, yco-44, (width-40)/3, 19, &ia->flag, 0, 0, 0, 0, "Play cyclic");
- uiDefButS(block, TOG|BIT|3, 0, "Hold", xco+20+2*(width-40)/3, yco-44, (width-40)/3, 19, &ia->flag, 0, 0, 0, 0, "Keep playing while activated");
-
- uiDefBut(block, TEX, 0, "Prop: ", xco+20, yco-66, width-40, 19, ia->name, 0.0, 31.0, 0, 0, "Set property to key position");
- } else
- */
+
if(ia->type==ACT_IPO_FROM_PROP) {
uiDefBut(block, TEX, 0,
"Prop: ", xco+20, yco-44, width-40, 19,
@@ -1638,14 +1624,14 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
&ia->end, 0.0, MAXFRAMEF, 0, 0,
"End frame");
- uiDefButS(block, TOG|BIT|ACT_IPOFORCE_BIT, B_REDR,
+ uiDefButBitS(block, TOG, ACT_IPOFORCE, B_REDR,
"Force", xco+width-78, yco-44, 43, 19,
&ia->flag, 0, 0, 0, 0,
"Convert Ipo to force");
/* Only show the do-force-local toggle if force is requested */
if (ia->flag & ACT_IPOFORCE) {
- uiDefButS(block, TOG|BIT|ACT_IPOFORCE_LOCAL_BIT, 0,
+ uiDefButBitS(block, TOG, ACT_IPOFORCE_LOCAL, 0,
"L", xco+width-35, yco-44, 15, 19,
&ia->flag, 0, 0, 0, 0,
"Let the force-ipo act in local coordinates.");
@@ -1799,7 +1785,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-68, wval, 19,
eoa->linVelocity+2, -100.0, 100.0, 10, 0,
"Velocity upon creation, z component.");
- uiDefButS(block, TOG|BIT|1, 0, "L", xco+45+3*wval, yco-68, 15, 19,
+ uiDefButBitS(block, TOG, 2, 0, "L", xco+45+3*wval, yco-68, 15, 19,
&eoa->localflag, 0.0, 0.0, 0, 0,
"Apply the transformation locally");
@@ -2016,7 +2002,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
0.0, 0.0, 0, 0,
"Make the object invisible or visible.");
/*
- uiDefButI(block, TOG|BIT|ACT_VISIBILITY_INVISIBLE_BIT, 0,
+ uiDefButBitI(block, TOG, ACT_VISIBILITY_INVISIBLE, 0,
"Invisible",
xco + 10, yco - 24, width - 20, 19, &visAct->flag,
0.0, 0.0, 0, 0,
@@ -2060,7 +2046,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
/*4. and 5. arguments for the distribution*/
switch (randAct->distribution) {
case ACT_RANDOM_BOOL_CONST:
- uiDefButI(block, TOG|BIT|0, 1, "Always true", (xco+10), yco-64, (width-20), 19,
+ uiDefButBitI(block, TOG, 1, 1, "Always true", (xco+10), yco-64, (width-20), 19,
&randAct->int_arg_1, 2.0, 1, 0, 0,
"Always false or always true");
break;
@@ -2165,7 +2151,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
"Optional message subject. This is what can be filtered on.");
/* line 3: Text/Property */
- uiDefButS(block, TOG|BIT|0, B_REDR, "T/P",
+ uiDefButBitS(block, TOG, 1, B_REDR, "T/P",
(xco+10),(yco-(myline*24)), (0.20 * (width-20)), 19,
&ma->bodyType, 0.0, 0.0, 0, 0,
"Toggle message type: either Text or a PropertyName.");
@@ -2350,42 +2336,42 @@ static uiBlock *actuator_menu(void *arg_unused)
void buttons_enji(uiBlock *block, Object *ob)
{
- uiDefBut(block, TOG|INT|BIT|13, B_SETSECTOR, "Sector",
+ uiDefButBitI(block, TOG, OB_SECTOR, B_SETSECTOR, "Sector",
10,205,65,19, &ob->gameflag, 0, 0, 0, 0,
"All game elements should be in the Sector boundbox");
- uiDefBut(block, TOG|INT|BIT|14, B_SETPROP, "Prop",
+ uiDefButBitI(block, TOG, OB_PROP, B_SETPROP, "Prop",
75,205,65,19, &ob->gameflag, 0, 0, 0, 0,
"An Object fixed within a sector");
uiBlockSetCol(block, BUTPURPLE);
- uiDefBut(block, TOG|INT|BIT|2, B_SETACTOR, "Actor",
+ uiDefButBitI(block, TOG, OB_ACTOR, B_SETACTOR, "Actor",
140,205,65,19, &ob->gameflag, 0, 0, 0, 0,
"Objects that are evaluated by the engine ");
if(ob->gameflag & OB_ACTOR) {
- uiDefBut(block, TOG|INT|BIT|0, B_SETDYNA, "Dynamic",
+ uiDefButBitI(block, TOG, OB_DYNAMIC, B_SETDYNA, "Dynamic",
205,205,75,19, &ob->gameflag, 0, 0, 0, 0,
"Motion defined by laws of physics");
- uiDefBut(block, TOG|INT|BIT|15, B_SETMAINACTOR, "MainActor",
+ uiDefButBitI(block, TOG, OB_MAINACTOR, B_SETMAINACTOR, "MainActor",
280,205,70,19, &ob->gameflag, 0, 0, 0, 0, "");
if(ob->gameflag & OB_DYNAMIC) {
- uiDefBut(block, TOG|INT|BIT|6, B_DIFF, "Do Fh",
+ uiDefButBitI(block, TOG, OB_DO_FH, B_DIFF, "Do Fh",
10,185,50,19, &ob->gameflag, 0, 0, 0, 0,
"Use Fh settings in Materials");
- uiDefBut(block, TOG|INT|BIT|7, B_DIFF, "Rot Fh",
+ uiDefButBitI(block, TOG, OB_ROT_FH, B_DIFF, "Rot Fh",
60,185,50,19, &ob->gameflag, 0, 0, 0, 0,
"Use face normal to rotate Object");
uiBlockSetCol(block, BUTGREY);
- uiDefBut(block, NUM|FLO, B_DIFF, "Mass:",
+ uiDefButF(block, NUM, B_DIFF, "Mass:",
110, 185, 120, 19, &ob->mass, 0.01, 100.0, 10, 0,
"The mass of the Object");
- uiDefBut(block, NUM|FLO, REDRAWVIEW3D, "Size:",
+ uiDefButF(block, NUM, REDRAWVIEW3D, "Size:",
230, 185, 120, 19, &ob->inertia, 0.01, 10.0, 10, 0,
"Bounding sphere size");
- uiDefBut(block, NUM|FLO, B_DIFF, "Damp:",
+ uiDefButF(block, NUM, B_DIFF, "Damp:",
10, 165, 100, 19, &ob->damping, 0.0, 1.0, 10, 0,
"General movement damping");
- uiDefBut(block, NUM|FLO, B_DIFF, "RotDamp:",
+ uiDefButF(block, NUM, B_DIFF, "RotDamp:",
110, 165, 120, 19, &ob->rdamping, 0.0, 1.0, 10, 0,
"General rotation damping");
}
@@ -2395,25 +2381,25 @@ void buttons_enji(uiBlock *block, Object *ob)
void buttons_ketsji(uiBlock *block, Object *ob)
{
- uiDefButI(block, TOG|BIT|2, B_REDR, "Actor",
+ uiDefButBitI(block, TOG, OB_ACTOR, B_REDR, "Actor",
10,205,75,19, &ob->gameflag, 0, 0, 0, 0,
"Objects that are evaluated by the engine ");
if(ob->gameflag & OB_ACTOR) {
- uiDefButI(block, TOG|BIT|9, B_REDR, "Ghost", 85,205,65,19,
+ uiDefButBitI(block, TOG, OB_GHOST, B_REDR, "Ghost", 85,205,65,19,
&ob->gameflag, 0, 0, 0, 0,
"Objects that don't restitute collisions (like a ghost)");
- uiDefButI(block, TOG|BIT|0, B_REDR, "Dynamic", 150,205,65,19,
+ uiDefButBitI(block, TOG, OB_DYNAMIC, B_REDR, "Dynamic", 150,205,65,19,
&ob->gameflag, 0, 0, 0, 0,
"Motion defined by laws of physics");
if(ob->gameflag & OB_DYNAMIC) {
- uiDefButI(block, TOG|BIT|10, B_REDR, "Rigid Body", 215,205,135,19,
+ uiDefButBitI(block, TOG, OB_RIGID_BODY, B_REDR, "Rigid Body", 215,205,135,19,
&ob->gameflag, 0, 0, 0, 0,
"Enable rolling physics");
- uiDefButI(block, TOG|BIT|6, B_DIFF, "Do Fh", 10,185,50,19,
+ uiDefButBitI(block, TOG, OB_DO_FH, B_DIFF, "Do Fh", 10,185,50,19,
&ob->gameflag, 0, 0, 0, 0,
"Use Fh settings in Materials");
- uiDefButI(block, TOG|BIT|7, B_DIFF, "Rot Fh", 60,185,50,19,
+ uiDefButBitI(block, TOG, OB_ROT_FH, B_DIFF, "Rot Fh", 60,185,50,19,
&ob->gameflag, 0, 0, 0, 0,
"Use face normal to rotate Object");
uiDefButF(block, NUM, B_DIFF, "Mass:", 110, 185, 80, 19,
@@ -2432,7 +2418,7 @@ void buttons_ketsji(uiBlock *block, Object *ob)
uiDefButF(block, NUM, B_DIFF, "RotDamp:", 110, 165, 120, 19,
&ob->rdamping, 0.0, 1.0, 10, 0,
"General rotation damping");
- uiDefButI(block, TOG|BIT|8, B_REDR, "Anisotropic",
+ uiDefButBitI(block, TOG, OB_ANISOTROPIC_FRICTION, B_REDR, "Anisotropic",
230, 165, 120, 19,
&ob->gameflag, 0.0, 1.0, 10, 0,
"Enable anisotropic friction");
@@ -2452,7 +2438,7 @@ void buttons_ketsji(uiBlock *block, Object *ob)
}
if (!(ob->gameflag & OB_GHOST)) {
- uiDefButI(block, TOG|BIT|11, B_REDR, "Bounds", 10, 125, 75, 19,
+ uiDefButBitI(block, TOG, OB_BOUNDS, B_REDR, "Bounds", 10, 125, 75, 19,
&ob->gameflag, 0, 0,0, 0,
"Specify a bounds object for physics");
if (ob->gameflag & OB_BOUNDS) {
@@ -2529,8 +2515,8 @@ void logic_buts(void)
}
if(prop->type==PROP_BOOL) {
- uiDefButI(block, TOG|BIT|0, B_REDR, "True", 215, (short)(70-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
- uiDefButI(block, TOGN|BIT|0, B_REDR, "False", 270, (short)(70-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOG, PROP_BOOL, B_REDR, "True", 215, (short)(70-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOGN, PROP_BOOL, B_REDR, "False", 270, (short)(70-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
}
else if(prop->type==PROP_INT)
uiDefButI(block, NUM, butreturn, "", 215, (short)(70-20*a), 110, 19, &prop->data, -10000, 10000, 0, 0, "");
@@ -2541,7 +2527,7 @@ void logic_buts(void)
else if(prop->type==PROP_TIME)
uiDefButF(block, NUM, butreturn, "", 215, (short)(70-20*a), 110, 19, (float*) &prop->data, -10000, 10000, 0, 0, "");
- uiDefButS(block, TOG|BIT|0, 0, "D", 325, (short)(70-20*a), 20, 19, &prop->flag, 0, 0, 0, 0, "Print Debug info");
+ uiDefButBitS(block, TOG, PROP_DEBUG, 0, "D", 325, (short)(70-20*a), 20, 19, &prop->flag, 0, 0, 0, 0, "Print Debug info");
a++;
prop= prop->next;
@@ -2557,9 +2543,9 @@ void logic_buts(void)
uiBlockSetEmboss(block, UI_EMBOSSP);
uiDefBlockBut(block, sensor_menu, NULL, "Sensors", xco-10, yco+35, 80, 19, "");
uiBlockSetEmboss(block, UI_EMBOSS);
- uiDefButS(block, TOG|BIT|0, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
- uiDefButS(block, TOG|BIT|1, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
- uiDefButS(block, TOG|BIT|2, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
+ uiDefButBitS(block, TOG, BUTS_SENS_SEL, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
+ uiDefButBitS(block, TOG, BUTS_SENS_ACT, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
+ uiDefButBitS(block, TOG, BUTS_SENS_LINK, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
for(a=0; a<count; a++) {
ob= (Object *)idar[a];
@@ -2571,9 +2557,9 @@ void logic_buts(void)
/* presume it is only objects for now */
uiBlockSetEmboss(block, UI_EMBOSS);
if(ob->sensors.first) uiSetCurFont(block, UI_HELVB);
- uiDefButS(block, TOG|BIT|6, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
+ uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
if(ob->sensors.first) uiSetCurFont(block, UI_HELV);
- uiDefButS(block, TOG|BIT|8, B_ADD_SENS, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor");
+ uiDefButBitS(block, TOG, OB_ADDSENS, B_ADD_SENS, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor");
yco-=20;
if(ob->scaflag & OB_SHOWSENS) {
@@ -2581,8 +2567,8 @@ void logic_buts(void)
sens= ob->sensors.first;
while(sens) {
uiBlockSetEmboss(block, UI_EMBOSSM);
- uiDefIconButS(block, TOG|BIT|1, B_DEL_SENS, ICON_X, xco, yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Delete Sensor");
- uiDefIconButS(block, ICONTOG|BIT|0, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Sensor settings");
+ uiDefIconButBitS(block, TOG, SENS_DEL, B_DEL_SENS, ICON_X, xco, yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Delete Sensor");
+ uiDefIconButBitS(block, ICONTOG, SENS_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Sensor settings");
ycoo= yco;
if(sens->flag & SENS_SHOW)
@@ -2621,9 +2607,9 @@ void logic_buts(void)
uiBlockSetEmboss(block, UI_EMBOSSP);
uiDefBlockBut(block, controller_menu, NULL, "Controllers", xco-10, yco+35, 100, 19, "");
uiBlockSetEmboss(block, UI_EMBOSS);
- uiDefButS(block, TOG|BIT|3, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
- uiDefButS(block, TOG|BIT|4, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
- uiDefButS(block, TOG|BIT|5, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Sensor/Actuator");
+ uiDefButBitS(block, TOG, BUTS_CONT_SEL, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
+ uiDefButBitS(block, TOG, BUTS_CONT_ACT, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
+ uiDefButBitS(block, TOG, BUTS_CONT_LINK, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Sensor/Actuator");
ob= OBACT;
@@ -2635,9 +2621,9 @@ void logic_buts(void)
/* presume it is only objects for now */
uiBlockSetEmboss(block, UI_EMBOSS);
- uiDefButS(block, TOG|BIT|9, B_ADD_CONT, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Controller");
+ uiDefButBitS(block, TOG, OB_ADDCONT, B_ADD_CONT, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Controller");
if(ob->controllers.first) uiSetCurFont(block, UI_HELVB);
- uiDefButS(block, TOG|BIT|11, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 0, 0, 0, "Active Object name");
+ uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 0, 0, 0, "Active Object name");
if(ob->controllers.first) uiSetCurFont(block, UI_HELV);
yco-=20;
@@ -2646,8 +2632,8 @@ void logic_buts(void)
cont= ob->controllers.first;
while(cont) {
uiBlockSetEmboss(block, UI_EMBOSSM);
- uiDefIconButS(block, TOG|BIT|1, B_DEL_CONT, ICON_X, xco, yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Delete Controller");
- uiDefIconButS(block, ICONTOG|BIT|0, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Controller settings");
+ uiDefIconButBitS(block, TOG, CONT_DEL, B_DEL_CONT, ICON_X, xco, yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Delete Controller");
+ uiDefIconButBitS(block, ICONTOG, CONT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Controller settings");
if(cont->flag & CONT_SHOW) {
cont->otype= cont->type;
@@ -2688,9 +2674,9 @@ void logic_buts(void)
uiBlockSetEmboss(block, UI_EMBOSSP);
uiDefBlockBut(block, actuator_menu, NULL, "Actuators", xco-10, yco+35, 100, 19, "");
uiBlockSetEmboss(block, UI_EMBOSS);
- uiDefButS(block, TOG|BIT|6, B_REDR, "Sel", xco+110, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
- uiDefButS(block, TOG|BIT|7, B_REDR, "Act", xco+110+(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
- uiDefButS(block, TOG|BIT|8, B_REDR, "Link", xco+110+2*(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
+ uiDefButBitS(block, TOG, BUTS_ACT_SEL, B_REDR, "Sel", xco+110, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
+ uiDefButBitS(block, TOG, BUTS_ACT_ACT, B_REDR, "Act", xco+110+(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
+ uiDefButBitS(block, TOG, BUTS_ACT_LINK, B_REDR, "Link", xco+110+2*(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
for(a=0; a<count; a++) {
ob= (Object *)idar[a];
@@ -2701,9 +2687,9 @@ void logic_buts(void)
/* presume it is only objects for now */
uiBlockSetEmboss(block, UI_EMBOSS);
if(ob->actuators.first) uiSetCurFont(block, UI_HELVB);
- uiDefButS(block, TOG|BIT|7, B_REDR, ob->id.name+2,(short)(xco-10), yco,(short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
+ uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2,(short)(xco-10), yco,(short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
if(ob->actuators.first) uiSetCurFont(block, UI_HELV);
- uiDefButS(block, TOG|BIT|10, B_ADD_ACT, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Actuator");
+ uiDefButBitS(block, TOG, OB_ADDACT, B_ADD_ACT, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Actuator");
yco-=20;
if(ob->scaflag & OB_SHOWACT) {
@@ -2711,8 +2697,8 @@ void logic_buts(void)
act= ob->actuators.first;
while(act) {
uiBlockSetEmboss(block, UI_EMBOSSM);
- uiDefIconButS(block, TOG|BIT|1, B_DEL_ACT, ICON_X, xco, yco, 22, 19, &act->flag, 0, 0, 0, 0, "Delete Actuator");
- uiDefIconButS(block, ICONTOG|BIT|0, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &act->flag, 0, 0, 0, 0, "Actuator settings");
+ uiDefIconButBitS(block, TOG, ACT_DEL, B_DEL_ACT, ICON_X, xco, yco, 22, 19, &act->flag, 0, 0, 0, 0, "Delete Actuator");
+ uiDefIconButBitS(block, ICONTOG, ACT_SHOW, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &act->flag, 0, 0, 0, 0, "Actuator settings");
if(act->flag & ACT_SHOW) {
act->otype= act->type;
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c
index e6487c6a291..6e4bc03c1c7 100644
--- a/source/blender/src/buttons_object.c
+++ b/source/blender/src/buttons_object.c
@@ -346,7 +346,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
/* Draw constraint header */
uiBlockSetEmboss(block, UI_EMBOSSN);
- uiDefIconButS(block, ICONTOG|BIT|CONSTRAINT_EXPAND_BIT, B_CONSTRAINT_REDRAW, ICON_DISCLOSURE_TRI_RIGHT, *xco-10, *yco, 20, 20, &con->flag, 0.0, 0.0, 0.0, 0.0, "Collapse/Expand Constraint");
+ uiDefIconButBitS(block, ICONTOG, CONSTRAINT_EXPAND, B_CONSTRAINT_REDRAW, ICON_DISCLOSURE_TRI_RIGHT, *xco-10, *yco, 20, 20, &con->flag, 0.0, 0.0, 0.0, 0.0, "Collapse/Expand Constraint");
if (con->flag & CONSTRAINT_EXPAND) {
@@ -483,9 +483,9 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
/* Draw XYZ toggles */
uiBlockBeginAlign(block);
- but=uiDefButI(block, TOG|BIT|0, B_CONSTRAINT_TEST, "X", *xco+((width/2)-48), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy X component");
- but=uiDefButI(block, TOG|BIT|1, B_CONSTRAINT_TEST, "Y", *xco+((width/2)-16), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy Y component");
- but=uiDefButI(block, TOG|BIT|2, B_CONSTRAINT_TEST, "Z", *xco+((width/2)+16), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy Z component");
+ but=uiDefButBitI(block, TOG, LOCLIKE_X, B_CONSTRAINT_TEST, "X", *xco+((width/2)-48), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy X component");
+ but=uiDefButBitI(block, TOG, LOCLIKE_Y, B_CONSTRAINT_TEST, "Y", *xco+((width/2)-16), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy Y component");
+ but=uiDefButBitI(block, TOG, LOCLIKE_Z, B_CONSTRAINT_TEST, "Z", *xco+((width/2)+16), *yco-64, 32, 18, &data->flag, 0, 24, 0, 0, "Copy Z component");
uiBlockEndAlign(block);
}
break;
@@ -647,7 +647,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
uiDefIDPoinBut(block, test_obpoin_but, B_CONSTRAINT_CHANGETARGET, "OB:", *xco+120, *yco-24, 135, 18, &data->tar, "Target Object");
/* Draw Curve Follow toggle */
- but=uiDefButI(block, TOG|BIT|0, B_CONSTRAINT_TEST, "CurveFollow", *xco+39, *yco-44, 100, 18, &data->followflag, 0, 24, 0, 0, "Object will follow the heading and banking of the curve");
+ but=uiDefButBitI(block, TOG, 1, B_CONSTRAINT_TEST, "CurveFollow", *xco+39, *yco-44, 100, 18, &data->followflag, 0, 24, 0, 0, "Object will follow the heading and banking of the curve");
/* Draw Offset number button */
uiDefButF(block, NUM, B_CONSTRAINT_REDRAW, "Offset:", *xco+155, *yco-44, 100, 18, &data->offset, -9000, 9000, 100.0, 0.0, "Offset from the position corresponding to the time frame");
@@ -992,16 +992,16 @@ static void object_panel_draw(Object *ob)
uiBlockBeginAlign(block);
for(a=0; a<5; a++)
- uiDefButI(block, TOG|BIT|(a), B_OBLAY+a, "", (short)(xco+a*(dx/2)), 180, (short)(dx/2), (short)(dy/2), &(BASACT->lay), 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOG, 1<<a, B_OBLAY+a, "", (short)(xco+a*(dx/2)), 180, (short)(dx/2), (short)(dy/2), &(BASACT->lay), 0, 0, 0, 0, "");
for(a=0; a<5; a++)
- uiDefButI(block, TOG|BIT|(a+10), B_OBLAY+a+10, "", (short)(xco+a*(dx/2)), 165, (short)(dx/2), (short)(dy/2), &(BASACT->lay), 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOG, 1<<(a+10), B_OBLAY+a+10, "", (short)(xco+a*(dx/2)), 165, (short)(dx/2), (short)(dy/2), &(BASACT->lay), 0, 0, 0, 0, "");
xco+= 7;
uiBlockBeginAlign(block);
for(a=5; a<10; a++)
- uiDefButI(block, TOG|BIT|(a), B_OBLAY+a, "", (short)(xco+a*(dx/2)), 180, (short)(dx/2), (short)(dy/2), &(BASACT->lay), 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOG, 1<<a, B_OBLAY+a, "", (short)(xco+a*(dx/2)), 180, (short)(dx/2), (short)(dy/2), &(BASACT->lay), 0, 0, 0, 0, "");
for(a=5; a<10; a++)
- uiDefButI(block, TOG|BIT|(a+10), B_OBLAY+a+10, "", (short)(xco+a*(dx/2)), 165, (short)(dx/2), (short)(dy/2), &(BASACT->lay), 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOG, 1<<(a+10), B_OBLAY+a+10, "", (short)(xco+a*(dx/2)), 165, (short)(dx/2), (short)(dy/2), &(BASACT->lay), 0, 0, 0, 0, "");
uiBlockEndAlign(block);
@@ -1017,7 +1017,7 @@ static void object_panel_draw(Object *ob)
uiDefBut(block, LABEL, 0, "Draw Extra", 120,120,90,20, NULL, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefButC(block, TOG|BIT|0, REDRAWVIEW3D, "Bounds", 120, 100, 90, 20, &ob->dtx, 0, 0, 0, 0, "Displays the active object's bounds");
+ uiDefButBitC(block, TOG, OB_BOUNDBOX, REDRAWVIEW3D, "Bounds", 120, 100, 90, 20, &ob->dtx, 0, 0, 0, 0, "Displays the active object's bounds");
uiDefButBitC(block, TOG, OB_DRAWNAME, REDRAWVIEW3D, "Name", 210, 100, 90, 20, &ob->dtx, 0, 0, 0, 0, "Displays the active object's name");
uiDefButS(block, MENU, REDRAWVIEW3D, "Boundary Display%t|Box%x0|Sphere%x1|Cylinder%x2|Cone%x3|Polyheder%x4",
@@ -1294,24 +1294,24 @@ static void object_panel_anim(Object *ob)
uiDefButC(block, ROW,REDRAWVIEW3D,"Y", 274,190,20,19, &ob->upflag, 13.0, 1.0, 0, 0, "Specify the axis that points up");
uiDefButC(block, ROW,REDRAWVIEW3D,"Z", 298,190,19,19, &ob->upflag, 13.0, 2.0, 0, 0, "Specify the axis that points up");
uiBlockBeginAlign(block);
- uiDefButC(block, TOG|BIT|0, REDRAWVIEW3D, "Draw Key", 24,160,71,19, &ob->ipoflag, 0, 0, 0, 0, "Draw object as key position");
- uiDefButC(block, TOG|BIT|1, REDRAWVIEW3D, "Draw Key Sel", 97,160,81,19, &ob->ipoflag, 0, 0, 0, 0, "Limit the drawing of object keys");
- uiDefButC(block, TOG|BIT|7, REDRAWVIEW3D, "Powertrack", 180,160,78,19, &ob->transflag, 0, 0, 0, 0, "Switch objects rotation off");
- uiDefButS(block, TOG|BIT|4, 0, "SlowPar", 260,160,56,19, &ob->partype, 0, 0, 0, 0, "Create a delay in the parent relationship");
+ uiDefButBitC(block, TOG, OB_DRAWKEY, REDRAWVIEW3D, "Draw Key", 24,160,71,19, &ob->ipoflag, 0, 0, 0, 0, "Draw object as key position");
+ uiDefButBitC(block, TOG, OB_DRAWKEYSEL, REDRAWVIEW3D, "Draw Key Sel", 97,160,81,19, &ob->ipoflag, 0, 0, 0, 0, "Limit the drawing of object keys");
+ uiDefButBitC(block, TOG, OB_POWERTRACK, REDRAWVIEW3D, "Powertrack", 180,160,78,19, &ob->transflag, 0, 0, 0, 0, "Switch objects rotation off");
+ uiDefButBitS(block, TOG, PARSLOW, 0, "SlowPar", 260,160,56,19, &ob->partype, 0, 0, 0, 0, "Create a delay in the parent relationship");
uiBlockBeginAlign(block);
- uiDefButC(block, TOG|BIT|3, REDRAWVIEW3D, "DupliFrames", 24,128,89,19, &ob->transflag, 0, 0, 0, 0, "Make copy of object for every frame");
- uiDefButC(block, TOG|BIT|4, REDRAWVIEW3D, "DupliVerts", 114,128,82,19, &ob->transflag, 0, 0, 0, 0, "Duplicate child objects on all vertices");
- uiDefButC(block, TOG|BIT|5, REDRAWVIEW3D, "Rot", 200,128,31,19, &ob->transflag, 0, 0, 0, 0, "Rotate dupli according to facenormal");
- uiDefButC(block, TOG|BIT|6, REDRAWVIEW3D, "No Speed", 234,128,82,19, &ob->transflag, 0, 0, 0, 0, "Set dupliframes to still, regardless of frame");
+ uiDefButBitC(block, TOG, OB_DUPLIFRAMES, REDRAWVIEW3D, "DupliFrames", 24,128,89,19, &ob->transflag, 0, 0, 0, 0, "Make copy of object for every frame");
+ uiDefButBitC(block, TOG, OB_DUPLIVERTS, REDRAWVIEW3D, "DupliVerts", 114,128,82,19, &ob->transflag, 0, 0, 0, 0, "Duplicate child objects on all vertices");
+ uiDefButBitC(block, TOG, OB_DUPLIROT, REDRAWVIEW3D, "Rot", 200,128,31,19, &ob->transflag, 0, 0, 0, 0, "Rotate dupli according to facenormal");
+ uiDefButBitC(block, TOG, OB_DUPLINOSPEED, REDRAWVIEW3D, "No Speed", 234,128,82,19, &ob->transflag, 0, 0, 0, 0, "Set dupliframes to still, regardless of frame");
uiBlockBeginAlign(block);
uiDefButS(block, NUM, REDRAWVIEW3D, "DupSta:", 24,105,141,19, &ob->dupsta, 1.0, (MAXFRAMEF - 1.0f), 0, 0, "Specify startframe for Dupliframes");
uiDefButS(block, NUM, REDRAWVIEW3D, "DupOn:", 170,105,146,19, &ob->dupon, 1.0, 1500.0, 0, 0, "");
uiDefButS(block, NUM, REDRAWVIEW3D, "DupEnd", 24,82,140,19, &ob->dupend, 1.0, MAXFRAMEF, 0, 0, "Specify endframe for Dupliframes");
uiDefButS(block, NUM, REDRAWVIEW3D, "DupOff", 171,82,145,19, &ob->dupoff, 0.0, 1500.0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefButC(block, TOG|BIT|2, REDRAWALL, "Offs Ob", 24,51,56,20, &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on its own objectipo");
- uiDefButC(block, TOG|BIT|6, REDRAWALL, "Offs Par", 82,51,56,20 , &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on the parent");
- uiDefButC(block, TOG|BIT|7, REDRAWALL, "Offs Particle", 140,51,103,20, &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on the particle effect");
+ uiDefButBitC(block, TOG, OB_OFFS_OB, REDRAWALL, "Offs Ob", 24,51,56,20, &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on its own objectipo");
+ uiDefButBitC(block, TOG, OB_OFFS_PARENT, REDRAWALL, "Offs Par", 82,51,56,20 , &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on the parent");
+ uiDefButBitC(block, TOG, OB_OFFS_PARTICLE, REDRAWALL, "Offs Particle", 140,51,103,20, &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on the particle effect");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, REDRAWALL, "TimeOffset:", 24,17,115,30, &ob->sf, -9000.0, 9000.0, 100, 0, "Specify an offset in frames");
@@ -1519,7 +1519,7 @@ static void object_panel_deflectors(Object *ob)
/* only meshes collide now */
if(ob->type==OB_MESH) {
- uiDefButS(block, TOG|BIT|0, B_REDR, "Deflection",160,160,150,20, &pd->deflect, 0, 0, 0, 0, "Deflects particles based on collision");
+ uiDefButBitS(block, TOG, 1, B_REDR, "Deflection",160,160,150,20, &pd->deflect, 0, 0, 0, 0, "Deflects particles based on collision");
uiDefBut(block, LABEL, 0, "Particles", 160,140,150,20, NULL, 0.0, 0, 0, 0, "");
uiBlockBeginAlign(block);
@@ -1870,10 +1870,10 @@ static void object_panel_modifiers(Object *ob)
if (ob->modifiers.first) {
int i, canCage=1, numModifiers = BLI_countlist(&ob->modifiers);
- ModifierData *md;
-
- CLAMP(actModifier, 1, numModifiers);
- uiDefButI(block, NUM, B_REDR, "Modifier", 740,380,180,27, &actModifier, 1, numModifiers, 0, 0, "Index of current modifier");
+ ModifierData *md;
+
+ CLAMP(actModifier, 1, numModifiers);
+ uiDefButI(block, NUM, B_REDR, "Modifier", 740,380,180,27, &actModifier, 1, numModifiers, 0, 0, "Index of current modifier");
for (i=0, md=ob->modifiers.first; md && i<actModifier-1; i++) {
if (!modifier_supportsMapping(md) || !(md->mode&eModifierMode_OnCage))
@@ -1989,7 +1989,7 @@ static void object_panel_effects(Object *ob)
x= 15 * a + 550;
y= 172; // - 12*( abs(a/10) ) ;
- uiDefButS(block, TOG|BIT|0, B_SELEFFECT+a, "", x, y, 15, 12, &eff->flag, 0, 0, 0, 0, "");
+ uiDefButBitS(block, TOG, SELECT, B_SELEFFECT+a, "", x, y, 15, 12, &eff->flag, 0, 0, 0, 0, "");
a++;
if(a==MAX_EFFECT) break;
@@ -2012,9 +2012,9 @@ static void object_panel_effects(Object *ob)
uiDefBut(block, BUT, B_RECALCAL, "RecalcAll", 741,187,67,27, 0, 0, 0, 0, 0, "Update the particle system");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|2, B_CALCEFFECT, "Static", 825,187,67,27, &paf->flag, 0, 0, 0, 0, "Make static particles (deform only works with SubSurf)");
+ uiDefButBitS(block, TOG, PAF_STATIC, B_CALCEFFECT, "Static", 825,187,67,27, &paf->flag, 0, 0, 0, 0, "Make static particles (deform only works with SubSurf)");
if(paf->flag & PAF_STATIC)
- uiDefButS(block, TOG|BIT|4, B_DIFF, "Animated",825,167,67,20, &paf->flag, 0, 0, 0, 0, "Static particles are recalculated each rendered frame");
+ uiDefButBitS(block, TOG, PAF_ANIMATED, B_DIFF, "Animated",825,167,67,20, &paf->flag, 0, 0, 0, 0, "Static particles are recalculated each rendered frame");
uiBlockBeginAlign(block);
uiDefButI(block, NUM, B_CALCEFFECT, "Tot:", 550,146,91,20, &paf->totpart, 1.0, 100000.0, 0, 0, "Set the total number of particles");
@@ -2038,8 +2038,8 @@ static void object_panel_effects(Object *ob)
uiDefButF(block, NUM, B_CALCEFFECT, "Randlife:", 550,96,96,20, &paf->randlife, 0.0, 2.0, 10, 0, "Give the particlelife a random variation");
uiDefButI(block, NUM, B_CALCEFFECT, "Seed:", 652,96,80,20, &paf->seed, 0.0, 255.0, 0, 0, "Set an offset in the random table");
- uiDefButS(block, TOG|BIT|3, B_CALCEFFECT, "Face", 735,96,46,20, &paf->flag, 0, 0, 0, 0, "Emit particles also from faces");
- uiDefButS(block, TOG|BIT|1, B_CALCEFFECT, "Bspline", 782,96,54,20, &paf->flag, 0, 0, 0, 0, "Use B spline formula for particle interpolation");
+ uiDefButBitS(block, TOG, PAF_FACE, B_CALCEFFECT, "Face", 735,96,46,20, &paf->flag, 0, 0, 0, 0, "Emit particles also from faces");
+ uiDefButBitS(block, TOG, PAF_BSPLINE, B_CALCEFFECT, "Bspline", 782,96,54,20, &paf->flag, 0, 0, 0, 0, "Use B spline formula for particle interpolation");
uiDefButS(block, TOG, REDRAWVIEW3D, "Vect", 837,96,45,20, &paf->stype, 0, 0, 0, 0, "Give the particles a rotation direction");
uiDefButF(block, NUM, B_DIFF, "VectSize", 885,96,116,20, &paf->vectsize, 0.0, 1.0, 10, 0, "Set the speed for Vect");
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c
index 5a218a168cc..8060a91653a 100644
--- a/source/blender/src/buttons_scene.c
+++ b/source/blender/src/buttons_scene.c
@@ -312,8 +312,8 @@ static void sound_panel_sequencer(void)
uiDefBut(block, BUT, B_SOUND_RECALC, "Recalc", xco+160,yco,75,20, 0, 0, 0, 0, 0, "Recalculate samples");
yco -= 25;
- uiDefButS(block, TOG|BIT|1, B_SOUND_CHANGED, "Sync", xco,yco,115,20, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
- uiDefButS(block, TOG|BIT|2, B_SOUND_CHANGED, "Scrub", xco+120,yco,115,20, &G.scene->audio.flag, 0, 0, 0, 0, "Scrub when changing frames");
+ uiDefButBitS(block, TOG, AUDIO_SYNC, B_SOUND_CHANGED, "Sync", xco,yco,115,20, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
+ uiDefButBitS(block, TOG, AUDIO_SCRUB, B_SOUND_CHANGED, "Scrub", xco+120,yco,115,20, &G.scene->audio.flag, 0, 0, 0, 0, "Scrub when changing frames");
yco -= 25;
uiDefBut(block, LABEL, 0, "Main mix", xco,yco,295,20, 0, 0, 0, 0, 0, "");
@@ -323,7 +323,7 @@ static void sound_panel_sequencer(void)
xco,yco,235,24,&G.scene->audio.main, -24.0, 6.0, 0, 0, "Set the audio master gain/attenuation in dB");
yco -= 25;
- uiDefButS(block, TOG|BIT|0, 0, "Mute", xco,yco,235,24, &G.scene->audio.flag, 0, 0, 0, 0, "Mute audio from sequencer");
+ uiDefButBitS(block, TOG, AUDIO_MUTE, 0, "Mute", xco,yco,235,24, &G.scene->audio.flag, 0, 0, 0, 0, "Mute audio from sequencer");
yco -= 35;
uiDefBut(block, BUT, B_SOUND_MIXDOWN, "MIXDOWN", xco,yco,235,24, 0, 0, 0, 0, 0, "Create WAV file from sequenced audio");
@@ -384,7 +384,7 @@ static void sound_panel_sound(bSound *sound)
if (sound->sample->packedfile) packdummy = 1;
else packdummy = 0;
- uiDefIconButI(block, TOG|BIT|0, B_SOUND_UNPACK_SAMPLE, ICON_PACKAGE,
+ uiDefIconButBitI(block, TOG, 1, B_SOUND_UNPACK_SAMPLE, ICON_PACKAGE,
285, 120,25,24, &packdummy, 0, 0, 0, 0,"Pack/Unpack this sample");
uiDefBut(block, BUT, B_SOUND_LOAD_SAMPLE, "Load sample", 10, 95,150,24, 0, 0, 0, 0, 0, "Load a different sample file");
@@ -398,11 +398,11 @@ static void sound_panel_sound(bSound *sound)
160,70,150,20, &sound->pitch, -12.0, 12.0, 0, 0, "Game engine only: Set the pitch of this sound");
/* looping */
- uiDefButI(block, TOG|BIT|SOUND_FLAGS_LOOP_BIT, B_SOUND_REDRAW, "Loop",
+ uiDefButBitI(block, TOG, SOUND_FLAGS_LOOP, B_SOUND_REDRAW, "Loop",
10, 50, 95, 20, &sound->flags, 0.0, 0.0, 0, 0, "Game engine only: Toggle between looping on/off");
if (sound->flags & SOUND_FLAGS_LOOP) {
- uiDefButI(block, TOG|BIT|SOUND_FLAGS_BIDIRECTIONAL_LOOP_BIT, B_SOUND_REDRAW, "Ping Pong",
+ uiDefButBitI(block, TOG, SOUND_FLAGS_BIDIRECTIONAL_LOOP, B_SOUND_REDRAW, "Ping Pong",
105, 50, 95, 20, &sound->flags, 0.0, 0.0, 0, 0, "Game engine only: Toggle between A->B and A->B->A looping");
}
@@ -411,7 +411,7 @@ static void sound_panel_sound(bSound *sound)
/* 3D settings ------------------------------------------------------------------ */
if (sound->sample->channels == 1) {
- uiDefButI(block, TOG|BIT|SOUND_FLAGS_3D_BIT, B_SOUND_REDRAW, "3D Sound",
+ uiDefButBitI(block, TOG, SOUND_FLAGS_3D, B_SOUND_REDRAW, "3D Sound",
10, 10, 90, 20, &sound->flags, 0, 0, 0, 0, "Game engine only: Turns 3D sound on");
if (sound->flags & SOUND_FLAGS_3D) {
@@ -1021,38 +1021,38 @@ static void render_panel_output(void)
uiBlockEndAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButS(block, TOG|BIT|0, B_NOP,"Backbuf", 10, 94, 80, 20, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image");
- uiDefButI(block, TOG|BIT|19, B_NOP,"Threads", 10, 68, 80, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable render in two threads");
+ uiDefButBitS(block, TOG, R_BACKBUF, B_NOP,"Backbuf", 10, 94, 80, 20, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image");
+ uiDefButBitI(block, TOG, R_THREADS, B_NOP,"Threads", 10, 68, 80, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable render in two threads");
uiBlockSetCol(block, TH_AUTO);
uiBlockBeginAlign(block);
for(b=2; b>=0; b--)
for(a=0; a<3; a++)
- uiDefButS(block, TOG|BIT|(3*b+a), 800,"", (short)(10+18*a),(short)(10+14*b),16,12, &G.winpos, 0, 0, 0, 0, "Render window placement on screen");
+ uiDefButBitS(block, TOG, 1<<(3*b+a), 800,"", (short)(10+18*a),(short)(10+14*b),16,12, &G.winpos, 0, 0, 0, 0, "Render window placement on screen");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|2, REDRAWVIEW3D, "Passepartout", 72, 30, 122, 20, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Draws darkened passepartout in camera view");
+ uiDefButBitS(block, TOG, R_PASSEPARTOUT, REDRAWVIEW3D, "Passepartout", 72, 30, 122, 20, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Draws darkened passepartout in camera view");
uiDefButS(block, ROW, B_REDR, "DispWin", 72, 10, 60, 20, &G.displaymode, 0.0, (float)R_DISPLAYWIN, 0, 0, "Sets render output to display in a seperate window");
uiDefButS(block, ROW, B_REDR, "DispView", 134, 10, 60, 20, &G.displaymode, 0.0, (float)R_DISPLAYVIEW, 0, 0, "Sets render output to display in 3D view");
uiBlockEndAlign(block);
- uiDefButS(block, TOG|BIT|4, 0, "Extensions", 205, 10, 105, 19, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Adds extensions to the output when rendering animations");
+ uiDefButBitS(block, TOG, R_EXTENSION, 0, "Extensions", 205, 10, 105, 19, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Adds extensions to the output when rendering animations");
/* Dither control */
uiDefButF(block, NUM,B_DIFF, "Dither:", 205,31,105,19, &G.scene->r.dither_intensity, 0.0, 2.0, 0, 0, "The amount of dithering noise present in the output image (0.0 = no dithering)");
/* Toon shading buttons */
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|5, 0,"Edge", 100, 94, 70, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Toon edge shading");
+ uiDefButBitI(block, TOG, R_EDGE, 0,"Edge", 100, 94, 70, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Toon edge shading");
uiDefBlockBut(block, edge_render_menu, NULL, "Edge Settings", 170, 94, 140, 20, "Display edge settings");
/* postprocess render buttons */
uiBlockBeginAlign(block);
if(R.rectftot)
- uiDefIconTextButI(block, TOG|BIT|18, B_NOP, ICON_IMAGE_DEHLT," Fbuf", 100, 68, 70, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render; buffer available");
+ uiDefIconTextButBitI(block, TOG, R_FBUF, B_NOP, ICON_IMAGE_DEHLT," Fbuf", 100, 68, 70, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render; buffer available");
else
- uiDefButI(block, TOG|BIT|18, 0,"Fbuf", 100, 68, 70, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render, no buffer available now");
+ uiDefButBitI(block, TOG, R_FBUF, 0,"Fbuf", 100, 68, 70, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render, no buffer available now");
uiDefBlockBut(block, post_render_menu, NULL, "Post process", 170, 68, 140, 20, "Applies on RGBA floats while render or with Fbuf available");
uiBlockEndAlign(block);
@@ -1079,7 +1079,7 @@ static void render_panel_render(void)
369, 142, 191, 20, &G.scene->r.renderer, 0, 0, 0, 0, "Choose rendering engine");
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|0, 0, "OSA", 369,109,122,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)");
+ uiDefButBitI(block, TOG, R_OSA, 0, "OSA", 369,109,122,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)");
uiDefButS(block, ROW,B_DIFF,"5", 369,88,29,20,&G.scene->r.osa,2.0,5.0, 0, 0, "Sets oversample level to 5");
uiDefButS(block, ROW,B_DIFF,"8", 400,88,29,20,&G.scene->r.osa,2.0,8.0, 0, 0, "Sets oversample level to 8 (Recommended)");
uiDefButS(block, ROW,B_DIFF,"11", 431,88,29,20,&G.scene->r.osa,2.0,11.0, 0, 0, "Sets oversample level to 11");
@@ -1087,7 +1087,7 @@ static void render_panel_render(void)
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|14, 0, "MBLUR", 496,109,64,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation");
+ uiDefButBitI(block, TOG, R_MBLUR, 0, "MBLUR", 496,109,64,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation");
uiDefButF(block, NUM,B_DIFF,"Bf:", 496,88,64,20,&G.scene->r.blurfac, 0.01, 5.0, 10, 2, "Sets motion blur factor");
uiBlockEndAlign(block);
@@ -1106,11 +1106,11 @@ static void render_panel_render(void)
uiDefButS(block, MENU, B_DIFF,"Octree resolution %t|64 %x64|128 %x128|256 %x256|512 %x512", 496,13,64,20,&G.scene->r.ocres,0.0,0.0, 0, 0, "Octree resolution for ray tracing");
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|1,0,"Shadow", 565,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation");
- uiDefButI(block, TOG|BIT|4,0,"EnvMap", 627,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable environment map rendering");
- uiDefButI(block, TOG|BIT|10,0,"Pano", 565,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)");
- uiDefButI(block, TOG|BIT|16,B_REDR,"Ray",606,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable ray tracing");
- uiDefButI(block, TOG|BIT|8,0,"Radio", 647,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable radiosity rendering");
+ uiDefButBitI(block, TOG, R_SHADOW, 0,"Shadow", 565,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation");
+ uiDefButBitI(block, TOG, R_ENVMAP, 0,"EnvMap", 627,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable environment map rendering");
+ uiDefButBitI(block, TOG, R_PANORAMA, 0,"Pano", 565,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)");
+ uiDefButBitI(block, TOG, R_RAYTRACE, B_REDR,"Ray",606,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable ray tracing");
+ uiDefButBitI(block, TOG, R_RADIO, 0,"Radio", 647,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable radiosity rendering");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
@@ -1121,15 +1121,15 @@ static void render_panel_render(void)
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|6,0,"Fields", 565,55,60,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables field rendering");
- uiDefButI(block, TOG|BIT|13,0,"Odd", 627,55,39,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Odd field first rendering (Default: Even field)");
- uiDefButI(block, TOG|BIT|7,0,"X", 668,55,19,20,&G.scene->r.mode, 0, 0, 0, 0, "Disables time difference in field calculations");
+ uiDefButBitI(block, TOG, R_FIELDS, 0,"Fields", 565,55,60,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables field rendering");
+ uiDefButBitI(block, TOG, R_ODDFIELD, 0,"Odd", 627,55,39,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Odd field first rendering (Default: Even field)");
+ uiDefButBitI(block, TOG, R_FIELDSTILL, 0,"X", 668,55,19,20,&G.scene->r.mode, 0, 0, 0, 0, "Disables time difference in field calculations");
- uiDefButI(block, TOG|BIT|17,0,"Gauss", 565,34,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Gaussian sampling filter for antialiasing");
+ uiDefButBitI(block, TOG, R_GAUSS, 0,"Gauss", 565,34,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Gaussian sampling filter for antialiasing");
uiDefButF(block, NUM,B_DIFF,"", 627,34,60,20,&G.scene->r.gauss,0.5, 1.5, 100, 2, "Sets the Gaussian filter size");
- uiDefButI(block, TOG|BIT|9,REDRAWVIEWCAM, "Border", 565,13,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Render a small cut-out of the image");
- uiDefButI(block, TOG|BIT|2, B_REDR, "Gamma", 627,13,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable gamma correction");
+ uiDefButBitI(block, TOG, R_BORDER, REDRAWVIEWCAM, "Border", 565,13,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Render a small cut-out of the image");
+ uiDefButBitI(block, TOG, R_GAMMA, B_REDR, "Gamma", 627,13,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable gamma correction");
uiBlockEndAlign(block);
}
@@ -1147,8 +1147,8 @@ static void render_panel_anim(void)
uiBlockSetCol(block, TH_BUT_SETTING1);
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|0, 0, "Do Sequence",692,114,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Enables sequence output rendering (Default: 3D rendering)");
- uiDefButS(block, TOG|BIT|1, 0, "Render Daemon",692,90,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Let external network render current scene");
+ uiDefButBitS(block, TOG, R_DOSEQ, 0, "Do Sequence",692,114,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Enables sequence output rendering (Default: 3D rendering)");
+ uiDefButBitS(block, TOG, R_BG_RENDER, 0, "Render Daemon",692,90,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Let external network render current scene");
uiBlockEndAlign(block);
uiBlockSetCol(block, TH_AUTO);
@@ -1190,11 +1190,11 @@ static void render_panel_format(void)
#ifdef __sgi
yofs = 76;
uiDefButS(block, NUM,B_DIFF,"MaxSize:", 892,32,165,20, &G.scene->r.maximsize, 0.0, 500.0, 0, 0, "Maximum size per frame to save in an SGI movie");
- uiDefButI(block, TOG|BIT|12,0,"Cosmo", 1059,32,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Attempt to save SGI movies using Cosmo hardware");
+ uiDefButBitI(block, TOG, R_COSMO, 0,"Cosmo", 1059,32,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Attempt to save SGI movies using Cosmo hardware");
#endif
uiDefButS(block, MENU,B_FILETYPEMENU,imagetype_pup(), 892,yofs,174,20, &G.scene->r.imtype, 0, 0, 0, 0, "Images are saved in this file format");
- uiDefButI(block, TOG|BIT|11,B_DIFF, "Crop", 1068,yofs,51,20, &G.scene->r.mode, 0, 0, 0, 0, "Exclude border rendering from total image");
+ uiDefButBitI(block, TOG, R_MOVIECROP, B_DIFF, "Crop", 1068,yofs,51,20, &G.scene->r.mode, 0, 0, 0, 0, "Exclude border rendering from total image");
yofs -= 22;
@@ -1248,7 +1248,7 @@ static void render_panel_format(void)
uiDefBut(block, BUT,B_PR_PAL169, "PAL 16:9",1146,70,100,18, 0, 0, 0, 0, 0, "Size preset: Image size - 720x576, Aspect ratio - 64x45");
uiDefBut(block, BUT,B_PR_PANO, "PANO", 1146,50,100,18, 0, 0, 0, 0, 0, "Standard panorama settings");
uiDefBut(block, BUT,B_PR_FULL, "FULL", 1146,30,100,18, 0, 0, 0, 0, 0, "Size preset: Image size - 1280x1024, Aspect ratio - 1x1");
- uiDefButI(block, TOG|BIT|15, B_REDR, "Unified Renderer", 1146,10,100,18, &G.scene->r.mode, 0, 0, 0, 0, "Use the unified renderer.");
+ uiDefButBitI(block, TOG, R_UNIFIED, B_REDR, "Unified Renderer", 1146,10,100,18, &G.scene->r.mode, 0, 0, 0, 0, "Use the unified renderer.");
uiBlockEndAlign(block);
}
@@ -1283,13 +1283,13 @@ static void render_panel_yafrayGI()
if (G.scene->r.GImethod==2) {
uiDefButI(block, NUM, B_DIFF, "Depth:", 180,175,110,20, &G.scene->r.GIdepth, 1.0, 100.0, 10, 10, "Number of bounces of the indirect light");
uiDefButI(block, NUM, B_DIFF, "CDepth:", 180,150,110,20, &G.scene->r.GIcausdepth, 1.0, 100.0, 10, 10, "Number of bounces inside objects (for caustics)");
- uiDefButS(block,TOG|BIT|0, B_REDR, "Photons",210,125,100,20, &G.scene->r.GIphotons, 0, 0, 0, 0, "Use global photons to help in GI");
+ uiDefButBitS(block, TOG, 1, B_REDR, "Photons",210,125,100,20, &G.scene->r.GIphotons, 0, 0, 0, 0, "Use global photons to help in GI");
}
- uiDefButS(block,TOG|BIT|0, B_REDR, "Cache",6,125,95,20, &G.scene->r.GIcache, 0, 0, 0, 0, "Cache occlusion/irradiance samples (faster)");
+ uiDefButBitS(block, TOG, 1, B_REDR, "Cache",6,125,95,20, &G.scene->r.GIcache, 0, 0, 0, 0, "Cache occlusion/irradiance samples (faster)");
if (G.scene->r.GIcache)
{
- uiDefButS(block,TOG|BIT|0, B_REDR, "NoBump",108,125,95,20, &G.scene->r.YF_nobump, 0, 0, 0, 0, "Don't use bumpnormals for cache (faster, but no bumpmapping in total indirectly lit areas)");
+ uiDefButBitS(block,TOG, 1, B_REDR, "NoBump",108,125,95,20, &G.scene->r.YF_nobump, 0, 0, 0, 0, "Don't use bumpnormals for cache (faster, but no bumpmapping in total indirectly lit areas)");
uiDefBut(block, LABEL, 0, "Cache parameters:", 5,105,130,20, 0, 1.0, 0, 0, 0, "");
if (G.scene->r.GIshadowquality==0.0) G.scene->r.GIshadowquality=0.9;
uiDefButF(block, NUM, B_DIFF,"ShadQu:", 5,85,154,20, &(G.scene->r.GIshadowquality), 0.01, 1.0 ,1,0, "Sets the shadow quality, keep it under 0.95 :-) ");
@@ -1312,7 +1312,7 @@ static void render_panel_yafrayGI()
if(G.scene->r.GImixphotons==0) G.scene->r.GImixphotons=100;
uiDefButI(block, NUM, B_DIFF, "MixCount:", 170,35,140,20, &G.scene->r.GImixphotons,
0, 1000, 10, 10, "Number of photons to mix");
- uiDefButS(block,TOG|BIT|0, B_REDR, "Tune Photons",170,10,140,20, &G.scene->r.GIdirect,
+ uiDefButBitS(block, TOG, 1, B_REDR, "Tune Photons",170,10,140,20, &G.scene->r.GIdirect,
0, 0, 0, 0, "Show the photonmap directly in the render for tuning");
}
}
@@ -1332,7 +1332,7 @@ static void render_panel_yafrayGlobal()
// label to force a boundbox for buttons not to be centered
uiDefBut(block, LABEL, 0, " ", 305,180,10,10, 0, 0, 0, 0, 0, "");
- uiDefButS(block,TOGN|BIT|0, B_REDR, "xml", 5,180,75,20, &G.scene->r.YFexportxml,
+ uiDefButBitS(block, TOGN, 1, B_REDR, "xml", 5,180,75,20, &G.scene->r.YFexportxml,
0, 0, 0, 0, "Export to an xml file and call yafray instead of plugin");
uiDefButF(block, NUMSLI, B_DIFF,"Bi ", 5,35,150,20, &(G.scene->r.YF_raybias),
@@ -1345,9 +1345,9 @@ static void render_panel_yafrayGlobal()
uiDefButI(block, NUM, B_DIFF, "Processors:", 160,60,150,20, &G.scene->r.YF_numprocs, 1.0, 8.0, 10, 10, "Number of processors to use");
/*AA Settings*/
- uiDefButS(block,TOGN|BIT|0, B_REDR, "Auto AA", 5,140,150,20, &G.scene->r.YF_AA,
+ uiDefButBitS(block, TOGN, 1, B_REDR, "Auto AA", 5,140,150,20, &G.scene->r.YF_AA,
0, 0, 0, 0, "Set AA using OSA and GI quality, disable for manual control");
- uiDefButS(block, TOGN|BIT|0, B_DIFF, "Clamp RGB", 160,140,150,20, &G.scene->r.YF_clamprgb, 1.0, 8.0, 10, 10, "For AA on fast high contrast changes. Not advisable for Bokeh! Dulls lens shape detail.");
+ uiDefButBitS(block, TOGN, 1, B_DIFF, "Clamp RGB", 160,140,150,20, &G.scene->r.YF_clamprgb, 1.0, 8.0, 10, 10, "For AA on fast high contrast changes. Not advisable for Bokeh! Dulls lens shape detail.");
if(G.scene->r.YF_AA){
uiDefButI(block, NUM, B_DIFF, "AA Passes ", 5,115,150,20, &G.scene->r.YF_AApasses, 0, 64, 10, 10, "Number of AA passes (0 is no AA)");
uiDefButI(block, NUM, B_DIFF, "AA Samples ", 160,115,150,20, &G.scene->r.YF_AAsamples, 0, 2048, 10, 10, "Number of samples per pass");
@@ -1366,7 +1366,7 @@ static void render_panel_sfx(void)
if(uiNewPanel(curarea, block, "Post Effects", "Render", 320, 0, 318, 204)==0) return;
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|20,B_SET_ZBLUR,"Zblur", 10,180,140,20,&G.scene->r.mode,0,0, 0, 0, "Apply blur based on depth values in z-buffer");
+ uiDefButBitI(block, TOG, R_ZBLUR,B_SET_ZBLUR,"Zblur", 10,180,140,20,&G.scene->r.mode,0,0, 0, 0, "Apply blur based on depth values in z-buffer");
uiDefButF(block, NUM,B_DIFF, "ZMin:", 10,160,140,20, &G.scene->r.zmin, 0.0, 1.0, 0, 0, "Specify the start distance with maximum blur");
uiDefButF(block, NUM,B_DIFF, "Focus:", 10,140,140,20, &G.scene->r.focus, 0.0, 1.0, 0, 0, "Specify the focus distance (not blurred)");
uiDefButF(block, NUM,B_DIFF, "Blur:", 10,120,140,20, &G.scene->r.zblur, 1.0, 100.0, 0, 0, "Specify the maximum blur radius");
@@ -1375,15 +1375,15 @@ static void render_panel_sfx(void)
/* Toon shading buttons */
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|5, B_SET_EDGE, "Edge", 160, 180, 150, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Toon edge shading");
+ uiDefButBitI(block, TOG, R_EDGE, B_SET_EDGE, "Edge", 160, 180, 150, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Toon edge shading");
uiDefBlockBut(block, edge_render_menu, NULL, "Edge Settings", 160, 160, 150, 20, "Display edge settings");
/* postprocess render buttons */
uiBlockBeginAlign(block);
if(R.rectftot)
- uiDefIconTextButI(block, TOG|BIT|18, B_NOP, ICON_IMAGE_DEHLT," Fbuf", 160, 130, 150, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render; buffer available");
+ uiDefIconTextButI(block, TOG, R_FBUF, B_NOP, ICON_IMAGE_DEHLT," Fbuf", 160, 130, 150, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render; buffer available");
else
- uiDefButI(block, TOG|BIT|18, 0,"Fbuf", 160, 130, 150, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render, no buffer available now");
+ uiDefButBitI(block, TOG, R_FBUF, 0,"Fbuf", 160, 130, 150, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render, no buffer available now");
uiDefBlockBut(block, post_render_menu, NULL, "Post process", 160, 110, 150, 20, "Applies on RGBA floats while render or with Fbuf available");
uiBlockEndAlign(block);
@@ -1432,7 +1432,7 @@ void anim_panels()
uiBlockBeginAlign(block);
uiDefButS(block, NUM,B_FRAMEMAP,"Frs/sec:", 10,130,150,20, &G.scene->r.frs_sec, 1.0, 120.0, 100.0, 0, "Frames per second");
- uiDefButS(block, TOG|BIT|1, B_SOUND_CHANGED, "Sync",160,130,150,20, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
+ uiDefButBitS(block, TOG, AUDIO_SYNC, B_SOUND_CHANGED, "Sync",160,130,150,20, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
uiBlockBeginAlign(block);
uiDefButS(block, NUM,REDRAWSEQ,"Sta:", 10,100,150,20,&G.scene->r.sfra,1.0,MAXFRAMEF, 0, 0, "Specify the start frame of the animation");
diff --git a/source/blender/src/buttons_script.c b/source/blender/src/buttons_script.c
index 78041a2e5a3..4d08faacdd3 100644
--- a/source/blender/src/buttons_script.c
+++ b/source/blender/src/buttons_script.c
@@ -318,7 +318,7 @@ static void script_panel_scriptlink(void)
block= uiNewBlock(&curarea->uiblocks, "script_panel_scriptlink", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Scriptlinks", "Script", 0, 0, 318, 204)==0) return;
- uiDefButI(block, TOG|BIT|13, REDRAWBUTSSCRIPT,
+ uiDefButBitI(block, TOG, G_DOSCRIPTLINKS, REDRAWBUTSSCRIPT,
"Enable Script Links", xco, 200, 150, 20, &G.f, 0, 0, 0, 0,
"Enable execution of all assigned Script links");
/* for proper alignment: */
diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c
index 1268a9432ac..5bef8d977e8 100644
--- a/source/blender/src/buttons_shading.c
+++ b/source/blender/src/buttons_shading.c
@@ -858,7 +858,7 @@ static void texture_panel_blend(Tex *tex)
uiDefButS(block, ROW, B_TEXPRV, "Lin", 10, 180, 75, 19, &tex->stype, 2.0, 0.0, 0, 0, "Creates a linear progresion");
uiDefButS(block, ROW, B_TEXPRV, "Quad", 85, 180, 75, 19, &tex->stype, 2.0, 1.0, 0, 0, "Creates a quadratic progression");
uiDefButS(block, ROW, B_TEXPRV, "Ease", 160, 180, 75, 19, &tex->stype, 2.0, 2.0, 0, 0, "Creates a progression easing from one step to the next");
- uiDefButS(block, TOG|BIT|1, B_TEXPRV, "Flip XY", 235, 180, 75, 19, &tex->flag, 0, 0, 0, 0, "Flips the direction of the progression 90 degrees");
+ uiDefButBitS(block, TOG, TEX_FLIPBLEND, B_TEXPRV, "Flip XY", 235, 180, 75, 19, &tex->flag, 0, 0, 0, 0, "Flips the direction of the progression 90 degrees");
uiDefButS(block, ROW, B_TEXPRV, "Diag", 10, 160, 100, 19, &tex->stype, 2.0, 3.0, 0, 0, "Use a diagonal progression");
uiDefButS(block, ROW, B_TEXPRV, "Sphere", 110, 160, 100, 19, &tex->stype, 2.0, 4.0, 0, 0, "Use progression with the shape of a sphere");
@@ -1144,7 +1144,7 @@ static void texture_panel_envmap(Tex *tex)
if (tex->ima->packedfile) packdummy = 1;
else packdummy = 0;
- uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,125,24,20, &packdummy, 0, 0, 0, 0, "Toggles Packed status of this environment map");
+ uiDefIconButBitI(block, TOG, 1, B_PACKIMA, ICON_PACKAGE, 205,125,24,20, &packdummy, 0, 0, 0, 0, "Toggles Packed status of this environment map");
}
else uiBlockEndAlign(block);
}
@@ -1179,16 +1179,16 @@ static void texture_panel_envmap(Tex *tex)
uiBlockBeginAlign(block);
for(a=0; a<5; a++)
- uiDefButI(block, TOG|BIT|a, 0, "", (xco+a*(dx/2)), (yco+dy/2), (dx/2), (1+dy/2), &env->notlay, 0, 0, 0, 0, "Toggles layer visibility to environment map");
+ uiDefButBitI(block, TOG, 1<<a, 0, "", (xco+a*(dx/2)), (yco+dy/2), (dx/2), (1+dy/2), &env->notlay, 0, 0, 0, 0, "Toggles layer visibility to environment map");
for(a=0; a<5; a++)
- uiDefButI(block, TOG|BIT|(a+10), 0, "",(xco+a*(dx/2)), yco, (dx/2), (dy/2), &env->notlay, 0, 0, 0, 0, "Toggles layer visibility to environment map");
+ uiDefButBitI(block, TOG, 1<<(a+10), 0, "",(xco+a*(dx/2)), yco, (dx/2), (dy/2), &env->notlay, 0, 0, 0, 0, "Toggles layer visibility to environment map");
uiBlockBeginAlign(block);
xco+= 5;
for(a=5; a<10; a++)
- uiDefButI(block, TOG|BIT|a, 0, "", (xco+a*(dx/2)), (yco+dy/2), (dx/2), (1+dy/2), &env->notlay, 0, 0, 0, 0, "Toggles layer visibility to environment map");
+ uiDefButBitI(block, TOG, 1<<a, 0, "", (xco+a*(dx/2)), (yco+dy/2), (dx/2), (1+dy/2), &env->notlay, 0, 0, 0, 0, "Toggles layer visibility to environment map");
for(a=5; a<10; a++)
- uiDefButI(block, TOG|BIT|(a+10), 0, "",(xco+a*(dx/2)), yco, (dx/2), (dy/2), &env->notlay, 0, 0, 0, 0, "Toggles layer visibility to environment map");
+ uiDefButBitI(block, TOG, 1<<(a+10), 0, "",(xco+a*(dx/2)), yco, (dx/2), (dy/2), &env->notlay, 0, 0, 0, 0, "Toggles layer visibility to environment map");
}
}
@@ -1230,7 +1230,7 @@ static void texture_panel_image1(Tex *tex)
uiDefButS(block, NUM, B_TEXPRV, "", 879,30,37,19, &(tex->fradur[2][1]), 0.0, 250.0, 0, 0, "Montage mode: amount of displayed frames");
uiDefButS(block, NUM, B_TEXPRV, "", 879,10,37,19, &(tex->fradur[3][1]), 0.0, 250.0, 0, 0, "Montage mode: amount of displayed frames");
uiBlockEndAlign(block);
- uiDefButS(block, TOG|BIT|6, B_TEXPRV, "Cyclic", 743,60,48,19, &tex->imaflag, 0, 0, 0, 0, "Toggles looping of animated frames");
+ uiDefButBitS(block, TOG, TEX_ANIMCYCLIC, B_TEXPRV, "Cyclic", 743,60,48,19, &tex->imaflag, 0, 0, 0, 0, "Toggles looping of animated frames");
}
@@ -1246,17 +1246,17 @@ static void texture_panel_image(Tex *tex)
/* types */
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|0, 0, "InterPol", 10, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Interpolates pixels of the Image to fit texture mapping");
- uiDefButS(block, TOG|BIT|1, B_TEXPRV, "UseAlpha", 85, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Click to use Image's alpha channel");
- uiDefButS(block, TOG|BIT|5, B_TEXPRV, "CalcAlpha", 160, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Click to calculate an alpha channel based on Image RGB values");
- uiDefButS(block, TOG|BIT|2, B_TEXPRV, "NegAlpha", 235, 180, 75, 18, &tex->flag, 0, 0, 0, 0, "Click to invert the alpha values");
-
- uiDefButS(block, TOG|BIT|2, B_IMAPTEST, "MipMap", 10, 160, 60, 18, &tex->imaflag, 0, 0, 0, 0, "Generates a series of pictures to use for mipmapping");
- uiDefButS(block, TOG|BIT|3, B_IMAPTEST, "Fields", 70, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Click to enable use of fields in Image");
- uiDefButS(block, TOG|BIT|4, B_TEXPRV, "Rot90", 120, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Actually flips X and Y for rendering, rotates and mirrors");
- uiDefButS(block, TOG|BIT|7, B_RELOADIMA, "Movie", 170, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Click to enable movie frames as Images");
- uiDefButS(block, TOG|BIT|8, 0, "Anti", 220, 160, 40, 18, &tex->imaflag, 0, 0, 0, 0, "Toggles Image anti-aliasing");
- uiDefButS(block, TOG|BIT|10, 0, "StField", 260, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Standard Field Toggle");
+ uiDefButBitS(block, TOG, TEX_INTERPOL, 0, "InterPol", 10, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Interpolates pixels of the Image to fit texture mapping");
+ uiDefButBitS(block, TOG, TEX_USEALPHA, B_TEXPRV, "UseAlpha", 85, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Click to use Image's alpha channel");
+ uiDefButBitS(block, TOG, TEX_CALCALPHA, B_TEXPRV, "CalcAlpha", 160, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Click to calculate an alpha channel based on Image RGB values");
+ uiDefButBitS(block, TOG, TEX_NEGALPHA, B_TEXPRV, "NegAlpha", 235, 180, 75, 18, &tex->flag, 0, 0, 0, 0, "Click to invert the alpha values");
+
+ uiDefButBitS(block, TOG, TEX_MIPMAP, B_IMAPTEST, "MipMap", 10, 160, 60, 18, &tex->imaflag, 0, 0, 0, 0, "Generates a series of pictures to use for mipmapping");
+ uiDefButBitS(block, TOG, TEX_FIELDS, B_IMAPTEST, "Fields", 70, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Click to enable use of fields in Image");
+ uiDefButBitS(block, TOG, TEX_IMAROT, B_TEXPRV, "Rot90", 120, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Actually flips X and Y for rendering, rotates and mirrors");
+ uiDefButBitS(block, TOG, TEX_ANIM5, B_RELOADIMA, "Movie", 170, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Click to enable movie frames as Images");
+ uiDefButBitS(block, TOG, TEX_ANTIALI, 0, "Anti", 220, 160, 40, 18, &tex->imaflag, 0, 0, 0, 0, "Toggles Image anti-aliasing");
+ uiDefButBitS(block, TOG, TEX_STD_FIELD, 0, "StField", 260, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "Standard Field Toggle");
uiBlockEndAlign(block);
/* file input */
@@ -1279,7 +1279,7 @@ static void texture_panel_image(Tex *tex)
if (tex->ima->packedfile) packdummy = 1;
else packdummy = 0;
- uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,115,24,19, &packdummy, 0, 0, 0, 0, "Toggles Packed status of this Image");
+ uiDefIconButBitI(block, TOG, 1, B_PACKIMA, ICON_PACKAGE, 205,115,24,19, &packdummy, 0, 0, 0, 0, "Toggles Packed status of this Image");
}
else uiBlockEndAlign(block);
}
@@ -1290,7 +1290,7 @@ static void texture_panel_image(Tex *tex)
/* crop extend clip */
uiDefButF(block, NUM, B_TEXPRV, "Filter :", 10,92,150,19, &tex->filtersize, 0.1, 25.0, 0, 3, "Sets the filter size used by mipmap and interpol");
- uiDefButS(block, TOG|BIT|11, B_NOP, "Normal Map", 160,92,150,19, &tex->imaflag, 0.1, 25.0, 0, 0, "Use image RGB values for normal mapping");
+ uiDefButBitS(block, TOG, TEX_NORMALMAP, B_NOP, "Normal Map", 160,92,150,19, &tex->imaflag, 0.1, 25.0, 0, 0, "Use image RGB values for normal mapping");
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_TEXREDR_PRV, "Extend", 10,70,63,19, &tex->extend, 4.0, 1.0, 0, 0, "Extends the colour of the edge pixels");
@@ -1306,8 +1306,8 @@ static void texture_panel_image(Tex *tex)
}
else if(tex->extend==TEX_CHECKER) {
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|3, B_TEXPRV, "Odd", 10,50,100,19, &tex->flag, 0.0, 0.0, 0, 0, "Sets odd checker tiles");
- uiDefButS(block, TOG|BIT|4, B_TEXPRV, "Even", 110,50,100,19, &tex->flag, 0.0, 0.0, 0, 0, "Sets even checker tiles");
+ uiDefButBitS(block, TOG, TEX_CHECKER_ODD, B_TEXPRV, "Odd", 10,50,100,19, &tex->flag, 0.0, 0.0, 0, 0, "Sets odd checker tiles");
+ uiDefButBitS(block, TOG, TEX_CHECKER_EVEN, B_TEXPRV, "Even", 110,50,100,19, &tex->flag, 0.0, 0.0, 0, 0, "Sets even checker tiles");
uiDefButF(block, NUM, B_TEXPRV, "Mortar:", 210,50,100,19, &tex->checkerdist, 0.0, 0.99, 0, 0, "Set checkers distance (like mortar)");
}
uiBlockBeginAlign(block);
@@ -1364,7 +1364,7 @@ static void texture_panel_colors(Tex *tex)
/* COLORBAND */
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|0, B_COLORBAND, "Colorband",10,180,80,20, &tex->flag, 0, 0, 0, 0, "Toggles colorband operations");
+ uiDefButBitS(block, TOG, TEX_COLORBAND, B_COLORBAND, "Colorband",10,180,80,20, &tex->flag, 0, 0, 0, 0, "Toggles colorband operations");
if(tex->flag & TEX_COLORBAND) {
draw_colorband_buts(block, tex->coba, 0, B_TEXREDR_PRV);
@@ -1666,8 +1666,8 @@ static void radio_panel_tool(Radio *rad, int flag)
uiDefButS(block, ROW, B_RAD_DRAW, "Wire", 2, 0, 10, 10, &rad->drawtype, 0.0, 0.0, 0, 0, "Enables wireframe drawmode");
uiDefButS(block, ROW, B_RAD_DRAW, "Solid", 2, 0, 10, 10, &rad->drawtype, 0.0, 1.0, 0, 0, "Enables solid drawmode");
uiDefButS(block, ROW, B_RAD_DRAW, "Gour", 2, 0, 10, 10, &rad->drawtype, 0.0, 2.0, 0, 0, "Enables Gourad drawmode");
- uiDefButS(block, TOG|BIT|0, B_RAD_DRAW, "ShowLim", 2, 0, 10, 10, &rad->flag, 0, 0, 0, 0, "Draws patch and element limits");
- uiDefButS(block, TOG|BIT|1, B_RAD_DRAW, "Z", 2, 0, 3, 10, &rad->flag, 0, 0, 0, 0, "Draws limits differently");
+ uiDefButBitS(block, TOG, 1, B_RAD_DRAW, "ShowLim", 2, 0, 10, 10, &rad->flag, 0, 0, 0, 0, "Draws patch and element limits");
+ uiDefButBitS(block, TOG, 2, B_RAD_DRAW, "Z", 2, 0, 3, 10, &rad->flag, 0, 0, 0, 0, "Draws limits differently");
uiDefButS(block, NUM, B_RAD_LIMITS, "ElMax:", 3, 0, 10, 10, &rad->elma, 1.0, 500.0, 0, 0, "Sets maximum size of an element");
uiDefButS(block, NUM, B_RAD_LIMITS, "ElMin:", 3, 0, 10, 10, &rad->elmi, 1.0, 100.0, 0, 0, "Sets minimum size of an element");
@@ -1738,9 +1738,9 @@ static void world_panel_mapto(World *wrld)
/* TEXTURE OUTPUT */
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 10,125,45,19, &(mtex->texflag), 0, 0, 0, 0, "Sets the texture mapping to stencil mode");
- uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 55,125,30,19, &(mtex->texflag), 0, 0, 0, 0, "Inverts the values of the texture to reverse its effect");
- uiDefButS(block, TOG|BIT|0, B_MATPRV, "No RGB", 85,125,60,19, &(mtex->texflag), 0, 0, 0, 0, "Converts texture RGB values to intensity (gray) values");
+ uiDefButBitS(block, TOG, MTEX_STENCIL, B_MATPRV, "Stencil", 10,125,45,19, &(mtex->texflag), 0, 0, 0, 0, "Sets the texture mapping to stencil mode");
+ uiDefButBitS(block, TOG, MTEX_NEGATIVE, B_MATPRV, "Neg", 55,125,30,19, &(mtex->texflag), 0, 0, 0, 0, "Inverts the values of the texture to reverse its effect");
+ uiDefButBitS(block, TOG, MTEX_RGBTOINT, B_MATPRV, "No RGB", 85,125,60,19, &(mtex->texflag), 0, 0, 0, 0, "Converts texture RGB values to intensity (gray) values");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
@@ -1753,10 +1753,10 @@ static void world_panel_mapto(World *wrld)
/* MAP TO */
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|0, B_MATPRV, "Blend", 10,180,75,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the colour progression of the background");
- uiDefButS(block, TOG|BIT|1, B_MATPRV, "Hori", 85,180,75,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the colour of the horizon");
- uiDefButS(block, TOG|BIT|2, B_MATPRV, "ZenUp", 160,180,75,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the colour of the zenith above");
- uiDefButS(block, TOG|BIT|3, B_MATPRV, "ZenDo", 235,180,75,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the colour of the zenith below");
+ uiDefButBitS(block, TOG, B_MATPRV, WOMAP_BLEND, "Blend", 10,180,75,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the colour progression of the background");
+ uiDefButBitS(block, TOG, B_MATPRV, WOMAP_HORIZ, "Hori", 85,180,75,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the colour of the horizon");
+ uiDefButBitS(block, TOG, B_MATPRV, WOMAP_ZENUP, "ZenUp", 160,180,75,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the colour of the zenith above");
+ uiDefButBitS(block, TOG, B_MATPRV, WOMAP_ZENDOWN, "ZenDo", 235,180,75,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the colour of the zenith below");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
@@ -1867,7 +1867,7 @@ static void world_panel_mistaph(World *wrld)
#endif
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButS(block, TOG|BIT|0,REDRAWVIEW3D,"Mist", 10,120,140,19, &wrld->mode, 0, 0, 0, 0, "Toggles mist simulation");
+ uiDefButBitS(block, TOG, WO_MIST, REDRAWVIEW3D,"Mist", 10,120,140,19, &wrld->mode, 0, 0, 0, 0, "Toggles mist simulation");
uiBlockSetCol(block, TH_AUTO);
uiBlockBeginAlign(block);
@@ -1882,7 +1882,7 @@ static void world_panel_mistaph(World *wrld)
uiBlockEndAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButS(block, TOG|BIT|1,REDRAWVIEW3D, "Stars",160,120,140,19, &wrld->mode, 0, 0, 0, 0, "Toggles starfield generation");
+ uiDefButBitS(block, TOG, WO_STARS, REDRAWVIEW3D, "Stars",160,120,140,19, &wrld->mode, 0, 0, 0, 0, "Toggles starfield generation");
uiBlockSetCol(block, TH_AUTO);
uiBlockBeginAlign(block);
@@ -1903,7 +1903,7 @@ static void world_panel_amb_occ(World *wrld)
if(uiNewPanel(curarea, block, "Amb Occ", "World", 320, 0, 318, 204)==0) return;
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButS(block, TOG|BIT|4,B_REDR, "Ambient Occlusion",10,150,300,19, &wrld->mode, 0, 0, 0, 0, "Toggles ambient occlusion");
+ uiDefButBitS(block, TOG, WO_AMB_OCC, B_REDR, "Ambient Occlusion",10,150,300,19, &wrld->mode, 0, 0, 0, 0, "Toggles ambient occlusion");
uiBlockSetCol(block, TH_AUTO);
if(wrld->mode & WO_AMB_OCC) {
@@ -1912,13 +1912,13 @@ static void world_panel_amb_occ(World *wrld)
uiBlockBeginAlign(block);
uiDefButS(block, NUM, B_REDR, "Samples:", 10, 120, 150, 19, &wrld->aosamp, 1.0, 16.0, 100, 0, "Sets the number of samples used for AO (actual number: squared)");
/* enable/disable total random sampling */
- uiDefButS(block, TOG|BIT|1, 0, "Random Sampling", 160, 120, 150, 19, &wrld->aomode, 0, 0, 0, 0, "When enabled, total random sampling will be used for an even noisier effect");
+ uiDefButBitS(block, TOG, WO_AORNDSMP, 0, "Random Sampling", 160, 120, 150, 19, &wrld->aomode, 0, 0, 0, 0, "When enabled, total random sampling will be used for an even noisier effect");
uiBlockEndAlign(block);
uiDefButF(block, NUM, B_REDR, "Dist:", 10, 95, 150, 19, &wrld->aodist, 0.001, 5000.0, 100, 0, "Sets length of AO rays, defines how far away other faces give occlusion effect");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|0, B_REDR, "Use Distances", 10, 70, 150, 19, &wrld->aomode, 0, 0, 0, 0, "When enabled, distances to objects will be used to attenuate shadows");
+ uiDefButBitS(block, TOG, WO_AODIST, B_REDR, "Use Distances", 10, 70, 150, 19, &wrld->aomode, 0, 0, 0, 0, "When enabled, distances to objects will be used to attenuate shadows");
/* distance attenuation factor */
if (wrld->aomode & WO_AODIST)
uiDefButF(block, NUM, B_REDR, "DistF:", 160, 70, 150, 19, &wrld->aodistfac, 0.00001, 10.0, 100, 0, "Distance factor, the higher, the 'shorter' the shadows");
@@ -2005,9 +2005,9 @@ static void world_panel_preview(World *wrld)
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|1,B_MATPRV,"Real", 200,175,80,25, &wrld->skytype, 0, 0, 0, 0, "Renders background with a real horizon");
- uiDefButS(block, TOG|BIT|0,B_MATPRV,"Blend",200,150,80,25, &wrld->skytype, 0, 0, 0, 0, "Renders background with natural progression from horizon to zenith");
- uiDefButS(block, TOG|BIT|2,B_MATPRV,"Paper",200,125,80,25, &wrld->skytype, 0, 0, 0, 0, "Flattens blend or texture coordinates");
+ uiDefButBitS(block, TOG, WO_SKYREAL, B_MATPRV,"Real", 200,175,80,25, &wrld->skytype, 0, 0, 0, 0, "Renders background with a real horizon");
+ uiDefButBitS(block, TOG, WO_SKYBLEND, B_MATPRV,"Blend",200,150,80,25, &wrld->skytype, 0, 0, 0, 0, "Renders background with natural progression from horizon to zenith");
+ uiDefButBitS(block, TOG,WO_SKYPAPER, B_MATPRV,"Paper",200,125,80,25, &wrld->skytype, 0, 0, 0, 0, "Flattens blend or texture coordinates");
uiBlockEndAlign(block);
}
@@ -2084,9 +2084,9 @@ static void lamp_panel_mapto(Object *ob, Lamp *la)
/* TEXTURE OUTPUT */
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 10,125,45,19, &(mtex->texflag), 0, 0, 0, 0, "Sets the texture mapping to stencil mode");
- uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 55,125,30,19, &(mtex->texflag), 0, 0, 0, 0, "Inverts the values of the texture to reverse its effect");
- uiDefButS(block, TOG|BIT|0, B_MATPRV, "No RGB", 85,125,60,19, &(mtex->texflag), 0, 0, 0, 0, "Converts texture RGB values to intensity (gray) values");
+ uiDefButBitS(block, TOG, MTEX_STENCIL, B_MATPRV, "Stencil", 10,125,45,19, &(mtex->texflag), 0, 0, 0, 0, "Sets the texture mapping to stencil mode");
+ uiDefButBitS(block, TOG, MTEX_NEGATIVE, B_MATPRV, "Neg", 55,125,30,19, &(mtex->texflag), 0, 0, 0, 0, "Inverts the values of the texture to reverse its effect");
+ uiDefButBitS(block, TOG, MTEX_RGBTOINT, B_MATPRV, "No RGB", 85,125,60,19, &(mtex->texflag), 0, 0, 0, 0, "Converts texture RGB values to intensity (gray) values");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
@@ -2098,7 +2098,7 @@ static void lamp_panel_mapto(Object *ob, Lamp *la)
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 10,10,135,19, &(mtex->def_var), 0.0, 1.0, 0, 0, "The default value the textures uses to mix with");
/* MAP TO */
- uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 10,180,135,19, &(mtex->mapto), 0, 0, 0, 0, "Lets the texture affect the basic colour of the lamp");
+ uiDefButBitS(block, TOG, MAP_COL, B_MATPRV, "Col", 10,180,135,19, &(mtex->mapto), 0, 0, 0, 0, "Lets the texture affect the basic colour of the lamp");
uiBlockBeginAlign(block);
uiDefButS(block, MENU, B_MATPRV, mapto_blendtype_pup(),155,125,155,19, &(mtex->blendtype), 0, 0, 0, 0, "Texture blending mode");
@@ -2203,16 +2203,16 @@ static void lamp_panel_spot(Object *ob, Lamp *la)
uiBlockSetCol(block, TH_BUT_SETTING1);
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|13, B_SHADRAY,"Ray Shadow",10,180,80,19,&la->mode, 0, 0, 0, 0, "Use ray tracing for shadow");
+ uiDefButBitS(block, TOG, LA_SHAD_RAY, B_SHADRAY,"Ray Shadow",10,180,80,19,&la->mode, 0, 0, 0, 0, "Use ray tracing for shadow");
if(la->type==LA_SPOT)
- uiDefButS(block, TOG|BIT|0, B_SHADBUF, "Buf.Shadow",10,160,80,19,&la->mode, 0, 0, 0, 0, "Lets spotlight produce shadows using shadow buffer");
+ uiDefButBitS(block, TOG, LA_SHAD, B_SHADBUF, "Buf.Shadow",10,160,80,19,&la->mode, 0, 0, 0, 0, "Lets spotlight produce shadows using shadow buffer");
uiBlockEndAlign(block);
- uiDefButS(block, TOG|BIT|5, 0,"OnlyShadow", 10,110,80,19,&la->mode, 0, 0, 0, 0, "Causes light to cast shadows only without illuminating objects");
+ uiDefButBitS(block, TOG, LA_ONLYSHADOW, 0,"OnlyShadow", 10,110,80,19,&la->mode, 0, 0, 0, 0, "Causes light to cast shadows only without illuminating objects");
if(la->type==LA_SPOT) {
- uiDefButS(block, TOG|BIT|7, B_LAMPREDRAW,"Square", 10,70,80,19,&la->mode, 0, 0, 0, 0, "Sets square spotbundles");
- uiDefButS(block, TOG|BIT|1, 0,"Halo", 10,50,80,19,&la->mode, 0, 0, 0, 0, "Renders spotlight with a volumetric halo");
+ uiDefButBitS(block, TOG, LA_SQUARE, B_LAMPREDRAW,"Square", 10,70,80,19,&la->mode, 0, 0, 0, 0, "Sets square spotbundles");
+ uiDefButBitS(block, TOG, LA_HALO, 0,"Halo", 10,50,80,19,&la->mode, 0, 0, 0, 0, "Renders spotlight with a volumetric halo");
uiBlockSetCol(block, TH_AUTO);
uiBlockBeginAlign(block);
@@ -2252,9 +2252,9 @@ static void lamp_panel_spot(Object *ob, Lamp *la)
}
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|1, 0,"Umbra", 100,110,200,19,&la->ray_samp_type, 0, 0, 0, 0, "Emphasis parts that are fully shadowed");
- uiDefButS(block, TOG|BIT|2, 0,"Dither", 100,90,100,19,&la->ray_samp_type, 0, 0, 0, 0, "Use 2x2 dithering for sampling");
- uiDefButS(block, TOG|BIT|3, 0,"Noise", 200,90,100,19,&la->ray_samp_type, 0, 0, 0, 0, "Use noise for sampling");
+ uiDefButBitS(block, TOG, LA_SAMP_UMBRA, 0,"Umbra", 100,110,200,19,&la->ray_samp_type, 0, 0, 0, 0, "Emphasis parts that are fully shadowed");
+ uiDefButBitS(block, TOG, LA_SAMP_DITHER, 0,"Dither", 100,90,100,19,&la->ray_samp_type, 0, 0, 0, 0, "Use 2x2 dithering for sampling");
+ uiDefButBitS(block, TOG, LA_SAMP_JITTER, 0,"Noise", 200,90,100,19,&la->ray_samp_type, 0, 0, 0, 0, "Use noise for sampling");
}
else uiDefBut(block, LABEL,0," ", 100,180,200,19,NULL, 0, 0, 0, 0, "");
@@ -2276,7 +2276,7 @@ static void lamp_panel_yafray(Object *ob, Lamp *la)
/* photonlight params */
if (la->type==LA_YF_PHOTON) {
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButS(block, TOG|BIT|0, B_DIFF,"Use QMC",10,180,80,19,&la->YF_useqmc, 0, 0, 0, 0, "Use QMC sampling (sometimes visible patterns)");
+ uiDefButBitS(block, TOG, 1, B_DIFF,"Use QMC",10,180,80,19,&la->YF_useqmc, 0, 0, 0, 0, "Use QMC sampling (sometimes visible patterns)");
uiBlockSetCol(block, TH_AUTO);
uiDefButF(block, NUMSLI,B_LAMPREDRAW,"Angle ", 100,180,200,19,&la->spotsize, 1.0, 180.0, 0, 0, "Sets the angle of the photonlight beam in degrees");
uiDefButI(block, NUM,B_DIFF,"photons:", 10,150,290,19, &la->YF_numphotons, 10000, 100000000, 0, 0, "Maximum number of photons to shoot");
@@ -2291,12 +2291,12 @@ static void lamp_panel_yafray(Object *ob, Lamp *la)
/* in yafray arealights always cast shadows, so ray shadow flag not needed */
/* ray shadow also not used when halo for spot enabled */
if ((la->type!=LA_AREA) && (!((la->type==LA_SPOT) && (la->mode & LA_HALO))))
- uiDefButS(block, TOG|BIT|13, B_SHADRAY,"Ray Shadow",10,180,80,19,&la->mode, 0, 0, 0, 0, "Use ray tracing for shadow");
+ uiDefButBitS(block, TOG, LA_SHAD_RAY, B_SHADRAY,"Ray Shadow",10,180,80,19,&la->mode, 0, 0, 0, 0, "Use ray tracing for shadow");
/* in yafray the regular lamp can use shadowbuffers (softlight), used by spot with halo as well */
/* to prevent clash with blender shadowbuf flag, a special flag is used for yafray */
if (la->type==LA_LOCAL) {
- uiDefButS(block, TOG|BIT|14, B_SHADBUF, "Buf.Shadow",10,160,80,19,&la->mode, 0, 0, 0, 0, "Lets light produce shadows using shadow buffer");
+ uiDefButBitS(block, TOG, LA_YF_SOFT, B_SHADBUF, "Buf.Shadow",10,160,80,19,&la->mode, 0, 0, 0, 0, "Lets light produce shadows using shadow buffer");
uiDefButF(block, NUM, B_DIFF, "GloInt:", 100,155,200,19, &la->YF_glowint, 0.0, 1.0, 1, 0, "Sets light glow intensity, 0 is off");
uiDefButF(block, NUM, B_DIFF, "GloOfs:", 100,135,100,19, &la->YF_glowofs, 0.0, 2.0, 1, 0, "Sets light glow offset, the higher, the less 'peaked' the glow");
uiDefButS(block, NUM, B_DIFF, "GlowType:", 200,135,100,19, &la->YF_glowtype, 0, 1, 1, 0, "Sets light glow type");
@@ -2324,7 +2324,7 @@ static void lamp_panel_yafray(Object *ob, Lamp *la)
if (la->type==LA_SPOT) {
- uiDefButS(block, TOG|BIT|1, B_LAMPREDRAW,"Halo", 10,50,80,19,&la->mode, 0, 0, 0, 0, "Renders spotlight with a volumetric halo");
+ uiDefButBitS(block, TOG, LA_HALO, B_LAMPREDRAW,"Halo", 10,50,80,19,&la->mode, 0, 0, 0, 0, "Renders spotlight with a volumetric halo");
uiBlockSetCol(block, TH_AUTO);
uiBlockBeginAlign(block);
@@ -2387,16 +2387,16 @@ static void lamp_panel_lamp(Object *ob, Lamp *la)
}
else if ELEM(la->type, LA_LOCAL, LA_SPOT) {
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButS(block, TOG|BIT|3, B_MATPRV,"Quad", 10,150,100,19,&la->mode, 0, 0, 0, 0, "Uses inverse quadratic proportion for light attenuation");
- uiDefButS(block, TOG|BIT|6, REDRAWVIEW3D,"Sphere", 10,130,100,19,&la->mode, 0, 0, 0, 0, "Sets light intensity to zero for objects beyond the distance value");
+ uiDefButBitS(block, TOG, LA_QUAD, B_MATPRV,"Quad", 10,150,100,19,&la->mode, 0, 0, 0, 0, "Uses inverse quadratic proportion for light attenuation");
+ uiDefButBitS(block, TOG, LA_SPHERE, REDRAWVIEW3D,"Sphere", 10,130,100,19,&la->mode, 0, 0, 0, 0, "Sets light intensity to zero for objects beyond the distance value");
}
uiBlockBeginAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButS(block, TOG|BIT|2, 0,"Layer", 10,70,100,19,&la->mode, 0, 0, 0, 0, "Illuminates objects in the same layer as the lamp only");
- uiDefButS(block, TOG|BIT|4, B_MATPRV,"Negative", 10,50,100,19,&la->mode, 0, 0, 0, 0, "Sets lamp to cast negative light");
- uiDefButS(block, TOG|BIT|11, 0,"No Diffuse", 10,30,100,19,&la->mode, 0, 0, 0, 0, "Disables diffuse shading of material illuminated by this lamp");
- uiDefButS(block, TOG|BIT|12, 0,"No Specular", 10,10,100,19,&la->mode, 0, 0, 0, 0, "Disables specular shading of material illuminated by this lamp");
+ uiDefButBitS(block, TOG, LA_LAYER, 0,"Layer", 10,70,100,19,&la->mode, 0, 0, 0, 0, "Illuminates objects in the same layer as the lamp only");
+ uiDefButBitS(block, TOG, LA_NEG, B_MATPRV,"Negative", 10,50,100,19,&la->mode, 0, 0, 0, 0, "Sets lamp to cast negative light");
+ uiDefButBitS(block, TOG, LA_NO_DIFF, 0,"No Diffuse", 10,30,100,19,&la->mode, 0, 0, 0, 0, "Disables diffuse shading of material illuminated by this lamp");
+ uiDefButBitS(block, TOG, LA_NO_SPEC, 0,"No Specular", 10,10,100,19,&la->mode, 0, 0, 0, 0, "Disables specular shading of material illuminated by this lamp");
uiBlockEndAlign(block);
uiBlockSetCol(block, TH_AUTO);
@@ -2644,9 +2644,9 @@ static void material_panel_map_to(Material *ma)
/* TEXTURE OUTPUT */
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|1, B_MATPRV, "Stencil", 10,125,45,19, &(mtex->texflag), 0, 0, 0, 0, "Sets the texture mapping to stencil mode");
- uiDefButS(block, TOG|BIT|2, B_MATPRV, "Neg", 55,125,30,19, &(mtex->texflag), 0, 0, 0, 0, "Inverts the values of the texture to reverse its effect");
- uiDefButS(block, TOG|BIT|0, B_MATPRV, "No RGB", 85,125,60,19, &(mtex->texflag), 0, 0, 0, 0, "Converts texture RGB values to intensity (gray) values");
+ uiDefButBitS(block, TOG, MTEX_STENCIL, B_MATPRV, "Stencil", 10,125,45,19, &(mtex->texflag), 0, 0, 0, 0, "Sets the texture mapping to stencil mode");
+ uiDefButBitS(block, TOG, MTEX_NEGATIVE, B_MATPRV, "Neg", 55,125,30,19, &(mtex->texflag), 0, 0, 0, 0, "Inverts the values of the texture to reverse its effect");
+ uiDefButBitS(block, TOG,MTEX_RGBTOINT, B_MATPRV, "No RGB", 85,125,60,19, &(mtex->texflag), 0, 0, 0, 0, "Converts texture RGB values to intensity (gray) values");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
@@ -2670,20 +2670,20 @@ static void material_panel_map_to(Material *ma)
/* MAP TO */
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 10,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect basic colour of the material");
- uiDefButS(block, TOG3|BIT|1, B_MATPRV, "Nor", 50,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the rendered normal");
- uiDefButS(block, TOG|BIT|2, B_MATPRV, "Csp", 90,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the specularity colour");
- uiDefButS(block, TOG|BIT|3, B_MATPRV, "Cmir", 130,180,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the mirror colour");
- uiDefButS(block, TOG3|BIT|4, B_MATPRV, "Ref", 180,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the value of the materials reflectivity");
- uiDefButS(block, TOG3|BIT|5, B_MATPRV, "Spec", 220,180,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the value of specularity");
- uiDefButS(block, TOG3|BIT|11, B_MATPRV, "Amb", 270,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the value of ambient");
-
- uiDefButS(block, TOG3|BIT|8, B_MATPRV, "Hard", 10,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the hardness value");
- uiDefButS(block, TOG3|BIT|9, B_MATPRV, "RayMir", 60,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the ray-mirror value");
- uiDefButS(block, TOG3|BIT|7, B_MATPRV, "Alpha", 110,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the alpha value");
- uiDefButS(block, TOG3|BIT|6, B_MATPRV, "Emit", 160,160,45,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the emit value");
- uiDefButS(block, TOG3|BIT|10, B_MATPRV, "Translu", 205,160,60,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the translucency value");
- uiDefButS(block, TOG3|BIT|12, B_MATPRV, "Disp", 265,160,45,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture displace the surface");
+ uiDefButBitS(block, TOG, MAP_COL, B_MATPRV, "Col", 10,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect basic colour of the material");
+ uiDefButBitS(block, TOG3, MAP_NORM, B_MATPRV, "Nor", 50,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the rendered normal");
+ uiDefButBitS(block, TOG, MAP_COLSPEC, B_MATPRV, "Csp", 90,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the specularity colour");
+ uiDefButBitS(block, TOG, MAP_COLMIR, B_MATPRV, "Cmir", 130,180,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the mirror colour");
+ uiDefButBitS(block, TOG3, MAP_REF, B_MATPRV, "Ref", 180,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the value of the materials reflectivity");
+ uiDefButBitS(block, TOG3, MAP_SPEC, B_MATPRV, "Spec", 220,180,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the value of specularity");
+ uiDefButBitS(block, TOG3, MAP_AMB, B_MATPRV, "Amb", 270,180,40,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the value of ambient");
+
+ uiDefButBitS(block, TOG3, MAP_HAR, B_MATPRV, "Hard", 10,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the hardness value");
+ uiDefButBitS(block, TOG3, MAP_RAYMIRR, B_MATPRV, "RayMir", 60,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the ray-mirror value");
+ uiDefButBitS(block, TOG3, MAP_ALPHA, B_MATPRV, "Alpha", 110,160,50,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the alpha value");
+ uiDefButBitS(block, TOG3, MAP_EMIT, B_MATPRV, "Emit", 160,160,45,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the emit value");
+ uiDefButBitS(block, TOG3, MAP_TRANSLU, B_MATPRV, "Translu", 205,160,60,19, &(mtex->mapto), 0, 0, 0, 0, "Causes the texture to affect the translucency value");
+ uiDefButBitS(block, TOG3, MAP_DISPLACE, B_MATPRV, "Disp", 265,160,45,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture displace the surface");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
@@ -2698,7 +2698,7 @@ static void material_panel_map_to(Material *ma)
uiDefButF(block, NUMSLI, B_MATPRV, "Disp ", 155,40,155,19, &(mtex->dispfac), 0.0, 1.0, 0, 0, "Sets the amount the texture displaces the surface");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|13, B_MATPRV, "Warp", 155,10,40,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture warp texture coordinates of next channels");
+ uiDefButBitS(block, TOG, MAP_WARP, B_MATPRV, "Warp", 155,10,40,19, &(mtex->mapto), 0, 0, 0, 0, "Let the texture warp texture coordinates of next channels");
uiDefButF(block, NUMSLI, B_MATPRV, "fac ", 195,10,115,19, &(mtex->warpfac), 0.0, 1.0, 0, 0, "Sets the amount the texture affects texture coordinates of next channels");
}
@@ -2797,8 +2797,8 @@ static void material_panel_texture(Material *ma)
mtex= ma->mtex[a];
if(mtex && mtex->tex) {
if(ma->septex & (1<<a))
- uiDefButS(block, TOG|BIT|a, B_MATPRV_DRAW, " ", -20, 180-18*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Click to disable or enable this texture channel");
- else uiDefIconButS(block, TOG|BIT|a, B_MATPRV_DRAW, ICON_CHECKBOX_HLT, -20, 180-18*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Click to disable or enable this texture channel");
+ uiDefButBitS(block, TOG, 1<<a, B_MATPRV_DRAW, " ", -20, 180-18*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Click to disable or enable this texture channel");
+ else uiDefIconButBitS(block, TOG, 1<<a, B_MATPRV_DRAW, ICON_CHECKBOX_HLT, -20, 180-18*a, 28, 20, &ma->septex, 0.0, 0.0, 0, 0, "Click to disable or enable this texture channel");
}
}
@@ -2835,7 +2835,7 @@ static void material_panel_texture(Material *ma)
uiBlockSetCol(block, TH_AUTO);
uiDefBut(block, BUT, B_TEXCLEAR, "Clear", 122, 130, 72, 20, 0, 0, 0, 0, 0, "Erases link to texture");
- uiDefButS(block, TOG|BIT|4, B_DIFF, "Correct Nor Map", 100,18,163,19, &(mtex->texflag), 0, 0, 0, 0, "This channel will correct normal mapping for View space and Object space");
+ uiDefButBitS(block, TOG, MTEX_VIEWSPACE, B_DIFF, "Correct Nor Map", 100,18,163,19, &(mtex->texflag), 0, 0, 0, 0, "This channel will correct normal mapping for View space and Object space");
}
else
@@ -2855,7 +2855,7 @@ static void material_panel_tramir(Material *ma)
uiNewPanelTabbed("Shaders", "Material");
if(uiNewPanel(curarea, block, "Mirror Transp", "Material", 640, 0, 318, 204)==0) return;
- uiDefButI(block, TOG|BIT|18, B_MATPRV,"Ray Mirror",210,180,100,20, &(ma->mode), 0, 0, 0, 0, "Enables raytracing for mirror reflection rendering");
+ uiDefButBitI(block, TOG, MA_RAYMIRROR, B_MATPRV,"Ray Mirror",210,180,100,20, &(ma->mode), 0, 0, 0, 0, "Enables raytracing for mirror reflection rendering");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "RayMir ", 10,160,200,20, &(ma->ray_mirror), 0.0, 1.0, 100, 2, "Sets the amount mirror reflection for raytrace");
@@ -2869,8 +2869,8 @@ static void material_panel_tramir(Material *ma)
uiDefButF(block, NUM, B_MATPRV, "Filt:", 10,110,100,20, &(ma->filter), 0.0, 1.0, 10, 0, "Amount of filtering for transparent raytrace");
else
uiDefButF(block, NUM, B_DIFF, "Zoffs:", 10,110,100,20, &(ma->zoffs), 0.0, 10.0, 100, 0, "Gives faces an artificial offset in the Z buffer for Ztransp option");
- uiDefButI(block, TOG|BIT|6, B_MATZTRANSP,"ZTransp", 110,110,100,20, &(ma->mode), 0, 0, 0, 0, "Enables Z-Buffering of transparent faces");
- uiDefButI(block, TOG|BIT|17, B_MATRAYTRANSP,"Ray Transp",210,110,100,20, &(ma->mode), 0, 0, 0, 0, "Enables raytracing for transparency rendering");
+ uiDefButBitI(block, TOG, MA_ZTRA, B_MATZTRANSP,"ZTransp", 110,110,100,20, &(ma->mode), 0, 0, 0, 0, "Enables Z-Buffering of transparent faces");
+ uiDefButBitI(block, TOG, MA_RAYTRANSP, B_MATRAYTRANSP,"Ray Transp",210,110,100,20, &(ma->mode), 0, 0, 0, 0, "Enables raytracing for transparency rendering");
uiBlockBeginAlign(block);
uiDefButF(block, NUMSLI, B_MATPRV, "IOR ", 10,90,200,20, &(ma->ang), 1.0, 3.0, 100, 2, "Sets the angular index of refraction for raytrace");
@@ -2884,9 +2884,9 @@ static void material_panel_tramir(Material *ma)
uiDefButF(block, NUMSLI, B_MATPRV, "Add ", 160,40,150,20, &(ma->add), 0.0, 1.0, 0, 0, "Sets a glow factor for transparant materials");
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|10, 0, "OnlyShadow", 10,10,100,20, &(ma->mode), 0, 0, 0, 0, "Renders shadows falling on material only");
- uiDefButI(block, TOG|BIT|14, 0, "No Mist", 110,10,100,20, &(ma->mode), 0, 0, 0, 0, "Sets the material to ignore mist values");
- uiDefButI(block, TOG|BIT|9, 0, "Env", 210,10,100,20, &(ma->mode), 0, 0, 0, 0, "Causes faces to render with alpha zero: allows sky/backdrop to show through");
+ uiDefButBitI(block, TOG, MA_ONLYSHADOW, 0, "OnlyShadow", 10,10,100,20, &(ma->mode), 0, 0, 0, 0, "Renders shadows falling on material only");
+ uiDefButBitI(block, TOG, MA_NOMIST, 0, "No Mist", 110,10,100,20, &(ma->mode), 0, 0, 0, 0, "Sets the material to ignore mist values");
+ uiDefButBitI(block, TOG, MA_ENV, 0, "Env", 210,10,100,20, &(ma->mode), 0, 0, 0, 0, "Causes faces to render with alpha zero: allows sky/backdrop to show through");
uiBlockEndAlign(block);
@@ -2913,9 +2913,9 @@ static void material_panel_tramir_yafray(Material *ma)
uiDefBut(block, LABEL, 0, "Mat.Preset", 20, 182, 100, 20, 0, 0.0, 0.0, 0, 0, "");
uiDefButI(block, MENU, B_MAT_YF_PRESET, mstr, 110, 182, 200, 20, &ma->YF_preset, 0.0, 0.0, 0, 0, "Basic material presets to start with");
- uiDefButI(block, TOG|BIT|18, B_MATPRV,"Ray Mirror", 10,160,100,20, &(ma->mode), 0, 0, 0, 0, "Enables raytracing for mirror reflection rendering");
- uiDefButI(block, TOG|BIT|17, B_MATRAYTRANSP,"Ray Transp", 110,160,100,20, &(ma->mode), 0, 0, 0, 0, "Enables raytracing for transparency rendering");
- uiDefButI(block, TOG|BIT|6, B_MATZTRANSP,"ZTransp", 210,160,100,20, &(ma->mode), 0, 0, 0, 0, "Use for objects with alphamap textures");
+ uiDefButBitI(block, TOG, MA_RAYMIRROR, B_MATPRV,"Ray Mirror", 10,160,100,20, &(ma->mode), 0, 0, 0, 0, "Enables raytracing for mirror reflection rendering");
+ uiDefButBitI(block, TOG, MA_RAYTRANSP, B_MATRAYTRANSP,"Ray Transp", 110,160,100,20, &(ma->mode), 0, 0, 0, 0, "Enables raytracing for transparency rendering");
+ uiDefButBitI(block, TOG, MA_ZTRA, B_MATZTRANSP,"ZTransp", 210,160,100,20, &(ma->mode), 0, 0, 0, 0, "Use for objects with alphamap textures");
uiDefButF(block, NUMSLI, B_MATPRV, "rayMir ", 10,140,150,20, &(ma->ray_mirror), 0.0, 1.0, 100, 2, "Sets the amount mirror reflection for raytrace");
uiDefButF(block, NUMSLI, B_MATPRV, "frsOfs ", 160,140,150,20, &(ma->fresnel_mir_i), 1.0, 5.0, 10, 2, "Fresnel offset, 1 is uniform mirror, 5 is fresnel mirror (IOR>1)");
@@ -2940,7 +2940,7 @@ static void material_panel_tramir_yafray(Material *ma)
uiDefBut(block, LABEL, 0, "Dispersion", 160, 98, 150, 18, 0, 0.0, 0.0, 0, 0, "");
uiDefButF(block, NUM, B_MATPRV, "Pwr ", 160, 78, 150, 18, &ma->YF_dpwr, 0.0, 1.0, 0.25, 0, "Dispersion power, the higher, the more dispersion, 0 is no dispersion");
uiDefButI(block, NUM, B_MATPRV, "Samples ", 160, 58, 150, 18, &ma->YF_dsmp, 1.0, 100.0, 0, 0, "Dispersion samples, minimum at least 10, unless using jitter ");
- uiDefButI(block, TOG|BIT|0, B_MATPRV, "Jitter", 160, 38, 150, 18, &ma->YF_djit, 0.0, 1.0, 0, 0, "Enable jittering of wavelenghts, adds noise");
+ uiDefButBitI(block, TOG, 1, B_MATPRV, "Jitter", 160, 38, 150, 18, &ma->YF_djit, 0.0, 1.0, 0, 0, "Enable jittering of wavelenghts, adds noise");
}
}
@@ -2954,7 +2954,7 @@ static void material_panel_shading(Material *ma)
if(uiNewPanel(curarea, block, "Shaders", "Material", 640, 0, 318, 204)==0) return;
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButI(block, TOG|BIT|5, B_MATHALO, "Halo", 245,180,65,18, &(ma->mode), 0, 0, 0, 0, "Renders material as a halo");
+ uiDefButBitI(block, TOG, MA_HALO, B_MATHALO, "Halo", 245,180,65,18, &(ma->mode), 0, 0, 0, 0, "Renders material as a halo");
uiBlockSetCol(block, TH_AUTO);
if(ma->mode & MA_HALO) {
@@ -2976,14 +2976,14 @@ static void material_panel_shading(Material *ma)
uiBlockSetCol(block, TH_BUT_SETTING1);
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|15, B_MATPRV_DRAW, "Flare",245,142,65,28, &(ma->mode), 0, 0, 0, 0, "Renders halo as a lensflare");
- uiDefButI(block, TOG|BIT|8, B_MATPRV, "Rings", 245,123,65, 18, &(ma->mode), 0, 0, 0, 0, "Renders rings over halo");
- uiDefButI(block, TOG|BIT|9, B_MATPRV, "Lines", 245,104,65, 18, &(ma->mode), 0, 0, 0, 0, "Renders star shaped lines over halo");
- uiDefButI(block, TOG|BIT|11, B_MATPRV, "Star", 245,85,65, 18, &(ma->mode), 0, 0, 0, 0, "Renders halo as a star");
- uiDefButI(block, TOG|BIT|12, B_MATPRV, "HaloTex", 245,66,65, 18, &(ma->mode), 0, 0, 0, 0, "Gives halo a texture");
- uiDefButI(block, TOG|BIT|13, B_MATPRV, "HaloPuno", 245,47,65, 18, &(ma->mode), 0, 0, 0, 0, "Uses the vertex normal to specify the dimension of the halo");
- uiDefButI(block, TOG|BIT|10, B_MATPRV, "X Alpha", 245,28,65, 18, &(ma->mode), 0, 0, 0, 0, "Uses extreme alpha");
- uiDefButI(block, TOG|BIT|14, B_MATPRV, "Shaded", 245,9,65, 18, &(ma->mode), 0, 0, 0, 0, "Lets halo receive light and shadows");
+ uiDefButBitI(block, TOG, MA_HALO_FLARE, B_MATPRV_DRAW, "Flare",245,142,65,28, &(ma->mode), 0, 0, 0, 0, "Renders halo as a lensflare");
+ uiDefButBitI(block, TOG, MA_HALO_RINGS, B_MATPRV, "Rings", 245,123,65, 18, &(ma->mode), 0, 0, 0, 0, "Renders rings over halo");
+ uiDefButBitI(block, TOG, MA_HALO_LINES, B_MATPRV, "Lines", 245,104,65, 18, &(ma->mode), 0, 0, 0, 0, "Renders star shaped lines over halo");
+ uiDefButBitI(block, TOG, MA_STAR, B_MATPRV, "Star", 245,85,65, 18, &(ma->mode), 0, 0, 0, 0, "Renders halo as a star");
+ uiDefButBitI(block, TOG, MA_HALOTEX, B_MATPRV, "HaloTex", 245,66,65, 18, &(ma->mode), 0, 0, 0, 0, "Gives halo a texture");
+ uiDefButBitI(block, TOG, MA_HALOPUNO, B_MATPRV, "HaloPuno", 245,47,65, 18, &(ma->mode), 0, 0, 0, 0, "Uses the vertex normal to specify the dimension of the halo");
+ uiDefButBitI(block, TOG, MA_HALO_XALPHA, B_MATPRV, "X Alpha", 245,28,65, 18, &(ma->mode), 0, 0, 0, 0, "Uses extreme alpha");
+ uiDefButBitI(block, TOG, MA_HALO_SHADE, B_MATPRV, "Shaded", 245,9,65, 18, &(ma->mode), 0, 0, 0, 0, "Lets halo receive light and shadows");
uiBlockEndAlign(block);
}
else {
@@ -3029,15 +3029,15 @@ static void material_panel_shading(Material *ma)
uiBlockEndAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButI(block, TOG|BIT|0, 0, "Traceable", 245,150,65,19, &(ma->mode), 0, 0, 0, 0, "Makes material to cast shadows or being detected by ray tracing");
+ uiDefButBitI(block, TOG, MA_TRACEBLE, 0, "Traceable", 245,150,65,19, &(ma->mode), 0, 0, 0, 0, "Makes material to cast shadows or being detected by ray tracing");
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|1, 0, "Shadow", 245,120,65,19, &(ma->mode), 0, 0, 0, 0, "Makes material receive shadows");
- uiDefButI(block, TOG|BIT|19, 0, "TraShadow", 245,100,65,19, &(ma->mode), 0, 0, 0, 0, "Recieves transparent shadows based at material color and alpha");
- uiDefButI(block, TOG|BIT|22, 0, "Bias", 245,80,65,19, &(ma->mode), 0, 0, 0, 0, "Prevents ray traced shadow errors with phong interpolated normals (terminator problem)");
+ uiDefButBitI(block, TOG, MA_SHADOW, 0, "Shadow", 245,120,65,19, &(ma->mode), 0, 0, 0, 0, "Makes material receive shadows");
+ uiDefButBitI(block, TOG, MA_SHADOW_TRA, 0, "TraShadow", 245,100,65,19, &(ma->mode), 0, 0, 0, 0, "Recieves transparent shadows based at material color and alpha");
+ uiDefButBitI(block, TOG, MA_RAYBIAS, 0, "Bias", 245,80,65,19, &(ma->mode), 0, 0, 0, 0, "Prevents ray traced shadow errors with phong interpolated normals (terminator problem)");
uiBlockEndAlign(block);
- uiDefButI(block, TOG|BIT|16, 0, "Radio", 245,55,65,19, &(ma->mode), 0, 0, 0, 0, "Enables material for radiosity rendering");
+ uiDefButBitI(block, TOG, MA_RADIO, 0, "Radio", 245,55,65,19, &(ma->mode), 0, 0, 0, 0, "Enables material for radiosity rendering");
}
@@ -3048,7 +3048,6 @@ static void material_panel_ramps(Material *ma)
uiBlock *block;
ColorBand *coba;
float *facp;
- short bitval;
char *inputc, *methodc;
block= uiNewBlock(&curarea->uiblocks, "material_panel_ramps", UI_EMBOSS, UI_HELV, curarea->win);
@@ -3062,11 +3061,10 @@ static void material_panel_ramps(Material *ma)
uiBlockSetCol(block, TH_AUTO);
/* COLORBAND */
- if(ma->ramp_show==0) bitval= 20; else bitval= 21;
uiBlockBeginAlign(block);
- uiDefButI(block, TOG|BIT|bitval, B_MATCOLORBAND, "Colorband",10,145,80,20, &ma->mode, 0, 0, 0, 0, "Toggles colorband ramp operations");
+ uiDefButBitI(block, TOG, ma->ramp_show?MA_RAMP_SPEC:MA_RAMP_COL, B_MATCOLORBAND, "Colorband",10,145,80,20, &ma->mode, 0, 0, 0, 0, "Toggles colorband ramp operations");
- if(ma->mode & (1<<bitval)) {
+ if(ma->mode & (ma->ramp_show?MA_RAMP_SPEC:MA_RAMP_COL)) {
if(ma->ramp_show==0) {
coba= ma->ramp_col;
inputc= &ma->rampin_col;
@@ -3129,12 +3127,12 @@ static void material_panel_material(Object *ob, Material *ma)
uiButSetFunc(but, test_idbutton_cb, id->name, NULL);
}
uiBlockSetCol(block, TH_BUT_ACTION);
- uiDefButS(block, TOG|BIT|(ob->actcol-1), B_MATFROM, "OB", 125,174,32,20, &ob->colbits, 0, 0, 0, 0, "Links material to object");
+ uiDefButBitS(block, TOG, 1<<(ob->actcol-1), B_MATFROM, "OB", 125,174,32,20, &ob->colbits, 0, 0, 0, 0, "Links material to object");
idn= ob->data;
strncpy(str, idn->name, 2);
str[2]= 0;
uiBlockSetCol(block, TH_BUT_SETTING);
- uiDefButS(block, TOGN|BIT|(ob->actcol-1), B_MATFROM, str, 158,174,32,20, &ob->colbits, 0, 0, 0, 0, "Shows the block the material is linked to");
+ uiDefButBitS(block, TOGN, 1<<(ob->actcol-1), B_MATFROM, str, 158,174,32,20, &ob->colbits, 0, 0, 0, 0, "Shows the block the material is linked to");
uiBlockSetCol(block, TH_AUTO);
sprintf(str, "%d Mat", ob->totcol);
@@ -3156,19 +3154,19 @@ static void material_panel_material(Object *ob, Material *ma)
uiBlockBeginAlign(block);
uiDefButF(block, NUM, 0, "Fh Damp ", 8,120,100,20, &ma->xyfrict, 0.0, 1.0, 10, 0, "Damping of the Fh spring force");
uiDefButF(block, NUM, 0, "Fh Dist ", 8,100 ,100,20, &ma->fhdist, 0.0, 20.0, 10, 0, "Height of the Fh area");
- uiDefButS(block, TOG|BIT|1, 0, "Fh Norm", 8,80 ,100,20, &ma->dynamode, 0.0, 0.0, 0, 0, "Add a horizontal spring force on slopes");
+ uiDefButBitS(block, TOG, MA_FH_NOR, 0, "Fh Norm", 8,80 ,100,20, &ma->dynamode, 0.0, 0.0, 0, 0, "Add a horizontal spring force on slopes");
}
else {
if(!(ma->mode & MA_HALO)) {
uiBlockBeginAlign(block);
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButI(block, TOG|BIT|4, B_REDR, "VCol Light", 8,146,73,20, &(ma->mode), 0, 0, 0, 0, "Adds vertex colours as extra light");
- uiDefButI(block, TOG|BIT|7, B_REDR, "VCol Paint", 82,146,73,20, &(ma->mode), 0, 0, 0, 0, "Replaces material's colours with vertex colours");
- uiDefButI(block, TOG|BIT|11, B_REDR, "TexFace", 156,146,73,20, &(ma->mode), 0, 0, 0, 0, "Sets UV-Editor assigned texture as color and texture info for faces");
- uiDefButI(block, TOG|BIT|2, B_MATPRV, "Shadeless", 230,146,73,20, &(ma->mode), 0, 0, 0, 0, "Makes material insensitive to light or shadow");
- uiDefButI(block, TOG|BIT|23, 0, "Full Osa", 8,127,147,19, &(ma->mode), 0.0, 10.0, 0, 0, "Forces to render all OSA samples, for shading and texture antialiasing");
- uiDefButI(block, TOG|BIT|3, 0, "Wire", 156,127,73,19, &(ma->mode), 0, 0, 0, 0, "Renders only the edges of faces as a wireframe");
- uiDefButI(block, TOG|BIT|8, 0, "ZInvert", 230,127,73,19, &(ma->mode), 0, 0, 0, 0, "Renders material's faces with inverted Z Buffer");
+ uiDefButBitI(block, TOG, MA_VERTEXCOL, B_REDR, "VCol Light", 8,146,73,20, &(ma->mode), 0, 0, 0, 0, "Adds vertex colours as extra light");
+ uiDefButBitI(block, TOG, MA_VERTEXCOLP, B_REDR, "VCol Paint", 82,146,73,20, &(ma->mode), 0, 0, 0, 0, "Replaces material's colours with vertex colours");
+ uiDefButBitI(block, TOG, MA_FACETEXTURE, B_REDR, "TexFace", 156,146,73,20, &(ma->mode), 0, 0, 0, 0, "Sets UV-Editor assigned texture as color and texture info for faces");
+ uiDefButBitI(block, TOG, MA_SHLESS, B_MATPRV, "Shadeless", 230,146,73,20, &(ma->mode), 0, 0, 0, 0, "Makes material insensitive to light or shadow");
+ uiDefButBitI(block, TOG, MA_FULL_OSA, 0, "Full Osa", 8,127,147,19, &(ma->mode), 0.0, 10.0, 0, 0, "Forces to render all OSA samples, for shading and texture antialiasing");
+ uiDefButBitI(block, TOG, MA_WIRE, 0, "Wire", 156,127,73,19, &(ma->mode), 0, 0, 0, 0, "Renders only the edges of faces as a wireframe");
+ uiDefButBitI(block, TOG, MA_ZINV, 0, "ZInvert", 230,127,73,19, &(ma->mode), 0, 0, 0, 0, "Renders material's faces with inverted Z Buffer");
}
uiBlockSetCol(block, TH_AUTO);
@@ -3215,7 +3213,7 @@ static void material_panel_material(Object *ob, Material *ma)
uiBlockBeginAlign(block);
uiDefButS(block, ROW, REDRAWBUTSSHADING, "RGB", 8,30,38,19, &(ma->colormodel), 1.0, (float)MA_RGB, 0, 0, "Creates colour using red, green and blue");
uiDefButS(block, ROW, REDRAWBUTSSHADING, "HSV", 46,30,38,19, &(ma->colormodel), 1.0, (float)MA_HSV, 0, 0, "Creates colour using hue, saturation and value");
- uiDefButS(block, TOG|BIT|0, REDRAWBUTSSHADING, "DYN", 84,30,39,19, &(ma->dynamode), 0.0, 0.0, 0, 0, "Adjusts parameters for dynamics options");
+ uiDefButBitS(block, TOG, MA_DRAW_DYNABUTS, REDRAWBUTSSHADING, "DYN", 84,30,39,19, &(ma->dynamode), 0.0, 0.0, 0, 0, "Adjusts parameters for dynamics options");
}
@@ -3239,11 +3237,11 @@ static void material_panel_preview(Material *ma)
uiDefIconButC(block, ROW, B_MATPRV, ICON_MATCUBE, 210,136,25,22, &(ma->pr_type), 10, 2, 0, 0, "");
uiBlockEndAlign(block);
- uiDefIconButS(block, ICONTOG|BIT|0, B_MATPRV, ICON_TRANSP_HLT, 210,100,25,22, &(ma->pr_back), 0, 0, 0, 0, "");
+ uiDefIconButBitS(block, ICONTOG, MA_DARK, B_MATPRV, ICON_TRANSP_HLT, 210,100,25,22, &(ma->pr_back), 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefIconButS(block, TOG|BIT|1, B_MATPRV, ICON_LAMP, 210,40,25,20, &(ma->pr_lamp), 0, 0, 0, 0, "");
- uiDefIconButS(block, TOG|BIT|0, B_MATPRV, ICON_LAMP, 210,20,25,20, &(ma->pr_lamp), 0, 0, 0, 0, "");
+ uiDefIconButBitS(block, TOG, 2, B_MATPRV, ICON_LAMP, 210,40,25,20, &(ma->pr_lamp), 0, 0, 0, 0, "");
+ uiDefIconButBitS(block, TOG, 1, B_MATPRV, ICON_LAMP, 210,20,25,20, &(ma->pr_lamp), 0, 0, 0, 0, "");
}
}
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index afd98abe78f..5858a03a2c3 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -60,6 +60,7 @@
#include "BKE_utildefines.h"
#include "BKE_global.h"
+#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_image.h"
@@ -745,14 +746,14 @@ static void image_panel_properties(short cntrl) // IMAGE_HANDLER_PROPERTIES
uiDefBut(block, LABEL, B_NOP, str, 10,180,300,19, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|1, B_TWINANIM, "Anim", 10,150,140,19, &G.sima->image->tpageflag, 0, 0, 0, 0, "Toggles use of animated texture");
+ uiDefButBitS(block, TOG, IMA_TWINANIM, B_TWINANIM, "Anim", 10,150,140,19, &G.sima->image->tpageflag, 0, 0, 0, 0, "Toggles use of animated texture");
uiDefButS(block, NUM, B_TWINANIM, "Start:", 10,130,140,19, &G.sima->image->twsta, 0.0, 128.0, 0, 0, "Displays the start frame of an animated texture");
uiDefButS(block, NUM, B_TWINANIM, "End:", 10,110,140,19, &G.sima->image->twend, 0.0, 128.0, 0, 0, "Displays the end frame of an animated texture");
uiDefButS(block, NUM, B_NOP, "Speed", 10,90,140,19, &G.sima->image->animspeed, 1.0, 100.0, 0, 0, "Displays Speed of the animation in frames per second");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|0, B_SIMAGEDRAW1, "Tiles", 160,150,140,19, &G.sima->image->tpageflag, 0, 0, 0, 0, "Toggles use of tilemode for faces");
+ uiDefButBitS(block, TOG, IMA_TILES, B_SIMAGEDRAW1, "Tiles", 160,150,140,19, &G.sima->image->tpageflag, 0, 0, 0, 0, "Toggles use of tilemode for faces");
uiDefButS(block, NUM, B_SIMAGEDRAW, "X:", 160,130,70,19, &G.sima->image->xrep, 1.0, 16.0, 0, 0, "Sets the degree of repetition in the X direction");
uiDefButS(block, NUM, B_SIMAGEDRAW, "Y:", 230,130,70,19, &G.sima->image->yrep, 1.0, 16.0, 0, 0, "Sets the degree of repetition in the Y direction");
uiBlockBeginAlign(block);
@@ -781,7 +782,6 @@ static void image_panel_paint(short cntrl) // IMAGE_HANDLER_PROPERTIES
uiDefButF(block, NUM, B_NOP, "Size ", 180+12+24,140,80,20, &Gvp.size, 2.0, 64.0, 0, 0, "The size of the brush");
}
-
static void image_blockhandlers(ScrArea *sa)
{
SpaceImage *sima= sa->spacedata.first;
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c
index 58c4013db47..0310cb477d9 100644
--- a/source/blender/src/drawipo.c
+++ b/source/blender/src/drawipo.c
@@ -887,7 +887,7 @@ static void draw_ipobuts(SpaceIpo *sipo)
y= area->winy-30+sipo->butofs;
for(a=0; a<sipo->totipo; a++, ei++, y-=IPOBUTY) {
// this button defines visiblity, bit zero of flag (IPO_VISIBLE)
- but= uiDefButS(block, TOG|BIT|0, a+1, ei->name, v2d->mask.xmax+18, y, IPOBUTX-15, IPOBUTY-1, &(ei->flag), 0, 0, 0, 0, "");
+ but= uiDefButBitS(block, TOG, IPO_VISIBLE, a+1, ei->name, v2d->mask.xmax+18, y, IPOBUTX-15, IPOBUTY-1, &(ei->flag), 0, 0, 0, 0, "");
// no hilite, its not visible, but most of all the winmatrix is not correct later on...
uiButSetFlag(but, UI_TEXT_LEFT|UI_NO_HILITE);
diff --git a/source/blender/src/drawnla.c b/source/blender/src/drawnla.c
index 72e74fd3ff6..1b6718a2b51 100644
--- a/source/blender/src/drawnla.c
+++ b/source/blender/src/drawnla.c
@@ -502,9 +502,9 @@ static void nla_panel_properties(short cntrl) // NLA_HANDLER_PROPERTIES
uiDefBut(block, NUM|FLO, B_REDR, "Stride:", 160,40,150,19, &strip->stridelen, 0.0001, MAXFRAMEF, 100, 0, "Distance covered by one complete cycle of the action specified in the Action Range");
uiBlockBeginAlign(block);
- uiDefBut(block, TOG|SHO|BIT|ACTSTRIP_USESTRIDEBIT, B_REDR, "Use Path", 10,0,100,19, &strip->flag, 0, 0, 0, 0, "Plays action based on path position & stride. Only armatures parented to a path");
- uiDefBut(block, TOG|SHO|BIT|ACTSTRIP_HOLDLASTFRAMEBIT, B_REDR, "Hold", 110,0,100,19, &strip->flag, 0, 0, 0, 0, "Toggles whether to continue displaying the last frame past the end of the strip");
- uiDefBut(block, TOG|SHO, B_REDR, "Add", 210,0,100,19, &strip->mode, 0, 0, 0, 0, "Toggles additive blending mode");
+ uiDefButBitS(block, TOG, ACTSTRIP_USESTRIDE, B_REDR, "Use Path", 10,0,100,19, &strip->flag, 0, 0, 0, 0, "Plays action based on path position & stride. Only armatures parented to a path");
+ uiDefButBitS(block, TOG, ACTSTRIP_HOLDLASTFRAME, B_REDR, "Hold", 110,0,100,19, &strip->flag, 0, 0, 0, 0, "Toggles whether to continue displaying the last frame past the end of the strip");
+ uiDefButS(block, TOG, B_REDR, "Add", 210,0,100,19, &strip->mode, 0, 0, 0, 0, "Toggles additive blending mode");
}
static void nla_blockhandlers(ScrArea *sa)
diff --git a/source/blender/src/drawseq.c b/source/blender/src/drawseq.c
index 51923915823..6b5c3ea026d 100644
--- a/source/blender/src/drawseq.c
+++ b/source/blender/src/drawseq.c
@@ -667,8 +667,8 @@ static void seq_panel_properties(short cntrl) // SEQ_HANDLER_PROPERTIES
uiDefBut(block, LABEL, 0, "Type: Image", 10,140,150,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, TEX, B_NOP, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, "");
- uiDefButS(block, TOG|BIT|6, SEQ_BUT_RELOAD, "Convert to Premul", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Converts RGB values to become premultiplied with Alpha");
- uiDefButS(block, TOG|BIT|4, SEQ_BUT_RELOAD, "FilterY", 10,70,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields");
+ uiDefButBitS(block, TOG, SEQ_MAKE_PREMUL, SEQ_BUT_RELOAD, "Convert to Premul", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Converts RGB values to become premultiplied with Alpha");
+ uiDefButBitS(block, TOG, SEQ_FILTERY, SEQ_BUT_RELOAD, "FilterY", 10,70,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields");
uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Mul:", 10,50,150,19, &last_seq->mul, 0.001, 5.0, 100, 0, "Multiply colors");
}
else if(last_seq->type==SEQ_META) {
@@ -690,8 +690,8 @@ static void seq_panel_properties(short cntrl) // SEQ_HANDLER_PROPERTIES
uiDefBut(block, LABEL, 0, "Type: Movie", 10,140,150,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, TEX, B_NOP, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, "");
- uiDefButS(block, TOG|BIT|6, SEQ_BUT_RELOAD, "Make Premul Alpha ", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Converts RGB values to become premultiplied with Alpha");
- uiDefButS(block, TOG|BIT|4, SEQ_BUT_RELOAD, "FilterY ", 10,70,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields");
+ uiDefButBitS(block, TOG, SEQ_MAKE_PREMUL, SEQ_BUT_RELOAD, "Make Premul Alpha ", 10,90,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "Converts RGB values to become premultiplied with Alpha");
+ uiDefButBitS(block, TOG, SEQ_FILTERY, SEQ_BUT_RELOAD, "FilterY ", 10,70,150,19, &last_seq->flag, 0.0, 21.0, 100, 0, "For video movies to remove fields");
uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Mul:", 10,50,150,19, &last_seq->mul, 0.001, 5.0, 100, 0, "Multiply colors");
}
@@ -700,7 +700,7 @@ static void seq_panel_properties(short cntrl) // SEQ_HANDLER_PROPERTIES
uiDefBut(block, LABEL, 0, "Type: Audio", 10,140,150,20, 0, 0, 0, 0, 0, "");
uiDefBut(block, TEX, 0, "Name: ", 10,120,150,19, last_seq->name+2, 0.0, 21.0, 100, 0, "");
- uiDefButS(block, TOG|BIT|5, B_NOP, "Mute", 10,90,120,19, &last_seq->flag, 0.0, 21.0, 100, 0, "");
+ uiDefButBitS(block, TOG, SEQ_MUTE, B_NOP, "Mute", 10,90,120,19, &last_seq->flag, 0.0, 21.0, 100, 0, "");
uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Gain (dB):", 10,70,150,19, &last_seq->level, -96.0, 6.0, 100, 0, "");
uiDefButF(block, NUM, SEQ_BUT_RELOAD, "Pan:", 10,50,150,19, &last_seq->pan, -1.0, 1.0, 100, 0, "");
}
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index 57a9698860c..4a0aecc9523 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -1213,8 +1213,8 @@ static void v3d_editvertex_buts(uiBlock *block, Object *ob, float lim)
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|13, REDRAWVIEW3D, "Global", 160, 150, 70, 19, &G.vd->flag, 0, 0, 0, 0, "Displays global values");
- uiDefButS(block, TOGN|BIT|13, REDRAWVIEW3D, "Local", 230, 150, 70, 19, &G.vd->flag, 0, 0, 0, 0, "Displays local values");
+ uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, REDRAWVIEW3D, "Global", 160, 150, 70, 19, &G.vd->flag, 0, 0, 0, 0, "Displays global values");
+ uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, REDRAWVIEW3D, "Local", 230, 150, 70, 19, &G.vd->flag, 0, 0, 0, 0, "Displays local values");
QUATCOPY(ve_median, median);
diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c
index 03f15a67d9b..1fb05cf9372 100644
--- a/source/blender/src/editscreen.c
+++ b/source/blender/src/editscreen.c
@@ -1383,7 +1383,7 @@ void screenmain(void)
// SET AUTOPLAY in G.flags for
// other fileloads
- G.flags |= G_FLAGS_AUTOPLAY;
+ G.flags |= G_FILE_AUTOPLAY;
area_autoplayscreen();
// Let The Games Begin
@@ -2204,7 +2204,7 @@ void area_fullscreen(void) /* with curarea */
// refuse to go out of SCREENAUTOPLAY as long as G_FLAGS_AUTOPLAY
// is set
- if (fulltype != SCREENAUTOPLAY || (G.flags & G_FLAGS_AUTOPLAY) == 0) {
+ if (fulltype != SCREENAUTOPLAY || (G.flags & G_FILE_AUTOPLAY) == 0) {
sc->full= 0;
/* find old area */
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c
index 3a6cafe28e2..e1367d4f722 100644
--- a/source/blender/src/header_action.c
+++ b/source/blender/src/header_action.c
@@ -703,14 +703,14 @@ void action_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if (curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU,
ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0,
"Show pulldown menus");
}
else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU,
ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0,
diff --git a/source/blender/src/header_buttonswin.c b/source/blender/src/header_buttonswin.c
index 0aeedd64091..cac244f6c94 100644
--- a/source/blender/src/header_buttonswin.c
+++ b/source/blender/src/header_buttonswin.c
@@ -560,14 +560,14 @@ void buts_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if (curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU,
ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0,
"Show pulldown menus");
}
else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU,
ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0,
diff --git a/source/blender/src/header_filesel.c b/source/blender/src/header_filesel.c
index 954b47cc5a7..c80527e5e22 100644
--- a/source/blender/src/header_filesel.c
+++ b/source/blender/src/header_filesel.c
@@ -127,8 +127,8 @@ void file_buttons(void)
BIF_DrawString(uiBlockGetCurFont(block), sfile->title, (U.transopts & USER_TR_BUTTONS));
xco+= BIF_GetStringWidth(G.font, sfile->title, (U.transopts & USER_TR_BUTTONS));
- uiDefIconButS(block, ICONTOG|BIT|0, B_SORTFILELIST, ICON_LONGDISPLAY,xco+=XIC,0,XIC,YIC, &sfile->flag, 0, 0, 0, 0, "Toggles long info");
- uiDefIconButS(block, TOG|BIT|3, B_RELOADDIR, ICON_GHOST,xco+=XIC,0,XIC,YIC, &sfile->flag, 0, 0, 0, 0, "Hides dot files");
+ uiDefIconButBitS(block, ICONTOG, FILE_SHOWSHORT, B_SORTFILELIST, ICON_LONGDISPLAY,xco+=XIC,0,XIC,YIC, &sfile->flag, 0, 0, 0, 0, "Toggles long info");
+ uiDefIconButBitS(block, TOG, FILE_HIDE_DOT, B_RELOADDIR, ICON_GHOST,xco+=XIC,0,XIC,YIC, &sfile->flag, 0, 0, 0, 0, "Hides dot files");
uiDefButBitS(block, TOG, FILE_STRINGCODE, 0, "Relative Paths", xco+=XIC+20,0,100,YIC, &sfile->flag, 0, 0, 0, 0, "Makes sure returned paths are relative to the current .blend file");
@@ -136,16 +136,16 @@ void file_buttons(void)
if(sfile->type==FILE_LOADLIB) {
uiBlockBeginAlign(block);
- uiDefButS(block, TOGN|BIT|2, B_REDR, "Append", xco+=XIC,0,100,YIC, &sfile->flag, 0, 0, 0, 0, "Copies selected data into current project");
- uiDefButS(block, TOG|BIT|2, B_REDR, "Link", xco+=100,0,100,YIC, &sfile->flag, 0, 0, 0, 0, "Creates a link to selected data from current project");
+ uiDefButBitS(block, TOGN, FILE_LINK, B_REDR, "Append", xco+=XIC,0,100,YIC, &sfile->flag, 0, 0, 0, 0, "Copies selected data into current project");
+ uiDefButBitS(block, TOG, FILE_LINK, B_REDR, "Link", xco+=100,0,100,YIC, &sfile->flag, 0, 0, 0, 0, "Creates a link to selected data from current project");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|4, B_REDR, "Autosel", xco+=125,0,65,YIC, &sfile->flag, 0, 0, 0, 0, "Autoselect imported objects");
- uiDefButS(block, TOG|BIT|5, B_REDR, "Active Layer", xco+=65,0,80,YIC, &sfile->flag, 0, 0, 0, 0, "Append object(s) in active layer");
- uiDefButS(block, TOG|BIT|6, B_REDR, "At Cursor", xco+=80,0,65,YIC, &sfile->flag, 0, 0, 0, 0, "Append object(s) at cursor, use centroid if more than one object is selected");
+ uiDefButBitS(block, TOG, FILE_AUTOSELECT, B_REDR, "Autosel", xco+=125,0,65,YIC, &sfile->flag, 0, 0, 0, 0, "Autoselect imported objects");
+ uiDefButBitS(block, TOG, FILE_ACTIVELAY, B_REDR, "Active Layer", xco+=65,0,80,YIC, &sfile->flag, 0, 0, 0, 0, "Append object(s) in active layer");
+ uiDefButBitS(block, TOG, FILE_ATCURSOR, B_REDR, "At Cursor", xco+=80,0,65,YIC, &sfile->flag, 0, 0, 0, 0, "Append object(s) at cursor, use centroid if more than one object is selected");
uiBlockEndAlign(block);
} else if(sfile->type==FILE_BLENDER) {
- uiDefButI(block, TOGN|BIT|10, B_REDR, "Load UI", xco+=XIC,0,80,YIC, &G.fileflags, 0, 0, 0, 0, "Load the UI setup as well as the scene data");
+ uiDefButBitI(block, TOGN, G_FILE_NO_UI, B_REDR, "Load UI", xco+=XIC,0,80,YIC, &G.fileflags, 0, 0, 0, 0, "Load the UI setup as well as the scene data");
xco+=100;
diff --git a/source/blender/src/header_image.c b/source/blender/src/header_image.c
index 9a1668c89b5..7a03c57cab9 100644
--- a/source/blender/src/header_image.c
+++ b/source/blender/src/header_image.c
@@ -1075,11 +1075,11 @@ void image_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if(curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Show pulldown menus");
} else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Hide pulldown menus");
}
@@ -1129,8 +1129,8 @@ void image_buttons(void)
/* uiDefIconBut(block, BUT, B_SIMAGEHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zooms window to home view showing all items (HOMEKEY)");
- uiDefIconButS(block, TOG|BIT|0, B_BE_SQUARE, ICON_KEEPRECT, xco+=XIC,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Toggles constraining UV polygons to squares while editing");
- uiDefIconButS(block, ICONTOG|BIT|2, B_CLIP_UV, ICON_CLIPUV_DEHLT,xco+=XIC,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Toggles clipping UV with image size");
+ uiDefIconButBitS(block, TOG, SI_BE_SQUARE, B_BE_SQUARE, ICON_KEEPRECT, xco+=XIC,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Toggles constraining UV polygons to squares while editing");
+ uiDefIconButBitS(block, ICONTOG, SI_CLIP_UV, B_CLIP_UV, ICON_CLIPUV_DEHLT,xco+=XIC,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Toggles clipping UV with image size");
*/
xco= std_libbuttons(block, xco, 0, 0, NULL, B_SIMABROWSE, (ID *)G.sima->image, 0, &(G.sima->imanr), 0, 0, B_IMAGEDELETE, 0, 0);
@@ -1143,7 +1143,7 @@ void image_buttons(void)
if (G.sima->image->packedfile) {
headerbuttons_packdummy = 1;
}
- uiDefIconButI(block, TOG|BIT|0, B_SIMAPACKIMA, ICON_PACKAGE, xco,0,XIC,YIC, &headerbuttons_packdummy, 0, 0, 0, 0, "Pack/Unpack this image");
+ uiDefIconButBitI(block, TOG, 1, B_SIMAPACKIMA, ICON_PACKAGE, xco,0,XIC,YIC, &headerbuttons_packdummy, 0, 0, 0, 0, "Pack/Unpack this image");
xco+= XIC;
}
@@ -1158,17 +1158,17 @@ void image_buttons(void)
uiBlockSetCol(block, TH_AUTO);
uiDefBut(block, BUT, B_SIMAGEREPLACE, "Replace",xco,0,(short)(3*XIC),YIC, 0, 0, 0, 0, 0, "Replaces current image - file select");
xco+= 3.5*XIC;
- uiDefIconButS(block, TOG|BIT|4, 0, ICON_ENVMAP, xco,0,XIC,YIC, &G.sima->image->flag, 0, 0, 0, 0, "Uses this image as a reflection map (Ignores UV Coordinates)");
+ uiDefIconButBitS(block, TOG, 16, 0, ICON_ENVMAP, xco,0,XIC,YIC, &G.sima->image->flag, 0, 0, 0, 0, "Uses this image as a reflection map (Ignores UV Coordinates)");
- uiDefIconButS(block, TOG|BIT|0, B_SIMAGEDRAW1, ICON_GRID, xco+=XIC,0,XIC,YIC, &G.sima->image->flag, 0, 0, 0, 0, "");
+ uiDefIconButBitS(block, TOG, 1, B_SIMAGEDRAW1, ICON_GRID, xco+=XIC,0,XIC,YIC, &G.sima->image->flag, 0, 0, 0, 0, "");
uiDefButS(block, NUM, B_SIMAGEDRAW, "", xco+=XIC,0,XIC,YIC, &G.sima->image->xrep, 1.0, 16.0, 0, 0, "Sets the degree of repetition in the X direction");
uiDefButS(block, NUM, B_SIMAGEDRAW, "", xco+=XIC,0,XIC,YIC, &G.sima->image->yrep, 1.0, 16.0, 0, 0, "Sets the degree of repetition in the Y direction");
- uiDefButS(block, TOG|BIT|1, B_TWINANIM, "Anim", xco,0,(2*XIC),YIC, &G.sima->image->tpageflag, 0, 0, 0, 0, "Toggles use of animated texture");
+ uiDefButBitS(block, TOG, IMA_TWINANIM, B_TWINANIM, "Anim", xco,0,(2*XIC),YIC, &G.sima->image->tpageflag, 0, 0, 0, 0, "Toggles use of animated texture");
xco+= XIC;
uiDefButS(block, NUM, B_TWINANIM, "", xco+=XIC,0,XIC,YIC, &G.sima->image->twsta, 0.0, 128.0, 0, 0, "Displays the start frame of an animated texture. Click to change.");
uiDefButS(block, NUM, B_TWINANIM, "", xco+=XIC,0,XIC,YIC, &G.sima->image->twend, 0.0, 128.0, 0, 0, "Displays the end frame of an animated texture. Click to change.");
-// uiDefButS(block, TOG|BIT|2, 0, "Cycle", xco+=XIC,0,2*XIC,YIC, &G.sima->image->tpageflag, 0, 0, 0, 0, "");
+// uiDefButBitS(block, TOG, IMA_COLCYCLE, 0, "Cycle", xco+=XIC,0,2*XIC,YIC, &G.sima->image->tpageflag, 0, 0, 0, 0, "");
uiDefButS(block, NUM, 0, "Speed", xco,0,4*XIC,YIC, &G.sima->image->animspeed, 1.0, 100.0, 0, 0, "Displays Speed of the animation in frames per second. Click to change.");
xco+= 4.5*XIC;
@@ -1189,7 +1189,7 @@ void image_buttons(void)
#ifdef NAN_TPT
- uiDefIconButS(block, TOG|BIT|3, B_SIMAGEPAINTTOOL, ICON_TPAINT_HLT, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Enables painting textures on the image with left mouse button");
+ uiDefIconButBitS(block, TOG, SI_DRAWTOOL, B_SIMAGEPAINTTOOL, ICON_TPAINT_HLT, xco,0,XIC,YIC, &G.sima->flag, 0, 0, 0, 0, "Enables painting textures on the image with left mouse button");
xco+= XIC+8;
#endif /* NAN_TPT */
diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c
index 69e05fefdcc..943d622dedd 100644
--- a/source/blender/src/header_info.c
+++ b/source/blender/src/header_info.c
@@ -1256,11 +1256,11 @@ static uiBlock *info_addmenu(void *arg_unused)
static void do_info_gamemenu(void *arg, int event)
{
switch (event) {
- case G_FILE_ENABLE_ALL_FRAMES_BIT:
- case G_FILE_SHOW_FRAMERATE_BIT:
- case G_FILE_SHOW_DEBUG_PROPS_BIT:
- case G_FILE_AUTOPLAY_BIT:
- G.fileflags ^= (1 << event);
+ case G_FILE_ENABLE_ALL_FRAMES:
+ case G_FILE_SHOW_FRAMERATE:
+ case G_FILE_SHOW_DEBUG_PROPS:
+ case G_FILE_AUTOPLAY:
+ G.fileflags ^= event;
break;
default:
; /* ignore the rest */
@@ -1282,30 +1282,30 @@ static uiBlock *info_gamemenu(void *arg_unused)
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 1, 0, "");
- if(G.fileflags & (1 << G_FILE_ENABLE_ALL_FRAMES_BIT)) {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Enable All Frames", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_ENABLE_ALL_FRAMES_BIT, "");
+ if(G.fileflags & G_FILE_ENABLE_ALL_FRAMES) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Enable All Frames", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_ENABLE_ALL_FRAMES, "");
} else {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Enable All Frames", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_ENABLE_ALL_FRAMES_BIT, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Enable All Frames", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_ENABLE_ALL_FRAMES, "");
}
- if(G.fileflags & (1 << G_FILE_SHOW_FRAMERATE_BIT)) {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Show Framerate and Profile", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_SHOW_FRAMERATE_BIT, "");
+ if(G.fileflags & G_FILE_SHOW_FRAMERATE) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Show Framerate and Profile", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_SHOW_FRAMERATE, "");
} else {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Show Framerate and Profile", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_SHOW_FRAMERATE_BIT, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Show Framerate and Profile", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_SHOW_FRAMERATE, "");
}
- if(G.fileflags & (1 << G_FILE_SHOW_DEBUG_PROPS_BIT)) {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Show Debug Properties", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_SHOW_DEBUG_PROPS_BIT, "");
+ if(G.fileflags & G_FILE_SHOW_DEBUG_PROPS) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Show Debug Properties", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_SHOW_DEBUG_PROPS, "");
} else {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Show Debug Properties", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_SHOW_DEBUG_PROPS_BIT, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Show Debug Properties", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_SHOW_DEBUG_PROPS, "");
}
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 1, 0, "");
- if(G.fileflags & (1 << G_FILE_AUTOPLAY_BIT)) {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Autostart", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_AUTOPLAY_BIT, "");
+ if(G.fileflags & G_FILE_AUTOPLAY) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Autostart", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_AUTOPLAY, "");
} else {
- uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Autostart", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_AUTOPLAY_BIT, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Autostart", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, G_FILE_AUTOPLAY, "");
}
uiBlockSetDirection(block, UI_DOWN);
@@ -1781,11 +1781,11 @@ void info_buttons(void)
else uiBlockSetCol(block, TH_HEADERDESEL);
if(curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Enables display of pulldown menus");
} else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Hides pulldown menus");
}
diff --git a/source/blender/src/header_ipo.c b/source/blender/src/header_ipo.c
index 8f6b558fdb1..0a81f6454b9 100644
--- a/source/blender/src/header_ipo.c
+++ b/source/blender/src/header_ipo.c
@@ -786,11 +786,11 @@ void ipo_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if(curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Enables display of pulldown menus");
} else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Hides pulldown menus");
}
diff --git a/source/blender/src/header_nla.c b/source/blender/src/header_nla.c
index c4287ad3ef7..ddedbb446ca 100644
--- a/source/blender/src/header_nla.c
+++ b/source/blender/src/header_nla.c
@@ -325,11 +325,11 @@ void nla_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if(curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Show pulldown menus");
} else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Hide pulldown menus");
}
diff --git a/source/blender/src/header_oops.c b/source/blender/src/header_oops.c
index fa2386aaabd..7e79a5c4478 100644
--- a/source/blender/src/header_oops.c
+++ b/source/blender/src/header_oops.c
@@ -340,11 +340,11 @@ void oops_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if(curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Show pulldown menus");
} else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Hide pulldown menus");
}
@@ -383,20 +383,20 @@ void oops_buttons(void)
/* VISIBLE */
uiBlockBeginAlign(block);
- uiDefButS(block, TOG|BIT|10,B_NEWOOPS, "Layer", (short)(xco+=XIC),0,XIC+20,YIC, &soops->visiflag, 0, 0, 0, 0, "Only show object datablocks on visible layers");
+ uiDefButBitS(block, TOG, OOPS_LAY, B_NEWOOPS, "Layer", (short)(xco+=XIC),0,XIC+20,YIC, &soops->visiflag, 0, 0, 0, 0, "Only show object datablocks on visible layers");
xco+= 20;
- uiDefIconButS(block, TOG|BIT|0, B_NEWOOPS, ICON_SCENE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Scene datablocks");
- uiDefIconButS(block, TOG|BIT|1, B_NEWOOPS, ICON_OBJECT_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Object datablocks");
- uiDefIconButS(block, TOG|BIT|2, B_NEWOOPS, ICON_MESH_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Mesh datablocks");
- uiDefIconButS(block, TOG|BIT|3, B_NEWOOPS, ICON_CURVE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Curve/Surface/Font datablocks");
- uiDefIconButS(block, TOG|BIT|4, B_NEWOOPS, ICON_MBALL_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Metaball datablocks");
- uiDefIconButS(block, TOG|BIT|5, B_NEWOOPS, ICON_LATTICE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Lattice datablocks");
- uiDefIconButS(block, TOG|BIT|6, B_NEWOOPS, ICON_LAMP_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Lamp datablocks");
- uiDefIconButS(block, TOG|BIT|7, B_NEWOOPS, ICON_MATERIAL_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Material datablocks");
- uiDefIconButS(block, TOG|BIT|8, B_NEWOOPS, ICON_TEXTURE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Texture datablocks");
- uiDefIconButS(block, TOG|BIT|9, B_NEWOOPS, ICON_IPO_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Ipo datablocks");
- uiDefIconButS(block, TOG|BIT|12, B_NEWOOPS, ICON_IMAGE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Image datablocks");
- uiDefIconButS(block, TOG|BIT|11, B_NEWOOPS, ICON_LIBRARY_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Library datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_SCE, B_NEWOOPS, ICON_SCENE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Scene datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_OB, B_NEWOOPS, ICON_OBJECT_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Object datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_ME, B_NEWOOPS, ICON_MESH_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Mesh datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_CU, B_NEWOOPS, ICON_CURVE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Curve/Surface/Font datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_MB, B_NEWOOPS, ICON_MBALL_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Metaball datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_LT, B_NEWOOPS, ICON_LATTICE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Lattice datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_LA, B_NEWOOPS, ICON_LAMP_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Lamp datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_MA, B_NEWOOPS, ICON_MATERIAL_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Material datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_TE, B_NEWOOPS, ICON_TEXTURE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Texture datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_IP, B_NEWOOPS, ICON_IPO_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Ipo datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_IM, B_NEWOOPS, ICON_IMAGE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Image datablocks");
+ uiDefIconButBitS(block, TOG, OOPS_LI, B_NEWOOPS, ICON_LIBRARY_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Displays Library datablocks");
uiBlockEndAlign(block);
diff --git a/source/blender/src/header_script.c b/source/blender/src/header_script.c
index f29c8f848d7..0f00b03d7bf 100644
--- a/source/blender/src/header_script.c
+++ b/source/blender/src/header_script.c
@@ -230,11 +230,11 @@ void script_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if(curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Enables display of pulldown menus");
} else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Hides pulldown menus");
}
diff --git a/source/blender/src/header_seq.c b/source/blender/src/header_seq.c
index 5ae3cca7d2e..b38aba31a8e 100644
--- a/source/blender/src/header_seq.c
+++ b/source/blender/src/header_seq.c
@@ -436,11 +436,11 @@ void seq_buttons()
uiBlockSetEmboss(block, UI_EMBOSSN);
if(curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Enables display of pulldown menus");
} else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Hides pulldown menus");
}
diff --git a/source/blender/src/header_sound.c b/source/blender/src/header_sound.c
index 77a1853e63c..f5503aaf686 100644
--- a/source/blender/src/header_sound.c
+++ b/source/blender/src/header_sound.c
@@ -252,14 +252,14 @@ void sound_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if (curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU,
ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0,
"Show pulldown menus");
}
else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU,
ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0,
diff --git a/source/blender/src/header_text.c b/source/blender/src/header_text.c
index c770f942256..25c177d778f 100644
--- a/source/blender/src/header_text.c
+++ b/source/blender/src/header_text.c
@@ -580,11 +580,11 @@ void text_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if(curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Enables display of pulldown menus");
} else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Hides pulldown menus");
}
diff --git a/source/blender/src/header_time.c b/source/blender/src/header_time.c
index 2c7a5423abd..83dafeeed8d 100644
--- a/source/blender/src/header_time.c
+++ b/source/blender/src/header_time.c
@@ -358,14 +358,14 @@ void time_buttons(ScrArea *sa)
uiBlockSetEmboss(block, UI_EMBOSSN);
if (sa->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU,
ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(sa->flag), 0, 0, 0, 0,
"Show pulldown menus");
}
else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU,
ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(sa->flag), 0, 0, 0, 0,
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c
index 1b4bf46003e..2737937a9cc 100644
--- a/source/blender/src/header_view3d.c
+++ b/source/blender/src/header_view3d.c
@@ -4038,11 +4038,11 @@ void view3d_buttons(void)
uiBlockSetEmboss(block, UI_EMBOSSN);
if(curarea->flag & HEADER_NO_PULLDOWN) {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Enables display of pulldown menus");
} else {
- uiDefIconButS(block, TOG|BIT|0, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
+ uiDefIconButBitS(block, TOG, HEADER_NO_PULLDOWN, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_DOWN,
xco,2,XIC,YIC-2,
&(curarea->flag), 0, 0, 0, 0, "Hides pulldown menus");
}
@@ -4091,7 +4091,7 @@ void view3d_buttons(void)
xco+= XIC+10;
- uiDefIconButS(block, TOG|BIT|10, B_AROUND, ICON_ALIGN,
+ uiDefIconButBitS(block, TOG, V3D_ALIGN, B_AROUND, ICON_ALIGN,
xco,0,XIC,YIC,
&G.vd->flag, 0, 0, 0, 0, "Move object centers only");
uiBlockEndAlign(block);
@@ -4100,15 +4100,15 @@ void view3d_buttons(void)
/* Transform widget / manipulators */
uiBlockBeginAlign(block);
- uiDefIconButS(block, TOG|BIT|0, B_REDR, ICON_MANIPUL,xco,0,XIC,YIC, &G.vd->twflag, 0, 0, 0, 0, "Use 3d transform manipulator (CTRL+Space)");
+ uiDefIconButBitS(block, TOG, V3D_USE_MANIPULATOR, B_REDR, ICON_MANIPUL,xco,0,XIC,YIC, &G.vd->twflag, 0, 0, 0, 0, "Use 3d transform manipulator (CTRL+Space)");
xco+= XIC;
if(G.vd->twflag & V3D_USE_MANIPULATOR) {
- uiDefIconButS(block, TOG|BIT|0, B_MAN_TRANS, ICON_MAN_TRANS, xco,0,XIC,YIC, &G.vd->twtype, 1.0, 0.0, 0, 0, "Translate manipulator mode (CTRL+Space)");
+ uiDefIconButBitS(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, xco,0,XIC,YIC, &G.vd->twtype, 1.0, 0.0, 0, 0, "Translate manipulator mode (CTRL+Space)");
xco+= XIC;
- uiDefIconButS(block, TOG|BIT|1, B_MAN_ROT, ICON_MAN_ROT, xco,0,XIC,YIC, &G.vd->twtype, 1.0, 0.0, 0, 0, "Rotate manipulator mode (CTRL+Space)");
+ uiDefIconButBitS(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, xco,0,XIC,YIC, &G.vd->twtype, 1.0, 0.0, 0, 0, "Rotate manipulator mode (CTRL+Space)");
xco+= XIC;
- uiDefIconButS(block, TOG|BIT|2, B_MAN_SCALE, ICON_MAN_SCALE, xco,0,XIC,YIC, &G.vd->twtype, 1.0, 0.0, 0, 0, "Scale manipulator mode (CTRL+Space)");
+ uiDefIconButBitS(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, xco,0,XIC,YIC, &G.vd->twtype, 1.0, 0.0, 0, 0, "Scale manipulator mode (CTRL+Space)");
xco+= XIC;
}
uiDefButS(block, MENU, B_NOP, "Orientation%t|Global%x0|Local%x1|Normal%x2|View%x3",xco,0,70,YIC, &G.vd->twmode, 0, 0, 0, 0, "Transform Orientation (ALT+Space)");
@@ -4121,16 +4121,16 @@ void view3d_buttons(void)
uiBlockBeginAlign(block);
for(a=0; a<5; a++)
- uiDefButI(block, TOG|BIT|a, B_LAY+a, "", (short)(xco+a*(XIC/2)), (short)(YIC/2),(short)(XIC/2),(short)(YIC/2), &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility");
+ uiDefButBitI(block, TOG, 1<<a, B_LAY+a, "", (short)(xco+a*(XIC/2)), (short)(YIC/2),(short)(XIC/2),(short)(YIC/2), &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility");
for(a=0; a<5; a++)
- uiDefButI(block, TOG|BIT|(a+10), B_LAY+10+a, "",(short)(xco+a*(XIC/2)), 0, XIC/2, (YIC)/2, &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility");
+ uiDefButBitI(block, TOG, 1<<(a+10), B_LAY+10+a, "",(short)(xco+a*(XIC/2)), 0, XIC/2, (YIC)/2, &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility");
xco+= 5;
uiBlockBeginAlign(block);
for(a=5; a<10; a++)
- uiDefButI(block, TOG|BIT|a, B_LAY+a, "", (short)(xco+a*(XIC/2)), (short)(YIC/2),(short)(XIC/2),(short)(YIC/2), &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility");
+ uiDefButBitI(block, TOG, 1<<a, B_LAY+a, "", (short)(xco+a*(XIC/2)), (short)(YIC/2),(short)(XIC/2),(short)(YIC/2), &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility");
for(a=5; a<10; a++)
- uiDefButI(block, TOG|BIT|(a+10), B_LAY+10+a, "",(short)(xco+a*(XIC/2)), 0, XIC/2, (YIC)/2, &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility");
+ uiDefButBitI(block, TOG, 1<<(a+10), B_LAY+10+a, "",(short)(xco+a*(XIC/2)), 0, XIC/2, (YIC)/2, &(G.vd->lay), 0, 0, 0, 0, "Toggles Layer visibility");
uiBlockEndAlign(block);
@@ -4159,15 +4159,15 @@ void view3d_buttons(void)
/* selection modus */
if(G.obedit && (G.obedit->type == OB_MESH)) {
uiBlockBeginAlign(block);
- uiDefIconButS(block, TOG|BIT|0, B_SEL_VERT, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Vertex select mode");
xco+= XIC;
- uiDefIconButS(block, TOG|BIT|1, B_SEL_EDGE, ICON_EDGESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Edge select mode");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Edge select mode");
xco+= XIC;
- uiDefIconButS(block, TOG|BIT|2, B_SEL_FACE, ICON_FACESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Face select mode");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, xco,0,XIC,YIC, &G.scene->selectmode, 1.0, 0.0, 0, 0, "Face select mode");
xco+= XIC;
uiBlockEndAlign(block);
if(G.vd->drawtype > OB_WIRE) {
- uiDefIconButS(block, TOG|BIT|12, B_REDR, ICON_ORTHO, xco,0,XIC,YIC, &G.vd->flag, 1.0, 0.0, 0, 0, "Limit selection to visible (clipped with depth buffer)");
+ uiDefIconButBitS(block, TOG, V3D_ZBUF_SELECT, B_REDR, ICON_ORTHO, xco,0,XIC,YIC, &G.vd->flag, 1.0, 0.0, 0, 0, "Limit selection to visible (clipped with depth buffer)");
xco+= XIC;
}
xco+= 20;
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index fa54d83260e..5c4843e8664 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -4612,14 +4612,6 @@ static uiBut *uiDefButBit(uiBlock *block, int type, int bit, int retval, char *s
if (bitIdx==-1) {
return NULL;
} else {
- if (type&BIT) {
- int curIdx = type&31;
-
- if (curIdx!=bitIdx) {
- printf("ERROR: button index mismatch! (Button: %s, Correct Index: %d, Given Index: %d)\n", str, bitIdx, curIdx);
- }
- }
-
return uiDefBut(block, type|BIT|bitIdx, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip);
}
}
diff --git a/source/blender/src/previewrender.c b/source/blender/src/previewrender.c
index e77ae44299a..622e1e4bbf4 100644
--- a/source/blender/src/previewrender.c
+++ b/source/blender/src/previewrender.c
@@ -652,12 +652,12 @@ static void texture_preview_pixel(Tex *tex, int x, int y, char *rect)
}
else {
skip= 1;
- ta= 0.0;
+ tr= tg= tb= ta= 0.0;
}
}
else {
skip= 1;
- ta= 0.0;
+ tr= tg= tb= ta= 0.0;
}
}
else {
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index ca51e596eec..9a5f7eb47e5 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -482,7 +482,7 @@ void start_game(void)
restore_all_scene_cfra(scene_cfra_store);
set_scene_bg(startscene);
- if (G.flags & G_FLAGS_AUTOPLAY)
+ if (G.flags & G_FILE_AUTOPLAY)
exit_usiblender();
/* groups could have changed ipo */
@@ -2362,7 +2362,7 @@ void drawinfospace(ScrArea *sa, void *spacedata)
&(U.flag), 0, 0, 0, 0,
"Forces the current Scene to be displayed in all Screens");
#ifndef __APPLE__
- uiDefButS(block, TOG|BIT|0, 0, "Large Cursors",
+ uiDefButBitS(block, TOG, 1, 0, "Large Cursors",
(xpos+edgsp),y2,spref,buth,
&(U.curssize), 0, 0, 0, 0,
"Use large mouse cursors when available");
@@ -2737,7 +2737,7 @@ void drawinfospace(ScrArea *sa, void *spacedata)
uiDefButS(block, MENU, B_REDR, "Light1 %x0|Light2 %x1|Light3 %x2",
xpos+edgsp, y2, 2*mpref/6, buth, &cur_light, 0.0, 0.0, 0, 0, "");
uiBlockSetCol(block, TH_BUT_SETTING1);
- uiDefButI(block, TOG|BIT|0, B_RECALCLIGHT, "On",
+ uiDefButBitI(block, TOG, 1, B_RECALCLIGHT, "On",
xpos+edgsp+2*mpref/6, y2, mpref/6, buth,
&U.light[cur_light].flag, 0.0, 0.0, 0, 0, "Enable this OpenGL light in Solid draw mode");
@@ -2787,7 +2787,7 @@ void drawinfospace(ScrArea *sa, void *spacedata)
}
/*
- uiDefButS(block, TOG|BIT|5, 0, "Log Events to Console",
+ uiDefButBitS(block, TOG, USER_EVTTOCONSOLE, 0, "Log Events to Console",
(xpos+edgsp),y2,lpref,buth,
&(U.uiflag), 0, 0, 0, 0, "Display a list of input events in the console");
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c
index bf623054892..ad96c8d2e8c 100644
--- a/source/blender/src/toets.c
+++ b/source/blender/src/toets.c
@@ -528,7 +528,7 @@ int blenderqread(unsigned short event, short val)
if(val==0) return 1;
if(event==MOUSEY || event==MOUSEX) return 1;
- if (G.flags & G_FLAGS_AUTOPLAY) return 1;
+ if (G.flags & G_FILE_AUTOPLAY) return 1;
if (curarea && curarea->spacetype==SPACE_TEXT) textspace= 1;
else if (curarea && curarea->spacetype==SPACE_SCRIPT) textspace= 1;
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c
index 9bf5468bf1e..f25467af57c 100644
--- a/source/blender/src/toolbox.c
+++ b/source/blender/src/toolbox.c
@@ -1244,16 +1244,16 @@ int movetolayer_buts(unsigned int *lay)
uiBlockBeginAlign(block);
for(a=0; a<5; a++)
- uiDefButI(block, TOGR|BIT|a, 0, "",(short)(x1+a*dx),(short)(y1+dy),(short)dx,(short)dy, lay, 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOGR, 1<<a, 0, "",(short)(x1+a*dx),(short)(y1+dy),(short)dx,(short)dy, lay, 0, 0, 0, 0, "");
for(a=0; a<5; a++)
- uiDefButI(block, TOGR|BIT|(a+10), 0, "",(short)(x1+a*dx),(short)y1,(short)dx,(short)dy, lay, 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOGR, 1<<(a+10), 0, "",(short)(x1+a*dx),(short)y1,(short)dx,(short)dy, lay, 0, 0, 0, 0, "");
x1+= 5;
uiBlockBeginAlign(block);
for(a=5; a<10; a++)
- uiDefButI(block, TOGR|BIT|a, 0, "",(short)(x1+a*dx),(short)(y1+dy),(short)dx,(short)dy, lay, 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOGR, 1<<a, 0, "",(short)(x1+a*dx),(short)(y1+dy),(short)dx,(short)dy, lay, 0, 0, 0, 0, "");
for(a=5; a<10; a++)
- uiDefButI(block, TOGR|BIT|(a+10), 0, "",(short)(x1+a*dx),(short)y1,(short)dx,(short)dy, lay, 0, 0, 0, 0, "");
+ uiDefButBitI(block, TOGR, 1<<(a+10), 0, "",(short)(x1+a*dx),(short)y1,(short)dx,(short)dy, lay, 0, 0, 0, 0, "");
uiBlockEndAlign(block);
x1-= 5;
diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c
index c993564cd3d..2fcd8995c6c 100644
--- a/source/blender/src/vpaint.c
+++ b/source/blender/src/vpaint.c
@@ -96,12 +96,6 @@
#define VP_MUL 3
#define VP_FILT 4
- /* Gvp.flag */
-#define VP_COLINDEX 1
-#define VP_AREA 2
-#define VP_SOFT 4
-#define VP_NORMALS 8
-
#define MAXINDEX 512000
VPaint Gvp= {1.0, 1.0, 1.0, 0.2, 25.0, 1.0, 1.0, 0, VP_AREA+VP_SOFT};