[Bf-blender-cvs] [83a2d3d] UI-experiments: Merge branch 'master' into UI-experiments
Julian Eisel
noreply at git.blender.org
Thu Oct 22 19:26:05 CEST 2015
Commit: 83a2d3dcf5a73f907c741038d5c55cb9f7aff1f9
Author: Julian Eisel
Date: Thu Oct 22 19:16:14 2015 +0200
Branches: UI-experiments
https://developer.blender.org/rB83a2d3dcf5a73f907c741038d5c55cb9f7aff1f9
Merge branch 'master' into UI-experiments
Conflicts:
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/intern/customdata.c
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/resources.c
source/blender/editors/transform/transform_manipulator.c
source/blender/windowmanager/intern/wm_init_exit.c
===================================================================
===================================================================
diff --cc release/scripts/modules/sys_info.py
index c146960,c79865d..c0f0463
--- a/release/scripts/modules/sys_info.py
+++ b/release/scripts/modules/sys_info.py
@@@ -175,18 -158,14 +158,17 @@@ def write_sysinfo(op)
output.write("extensions:\n")
glext = bgl.glGetString(bgl.GL_EXTENSIONS)
- glext = textWrap(glext, 70)
+ glext = textwrap.wrap(glext, 70)
for l in glext:
- output.write("\t\t%r\n" % (l))
+ output.write("\t%s\n" % l)
- output.write("\nImplementation Dependent OpenGL Limits:\n")
- output.write(lilies)
+ output.write(title("Implementation Dependent OpenGL Limits"))
limit = bgl.Buffer(bgl.GL_INT, 1)
+ limit_fl = bgl.Buffer(bgl.GL_FLOAT, 2)
bgl.glGetIntegerv(bgl.GL_MAX_TEXTURE_UNITS, limit)
output.write("Maximum Fixed Function Texture Units:\t%d\n" % limit[0])
+ bgl.glGetFloatv(bgl.GL_MAX_TEXTURE_UNITS, limit_fl)
+ output.write("Point Sprite Size Range:\t Max: %f Min: %f\n" % (limit_fl[0], limit_fl[1]))
output.write("\nGLSL:\n")
if version[0] > '1':
diff --cc source/blender/blenkernel/BKE_blender.h
index a13bd0c,fb4a1a4..607f2a9
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@@ -41,8 -41,8 +41,8 @@@ extern "C"
/* these lines are grep'd, watch out for our not-so-awesome regex
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
- #define BLENDER_VERSION 275
- #define BLENDER_SUBVERSION 6
+ #define BLENDER_VERSION 276
-#define BLENDER_SUBVERSION 1
++#define BLENDER_SUBVERSION 2
/* Several breakages with 270, e.g. constraint deg vs rad */
#define BLENDER_MINVERSION 270
#define BLENDER_MINSUBVERSION 5
diff --cc source/blender/blenkernel/intern/customdata.c
index 416125e,88ab634..c9b059e
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@@ -1372,10 -1366,17 +1378,17 @@@ const CustomDataMask CD_MASK_BMESH
CD_MASK_PROP_STR | CD_MASK_SHAPEKEY | CD_MASK_SHAPE_KEYINDEX | CD_MASK_MDISPS |
CD_MASK_CREASE | CD_MASK_BWEIGHT | CD_MASK_RECAST | CD_MASK_PAINT_MASK |
CD_MASK_GRID_PAINT_MASK | CD_MASK_MVERT_SKIN | CD_MASK_FREESTYLE_EDGE | CD_MASK_FREESTYLE_FACE |
- CD_MASK_CUSTOMLOOPNORMAL;
+ CD_MASK_CUSTOMLOOPNORMAL | CD_MASK_FACEMAP;
- const CustomDataMask CD_MASK_FACECORNERS = /* XXX Not used anywhere! */
- CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_MTEXPOLY | CD_MASK_MLOOPUV |
- CD_MASK_MLOOPCOL | CD_MASK_NORMAL | CD_MASK_MLOOPTANGENT;
+ /**
+ * cover values copied by #BKE_mesh_loops_to_tessdata
+ */
+ const CustomDataMask CD_MASK_FACECORNERS =
+ CD_MASK_MTFACE | CD_MASK_MTEXPOLY | CD_MASK_MLOOPUV |
+ CD_MASK_MCOL | CD_MASK_MLOOPCOL |
+ CD_MASK_PREVIEW_MCOL | CD_MASK_PREVIEW_MLOOPCOL |
+ CD_MASK_ORIGSPACE | CD_MASK_ORIGSPACE_MLOOP |
+ CD_MASK_TESSLOOPNORMAL | CD_MASK_NORMAL |
+ CD_MASK_TANGENT | CD_MASK_MLOOPTANGENT;
const CustomDataMask CD_MASK_EVERYTHING =
CD_MASK_MVERT | CD_MASK_MDEFORMVERT | CD_MASK_MEDGE | CD_MASK_MFACE |
CD_MASK_MTFACE | CD_MASK_MCOL | CD_MASK_ORIGINDEX | CD_MASK_NORMAL /* | CD_MASK_POLYINDEX */ | CD_MASK_PROP_FLT |
diff --cc source/blender/blenloader/intern/versioning_270.c
index c659eaf,1f4aa3c..3bf24d3
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -855,85 -854,18 +854,99 @@@ void blo_do_versions_270(FileData *fd,
#undef BRUSH_TORUS
}
+ if (!MAIN_VERSION_ATLEAST(main, 276, 2)) {
+ if (!DNA_struct_elem_find(fd->filesdna, "bPoseChannel", "float", "custom_scale")) {
+ Object *ob;
+
+ for (ob = main->object.first; ob; ob = ob->id.next) {
+ if (ob->pose) {
+ bPoseChannel *pchan;
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ pchan->custom_scale = 1.0f;
+ }
+ }
+ }
+ }
+ }
+ {
+ bScreen *screen;
+ for (screen = main->screen.first; screen; screen = screen->id.next) {
+ ScrArea *sa;
+
+ for (sa = screen->areabase.first; sa; sa = sa->next) {
+ const char needed_type = (sa->spacetype == SPACE_CLIP) ? RGN_TYPE_PREVIEW : RGN_TYPE_WINDOW;
+ ARegion *ar = BKE_area_find_region_type(sa, needed_type);
+ SpaceLink *sl;
+
+ if (ar == NULL)
+ continue;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ switch (sl->spacetype) {
+ case SPACE_TIME:
+ case SPACE_ACTION:
+ case SPACE_NLA:
+ ar->v2d.flag |= V2D_USES_UNITS_HORIZONTAL;
+ break;
+ case SPACE_IPO:
+ case SPACE_SEQ:
+ ar->v2d.flag |= (V2D_USES_UNITS_HORIZONTAL | V2D_USES_UNITS_VERTICAL);
+ break;
+ case SPACE_CLIP:
+ {
+ SpaceClip *sc = (SpaceClip *)sl;
+
+ if (sc->view == SC_VIEW_DOPESHEET) {
+ ar->v2d.flag |= V2D_USES_UNITS_HORIZONTAL;
+ }
+ else if (sc->view == SC_VIEW_GRAPH) {
+ ar->v2d.flag |= (V2D_USES_UNITS_HORIZONTAL | V2D_USES_UNITS_VERTICAL);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+ }
+ }
+ {
+ if (!DNA_struct_elem_find(fd->filesdna, "SpaceNode", "float", "backdrop_zoom")) {
+ bScreen *sc;
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_NODE) {
+ SpaceNode *snode = (SpaceNode *)sl;
+ snode->backdrop_zoom = 1.0;
+ }
+ if (sl->spacetype == SPACE_SEQ) {
+ SpaceSeq *sseq = (SpaceSeq *)sl;
+ sseq->overdrop_zoom = 1.0;
+ }
+ }
+ }
+ }
+ }
+
+ if (!DNA_struct_elem_find(fd->filesdna, "SpaceIpo", "float", "backdrop_zoom")) {
+ bScreen *sc;
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ if (sl->spacetype == SPACE_IPO) {
+ SpaceIpo *sipo = (SpaceIpo *)sl;
+ sipo->backdrop_zoom = 1.0f;
+ sipo->backdrop_opacity = 0.7f;
+ }
+ }
+ }
+ }
+ }
+ }
}
diff --cc source/blender/editors/include/ED_screen.h
index 6c9150c,df3a582..2a7d79c
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@@ -69,11 -69,8 +69,11 @@@ void ED_region_header_init(struct AR
void ED_region_header(const struct bContext *C, struct ARegion *ar);
void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar);
void ED_region_info_draw(struct ARegion *ar, const char *text, float fill_color[4], const bool full_redraw);
- void ED_region_image_metadata_draw(int x, int y, struct ImBuf *ibuf, rctf frame, float zoomx, float zoomy);
+ void ED_region_image_metadata_draw(int x, int y, struct ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy);
void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy);
+void ED_region_draw_backdrop_view3d(const struct bContext *C, struct Object *camera, const float alpha,
+ const float width, const float height, const float x, const float y,
+ const float zoomx, const float zoomy, const bool draw_background);
float ED_region_blend_factor(struct ARegion *ar);
void ED_region_visible_rect(struct ARegion *ar, struct rcti *rect);
diff --cc source/blender/editors/interface/interface.c
index 4c42d5b,1fccf0f..0ee4a30
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@@ -3170,25 -3140,20 +3197,39 @@@ void ui_block_cm_to_scene_linear_v3(uiB
IMB_colormanagement_display_to_scene_linear_v3(pixel, display);
}
+ void ui_block_cm_to_display_space_range(uiBlock *block, float *min, float *max)
+ {
+ struct ColorManagedDisplay *display = ui_block_cm_display_get(block);
+ float pixel[3];
+
+ copy_v3_fl(pixel, *min);
+ IMB_colormanagement_scene_linear_to_display_v3(pixel, display);
+ *min = min_fff(UNPACK3(pixel));
+
+ copy_v3_fl(pixel, *max);
+ IMB_colormanagement_scene_linear_to_display_v3(pixel, display);
+ *max = max_fff(UNPACK3(pixel));
+ }
+
+static uiSubBut *ui_def_subbut(
+ uiBut *but, const int type,
+ uiSubButAlign alignment,
+ const int width, const int height)
+{
+ uiSubBut *sbut = MEM_callocN(sizeof(uiSubBut), "uiSubBut");
+
+ sbut->type = type;
+ sbut->align = alignment;
+ sbut->width = width;
+ sbut->height = height;
+
+ /* sbut->rect is calculated later */
+
+ BLI_addtail(&but->subbuts, sbut);
+
+ return sbut;
+}
+
/**
* \brief ui_def_but is the function that draws many button types
*
diff --cc source/blender/editors/interface/interface_handlers.c
index 5d2b6e3,010bb8b..b268861
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@@ -6669,36 -6704,43 +6705,49 @@@ static bool ui_but_menu(bContext *C, ui
if (kmi_id)
kmi = WM_keymap_item_find_id(km, kmi_id);
- /* keyboard shortcuts */
- if ((kmi) && ISKEYBOARD(kmi->type)) {
+ /* We do have a shortcut, but only keyboard ones are editbale that way... */
+ if (kmi) {
+ if (ISKEYBOARD(kmi->type)) {
+ #if 0 /* would rather use a block but, but gets weirdly positioned... */
+ uiDefBlockBut(block, menu_change_shortcut, but, "Change Shortcut",
+ 0, 0, uiLayoutGetWidth(layout), UI_UNIT_Y, "");
+ #endif
- /* would rather use a block but, but gets weirdly positioned... */
- //uiDefBlockBut(block, menu_change_shortcut, but, "Change Shortcut", 0, 0, uiLayoutGetWidth(layout), UI_UNIT_Y, "");
-
- but2 = uiDefIconTextBut(block, UI_BTYPE_BUT, 0, 0, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Change Shortcut"),
- 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
- UI_but_func_set(but2, popup_change_shortcut_func, but, NULL);
+ but2 = uiDe
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list