Fix T57371: Generative modifiers in editmode display vertex group weights
In a better way...
6dbfd7f6d6
would make the final vertex weights always calculated in
edit mode. Now it's only if the option is enabled.
This commit is contained in:
parent
9f51fc656e
commit
00d2237d2a
Notes:
blender-bot
2023-02-14 06:00:49 +01:00
Referenced by issue #57371, Generative modifiers in editmode display vertex group weights incorrectly (or assert)
|
@ -485,8 +485,8 @@ char ED_view3d_lock_view_from_index(int index);
|
|||
char ED_view3d_axis_view_opposite(char view);
|
||||
bool ED_view3d_lock(struct RegionView3D *rv3d);
|
||||
|
||||
uint64_t ED_view3d_datamask(const struct Scene *scene, const struct View3D *v3d);
|
||||
uint64_t ED_view3d_screen_datamask(const struct Scene *scene, const struct bScreen *screen);
|
||||
uint64_t ED_view3d_datamask(const struct bContext *C, const struct Scene *scene, const struct View3D *v3d);
|
||||
uint64_t ED_view3d_screen_datamask(const struct bContext *C, const struct Scene *scene, const struct bScreen *screen);
|
||||
|
||||
bool ED_view3d_offset_lock_check(const struct View3D *v3d, const struct RegionView3D *rv3d);
|
||||
void ED_view3d_persp_switch_from_camera(
|
||||
|
|
|
@ -606,7 +606,7 @@ static bool screen_opengl_render_init(bContext *C, wmOperator *op)
|
|||
oglrender->rv3d = oglrender->ar->regiondata;
|
||||
|
||||
/* MUST be cleared on exit */
|
||||
oglrender->scene->customdata_mask_modal = ED_view3d_datamask(oglrender->scene, oglrender->v3d);
|
||||
oglrender->scene->customdata_mask_modal = ED_view3d_datamask(C, oglrender->scene, oglrender->v3d);
|
||||
|
||||
/* apply immediately in case we're rendering from a script,
|
||||
* running notifiers again will overwrite */
|
||||
|
|
|
@ -888,7 +888,7 @@ void ED_view3d_draw_depth_gpencil(
|
|||
|
||||
/* *********************** customdata **************** */
|
||||
|
||||
CustomDataMask ED_view3d_datamask(const Scene *UNUSED(scene), const View3D *v3d)
|
||||
CustomDataMask ED_view3d_datamask(const bContext *C, const Scene *UNUSED(scene), const View3D *v3d)
|
||||
{
|
||||
CustomDataMask mask = 0;
|
||||
const int drawtype = view3d_effective_drawtype(v3d);
|
||||
|
@ -900,18 +900,24 @@ CustomDataMask ED_view3d_datamask(const Scene *UNUSED(scene), const View3D *v3d)
|
|||
mask |= CD_MASK_ORCO;
|
||||
}
|
||||
|
||||
if ((CTX_data_mode_enum(C) == CTX_MODE_EDIT_MESH) &&
|
||||
(v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_WEIGHT))
|
||||
{
|
||||
mask |= CD_MASK_MDEFORMVERT;
|
||||
}
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
/* goes over all modes and view3d settings */
|
||||
CustomDataMask ED_view3d_screen_datamask(const Scene *scene, const bScreen *screen)
|
||||
CustomDataMask ED_view3d_screen_datamask(const bContext *C, const Scene *scene, const bScreen *screen)
|
||||
{
|
||||
CustomDataMask mask = CD_MASK_BAREMESH;
|
||||
|
||||
/* check if we need tfaces & mcols due to view mode */
|
||||
for (const ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
|
||||
if (sa->spacetype == SPACE_VIEW3D) {
|
||||
mask |= ED_view3d_datamask(scene, sa->spacedata.first);
|
||||
mask |= ED_view3d_datamask(C, scene, sa->spacedata.first);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -314,7 +314,7 @@ void wm_event_do_depsgraph(bContext *C)
|
|||
const Scene *scene = WM_window_get_active_scene(win);
|
||||
const bScreen *screen = WM_window_get_active_screen(win);
|
||||
|
||||
win_combine_v3d_datamask |= ED_view3d_screen_datamask(scene, screen);
|
||||
win_combine_v3d_datamask |= ED_view3d_screen_datamask(C, scene, screen);
|
||||
}
|
||||
/* Update all the dependency graphs of visible vew layers. */
|
||||
for (wmWindow *win = wm->windows.first; win; win = win->next) {
|
||||
|
|
Loading…
Reference in New Issue