Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "RNA_access.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
#include "BLF_translation.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_effect.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_paint.h"
#include "BKE_screen.h"
#include "ED_mesh.h"
#include "ED_util.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "view3d_intern.h"
Go to the source code of this file.
Definition in file view3d_header.c.
#define B_FULL 102 |
Definition at line 101 of file view3d_header.c.
#define B_HOME 103 |
Definition at line 102 of file view3d_header.c.
#define B_MAN_MODE 120 |
Definition at line 113 of file view3d_header.c.
Referenced by do_view3d_header_buttons(), and uiTemplateHeader3D().
#define B_MAN_ROT 117 |
Definition at line 110 of file view3d_header.c.
Referenced by do_view3d_header_buttons(), and uiTemplateHeader3D().
#define B_MAN_SCALE 118 |
Definition at line 111 of file view3d_header.c.
Referenced by do_view3d_header_buttons(), and uiTemplateHeader3D().
#define B_MAN_TRANS 116 |
Definition at line 109 of file view3d_header.c.
Referenced by do_view3d_header_buttons(), and uiTemplateHeader3D().
#define B_MODESELECT 108 |
Definition at line 105 of file view3d_header.c.
Referenced by do_view3d_header_buttons(), and uiTemplateHeader3D().
#define B_NDOF 119 |
Definition at line 112 of file view3d_header.c.
Referenced by do_view3d_header_buttons().
#define B_NOP 123 |
Definition at line 115 of file view3d_header.c.
#define B_PERSP 105 |
Definition at line 104 of file view3d_header.c.
#define B_REDR 122 |
Definition at line 114 of file view3d_header.c.
#define B_SCENELOCK 101 |
Definition at line 100 of file view3d_header.c.
#define B_SEL_EDGE 111 |
Definition at line 107 of file view3d_header.c.
Referenced by do_view3d_header_buttons(), and uiTemplateEditModeSelection().
#define B_SEL_FACE 112 |
Definition at line 108 of file view3d_header.c.
Referenced by do_view3d_header_buttons(), and uiTemplateEditModeSelection().
#define B_SEL_VERT 110 |
Definition at line 106 of file view3d_header.c.
Referenced by do_view3d_header_buttons(), and uiTemplateEditModeSelection().
#define B_VIEWBUT 104 |
Definition at line 103 of file view3d_header.c.
#define VIEW3D_HANDLER_BACKGROUND 1 |
Definition at line 87 of file view3d_header.c.
#define VIEW3D_HANDLER_BONESKETCH 8 |
Definition at line 94 of file view3d_header.c.
#define VIEW3D_HANDLER_GREASEPENCIL 7 |
Definition at line 93 of file view3d_header.c.
#define VIEW3D_HANDLER_MULTIRES 5 |
Definition at line 91 of file view3d_header.c.
#define VIEW3D_HANDLER_OBJECT 3 |
Definition at line 89 of file view3d_header.c.
#define VIEW3D_HANDLER_PREVIEW 4 |
Definition at line 90 of file view3d_header.c.
#define VIEW3D_HANDLER_PROPERTIES 2 |
Definition at line 88 of file view3d_header.c.
#define VIEW3D_HANDLER_TRANSFORM 6 |
Definition at line 92 of file view3d_header.c.
static void do_view3d_header_buttons | ( | bContext * | C, |
void * | arg, | ||
int | event | ||
) | [static] |
Referenced by uiTemplateEditModeSelection(), and uiTemplateHeader3D().
static void do_view3d_header_buttons | ( | bContext * | C, |
void * | UNUSEDarg, | ||
int | event | ||
) | [static] |
Definition at line 330 of file view3d_header.c.
References B_MAN_MODE, B_MAN_ROT, B_MAN_SCALE, B_MAN_TRANS, B_MODESELECT, B_NDOF, B_REDR, B_SEL_EDGE, B_SEL_FACE, B_SEL_VERT, BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), wmEvent::ctrl, CTX_data_edit_object(), CTX_data_tool_settings(), CTX_wm_area(), CTX_wm_window(), Object::data, ED_area_tag_redraw(), ED_undo_push(), EM_convertsel(), EM_selectmode_set(), wmWindow::eventstate, ListBase::first, View3D::modeselect, NC_GEOM, ND_SELECT, NULL, OB_MESH, RNA_enum_set(), SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, ToolSettings::selectmode, EditMesh::selectmode, wmEvent::shift, ScrArea::spacedata, View3D::twtype, Object::type, V3D_MANIP_ROTATE, V3D_MANIP_SCALE, V3D_MANIP_TRANSLATE, WM_event_add_notifier(), WM_OP_EXEC_REGION_WIN, WM_operator_name_call(), WM_operator_properties_create(), and WM_operator_properties_free().
static void handle_view3d_lock | ( | bContext * | C | ) | [static] |
Definition at line 118 of file view3d_header.c.
References BKE_screen_view3d_main_sync(), View3D::camera, Scene::camera, CTX_data_main(), CTX_data_scene(), CTX_wm_area(), CTX_wm_view3d(), View3D::lay, Scene::lay, View3D::layact, Scene::layact, View3D::localvd, NC_SCENE, ND_LAYER, NULL, View3D::scenelock, Main::screen, SPACE_VIEW3D, ScrArea::spacetype, and WM_event_add_notifier().
Referenced by view3d_layers_exec(), and viewnumpad_exec().
static int modeselect_addmode | ( | char * | str, |
const char * | title, | ||
int | id, | ||
int | icon | ||
) | [static] |
Definition at line 269 of file view3d_header.c.
References IFACE_.
Referenced by view3d_modeselect_pup().
static int object_mode_icon | ( | int | mode | ) | [static] |
Definition at line 431 of file view3d_header.c.
References EnumPropertyItem::icon, EnumPropertyItem::name, NULL, object_mode_items, and EnumPropertyItem::value.
Referenced by uiTemplateHeader3D().
Definition at line 444 of file view3d_header.c.
References B_SEL_EDGE, B_SEL_FACE, B_SEL_VERT, BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), CTX_data_edit_object(), Object::data, do_view3d_header_buttons(), NULL, OB_MESH, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, EditMesh::selectmode, TOG, Object::type, UI_UNIT_X, UI_UNIT_Y, uiBlockSetHandleFunc(), uiDefIconButBitS(), uiLayoutGetBlock(), and uiLayoutRow().
Referenced by uiTemplateHeader3D().
Definition at line 465 of file view3d_header.c.
References B_MAN_MODE, B_MAN_ROT, B_MAN_SCALE, B_MAN_TRANS, B_MODESELECT, BIF_countTransformOrientation(), BIF_menustringTransformOrientation(), CTX_data_edit_object(), CTX_data_scene(), CTX_data_tool_settings(), CTX_wm_area(), CTX_wm_screen(), Object::data, do_view3d_header_buttons(), ListBase::first, Object::id, Scene::id, bScreen::id, Object::lay, View3D::localvd, MEM_freeN(), MENU, Object::mode, View3D::modeselect, NULL, OB_MODE_OBJECT, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OBACT, object_mode_icon(), RNA_Mesh, RNA_pointer_create(), RNA_Scene, RNA_SpaceView3D, RNA_ToolSettings, View3D::scenelock, ScrArea::spacedata, TIP_, TOG, View3D::twflag, View3D::twmode, View3D::twtype, UI_BUT_UNDO, UI_DPI_FAC, UI_EMBOSS, UI_ITEM_R_ICON_ONLY, UI_UNIT_X, UI_UNIT_Y, uiBlockSetEmboss(), uiBlockSetHandleFunc(), uiButClearFlag(), uiDefButC(), uiDefIconButBitC(), uiDefIconTextButS(), uiItemR(), uiLayoutGetBlock(), uiLayoutRow(), uiTemplateEditModeSelection(), uiTemplateLayers(), V3D_MANIP_CUSTOM, V3D_MANIP_ROTATE, V3D_MANIP_SCALE, V3D_MANIP_TRANSLATE, V3D_USE_MANIPULATOR, and view3d_modeselect_pup().
Definition at line 147 of file view3d_header.c.
References Object::lay, View3D::lay, and Scene::obedit.
Referenced by view3d_layers_exec().
static int view3d_layers_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 162 of file view3d_header.c.
References CTX_data_main(), CTX_data_scene(), CTX_wm_area(), DAG_on_visible_update(), ED_area_tag_redraw(), FALSE, ListBase::first, handle_view3d_lock(), View3D::lay, View3D::layact, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_int_get(), View3D::scenelock, ScrArea::spacedata, and view3d_layers_editmode_ensure().
Referenced by view3d_layers_invoke(), and VIEW3D_OT_layers().
static int view3d_layers_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 227 of file view3d_header.c.
References wmEvent::alt, wmEvent::ctrl, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmEvent::oskey, wmOperator::ptr, RNA_boolean_set(), RNA_int_get(), RNA_int_set(), wmEvent::shift, TRUE, and view3d_layers_exec().
Referenced by VIEW3D_OT_layers().
static int view3d_layers_poll | ( | bContext * | C | ) | [static] |
Definition at line 244 of file view3d_header.c.
References CTX_wm_view3d(), ED_operator_view3d_active(), and NULL.
Referenced by VIEW3D_OT_layers().
static char* view3d_modeselect_pup | ( | Scene * | scene | ) | [static] |
Definition at line 276 of file view3d_header.c.
References BLI_strncpy(), Object::data, eModifierType_Cloth, eModifierType_Softbody, ListBase::first, Object::id, IFACE_, ID::lib, Object::mode, modeselect_addmode(), modifiers_findByType(), N_, NULL, OB_ARMATURE, OB_CURVE, OB_FONT, OB_LATTICE, OB_MBALL, OB_MESH, OB_MODE_EDIT, OB_MODE_OBJECT, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_TEXTURE_PAINT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OB_SURF, OBACT, Object::particlesystem, str, and Object::type.
Referenced by uiTemplateHeader3D().
void VIEW3D_OT_layers | ( | wmOperatorType * | ot | ) |
Definition at line 249 of file view3d_header.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), RNA_def_int(), wmOperatorType::srna, view3d_layers_exec(), view3d_layers_invoke(), and view3d_layers_poll().
Referenced by view3d_operatortypes().