Hide the 3D cursor in a few cases where it is unneeded (active object is
in sculpt mode or image paint mode and no clone tool is active)
This commit is contained in:
parent
a53e864cf4
commit
85eaa98980
Notes:
blender-bot
2023-02-14 08:42:53 +01:00
Referenced by commit df2537d09d
, Revert "Hide the 3D cursor in a few cases where it is unneeded (active object is"
|
@ -33,6 +33,7 @@
|
|||
#include <math.h>
|
||||
|
||||
#include "DNA_armature_types.h"
|
||||
#include "DNA_brush_types.h"
|
||||
#include "DNA_camera_types.h"
|
||||
#include "DNA_customdata_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
|
@ -50,6 +51,7 @@
|
|||
#include "BLI_endian_switch.h"
|
||||
|
||||
#include "BKE_anim.h"
|
||||
#include "BKE_brush.h"
|
||||
#include "BKE_camera.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_customdata.h"
|
||||
|
@ -3383,16 +3385,34 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha
|
|||
}
|
||||
|
||||
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
|
||||
Object *ob;
|
||||
Object *ob = OBACT;
|
||||
|
||||
drawcursor(scene, ar, v3d);
|
||||
if (ob) {
|
||||
switch (ob->mode) {
|
||||
case OB_MODE_SCULPT:
|
||||
break;
|
||||
|
||||
case OB_MODE_TEXTURE_PAINT:
|
||||
{
|
||||
Brush *br = BKE_paint_brush(&scene->toolsettings->imapaint.paint);
|
||||
|
||||
if (br && br->imagepaint_tool == PAINT_TOOL_CLONE)
|
||||
drawcursor(scene, ar, v3d);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
drawcursor(scene, ar, v3d);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (U.uiflag & USER_SHOW_ROTVIEWICON)
|
||||
draw_view_axis(rv3d, &rect);
|
||||
else
|
||||
draw_view_icon(rv3d, &rect);
|
||||
|
||||
ob = OBACT;
|
||||
if (U.uiflag & USER_DRAWVIEWINFO)
|
||||
draw_selected_name(scene, ob, &rect);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue