Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-11-19 18:28:39 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-11-19 18:28:39 +0300
commit559bd7576602e04b1895481561b054e67982351c (patch)
treec17c92da080ff2336a340ecb86cb157272f04c55 /source/blender/editors
parent5cbc7b6ed29645d793e813fab374add4e11fa4c7 (diff)
parent369872a2c50e95eee822512018cc282ef5fcfdd1 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/blenloader/intern/versioning_270.c source/blender/depsgraph/intern/builder/deg_builder_nodes.cc source/blender/depsgraph/intern/builder/deg_builder_relations.cc source/blender/editors/space_view3d/drawobject.c
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_anim.c8
-rw-r--r--source/blender/editors/interface/interface_handlers.c2
-rw-r--r--source/blender/editors/render/render_opengl.c7
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c3
-rw-r--r--source/blender/editors/space_node/space_node.c36
-rw-r--r--source/blender/editors/space_view3d/drawobject.c19
6 files changed, 65 insertions, 10 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 991cd54fecf..5da294302e9 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -99,6 +99,10 @@ void ui_but_anim_flag(uiBut *but, float cfra)
}
}
+/**
+ * \a str can be NULL to only perform check if \a but has an expression at all.
+ * \return if button has an expression.
+ */
bool ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen)
{
FCurve *fcu;
@@ -111,7 +115,9 @@ bool ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen)
driver = fcu->driver;
if (driver && driver->type == DRIVER_TYPE_PYTHON) {
- BLI_strncpy(str, driver->expression, maxlen);
+ if (str) {
+ BLI_strncpy(str, driver->expression, maxlen);
+ }
return true;
}
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index f3eeadb6604..fc511d61e2b 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3067,7 +3067,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
data->str = ui_but_string_get_dynamic(but, &data->maxlen);
}
- if (ui_but_is_float(but) && !ui_but_is_unit(but)) {
+ if (ui_but_is_float(but) && !ui_but_is_unit(but) && !ui_but_anim_expression_get(but, NULL, 0)) {
BLI_str_rstrip_float_zero(data->str, '\0');
}
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 16842efb436..9097432a251 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -552,8 +552,11 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
BLI_assert(view_id < oglrender->views_len);
RE_SetActiveRenderView(oglrender->re, rv->name);
oglrender->view_id = view_id;
- /* add grease pencil passes */
- add_gpencil_renderpass(oglrender, rr, rv);
+ /* add grease pencil passes. For sequencer, the render does not include renderpasses
+ * TODO: The sequencer render of grease pencil should be rethought */
+ if (!oglrender->is_sequencer) {
+ add_gpencil_renderpass(oglrender, rr, rv);
+ }
/* render composite */
screen_opengl_render_doit(oglrender, rr);
}
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 9474a46d716..4f93c12385d 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -1489,7 +1489,8 @@ void paint_2d_bucket_fill(
float image_init[2];
int minx = ibuf->x, miny = ibuf->y, maxx = 0, maxy = 0;
float pixel_color[4];
- float threshold_sq = br->fill_threshold * br->fill_threshold;
+ /* We are comparing to sum of three squared values (assumed in range [0,1]), so need to multiply... */
+ float threshold_sq = br->fill_threshold * br->fill_threshold * 3;
UI_view2d_region_to_view(s->v2d, mouse_init[0], mouse_init[1], &image_init[0], &image_init[1]);
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 4ef703c8994..bbdf6feef01 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -855,6 +855,42 @@ static void node_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID
id_us_plus(new_id);
}
}
+ else if (GS(old_id->name) == ID_NT) {
+ bNodeTreePath *path, *path_next;
+
+ for (path = snode->treepath.first; path; path = path->next) {
+ if ((ID *)path->nodetree == old_id) {
+ path->nodetree = (bNodeTree *)new_id;
+ id_us_min(old_id);
+ id_us_plus(new_id);
+ }
+ if (path == snode->treepath.first) {
+ /* first nodetree in path is same as snode->nodetree */
+ snode->nodetree = path->nodetree;
+ }
+ if (path->nodetree == NULL) {
+ break;
+ }
+ }
+
+ /* remaining path entries are invalid, remove */
+ for (; path; path = path_next) {
+ path_next = path->next;
+
+ BLI_remlink(&snode->treepath, path);
+ MEM_freeN(path);
+ }
+
+ /* edittree is just the last in the path,
+ * set this directly since the path may have been shortened above */
+ if (snode->treepath.last) {
+ path = snode->treepath.last;
+ snode->edittree = path->nodetree;
+ }
+ else {
+ snode->edittree = NULL;
+ }
+ }
}
/* only called once, from space/spacetypes.c */
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 4ae5bdff508..45041620fea 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -972,7 +972,7 @@ void drawaxes(const float viewmat_local[4][4], float size, char drawtype, const
/* Function to draw an Image on an empty Object */
-static void draw_empty_image(Object *ob, const short dflag, const unsigned char ob_wire_col[4])
+static void draw_empty_image(Object *ob, const short dflag, const unsigned char ob_wire_col[4], StereoViews sview)
{
Image *ima = ob->data;
@@ -982,13 +982,22 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char
int bindcode = 0;
if (ima) {
+ ImageUser iuser = *ob->iuser;
+
+ /* Support multi-view */
+ if (ima && (sview == STEREO_RIGHT_ID)) {
+ iuser.multiview_eye = sview;
+ iuser.flag |= IMA_SHOW_STEREO;
+ BKE_image_multiview_index(ima, &iuser);
+ }
+
if (ob_alpha > 0.0f) {
- bindcode = GPU_verify_image(ima, ob->iuser, GL_TEXTURE_2D, 0, false, false, false);
+ bindcode = GPU_verify_image(ima, &iuser, GL_TEXTURE_2D, 0, false, false, false);
/* don't bother drawing the image if alpha = 0 */
}
int w, h;
- BKE_image_get_size(ima, ob->iuser, &w, &h);
+ BKE_image_get_size(ima, &iuser, &w, &h);
width = w;
height = h;
}
@@ -7685,7 +7694,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
case OB_EMPTY:
if (!render_override) {
if (ob->empty_drawtype == OB_EMPTY_IMAGE) {
- draw_empty_image(ob, dflag, ob_wire_col);
+ draw_empty_image(ob, dflag, ob_wire_col, v3d->multiview_eye);
}
else {
drawaxes(rv3d->viewmatob, ob->empty_drawsize, ob->empty_drawtype, ob_wire_col);
@@ -8420,7 +8429,7 @@ void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object
case OB_EMPTY:
if (ob->empty_drawtype == OB_EMPTY_IMAGE) {
/* CONSTCOLOR == no wire outline */
- draw_empty_image(ob, DRAW_CONSTCOLOR, NULL);
+ draw_empty_image(ob, DRAW_CONSTCOLOR, NULL, v3d->multiview_eye);
}
else {
drawaxes(rv3d->viewmatob, ob->empty_drawsize, ob->empty_drawtype, NULL); /* TODO: use proper color */