Blender V2.61 - r43446
|
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
#include "DNA_lattice_types.h"
#include "DNA_meta_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_customdata.h"
#include "BKE_depsgraph.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_screen.h"
#include "BKE_deform.h"
#include "BKE_object.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "ED_armature.h"
#include "ED_gpencil.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_curve.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_buttons.c.
#define B_ARMATUREPANEL1 1009 |
Definition at line 87 of file view3d_buttons.c.
#define B_ARMATUREPANEL2 1010 |
Definition at line 88 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons(), and v3d_posearmature_buts().
#define B_ARMATUREPANEL3 1013 |
Definition at line 91 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons(), and v3d_posearmature_buts().
#define B_CLR_WPAINT 2850 |
Definition at line 114 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_IDNAME 3000 |
Definition at line 120 of file view3d_buttons.c.
#define B_NOP 1 |
Definition at line 83 of file view3d_buttons.c.
#define B_OBJECTPANEL 1012 |
Definition at line 90 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_OBJECTPANELDIMS 1015 |
Definition at line 93 of file view3d_buttons.c.
#define B_OBJECTPANELMEDIAN 1008 |
Definition at line 86 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons(), and v3d_editvertex_buts().
#define B_OBJECTPANELPARENT 1011 |
Definition at line 89 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_OBJECTPANELROT 1007 |
Definition at line 85 of file view3d_buttons.c.
#define B_OBJECTPANELSCALE 1014 |
Definition at line 92 of file view3d_buttons.c.
#define B_OPA1_0 2849 |
Definition at line 112 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_OPA1_2 2847 |
Definition at line 110 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_OPA1_4 2846 |
Definition at line 109 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_OPA1_8 2845 |
Definition at line 108 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_OPA3_4 2848 |
Definition at line 111 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_RECALCMBALL 2501 |
Definition at line 100 of file view3d_buttons.c.
#define B_REDR 2 |
Definition at line 84 of file view3d_buttons.c.
#define B_RV3D_BOXCLIP 2902 |
Definition at line 118 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_RV3D_BOXVIEW 2901 |
Definition at line 117 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_RV3D_LOCKED 2900 |
Definition at line 116 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_SETPT_ALIGN 2127 |
Definition at line 98 of file view3d_buttons.c.
#define B_SETPT_AUTO 2125 |
Definition at line 96 of file view3d_buttons.c.
#define B_SETPT_FREE 2128 |
Definition at line 99 of file view3d_buttons.c.
#define B_SETPT_VECTOR 2126 |
Definition at line 97 of file view3d_buttons.c.
#define B_TRANSFORMSPACEADD 1016 |
Definition at line 94 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_TRANSFORMSPACECLEAR 1017 |
Definition at line 95 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_VGRP_PNL_COPY 1 |
Definition at line 592 of file view3d_buttons.c.
Referenced by do_view3d_vgroup_buttons(), and view3d_panel_vgroup().
#define B_VGRP_PNL_COPY_SINGLE 16384 |
Definition at line 595 of file view3d_buttons.c.
Referenced by do_view3d_vgroup_buttons(), and view3d_panel_vgroup().
#define B_VGRP_PNL_EDIT_SINGLE 8 |
Definition at line 594 of file view3d_buttons.c.
Referenced by do_view3d_vgroup_buttons(), and view3d_panel_vgroup().
#define B_VGRP_PNL_NORMALIZE 2 |
Definition at line 593 of file view3d_buttons.c.
Referenced by do_view3d_vgroup_buttons(), and view3d_panel_vgroup().
#define B_WEIGHT0_0 2840 |
Definition at line 102 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_WEIGHT1_0 2844 |
Definition at line 106 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_WEIGHT1_2 2842 |
Definition at line 104 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_WEIGHT1_4 2841 |
Definition at line 103 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
#define B_WEIGHT3_4 2843 |
Definition at line 105 of file view3d_buttons.c.
Referenced by do_view3d_region_buttons().
static void act_vert_def | ( | Object * | ob, |
EditVert ** | eve, | ||
MDeformVert ** | dvert | ||
) | [static] |
Definition at line 597 of file view3d_buttons.c.
References BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), CD_MDEFORMVERT, CustomData_em_get(), EditSelection::data, Object::data, Object::defbase, EDITVERT, ListBase::first, ListBase::last, Object::mode, NULL, OB_MESH, OB_MODE_EDIT, EditMesh::selected, EditSelection::type, Object::type, and EditMesh::vdata.
Referenced by vgroup_adjust_active(), vgroup_copy_active_to_sel(), vgroup_copy_active_to_sel_single(), vgroup_normalize_active(), view3d_panel_vgroup(), and view3d_panel_vgroup_poll().
static void do_view3d_region_buttons | ( | bContext * | C, |
void * | UNUSEDindex, | ||
int | event | ||
) | [static] |
Definition at line 1109 of file view3d_buttons.c.
References Object::actdef, ARegion::alignment, B_ARMATUREPANEL2, B_ARMATUREPANEL3, B_CLR_WPAINT, B_OBJECTPANEL, B_OBJECTPANELMEDIAN, B_OBJECTPANELPARENT, B_OPA1_0, B_OPA1_2, B_OPA1_4, B_OPA1_8, B_OPA3_4, B_REDR, B_RV3D_BOXCLIP, B_RV3D_BOXVIEW, B_RV3D_LOCKED, B_TRANSFORMSPACEADD, B_TRANSFORMSPACECLEAR, B_WEIGHT0_0, B_WEIGHT1_0, B_WEIGHT1_2, B_WEIGHT1_4, B_WEIGHT3_4, BIF_clearTransformOrientation(), BIF_createTransformOrientation(), BKE_object_parent_loop_check(), BLI_findlink(), copy_v3_v3(), CTX_data_main(), CTX_data_scene(), CTX_wm_area(), CTX_wm_view3d(), DAG_id_tag_update(), DAG_scene_sort(), Object::data, Object::defbase, DEG2RADF, ED_area_tag_redraw(), ED_vgroup_vert_remove(), bPoseChannel::eul, eul_to_quat(), bPose::flag, get_active_posechannel(), Object::id, ListBase::last, ID::lib, names, NC_SPACE, ND_SPACE_VIEW3D, NULL, TransformProperties::ob_eul, OB_RECALC_DATA, OB_RECALC_OB, OBACT, Object::parent, Object::pose, POSE_DO_UNLOCK, POSE_LOCKED, ARegion::prev, View3D::properties_storage, bPoseChannel::quat, quat_to_axis_angle(), ScrArea::regionbase, ARegion::regiondata, RGN_ALIGN_QSPLIT, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::rotmode, RV3D_BOXCLIP, RV3D_BOXVIEW, RV3D_LOCKED, Mesh::totvert, v3d_editvertex_buts(), view3d_boxview_copy(), RegionView3D::viewlock, and WM_event_add_notifier().
Referenced by view3d_panel_object().
static void do_view3d_vgroup_buttons | ( | bContext * | C, |
void * | UNUSEDarg, | ||
int | event | ||
) | [static] |
Definition at line 759 of file view3d_buttons.c.
References B_VGRP_PNL_COPY, B_VGRP_PNL_COPY_SINGLE, B_VGRP_PNL_EDIT_SINGLE, B_VGRP_PNL_NORMALIZE, CTX_data_scene(), DAG_id_tag_update(), Object::data, Object::id, NC_GEOM, ND_DATA, OB_RECALC_DATA, OBACT, vgroup_adjust_active(), vgroup_copy_active_to_sel(), vgroup_copy_active_to_sel_single(), vgroup_normalize_active(), and WM_event_add_notifier().
Referenced by view3d_panel_vgroup().
Definition at line 617 of file view3d_buttons.c.
References BKE_mesh_get_editmesh(), CD_MDEFORMVERT, EditVert::co, CustomData_em_get(), EditVert::data, Object::data, defgroup_flip_index(), defgroup_flip_map(), defvert_find_weight(), defvert_sync_mapped(), defvert_verify_index(), editmesh_get_x_mirror_vert(), MEM_freeN(), TRUE, EditMesh::vdata, and MDeformWeight::weight.
Referenced by vgroup_adjust_active(), vgroup_copy_active_to_sel(), vgroup_copy_active_to_sel_single(), and vgroup_normalize_active().
Definition at line 1023 of file view3d_buttons.c.
References bArmature::act_edbone, BONE_CONNECTED, Object::data, EditBone::flag, bArmature::id, bArmature::layer, EditBone::layer, EditBone::parent, RNA_EditBone, RNA_pointer_create(), RNA_pointer_get(), uiItemL(), uiItemR(), and uiLayoutColumn().
Referenced by view3d_panel_object().
Definition at line 1058 of file view3d_buttons.c.
References Object::data, MetaBall::id, MetaBall::lastelem, MB_BALL, MB_CUBE, MB_ELIPSOID, MB_PLANE, MB_TUBE, RNA_enum_get(), RNA_MetaBall, RNA_MetaElement, RNA_pointer_create(), uiItemL(), uiItemR(), and uiLayoutColumn().
Referenced by view3d_panel_object().
static void v3d_editvertex_buts | ( | uiLayout * | layout, |
View3D * | v3d, | ||
Object * | ob, | ||
float | lim | ||
) | [static] |
Definition at line 135 of file view3d_buttons.c.
References add_v3_v3(), B_OBJECTPANELMEDIAN, B_REDR, Nurb::bezt, BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), BLI_findlink(), BLI_snprintf(), Nurb::bp, EditEdge::bweight, CD_MDEFORMVERT, CLAMP(), EditVert::co, EditEdge::crease, CU_BEZIER, TransformProperties::curdef, curve_editnurbs(), CustomData_em_get(), EditVert::data, Object::data, Lattice::def, MDeformWeight::def_nr, Object::defbase, TransformProperties::defweightp, MDeformVert::dw, EditMesh::edges, Lattice::editlatt, EditEdge::f, EditVert::f, BPoint::f1, BezTriple::f1, BezTriple::f2, BezTriple::f3, ListBase::first, View3D::flag, FLT_MAX, i, Curve::id, Object::imat, init(), invert_m4_m4(), LABEL, EditLatt::latt, len_v3(), max, MEM_callocN(), mul_m4_v3(), bDeformGroup::name, Nurb::next, EditEdge::next, EditVert::next, NULL, NUM, OB_CURVE, OB_LATTICE, OB_MESH, OB_SURF, Object::obmat, Lattice::pntsu, Nurb::pntsu, Lattice::pntsv, Nurb::pntsv, Lattice::pntsw, PROP_UNIT_LENGTH, View3D::properties_storage, BPoint::radius, BezTriple::radius, recalc_editnormals(), RNA_BezierSplinePoint, RNA_pointer_create(), RNA_SplinePoint, SELECT, str, sub_v3_v3v3(), test2DNurb(), testhandlesNurb(), TOG, TOGN, MDeformVert::totweight, Nurb::type, Object::type, uiBlockBeginAlign(), uiBlockEndAlign(), uiButSetUnitType(), uiDefBut(), uiDefButBitS(), uiDefButF(), uiDefButR(), uiLayoutAbsoluteBlock(), V3D_GLOBAL_STATS, EditMesh::vdata, TransformProperties::ve_median, BPoint::vec, BezTriple::vec, EditMesh::verts, BPoint::weight, BezTriple::weight, and MDeformWeight::weight.
Referenced by do_view3d_region_buttons(), and view3d_panel_object().
Definition at line 914 of file view3d_buttons.c.
References axis_angle_to_quat(), B_ARMATUREPANEL2, B_ARMATUREPANEL3, B_REDR, copy_v3_v3(), bPoseChannel::eul, get_active_posechannel(), ICONTOG, Object::id, LABEL, bPoseChannel::loc, NUM, OB_LOCK_LOCX, OB_LOCK_LOCY, OB_LOCK_LOCZ, OB_LOCK_ROTX, OB_LOCK_ROTY, OB_LOCK_ROTZ, OB_LOCK_SCALEX, OB_LOCK_SCALEY, OB_LOCK_SCALEZ, PROP_UNIT_LENGTH, bPoseChannel::protectflag, bPoseChannel::quat, quat_to_eul(), RAD2DEGF, RNA_pointer_create(), RNA_PoseBone, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, bPoseChannel::rotAngle, bPoseChannel::rotAxis, bPoseChannel::rotmode, bPoseChannel::size, uiBlockBeginAlign(), uiBlockEndAlign(), uiButSetUnitType(), uiDefBut(), uiDefButF(), uiDefIconButBitS(), uiItemL(), uiLayoutAbsoluteBlock(), uiLayoutColumn(), and v3d_transform_butsR().
Referenced by view3d_panel_object().
static void v3d_transform_butsR | ( | uiLayout * | layout, |
PointerRNA * | ptr | ||
) | [static] |
Definition at line 842 of file view3d_buttons.c.
References BONE_CONNECTED, PointerRNA::data, Bone::flag, OB_TYPE_SUPPORT_MATERIAL, Bone::parent, RNA_boolean_get(), RNA_enum_get(), RNA_Object, RNA_pointer_get(), RNA_PoseBone, ROT_MODE_AXISANGLE, ROT_MODE_QUAT, split(), Object::type, PointerRNA::type, UI_ITEM_R_ICON_ONLY, UI_ITEM_R_TOGGLE, uiItemL(), uiItemR(), uiLayoutColumn(), uiLayoutSetActive(), and uiLayoutSplit().
Referenced by v3d_posearmature_buts(), and view3d_panel_object().
static void vgroup_adjust_active | ( | Object * | ob, |
int | def_nr | ||
) | [static] |
Definition at line 647 of file view3d_buttons.c.
References act_vert_def(), Object::data, editvert_mirror_update(), and ME_EDIT_MIRROR_X.
Referenced by do_view3d_vgroup_buttons().
static void vgroup_copy_active_to_sel | ( | Object * | ob | ) | [static] |
Definition at line 660 of file view3d_buttons.c.
References act_vert_def(), BKE_mesh_get_editmesh(), CD_MDEFORMVERT, CustomData_em_get(), EditVert::data, Object::data, defvert_copy(), Mesh::editflag, editvert_mirror_update(), EditVert::f, ListBase::first, ME_EDIT_MIRROR_X, EditVert::next, NULL, SELECT, EditMesh::vdata, and EditMesh::verts.
Referenced by do_view3d_vgroup_buttons().
static void vgroup_copy_active_to_sel_single | ( | Object * | ob, |
const int | def_nr | ||
) | [static] |
Definition at line 692 of file view3d_buttons.c.
References act_vert_def(), BKE_mesh_get_editmesh(), CD_MDEFORMVERT, CustomData_em_get(), EditVert::data, Object::data, defvert_find_index(), Mesh::editflag, editvert_mirror_update(), EditVert::f, ListBase::first, ME_EDIT_MIRROR_X, EditVert::next, NULL, SELECT, EditMesh::vdata, EditMesh::verts, and MDeformWeight::weight.
Referenced by do_view3d_vgroup_buttons().
static void vgroup_normalize_active | ( | Object * | ob | ) | [static] |
Definition at line 740 of file view3d_buttons.c.
References act_vert_def(), Object::data, defvert_normalize(), editvert_mirror_update(), ME_EDIT_MIRROR_X, and NULL.
Referenced by do_view3d_vgroup_buttons().
void view3d_buttons_register | ( | ARegionType * | art | ) |
Definition at line 1356 of file view3d_buttons.c.
References BLI_addtail(), PanelType::draw, gpencil_panel_standard(), PanelType::idname, PanelType::label, MEM_callocN(), ARegionType::paneltypes, PanelType::poll, view3d_panel_object(), view3d_panel_vgroup(), and view3d_panel_vgroup_poll().
Referenced by ED_spacetype_view3d().
void VIEW3D_OT_properties | ( | wmOperatorType * | ot | ) |
Definition at line 1393 of file view3d_buttons.c.
References wmOperatorType::description, ED_operator_view3d_active(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, wmOperatorType::poll, and view3d_properties().
Referenced by view3d_operatortypes().
Definition at line 1275 of file view3d_buttons.c.
References CTX_data_edit_object(), CTX_data_scene(), CTX_wm_view3d(), do_view3d_region_buttons(), View3D::grid, Object::id, Panel::layout, MAX2, Object::mode, NULL, OB_ARMATURE, OB_MBALL, OB_MODE_POSE, OBACT, RNA_id_pointer_create(), Object::type, uiBlockSetHandleFunc(), uiLayoutColumn(), uiLayoutGetBlock(), v3d_editarmature_buts(), v3d_editmetaball_buts(), v3d_editvertex_buts(), v3d_posearmature_buts(), and v3d_transform_butsR().
Referenced by view3d_buttons_register().
Definition at line 799 of file view3d_buttons.c.
References act_vert_def(), B_VGRP_PNL_COPY, B_VGRP_PNL_COPY_SINGLE, B_VGRP_PNL_EDIT_SINGLE, B_VGRP_PNL_NORMALIZE, BLI_findlink(), BUT, CTX_data_scene(), MDeformWeight::def_nr, Object::defbase, do_view3d_vgroup_buttons(), MDeformVert::dw, i, Panel::layout, bDeformGroup::name, NULL, NUM, OBACT, MDeformVert::totweight, uiBlockBeginAlign(), uiBlockEndAlign(), uiBlockSetHandleFunc(), uiDefBut(), uiDefButF(), uiLayoutAbsoluteBlock(), uiLayoutColumn(), and MDeformWeight::weight.
Referenced by view3d_buttons_register().
Definition at line 786 of file view3d_buttons.c.
References act_vert_def(), CTX_data_scene(), OBACT, and MDeformVert::totweight.
Referenced by view3d_buttons_register().
static int view3d_properties | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1382 of file view3d_buttons.c.
References CTX_wm_area(), ED_region_toggle_hidden(), OPERATOR_FINISHED, and view3d_has_buttons_region().
Referenced by VIEW3D_OT_properties().