Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / space_view3d / view3d_header.c
index dde86f8..5f07bb0 100644 (file)
@@ -117,7 +117,7 @@ static int view3d_layers_exec(bContext *C, wmOperator *op)
        Object *obedit = CTX_data_edit_object(C);
        int nr = RNA_int_get(op->ptr, "nr");
        const bool toggle = RNA_boolean_get(op->ptr, "toggle");
-       
+
        if (nr < 0)
                return OPERATOR_CANCELLED;
 
@@ -165,13 +165,13 @@ static int view3d_layers_exec(bContext *C, wmOperator *op)
                        }
                }
        }
-       
+
        if (v3d->scenelock) handle_view3d_lock(C);
-       
+
        DEG_on_visible_update(CTX_data_main(C), false);
 
        ED_area_tag_redraw(sa);
-       
+
        return OPERATOR_FINISHED;
 }
 
@@ -181,18 +181,18 @@ static int view3d_layers_invoke(bContext *C, wmOperator *op, const wmEvent *even
 {
        if (event->ctrl || event->oskey)
                return OPERATOR_PASS_THROUGH;
-       
+
        if (event->shift)
                RNA_boolean_set(op->ptr, "extend", true);
        else
                RNA_boolean_set(op->ptr, "extend", false);
-       
+
        if (event->alt) {
                const int nr = RNA_int_get(op->ptr, "nr") + 10;
                RNA_int_set(op->ptr, "nr", nr);
        }
        view3d_layers_exec(C, op);
-       
+
        return OPERATOR_FINISHED;
 }
 
@@ -207,15 +207,15 @@ void VIEW3D_OT_layers(wmOperatorType *ot)
        ot->name = "Layers";
        ot->description = "Toggle layer(s) visibility";
        ot->idname = "VIEW3D_OT_layers";
-       
+
        /* api callbacks */
        ot->invoke = view3d_layers_invoke;
        ot->exec = view3d_layers_exec;
        ot->poll = view3d_layers_poll;
-       
+
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-       
+
        RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "The layer number to set, zero for all layers", 0, 20);
        RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Add this layer to the current view layers");
        RNA_def_boolean(ot->srna, "toggle", 1, "Toggle", "Toggle the layer");
@@ -371,7 +371,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
                ob && !(gpd && (gpd->flag & GP_DATA_STROKE_EDITMODE)) &&
                ELEM(ob->mode,
                     OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OB_MODE_TEXTURE_PAINT));
-       
+
        RNA_pointer_create(&screen->id, &RNA_SpaceView3D, v3d, &v3dptr);
        RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &toolsptr);
        RNA_pointer_create(&scene->id, &RNA_Scene, scene, &sceneptr);