Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-07-10 00:03:21 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-07-10 00:03:21 +0300
commit05517c9bedfdd6afbae0a7d99dbbaba54563303b (patch)
tree8227f5feb22217e7278a65f4b6c1d1f0b7a29eeb /source/blender/editors/space_view3d
parentff11750ee9925d2c75193e1e7cbaccec86855fa8 (diff)
parent07e368cb5f6a4f73164a70794e884970d171d909 (diff)
Merge remote-tracking branch 'origin/blender2.8' into temp-eeveelightcachetemp-eeveelightcache
# Conflicts: # source/blender/draw/engines/eevee/eevee_lightprobes.c
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_manipulator_empty.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_manipulator_lamp.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_manipulator_ruler.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_ruler.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c11
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c2
12 files changed, 30 insertions, 20 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index bca5faa314a..beb323fb21c 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -748,7 +748,7 @@ void ED_draw_object_facemap(
const int *facemap_data = CustomData_get_layer(&me->pdata, CD_FACEMAP);
if (facemap_data) {
Gwn_VertFormat *format = immVertexFormat();
- unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
+ uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
immUniformColor4fv(col);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 7495733382c..9aaced3e583 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1065,11 +1065,11 @@ static void view3d_main_region_message_subscribe(
&RNA_Window,
/* These object have properties that impact drawing. */
- &RNA_AreaLamp,
+ &RNA_AreaLight,
&RNA_Camera,
- &RNA_Lamp,
+ &RNA_Light,
&RNA_Speaker,
- &RNA_SunLamp,
+ &RNA_SunLight,
/* General types the 3D view depends on. */
&RNA_Object,
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index bcf9a7c4ad1..8fa327d8782 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -1226,7 +1226,7 @@ void VIEW3D_OT_properties(wmOperatorType *ot)
static int view3d_object_mode_menu(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = CTX_data_active_object(C);
- if (ob->type == OB_ARMATURE) {
+ if (ob && ((ob->mode & OB_MODE_EDIT) == 0) && (ELEM(ob->type, OB_ARMATURE))) {
ED_object_mode_toggle(C, OB_MODE_POSE);
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index a428b60643d..2c732586606 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -814,8 +814,8 @@ static void draw_view_axis(RegionView3D *rv3d, const rcti *rect)
GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
Gwn_VertFormat *format = immVertexFormat();
- unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
- unsigned int col = GWN_vertformat_attr_add(format, "color", GWN_COMP_U8, 4, GWN_FETCH_INT_TO_FLOAT_UNIT);
+ uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
+ uint col = GWN_vertformat_attr_add(format, "color", GWN_COMP_U8, 4, GWN_FETCH_INT_TO_FLOAT_UNIT);
immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR);
immBegin(GWN_PRIM_LINES, 6);
@@ -859,8 +859,8 @@ static void UNUSED_FUNCTION(draw_rotation_guide)(RegionView3D *rv3d)
glDepthMask(GL_FALSE); /* don't overwrite zbuf */
Gwn_VertFormat *format = immVertexFormat();
- unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
- unsigned int col = GWN_vertformat_attr_add(format, "color", GWN_COMP_U8, 4, GWN_FETCH_INT_TO_FLOAT_UNIT);
+ uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT);
+ uint col = GWN_vertformat_attr_add(format, "color", GWN_COMP_U8, 4, GWN_FETCH_INT_TO_FLOAT_UNIT);
immBindBuiltinProgram(GPU_SHADER_3D_SMOOTH_COLOR);
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index f9fdf8c2cc0..8c6bbaa94da 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -263,7 +263,7 @@ static void drawFlyPixel(const struct bContext *UNUSED(C), ARegion *UNUSED(ar),
y2 = yoff + 0.55f * fly->height;
Gwn_VertFormat *format = immVertexFormat();
- unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
+ uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_empty.c b/source/blender/editors/space_view3d/view3d_manipulator_empty.c
index 75e4a9e3314..fc15ec593f5 100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_empty.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_empty.c
@@ -186,7 +186,7 @@ static void WIDGETGROUP_empty_image_refresh(const bContext *C, wmManipulatorGrou
void VIEW3D_WGT_empty_image(wmManipulatorGroupType *wgt)
{
- wgt->name = "Area Lamp Widgets";
+ wgt->name = "Area Light Widgets";
wgt->idname = "VIEW3D_WGT_empty_image";
wgt->flag |= (WM_MANIPULATORGROUPTYPE_PERSISTENT |
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_lamp.c b/source/blender/editors/space_view3d/view3d_manipulator_lamp.c
index f98a2f336bc..0e1015a66f1 100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_lamp.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_lamp.c
@@ -99,13 +99,13 @@ static void WIDGETGROUP_lamp_spot_refresh(const bContext *C, wmManipulatorGroup
/* need to set property here for undo. TODO would prefer to do this in _init */
PointerRNA lamp_ptr;
const char *propname = "spot_size";
- RNA_pointer_create(&la->id, &RNA_Lamp, la, &lamp_ptr);
+ RNA_pointer_create(&la->id, &RNA_Light, la, &lamp_ptr);
WM_manipulator_target_property_def_rna(mpr, "offset", &lamp_ptr, propname, -1);
}
void VIEW3D_WGT_lamp_spot(wmManipulatorGroupType *wgt)
{
- wgt->name = "Spot Lamp Widgets";
+ wgt->name = "Spot Light Widgets";
wgt->idname = "VIEW3D_WGT_lamp_spot";
wgt->flag |= (WM_MANIPULATORGROUPTYPE_PERSISTENT |
@@ -213,7 +213,7 @@ static void WIDGETGROUP_lamp_area_refresh(const bContext *C, wmManipulatorGroup
void VIEW3D_WGT_lamp_area(wmManipulatorGroupType *wgt)
{
- wgt->name = "Area Lamp Widgets";
+ wgt->name = "Area Light Widgets";
wgt->idname = "VIEW3D_WGT_lamp_area";
wgt->flag |= (WM_MANIPULATORGROUPTYPE_PERSISTENT |
@@ -291,7 +291,7 @@ static void WIDGETGROUP_lamp_target_draw_prepare(const bContext *C, wmManipulato
void VIEW3D_WGT_lamp_target(wmManipulatorGroupType *wgt)
{
- wgt->name = "Target Lamp Widgets";
+ wgt->name = "Target Light Widgets";
wgt->idname = "VIEW3D_WGT_lamp_target";
wgt->flag |= (WM_MANIPULATORGROUPTYPE_PERSISTENT |
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_ruler.c b/source/blender/editors/space_view3d/view3d_manipulator_ruler.c
index c33f15c0493..d102fdc6e04 100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_ruler.c
@@ -793,7 +793,7 @@ static void manipulator_ruler_draw(const bContext *C, wmManipulator *mpr)
float co_ss_snap[3];
ED_view3d_project_float_global(ar, ruler_item->co[inter->co_index], co_ss_snap, V3D_PROJ_TEST_NOP);
- unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
+ uint pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4fv(color_act);
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 00f0dea8fe2..0fd109f858d 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -311,7 +311,8 @@ void view3d_keymap(wmKeyConfig *keyconf)
RNA_boolean_set(kmi->ptr, "center", true);
#endif
- WM_keymap_add_menu_pie(keymap, "VIEW3D_MT_view_pie", ACCENTGRAVEKEY, KM_CLICK_DRAG, 0, 0);
+ WM_keymap_add_menu_pie(keymap, "VIEW3D_MT_view_pie", ACCENTGRAVEKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_navigate", ACCENTGRAVEKEY, KM_PRESS, KM_SHIFT, 0);
/* numpad view hotkeys*/
WM_keymap_add_item(keymap, "VIEW3D_OT_view_camera", PAD0, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c
index 5911c8224be..4617b92c780 100644
--- a/source/blender/editors/space_view3d/view3d_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_ruler.c
@@ -703,7 +703,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
float co_ss[3];
ED_view3d_project_float_global(ar, ruler_item->co[ruler_item->co_index], co_ss, V3D_PROJ_TEST_NOP);
- unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
+ uint pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4fv(color_act);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index b7dbb09e1a4..0f82dfa775c 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1062,6 +1062,8 @@ static Base *object_mouse_select_menu(
short baseCount = 0;
bool ok;
LinkNode *linklist = NULL;
+ const int object_type_exclude_select = (
+ vc->v3d->object_type_exclude_viewport | vc->v3d->object_type_exclude_select);
/* handle base->object->select_color */
CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
@@ -1079,6 +1081,9 @@ static Base *object_mouse_select_menu(
}
}
else {
+ if (object_type_exclude_select & (1 << base->object->type)) {
+ continue;
+ }
const int dist = 15 * U.pixelsize;
if (ED_view3d_project_base(vc->ar, base) == V3D_PROJ_RET_OK) {
const int delta_px[2] = {base->sx - mval[0], base->sy - mval[1]};
@@ -1447,9 +1452,13 @@ static bool ed_object_select_pick(
basact = object_mouse_select_menu(C, &vc, NULL, 0, mval, toggle);
}
else {
+ const int object_type_exclude_select = (
+ vc.v3d->object_type_exclude_viewport | vc.v3d->object_type_exclude_select);
base = startbase;
while (base) {
- if (BASE_SELECTABLE(base)) {
+ if (BASE_SELECTABLE(base) &&
+ ((object_type_exclude_select & (1 << base->object->type)) == 0))
+ {
float screen_co[2];
if (ED_view3d_project_float_global(
ar, base->object->obmat[3], screen_co,
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index e3e82e8b9c2..7356d4a6eea 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -344,7 +344,7 @@ static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *ar, void *a
}
Gwn_VertFormat *format = immVertexFormat();
- unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_I32, 2, GWN_FETCH_INT_TO_FLOAT);
+ uint pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_I32, 2, GWN_FETCH_INT_TO_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);