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:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_header.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c45
1 files changed, 16 insertions, 29 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index d7ab8034286..a481fdb59f6 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -37,6 +37,11 @@
#include "MEM_guardedalloc.h"
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_editVert.h"
+#include "BLI_utildefines.h"
+
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_effect.h"
@@ -58,11 +63,6 @@
#include "RNA_define.h"
#include "RNA_enum_types.h"
-
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_editVert.h"
-
#include "UI_interface.h"
#include "UI_resources.h"
@@ -81,9 +81,6 @@
#define TEST_EDITMESH if(obedit==0) return; \
if( (v3d->lay & obedit->lay)==0 ) return;
-/* XXX port over */
-extern void borderselect();
-
/* view3d handler codes */
#define VIEW3D_HANDLER_BACKGROUND 1
#define VIEW3D_HANDLER_PROPERTIES 2
@@ -204,7 +201,7 @@ static int layers_exec(bContext *C, wmOperator *op)
if(v3d->scenelock) handle_view3d_lock(C);
/* new layers might need unflushed events events */
- DAG_scene_update_flags(bmain, scene, v3d->lay); /* tags all that moves and flushes */
+ DAG_scene_update_flags(bmain, scene, v3d->lay, FALSE); /* tags all that moves and flushes */
ED_area_tag_redraw(sa);
@@ -304,7 +301,7 @@ static char *view3d_modeselect_pup(Scene *scene)
}
-static void do_view3d_header_buttons(bContext *C, void *arg, int event)
+static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event)
{
wmWindow *win= CTX_wm_window(C);
ToolSettings *ts= CTX_data_tool_settings(C);
@@ -446,16 +443,6 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
v3d->modeselect = ob->mode;
else
v3d->modeselect = OB_MODE_OBJECT;
-
- v3d->flag &= ~V3D_MODE;
-
- /* not sure what the v3d->flag is useful for now... modeselect is confusing */
- if(obedit) v3d->flag |= V3D_EDITMODE;
- if(ob && (ob->mode & OB_MODE_POSE)) v3d->flag |= V3D_POSEMODE;
- if(ob && (ob->mode & OB_MODE_VERTEX_PAINT)) v3d->flag |= V3D_VERTEXPAINT;
- if(ob && (ob->mode & OB_MODE_WEIGHT_PAINT)) v3d->flag |= V3D_WEIGHTPAINT;
- if(ob && (ob->mode & OB_MODE_TEXTURE_PAINT)) v3d->flag |= V3D_TEXTUREPAINT;
- if(paint_facesel_test(ob)) v3d->flag |= V3D_FACESELECT;
uiBlockBeginAlign(block);
uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene) ,
@@ -463,7 +450,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiBlockEndAlign(block);
/* Draw type */
- uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", 0);
+ uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", ICON_NULL);
if (obedit==NULL && ((ob && ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)))) {
/* Manipulators aren't used in weight paint mode */
@@ -471,13 +458,13 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
PointerRNA meshptr;
RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr);
- uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", 0);
+ uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NULL);
} else {
- char *str_menu;
+ const char *str_menu;
row= uiLayoutRow(layout, 1);
- uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", 0);
- uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", 0);
+ uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NULL);
+ uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NULL);
/* NDOF */
/* Not implemented yet
@@ -492,7 +479,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
/* Transform widget / manipulators */
row= uiLayoutRow(layout, 1);
- uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", 0);
+ uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NULL);
block= uiLayoutGetBlock(row);
if(v3d->twflag & V3D_USE_MANIPULATOR) {
@@ -507,11 +494,11 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
str_menu = BIF_menustringTransformOrientation(C, "Orientation");
uiDefButS(block, MENU, B_MAN_MODE, str_menu,0,0,70,YIC, &v3d->twmode, 0, 0, 0, 0, "Transform Orientation");
- MEM_freeN(str_menu);
+ MEM_freeN((void *)str_menu);
}
if(obedit==NULL && v3d->localvd==NULL) {
- int ob_lay = ob ? ob->lay : 0;
+ unsigned int ob_lay = ob ? ob->lay : 0;
/* Layers */
if (v3d->scenelock)
@@ -520,7 +507,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiTemplateLayers(layout, &v3dptr, "layers", &v3dptr, "layers_used", ob_lay);
/* Scene lock */
- uiItemR(layout, &v3dptr, "lock_camera_and_layers", UI_ITEM_R_ICON_ONLY, "", 0);
+ uiItemR(layout, &v3dptr, "lock_camera_and_layers", UI_ITEM_R_ICON_ONLY, "", ICON_NULL);
}
/* selection modus, dont use python for this since it cant do the toggle buttons with shift+click as well as clicking to set one. */