Merge branch 'blender-v3.4-release'
This commit is contained in:
commit
3ccf4a3944
|
@ -3938,7 +3938,7 @@ def km_grease_pencil_stroke_sculpt_mode(params):
|
|||
|
||||
items.extend([
|
||||
# Selection
|
||||
*_grease_pencil_selection(params, use_select_mouse=False),
|
||||
*_grease_pencil_selection(params, use_select_mouse=(params.use_fallback_tool_select_mouse == False)),
|
||||
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
|
@ -4229,7 +4229,7 @@ def km_grease_pencil_stroke_vertex_mode(params):
|
|||
|
||||
items.extend([
|
||||
# Selection
|
||||
*_grease_pencil_selection(params, use_select_mouse=False),
|
||||
*_grease_pencil_selection(params, use_select_mouse=(params.use_fallback_tool_select_mouse == False)),
|
||||
# Brush strength
|
||||
("wm.radial_control", {"type": 'F', "value": 'PRESS', "shift": True},
|
||||
{"properties": [
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "DNA_constraint_types.h"
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_fluid_types.h"
|
||||
#include "DNA_gpencil_modifier_types.h"
|
||||
#include "DNA_lightprobe_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meta_types.h"
|
||||
|
@ -1271,6 +1272,20 @@ static void OVERLAY_relationship_lines(OVERLAY_ExtraCallBuffers *cb,
|
|||
OVERLAY_extra_point(cb, center, relation_color);
|
||||
}
|
||||
}
|
||||
for (GpencilModifierData *md =
|
||||
static_cast<GpencilModifierData *>(ob->greasepencil_modifiers.first);
|
||||
md;
|
||||
md = md->next) {
|
||||
if (md->type == eGpencilModifierType_Hook) {
|
||||
HookGpencilModifierData *hmd = (HookGpencilModifierData *)md;
|
||||
float center[3];
|
||||
mul_v3_m4v3(center, ob->object_to_world, hmd->cent);
|
||||
if (hmd->object) {
|
||||
OVERLAY_extra_line_dashed(cb, hmd->object->object_to_world[3], center, relation_color);
|
||||
}
|
||||
OVERLAY_extra_point(cb, center, relation_color);
|
||||
}
|
||||
}
|
||||
|
||||
if (ob->rigidbody_constraint) {
|
||||
Object *rbc_ob1 = ob->rigidbody_constraint->ob1;
|
||||
|
|
|
@ -2462,7 +2462,7 @@ static void gpencil_fill_exit(bContext *C, wmOperator *op)
|
|||
if (tgpf->draw_handle_3d) {
|
||||
ED_region_draw_cb_exit(tgpf->region->type, tgpf->draw_handle_3d);
|
||||
}
|
||||
WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DEFAULT);
|
||||
WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DOT);
|
||||
|
||||
/* Remove depth buffer in cache. */
|
||||
if (tgpf->depths) {
|
||||
|
@ -3012,7 +3012,7 @@ static int gpencil_fill_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
|||
tgpf->initial_length = len_v2(mlen);
|
||||
}
|
||||
if (event->val == KM_RELEASE) {
|
||||
WM_cursor_set(CTX_wm_window(C), WM_CURSOR_DEFAULT);
|
||||
WM_cursor_modal_set(CTX_wm_window(C), WM_CURSOR_PAINT_BRUSH);
|
||||
|
||||
tgpf->mouse_init[0] = -1.0f;
|
||||
tgpf->mouse_init[1] = -1.0f;
|
||||
|
|
|
@ -2441,15 +2441,15 @@ static int gpencil_select_exec(bContext *C, wmOperator *op)
|
|||
|
||||
/* if select mode is stroke, use whole stroke */
|
||||
if ((ob) && (ob->mode == OB_MODE_SCULPT_GPENCIL)) {
|
||||
whole = (bool)(gpencil_select_mode_from_sculpt(ts->gpencil_selectmode_sculpt) ==
|
||||
whole |= (bool)(gpencil_select_mode_from_sculpt(ts->gpencil_selectmode_sculpt) ==
|
||||
GP_SELECTMODE_STROKE);
|
||||
}
|
||||
else if ((ob) && (ob->mode == OB_MODE_VERTEX_GPENCIL)) {
|
||||
whole = (bool)(gpencil_select_mode_from_vertex(ts->gpencil_selectmode_sculpt) ==
|
||||
whole |= (bool)(gpencil_select_mode_from_vertex(ts->gpencil_selectmode_sculpt) ==
|
||||
GP_SELECTMODE_STROKE);
|
||||
}
|
||||
else {
|
||||
whole = (bool)(ts->gpencil_selectmode_edit == GP_SELECTMODE_STROKE);
|
||||
whole |= (bool)(ts->gpencil_selectmode_edit == GP_SELECTMODE_STROKE);
|
||||
}
|
||||
|
||||
if (is_curve_edit) {
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include "ED_armature.h"
|
||||
#include "ED_asset.h"
|
||||
#include "ED_gpencil.h"
|
||||
#include "ED_image.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_object.h"
|
||||
|
@ -97,11 +98,12 @@ void ED_editors_init(bContext *C)
|
|||
continue;
|
||||
}
|
||||
if (BKE_object_has_mode_data(ob, mode)) {
|
||||
/* For multi-edit mode we may already have mode data. */
|
||||
continue;
|
||||
}
|
||||
if (ob->type == OB_GPENCIL) {
|
||||
/* For multi-edit mode we may already have mode data (grease pencil does not need it).
|
||||
* However we may have a non-active object stuck in a grease-pencil edit mode. */
|
||||
/* Grease pencil does not need a toggle of mode. However we may have a non-active object
|
||||
* stuck in a grease-pencil edit mode. */
|
||||
if (ob != obact) {
|
||||
bGPdata *gpd = (bGPdata *)ob->data;
|
||||
gpd->flag &= ~(GP_DATA_STROKE_PAINTMODE | GP_DATA_STROKE_EDITMODE |
|
||||
|
@ -110,6 +112,9 @@ void ED_editors_init(bContext *C)
|
|||
ob->mode = OB_MODE_OBJECT;
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
else if (mode & OB_MODE_ALL_PAINT_GPENCIL) {
|
||||
ED_gpencil_toggle_brush_cursor(C, true, NULL);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue