[Bf-blender-cvs] [86d6ee427c4] workspaces: Sync with blender2.8, cleanup, remove unintentionally committed files
Julian Eisel
noreply at git.blender.org
Fri Apr 7 17:55:23 CEST 2017
Commit: 86d6ee427c4dd4b857b10a644aa229706ee4c943
Author: Julian Eisel
Date: Fri Apr 7 17:54:08 2017 +0200
Branches: workspaces
https://developer.blender.org/rB86d6ee427c4dd4b857b10a644aa229706ee4c943
Sync with blender2.8, cleanup, remove unintentionally committed files
===================================================================
M doc/doxygen/doxygen.source.h
M source/blender/blenkernel/intern/context.c
M source/blender/editors/armature/editarmature_sketch.c
M source/blender/editors/screen/area.c
M source/blender/editors/screen/glutil.c
D source/blender/editors/screen/glutil.c.orig
M source/blender/editors/screen/screen_context.c
M source/blender/editors/screen/screen_draw.c
D source/blender/editors/screen/screen_draw.c.orig
M source/blender/editors/screen/screen_edit.c
M source/blender/editors/screen/screen_intern.h
M source/blender/editors/screen/screen_ops.c
M source/blender/editors/screen/screendump.c
M source/blender/editors/screen/workspace_edit.c
M source/blender/editors/screen/workspace_layout_edit.c
M source/blender/editors/space_action/space_action.c
M source/blender/editors/space_buttons/space_buttons.c
M source/blender/editors/space_clip/space_clip.c
M source/blender/editors/space_graph/space_graph.c
M source/blender/editors/space_image/space_image.c
M source/blender/editors/space_info/space_info.c
M source/blender/editors/space_nla/space_nla.c
M source/blender/editors/space_node/space_node.c
M source/blender/editors/space_outliner/space_outliner.c
M source/blender/editors/space_sequencer/space_sequencer.c
M source/blender/editors/space_time/space_time.c
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/makesrna/intern/rna_mask.c
M source/blender/makesrna/intern/rna_userdef.c
M source/blender/makesrna/intern/rna_wm.c
M source/blender/makesrna/intern/rna_workspace.c
M source/blender/windowmanager/WM_types.h
M source/blender/windowmanager/intern/wm_event_system.c
M source/blender/windowmanager/intern/wm_window.c
===================================================================
diff --git a/doc/doxygen/doxygen.source.h b/doc/doxygen/doxygen.source.h
index eb56f52ae73..6f12991fb44 100644
--- a/doc/doxygen/doxygen.source.h
+++ b/doc/doxygen/doxygen.source.h
@@ -219,7 +219,7 @@
* \ingroup editors
*/
-/** \defgroup edscreen screen
+/** \defgroup edscr screen
* \ingroup editors
*/
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c
index b6fdd6e929e..8f12b31da63 100644
--- a/source/blender/blenkernel/intern/context.c
+++ b/source/blender/blenkernel/intern/context.c
@@ -836,7 +836,9 @@ void CTX_wm_manager_set(bContext *C, wmWindowManager *wm)
void CTX_wm_window_set(bContext *C, wmWindow *win)
{
C->wm.window = win;
- C->data.scene = (win) ? win->scene : NULL;
+ if (win) {
+ C->data.scene = win->scene;
+ }
C->wm.workspace = (win) ? BKE_workspace_active_get(win->workspace_hook) : NULL;
C->wm.screen = (win) ? BKE_workspace_active_screen_get(win->workspace_hook) : NULL;
C->wm.area = NULL;
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index a2eca395740..b53bba8db32 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -2163,7 +2163,7 @@ static int sketch_delete(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNU
sk_deleteSelectedStrokes(sketch);
// allqueue(REDRAWVIEW3D, 0);
}
- WM_event_add_notifier(C, NC_WORKSPACE | ND_SKETCH | NA_REMOVED, NULL);
+ WM_event_add_notifier(C, NC_SCREEN | ND_SKETCH | NA_REMOVED, NULL);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 20f7c76351b..d00bc38c262 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -25,7 +25,7 @@
*/
/** \file blender/editors/screen/area.c
- * \ingroup edscreen
+ * \ingroup edscr
*/
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 6ed6b6aa364..f9e7a27e337 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -24,7 +24,7 @@
*/
/** \file blender/editors/screen/glutil.c
- * \ingroup edscreen
+ * \ingroup edscr
*/
diff --git a/source/blender/editors/screen/glutil.c.orig b/source/blender/editors/screen/glutil.c.orig
deleted file mode 100644
index 948895f9089..00000000000
--- a/source/blender/editors/screen/glutil.c.orig
+++ /dev/null
@@ -1,1249 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- * Contributor(s): Blender Foundation
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/editors/workspace/glutil.c
- * \ingroup workspace
- */
-
-
-#include <stdio.h>
-#include <string.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_userdef_types.h"
-#include "DNA_vec_types.h"
-
-#include "BLI_rect.h"
-#include "BLI_utildefines.h"
-#include "BLI_math.h"
-
-#include "BKE_context.h"
-
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
-#include "IMB_colormanagement.h"
-#include "IMB_imbuf_types.h"
-
-#include "GPU_basic_shader.h"
-#include "GPU_immediate.h"
-
-#include "UI_interface.h"
-
-/* DEPRECATED: use imm_draw_line instead */
-void fdrawline(float x1, float y1, float x2, float y2)
-{
- glBegin(GL_LINES);
- glVertex2f(x1, y1);
- glVertex2f(x2, y2);
- glEnd();
-}
-
-void fdrawbox(float x1, float y1, float x2, float y2)
-{
- /* DEPRECATED: use imm_draw_line_box instead */
- glBegin(GL_LINE_LOOP);
-
- glVertex2f(x1, y1);
- glVertex2f(x1, y2);
- glVertex2f(x2, y2);
- glVertex2f(x2, y1);
-
- glEnd();
-}
-
-void fdrawcheckerboard(float x1, float y1, float x2, float y2)
-{
- /* DEPRECATED: use imm_draw_checker_box instead */
- unsigned char col1[4] = {40, 40, 40}, col2[4] = {50, 50, 50};
-
- glColor3ubv(col1);
- glRectf(x1, y1, x2, y2);
- glColor3ubv(col2);
-
- GPU_basic_shader_bind(GPU_SHADER_STIPPLE | GPU_SHADER_USE_COLOR);
- GPU_basic_shader_stipple(GPU_SHADER_STIPPLE_CHECKER_8PX);
- glRectf(x1, y1, x2, y2);
- GPU_basic_shader_bind(GPU_SHADER_USE_COLOR);
-}
-
-void sdrawline(int x1, int y1, int x2, int y2) /* DEPRECATED */
-{
- glBegin(GL_LINES);
- glVertex2i(x1, y1);
- glVertex2i(x2, y2);
- glEnd();
-}
-
-void sdrawbox(int x1, int y1, int x2, int y2)
-{
- /* DEPRECATED: use imm_draw_line_box instead */
- glBegin(GL_LINE_LOOP);
-
- glVertex2i(x1, y1);
- glVertex2i(x1, y2);
- glVertex2i(x2, y2);
- glVertex2i(x2, y1);
-
- glEnd();
-}
-
-
-/* ******************************************** */
-
-void setlinestyle(int nr)
-{
- if (nr == 0) {
- glDisable(GL_LINE_STIPPLE);
- }
- else {
-
- glEnable(GL_LINE_STIPPLE);
- if (U.pixelsize > 1.0f)
- glLineStipple(nr, 0xCCCC);
- else
- glLineStipple(nr, 0xAAAA);
- }
-}
-
-/* Invert line handling */
-
-#define GL_TOGGLE(mode, onoff) (((onoff) ? glEnable : glDisable)(mode))
-
-void set_inverted_drawing(int enable)
-{
- glLogicOp(enable ? GL_INVERT : GL_COPY);
- GL_TOGGLE(GL_COLOR_LOGIC_OP, enable);
- GL_TOGGLE(GL_DITHER, !enable);
-}
-
-
-void glutil_draw_filled_arc(float start, float angle, float radius, int nsegments)
-{
- /* DEPRECATED */
- int i;
-
- glBegin(GL_TRIANGLE_FAN);
- glVertex2f(0.0, 0.0);
- for (i = 0; i < nsegments; i++) {
- float t = (float) i / (nsegments - 1);
- float cur = start + t * angle;
-
- glVertex2f(cosf(cur) * radius, sinf(cur) * radius);
- }
- glEnd();
-}
-
-void glutil_draw_lined_arc(float start, float angle, float radius, int nsegments)
-{
- /* DEPRECATED */
- int i;
-
- glBegin(GL_LINE_STRIP);
- for (i = 0; i < nsegments; i++) {
- float t = (float) i / (nsegments - 1);
- float cur = start + t * angle;
-
- glVertex2f(cosf(cur) * radius, sinf(cur) * radius);
- }
- glEnd();
-}
-
-static void imm_draw_circle(PrimitiveType prim_type, unsigned pos, float x, float y, float rad, int nsegments)
-{
- immBegin(prim_type, nsegments);
- for (int i = 0; i < nsegments; ++i) {
- float angle = 2 * M_PI * ((float)i / (float)nsegments);
- immVertex2f(pos, x + rad * cosf(angle),
- y + rad * sinf(angle));
- }
- immEnd();
-}
-
-void imm_draw_lined_circle(unsigned pos, float x, float y, float rad, int nsegments)
-{
- imm_draw_circle(PRIM_LINE_LOOP, pos, x, y, rad, nsegments);
-}
-
-void imm_draw_filled_circle(unsigned pos, float x, float y, float rad, int nsegments)
-{
- imm_draw_circle(PRIM_TRIANGLE_FAN, pos, x, y, rad, nsegments);
-}
-
-void imm_draw_lined_circle_3D(unsigned pos, float x, float y, float rad, int nsegments)
-{
- immBegin(PRIM_LINE_LOOP, nsegments);
- for (int i = 0; i < nsegments; ++i) {
- float angle = 2 * M_PI * ((float)i / (float)nsegments);
- immVertex3f(pos, x + rad * cosf(angle),
- y + rad * sinf(angle), 0.0f);
- }
- immEnd();
-}
-
-void imm_draw_line_box(unsigned pos, float x1, float y1, float x2, float y2)
-{
- immBegin(PRIM_LINE_LOOP, 4);
- immVertex2f(pos, x1, y1);
- immVertex2f(pos, x1, y2);
- immVertex2f(pos, x2, y2);
- immVertex2f(pos, x2, y1);
- immEnd();
-}
-
-void imm_draw_line_box_3D(unsigned pos, float x1, float y1, float x2, float y2)
-{
- /* use this version when VertexFormat has a vec3 position */
- immBegin(PRIM_LINE_LOOP, 4);
- immVertex3f(pos, x1, y1, 0.0f);
- immVertex3f(pos, x1, y2, 0.0f);
- immVertex3f(pos, x2, y2, 0.0f);
- immVertex3f(pos, x2, y1, 0.0f);
- immEnd();
-}
-
-void imm_draw_checker_box(float x1, float y1, float x2, float y2)
-{
- unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 2, KEEP_FLOAT);
- immBindBuiltinProgram(GPU_SHADER_2D_CHECKER);
-
- immUniform4f("color1", 0.15f, 0.15f, 0.15f, 1.0f);
- immUniform4f("color2", 0.2f, 0.2f, 0.2f, 1.0f);
- immUniform1i("size", 8);
-
- immRectf(pos, x1, y1, x2, y2);
-
- immUnbindProgram();
-}
-
-void imm_cpack(unsigned int x)
-{
- immUniformColor3ub(((x)& 0xFF),
- (((x) >> 8) & 0xFF),
- (((x) >> 16) & 0xFF));
-}
-
-void imm_cylinder(unsigned int pos, unsigned int nor, float base, float top, float height, int slices, int stacks)
-{
- immBegin(GL_TRIANGLES, 6 * slices * stacks);
- for (int i = 0; i < slices; ++i) {
- const float angle1 = 2 * M_PI * ((float)i / (float)slices);
- const float angle2 = 2 * M_PI * ((float)(i+1) / (float)slices);
- const float cos1 = cosf(angle1);
- const float sin1 = sinf(angle1);
- const float cos2 = cosf(angle2);
- const float sin2 = sinf(angle2);
-
- for (int j = 0; j < stacks; ++j) {
- float fac1 = (float)j / (float)stacks;
- float fac2 = (float)(j+1) / (float)stacks;
- float r1 = base * (1.f - fac1) + top * fac1;
- float r2 = base * (1.f - fac2) + top * fac2;
- float h1 = height * ((float)j / (float)stacks);
- float h2 = height * ((float)(j+1) / (float)stacks);
-
- float v1[3] = {r1 * cos2, r1 * sin2, h1};
- float v2[3] = {r2 * cos2, r2 * sin2, h2};
- float v3[3] = {r2 * cos1, r2 * sin1, h2};
- float v4[3] = {r1 * cos1, r1 * sin1, h1};
- float n1[3], n2[3];
-
- /* calc normals */
- sub_v3_v3v3(n1, v2, v1);
- normalize_v3(n1);
- n1[0] = cos1; n1[1] = sin1; n1[2] = 1-n1[2];
-
- sub_v3_v3v3(n2, v3, v4);
- normalize_v3(n2);
- n2[0] = cos2; n2[1] = sin2; n2[2] = 1-n2[2];
-
- /* first tri */
- immAttrib3fv(nor, n2);
- immVertex3fv(pos, v1);
- immVertex3fv(pos, v2);
- immAttrib3fv(nor, n1);
- immVertex3fv(pos, v3);
-
- /* second tri */
- immVertex3fv(pos, v3);
- immVertex3fv(pos, v4);
- immAttrib3fv(nor, n2);
- immVertex3fv(pos, v1);
- }
- }
- immEnd();
-}
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list