Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_select.c
| Show First 20 Lines • Show All 2,202 Lines • ▼ Show 20 Lines | if (hits > 0) { | ||||
| retval = true; | retval = true; | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, basact->object); | WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, basact->object); | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, basact->object); | WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, basact->object); | ||||
| DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS); | DEG_id_tag_update(&scene->id, ID_RECALC_BASE_FLAGS); | ||||
| /* In weight-paint, we use selected bone to select vertex-group, | /* In weight-paint, we use selected bone to select vertex-group, | ||||
| * so don't switch to new active object. */ | * so don't switch to new active object. */ | ||||
| if (oldbasact && (oldbasact->object->mode & OB_MODE_WEIGHT_PAINT)) { | if (oldbasact && (oldbasact->object->mode & OB_MODE_ALL_WEIGHT_PAINT)) { | ||||
| /* Prevent activating. | /* Prevent activating. | ||||
| * Selection causes this to be considered the 'active' pose in weight-paint mode. | * Selection causes this to be considered the 'active' pose in weight-paint mode. | ||||
| * Eventually this limitation may be removed. | * Eventually this limitation may be removed. | ||||
| * For now, de-select all other pose objects deforming this mesh. */ | * For now, de-select all other pose objects deforming this mesh. */ | ||||
| ED_armature_pose_select_in_wpaint_mode(view_layer, basact); | ED_armature_pose_select_in_wpaint_mode(view_layer, basact); | ||||
| basact = NULL; | basact = NULL; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | static int view3d_select_exec(bContext *C, wmOperator *op) | ||||
| bool toggle = RNA_boolean_get(op->ptr, "toggle"); | bool toggle = RNA_boolean_get(op->ptr, "toggle"); | ||||
| bool center = RNA_boolean_get(op->ptr, "center"); | bool center = RNA_boolean_get(op->ptr, "center"); | ||||
| bool enumerate = RNA_boolean_get(op->ptr, "enumerate"); | bool enumerate = RNA_boolean_get(op->ptr, "enumerate"); | ||||
| /* Only force object select for edit-mode to support vertex parenting, | /* Only force object select for edit-mode to support vertex parenting, | ||||
| * or paint-select to allow pose bone select with vert/face select. */ | * or paint-select to allow pose bone select with vert/face select. */ | ||||
| bool object = (RNA_boolean_get(op->ptr, "object") && | bool object = (RNA_boolean_get(op->ptr, "object") && | ||||
| (obedit || BKE_paint_select_elem_test(obact) || | (obedit || BKE_paint_select_elem_test(obact) || | ||||
| /* so its possible to select bones in weight-paint mode (LMB select) */ | /* so its possible to select bones in weight-paint mode (LMB select) */ | ||||
| (obact && (obact->mode & OB_MODE_WEIGHT_PAINT) && | (obact && (obact->mode & OB_MODE_ALL_WEIGHT_PAINT) && | ||||
| BKE_object_pose_armature_get(obact)))); | BKE_object_pose_armature_get(obact)))); | ||||
| bool retval = false; | bool retval = false; | ||||
| int location[2]; | int location[2]; | ||||
| RNA_int_get_array(op->ptr, "location", location); | RNA_int_get_array(op->ptr, "location", location); | ||||
| view3d_operator_needs_opengl(C); | view3d_operator_needs_opengl(C); | ||||
| ▲ Show 20 Lines • Show All 1,783 Lines • Show Last 20 Lines | |||||