[Bf-blender-cvs] [b8c2a79b870] topbar: Don't draw advanced operator properties in top-bar

Julian Eisel noreply at git.blender.org
Thu Nov 23 18:27:38 CET 2017


Commit: b8c2a79b8704681a154bf97dca16bb95a27a0da1
Author: Julian Eisel
Date:   Thu Nov 23 17:29:00 2017 +0100
Branches: topbar
https://developer.blender.org/rBb8c2a79b8704681a154bf97dca16bb95a27a0da1

Don't draw advanced operator properties in top-bar

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

M	source/blender/editors/interface/interface_templates.c

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

diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 169964b9ccb..3fcadd8081a 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1411,6 +1411,11 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
 
 /************************ Redo Buttons Template *************************/
 
+static bool template_operator_redo_property_buts_poll(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
+{
+	return (RNA_property_tags(prop) & OP_PROP_TAG_ADVANCED) == 0;
+}
+
 static void template_operator_redo_property_buts_draw(
         const bContext *C, wmOperator *op,
         uiLayout *layout, int layout_flags)
@@ -1422,7 +1427,9 @@ static void template_operator_redo_property_buts_draw(
 	}
 	else {
 		/* Might want to make label_align adjustable somehow. */
-		uiTemplateOperatorPropertyButs(C, layout, op, NULL, UI_BUT_LABEL_ALIGN_NONE, layout_flags);
+		uiTemplateOperatorPropertyButs(
+	                        C, layout, op, template_operator_redo_property_buts_poll,
+	                        UI_BUT_LABEL_ALIGN_NONE, layout_flags);
 	}
 }



More information about the Bf-blender-cvs mailing list