[Bf-blender-cvs] [69be0909444] property-search-ui-v2: Merge branch 'master' into properties-pin-operator
Hans Goudey
noreply at git.blender.org
Wed Sep 9 18:11:50 CEST 2020
Commit: 69be09094445d8520881f38e28c0ca0e7cc7b020
Author: Hans Goudey
Date: Wed Sep 9 10:14:10 2020 -0500
Branches: property-search-ui-v2
https://developer.blender.org/rB69be09094445d8520881f38e28c0ca0e7cc7b020
Merge branch 'master' into properties-pin-operator
===================================================================
===================================================================
diff --cc source/blender/editors/space_buttons/buttons_ops.c
index 7f04bad3700,a062b178fc8..10e1e1613cf
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@@ -52,34 -52,9 +52,40 @@@
#include "buttons_intern.h" /* own include */
- /********************** pin id operator *********************/
++/* -------------------------------------------------------------------- */
++/** \name Pin ID Operator
++ * \{ */
+
+static int toggle_pin_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ SpaceProperties *sbuts = CTX_wm_space_properties(C);
+
+ sbuts->pinid = (sbuts->flag & SB_PIN_CONTEXT) ? NULL : buttons_context_id_path(C);
+
+ sbuts->flag ^= SB_PIN_CONTEXT;
+
+ ED_area_tag_redraw(CTX_wm_area(C));
+
+ return OPERATOR_FINISHED;
+}
+
+void BUTTONS_OT_toggle_pin(wmOperatorType *ot)
+{
- /* identifiers */
++ /* Identifiers. */
+ ot->name = "Toggle Pin ID";
+ ot->description = "Keep the current data-block displayed";
+ ot->idname = "BUTTONS_OT_toggle_pin";
+
- /* api callbacks */
++ /* Callbacks. */
+ ot->exec = toggle_pin_exec;
+ ot->poll = ED_operator_buttons_active;
+}
+
- /********************** context_menu operator *********************/
++/** \} */
++
+ /* -------------------------------------------------------------------- */
+ /** \name Context Menu Operator
+ * \{ */
static int context_menu_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event))
{
More information about the Bf-blender-cvs
mailing list