[Bf-blender-cvs] [a2d24345bfe] master: Fix T60107: gizmos should not show for unselectable objects.

Brecht Van Lommel noreply at git.blender.org
Thu Jan 3 13:02:45 CET 2019


Commit: a2d24345bfead8e4279a818a67d73d42d2565b96
Author: Brecht Van Lommel
Date:   Thu Jan 3 12:39:16 2019 +0100
Branches: master
https://developer.blender.org/rBa2d24345bfead8e4279a818a67d73d42d2565b96

Fix T60107: gizmos should not show for unselectable objects.

===================================================================

M	source/blender/editors/space_view3d/view3d_gizmo_armature.c
M	source/blender/editors/space_view3d/view3d_gizmo_camera.c
M	source/blender/editors/space_view3d/view3d_gizmo_empty.c
M	source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
M	source/blender/editors/space_view3d/view3d_gizmo_lamp.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_gizmo_armature.c b/source/blender/editors/space_view3d/view3d_gizmo_armature.c
index 9766e8f7ff9..b29ce64eba5 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_armature.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_armature.c
@@ -138,7 +138,7 @@ static bool WIDGETGROUP_armature_spline_poll(const bContext *C, wmGizmoGroupType
 
 	ViewLayer *view_layer = CTX_data_view_layer(C);
 	Base *base = BASACT(view_layer);
-	if (base && BASE_VISIBLE(v3d, base)) {
+	if (base && BASE_VISIBLE(v3d, base) && BASE_SELECTABLE(v3d, base)) {
 		Object *ob = BKE_object_pose_armature_get(base->object);
 		if (ob) {
 			const bArmature *arm = ob->data;
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_camera.c b/source/blender/editors/space_view3d/view3d_gizmo_camera.c
index ace22094e53..472c9571223 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_camera.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_camera.c
@@ -72,7 +72,7 @@ static bool WIDGETGROUP_camera_poll(const bContext *C, wmGizmoGroupType *UNUSED(
 
 	ViewLayer *view_layer = CTX_data_view_layer(C);
 	Base *base = BASACT(view_layer);
-	if (base && BASE_VISIBLE(v3d, base)) {
+	if (base && BASE_VISIBLE(v3d, base) && BASE_SELECTABLE(v3d, base)) {
 		Object *ob = base->object;
 		if (ob->type == OB_CAMERA) {
 			Camera *camera = ob->data;
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_empty.c b/source/blender/editors/space_view3d/view3d_gizmo_empty.c
index e5dafad0757..24236ac2e6c 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_empty.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_empty.c
@@ -120,7 +120,7 @@ static bool WIDGETGROUP_empty_image_poll(const bContext *C, wmGizmoGroupType *UN
 
 	ViewLayer *view_layer = CTX_data_view_layer(C);
 	Base *base = BASACT(view_layer);
-	if (base && BASE_VISIBLE(v3d, base)) {
+	if (base && BASE_VISIBLE(v3d, base) && BASE_SELECTABLE(v3d, base)) {
 		Object *ob = base->object;
 		if (ob->type == OB_EMPTY) {
 			if (ob->empty_drawtype == OB_EMPTY_IMAGE) {
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c b/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
index 0e3d214ae3c..656836488ba 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
@@ -64,7 +64,7 @@ static bool WIDGETGROUP_forcefield_poll(const bContext *C, wmGizmoGroupType *UNU
 
 	ViewLayer *view_layer = CTX_data_view_layer(C);
 	Base *base = BASACT(view_layer);
-	if (base && BASE_VISIBLE(v3d, base)) {
+	if (base && BASE_VISIBLE(v3d, base) && BASE_SELECTABLE(v3d, base)) {
 		Object *ob = base->object;
 		if (ob->pd && ob->pd->forcefield) {
 			return true;
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c
index c4e93234aa5..0edc30597c4 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_lamp.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_lamp.c
@@ -65,7 +65,7 @@ static bool WIDGETGROUP_lamp_spot_poll(const bContext *C, wmGizmoGroupType *UNUS
 
 	ViewLayer *view_layer = CTX_data_view_layer(C);
 	Base *base = BASACT(view_layer);
-	if (base && BASE_VISIBLE(v3d, base)) {
+	if (base && BASE_VISIBLE(v3d, base) && BASE_SELECTABLE(v3d, base)) {
 		Object *ob = base->object;
 		if (ob->type == OB_LAMP) {
 			Lamp *la = ob->data;
@@ -174,7 +174,7 @@ static bool WIDGETGROUP_lamp_area_poll(const bContext *C, wmGizmoGroupType *UNUS
 
 	ViewLayer *view_layer = CTX_data_view_layer(C);
 	Base *base = BASACT(view_layer);
-	if (base && BASE_VISIBLE(v3d, base)) {
+	if (base && BASE_VISIBLE(v3d, base) && BASE_SELECTABLE(v3d, base)) {
 		Object *ob = base->object;
 		if (ob->type == OB_LAMP) {
 			Lamp *la = ob->data;
@@ -258,7 +258,7 @@ static bool WIDGETGROUP_lamp_target_poll(const bContext *C, wmGizmoGroupType *UN
 
 	ViewLayer *view_layer = CTX_data_view_layer(C);
 	Base *base = BASACT(view_layer);
-	if (base && BASE_VISIBLE(v3d, base)) {
+	if (base && BASE_VISIBLE(v3d, base) && BASE_SELECTABLE(v3d, base)) {
 		Object *ob = base->object;
 		if (ob->type == OB_LAMP) {
 			Lamp *la = ob->data;



More information about the Bf-blender-cvs mailing list