[Bf-blender-cvs] [bd7cb42f3d4] blender2.8: GP: Remove unneeded code to get icon

Antonioya noreply at git.blender.org
Mon Oct 29 17:49:46 CET 2018


Commit: bd7cb42f3d4c9c9a79fdfce4f2cc1ac54cd8b765
Author: Antonioya
Date:   Mon Oct 29 17:49:26 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBbd7cb42f3d4c9c9a79fdfce4f2cc1ac54cd8b765

GP: Remove unneeded code to get icon

Test the object type is not good idea here.

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

M	source/blender/editors/space_buttons/buttons_context.c

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

diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index c4756e1635d..04948fd6984 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -646,13 +646,7 @@ void buttons_context_compute(const bContext *C, SpaceButs *sbuts)
 					sbuts->dataicon = RNA_struct_ui_icon(ptr->type);
 				}
 				else {
-					Object *ob = CTX_data_active_object(C);
-					if (ob->type == OB_GPENCIL) {
-						sbuts->dataicon = ICON_GREASEPENCIL;
-					}
-					else {
-						sbuts->dataicon = ICON_EMPTY_DATA;
-					}
+					sbuts->dataicon = ICON_EMPTY_DATA;
 				}
 			}
 		}



More information about the Bf-blender-cvs mailing list