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:
authorCampbell Barton <ideasman42@gmail.com>2017-05-26 12:57:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-05-26 12:57:28 +0300
commitf2a8b74c2572258391c5847c177e59266aee3dab (patch)
tree0b3d7d1822beb32d335b0689bb04bb0a3a36f98c
parent3b24ece297afc8ee648f91dbbe890d8aaee7e3bc (diff)
parentf78ba0df02a9734740d7ccddbe315020f56852f6 (diff)
Merge branch 'master' into blender2.8
-rw-r--r--intern/cycles/blender/addon/engine.py20
-rw-r--r--intern/cycles/blender/addon/properties.py11
-rw-r--r--intern/cycles/blender/blender_sync.cpp2
-rw-r--r--source/blender/alembic/intern/abc_archive.cc6
-rw-r--r--source/blender/blenkernel/intern/displist.c11
-rw-r--r--source/blender/blenloader/intern/readfile.c10
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c8
-rw-r--r--source/blender/imbuf/intern/colormanagement.c18
-rw-r--r--source/blender/makesrna/intern/rna_image.c2
-rw-r--r--source/blender/python/intern/bpy_interface.c15
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c4
-rw-r--r--source/creator/CMakeLists.txt10
12 files changed, 75 insertions, 42 deletions
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py
index 8fb2d08cedd..9e22ce331d0 100644
--- a/intern/cycles/blender/addon/engine.py
+++ b/intern/cycles/blender/addon/engine.py
@@ -243,13 +243,13 @@ def register_passes(engine, scene, srl):
if crl.pass_debug_ray_bounces: engine.register_pass(scene, srl, "Debug Ray Bounces", 1, "X", 'VALUE')
if crl.use_denoising and crl.denoising_store_passes:
- engine.register_pass(scene, srl, "Denoising Normal", 3, "XYZ", 'VECTOR');
- engine.register_pass(scene, srl, "Denoising Normal Variance", 3, "XYZ", 'VECTOR');
- engine.register_pass(scene, srl, "Denoising Albedo", 3, "RGB", 'COLOR');
- engine.register_pass(scene, srl, "Denoising Albedo Variance", 3, "RGB", 'COLOR');
- engine.register_pass(scene, srl, "Denoising Depth", 1, "Z", 'VALUE');
- engine.register_pass(scene, srl, "Denoising Depth Variance", 1, "Z", 'VALUE');
- engine.register_pass(scene, srl, "Denoising Shadow A", 3, "XYV", 'VECTOR');
- engine.register_pass(scene, srl, "Denoising Shadow B", 3, "XYV", 'VECTOR');
- engine.register_pass(scene, srl, "Denoising Image", 3, "RGB", 'COLOR');
- engine.register_pass(scene, srl, "Denoising Image Variance", 3, "RGB", 'COLOR'); \ No newline at end of file
+ engine.register_pass(scene, srl, "Denoising Normal", 3, "XYZ", 'VECTOR')
+ engine.register_pass(scene, srl, "Denoising Normal Variance", 3, "XYZ", 'VECTOR')
+ engine.register_pass(scene, srl, "Denoising Albedo", 3, "RGB", 'COLOR')
+ engine.register_pass(scene, srl, "Denoising Albedo Variance", 3, "RGB", 'COLOR')
+ engine.register_pass(scene, srl, "Denoising Depth", 1, "Z", 'VALUE')
+ engine.register_pass(scene, srl, "Denoising Depth Variance", 1, "Z", 'VALUE')
+ engine.register_pass(scene, srl, "Denoising Shadow A", 3, "XYV", 'VECTOR')
+ engine.register_pass(scene, srl, "Denoising Shadow B", 3, "XYV", 'VECTOR')
+ engine.register_pass(scene, srl, "Denoising Image", 3, "RGB", 'COLOR')
+ engine.register_pass(scene, srl, "Denoising Image Variance", 3, "RGB", 'COLOR')
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 1fc6f711cc4..28d60671bd8 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -1160,6 +1160,12 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
def unregister(cls):
del bpy.types.Scene.cycles_curves
+def update_render_passes(self, context):
+ scene = context.scene
+ rd = scene.render
+ rl = rd.layers.active
+ rl.update_render_passes()
+
class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
@classmethod
def register(cls):
@@ -1172,21 +1178,25 @@ class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
name="Debug BVH Traversed Nodes",
description="Store Debug BVH Traversed Nodes pass",
default=False,
+ update=update_render_passes,
)
cls.pass_debug_bvh_traversed_instances = BoolProperty(
name="Debug BVH Traversed Instances",
description="Store Debug BVH Traversed Instances pass",
default=False,
+ update=update_render_passes,
)
cls.pass_debug_bvh_intersections = BoolProperty(
name="Debug BVH Intersections",
description="Store Debug BVH Intersections",
default=False,
+ update=update_render_passes,
)
cls.pass_debug_ray_bounces = BoolProperty(
name="Debug Ray Bounces",
description="Store Debug Ray Bounces pass",
default=False,
+ update=update_render_passes,
)
cls.use_denoising = BoolProperty(
@@ -1261,6 +1271,7 @@ class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
name="Store denoising passes",
description="Store the denoising feature passes and the noisy image",
default=False,
+ update=update_render_passes,
)
@classmethod
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index 138ea4dfad2..1604b0039eb 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -585,8 +585,6 @@ array<Pass> BlenderSync::sync_render_passes(BL::RenderLayer& b_rlay,
b_engine.add_pass("Debug Ray Bounces", 1, "X", b_srlay.name().c_str());
Pass::add(PASS_RAY_BOUNCES, passes);
}
-#else
- (void) b_srlay; /* Ignored. */
#endif
return passes;
diff --git a/source/blender/alembic/intern/abc_archive.cc b/source/blender/alembic/intern/abc_archive.cc
index ff14cf15124..bd16196cb78 100644
--- a/source/blender/alembic/intern/abc_archive.cc
+++ b/source/blender/alembic/intern/abc_archive.cc
@@ -23,8 +23,10 @@
*/
#include "abc_archive.h"
-
-#include "BKE_blender_version.h"
+extern "C"
+{
+ #include "BKE_blender_version.h"
+}
#ifdef WIN32
# include "utfconv.h"
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 22cb70e3d10..44f284d043e 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -169,10 +169,12 @@ void BKE_displist_normals_add(ListBase *lb)
if (dl->nors == NULL) {
dl->nors = MEM_callocN(sizeof(float) * 3, "dlnors");
- if (dl->verts[2] < 0.0f)
+ if (dl->flag & DL_BACK_CURVE) {
dl->nors[2] = -1.0f;
- else
+ }
+ else {
dl->nors[2] = 1.0f;
+ }
}
}
else if (dl->type == DL_SURF) {
@@ -471,6 +473,7 @@ void BKE_displist_fill(ListBase *dispbase, ListBase *to, const float normal_proj
sf_arena = BLI_memarena_new(BLI_SCANFILL_ARENA_SIZE, __func__);
while (cont) {
+ int dl_flag_accum = 0;
cont = 0;
totvert = 0;
nextcol = 0;
@@ -516,6 +519,7 @@ void BKE_displist_fill(ListBase *dispbase, ListBase *to, const float normal_proj
nextcol = 1;
}
}
+ dl_flag_accum |= dl->flag;
}
dl = dl->next;
}
@@ -528,6 +532,7 @@ void BKE_displist_fill(ListBase *dispbase, ListBase *to, const float normal_proj
if (tot) {
dlnew = MEM_callocN(sizeof(DispList), "filldisplist");
dlnew->type = DL_INDEX3;
+ dlnew->flag = (dl_flag_accum & (DL_BACK_CURVE | DL_FRONT_CURVE));
dlnew->col = colnr;
dlnew->nr = totvert;
dlnew->parts = tot;
@@ -605,6 +610,7 @@ static void bevels_to_filledpoly(Curve *cu, ListBase *dispbase)
dlnew->nr = dl->parts;
dlnew->parts = 1;
dlnew->type = DL_POLY;
+ dlnew->flag = DL_BACK_CURVE;
dlnew->col = dl->col;
dlnew->charidx = dl->charidx;
@@ -625,6 +631,7 @@ static void bevels_to_filledpoly(Curve *cu, ListBase *dispbase)
dlnew->nr = dl->parts;
dlnew->parts = 1;
dlnew->type = DL_POLY;
+ dlnew->flag = DL_FRONT_CURVE;
dlnew->col = dl->col;
dlnew->charidx = dl->charidx;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 2e3dd972c5e..cd8cbabc2d7 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6115,9 +6115,13 @@ static void direct_link_scene(FileData *fd, Scene *sce)
seq->strip->transform = NULL;
}
if (seq->flag & SEQ_USE_PROXY) {
- seq->strip->proxy = newdataadr(
- fd, seq->strip->proxy);
- seq->strip->proxy->anim = NULL;
+ seq->strip->proxy = newdataadr(fd, seq->strip->proxy);
+ if (seq->strip->proxy) {
+ seq->strip->proxy->anim = NULL;
+ }
+ else {
+ BKE_sequencer_proxy_set(seq, true);
+ }
}
else {
seq->strip->proxy = NULL;
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 15f0a66ca1b..93554c374d9 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1171,8 +1171,10 @@ int view3d_opengl_select(
G.f |= G_PICKSEL;
- ED_view3d_draw_setup_view(vc->win, scene, ar, v3d, NULL, NULL, &rect);
-
+ /* Important we use the 'viewmat' and don't re-calculate since
+ * the object & bone view locking takes 'rect' into account, see: T51629. */
+ ED_view3d_draw_setup_view(vc->win, scene, ar, v3d, vc->rv3d->viewmat, NULL, &rect);
+
if (v3d->drawtype > OB_WIRE) {
v3d->zbuf = true;
glEnable(GL_DEPTH_TEST);
@@ -1215,7 +1217,7 @@ int view3d_opengl_select(
}
G.f &= ~G_PICKSEL;
- ED_view3d_draw_setup_view(vc->win, scene, ar, v3d, NULL, NULL, NULL);
+ ED_view3d_draw_setup_view(vc->win, scene, ar, v3d, vc->rv3d->viewmat, NULL, NULL);
if (v3d->drawtype > OB_WIRE) {
v3d->zbuf = 0;
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c
index a4d5da9993a..ff19a14dbff 100644
--- a/source/blender/imbuf/intern/colormanagement.c
+++ b/source/blender/imbuf/intern/colormanagement.c
@@ -214,7 +214,7 @@ typedef struct ColormanageCacheKey {
int display; /* display device name */
} ColormanageCacheKey;
-typedef struct ColormnaageCacheData {
+typedef struct ColormanageCacheData {
int flag; /* view flags of cached buffer */
int look; /* Additional artistics transform */
float exposure; /* exposure value cached buffer is calculated with */
@@ -222,12 +222,12 @@ typedef struct ColormnaageCacheData {
float dither; /* dither value cached buffer is calculated with */
CurveMapping *curve_mapping; /* curve mapping used for cached buffer */
int curve_mapping_timestamp; /* time stamp of curve mapping used for cached buffer */
-} ColormnaageCacheData;
+} ColormanageCacheData;
typedef struct ColormanageCache {
struct MovieCache *moviecache;
- ColormnaageCacheData *data;
+ ColormanageCacheData *data;
} ColormanageCache;
static struct MovieCache *colormanage_moviecache_get(const ImBuf *ibuf)
@@ -238,7 +238,7 @@ static struct MovieCache *colormanage_moviecache_get(const ImBuf *ibuf)
return ibuf->colormanage_cache->moviecache;
}
-static ColormnaageCacheData *colormanage_cachedata_get(const ImBuf *ibuf)
+static ColormanageCacheData *colormanage_cachedata_get(const ImBuf *ibuf)
{
if (!ibuf->colormanage_cache)
return NULL;
@@ -281,7 +281,7 @@ static struct MovieCache *colormanage_moviecache_ensure(ImBuf *ibuf)
return ibuf->colormanage_cache->moviecache;
}
-static void colormanage_cachedata_set(ImBuf *ibuf, ColormnaageCacheData *data)
+static void colormanage_cachedata_set(ImBuf *ibuf, ColormanageCacheData *data)
{
if (!ibuf->colormanage_cache)
ibuf->colormanage_cache = MEM_callocN(sizeof(ColormanageCache), "imbuf colormanage cache");
@@ -361,7 +361,7 @@ static unsigned char *colormanage_cache_get(ImBuf *ibuf, const ColormanageCacheV
cache_ibuf = colormanage_cache_get_ibuf(ibuf, &key, cache_handle);
if (cache_ibuf) {
- ColormnaageCacheData *cache_data;
+ ColormanageCacheData *cache_data;
BLI_assert(cache_ibuf->x == ibuf->x &&
cache_ibuf->y == ibuf->y);
@@ -402,7 +402,7 @@ static void colormanage_cache_put(ImBuf *ibuf, const ColormanageCacheViewSetting
{
ColormanageCacheKey key;
ImBuf *cache_ibuf;
- ColormnaageCacheData *cache_data;
+ ColormanageCacheData *cache_data;
int view_flag = 1 << (view_settings->view - 1);
struct MovieCache *moviecache = colormanage_moviecache_ensure(ibuf);
CurveMapping *curve_mapping = view_settings->curve_mapping;
@@ -421,7 +421,7 @@ static void colormanage_cache_put(ImBuf *ibuf, const ColormanageCacheViewSetting
cache_ibuf->flags |= IB_rect;
/* store data which is needed to check whether cached buffer could be used for color managed display settings */
- cache_data = MEM_callocN(sizeof(ColormnaageCacheData), "color manage cache imbuf data");
+ cache_data = MEM_callocN(sizeof(ColormanageCacheData), "color manage cache imbuf data");
cache_data->look = view_settings->look;
cache_data->exposure = view_settings->exposure;
cache_data->gamma = view_settings->gamma;
@@ -710,7 +710,7 @@ void colormanage_cache_free(ImBuf *ibuf)
}
if (ibuf->colormanage_cache) {
- ColormnaageCacheData *cache_data = colormanage_cachedata_get(ibuf);
+ ColormanageCacheData *cache_data = colormanage_cachedata_get(ibuf);
struct MovieCache *moviecache = colormanage_moviecache_get(ibuf);
if (cache_data) {
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index f65aa90ea71..b6e84cf8ac3 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -871,7 +871,7 @@ static void rna_def_image(BlenderRNA *brna)
prop = RNA_def_property(srna, "has_data", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_Image_has_data_get", NULL);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Has data", "True if this image has data");
+ RNA_def_property_ui_text(prop, "Has Data", "True if the image data is loaded into memory");
prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_funcs(prop, "rna_Image_depth_get", NULL, NULL);
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 55e477b0214..7b0daa91523 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -480,11 +480,20 @@ static bool python_script_exec(
* object, but as written in the Python/C API Ref Manual, chapter 2,
* 'FILE structs for different C libraries can be different and
* incompatible'.
- * So now we load the script file data to a buffer */
+ * So now we load the script file data to a buffer.
+ *
+ * Note on use of 'globals()', it's important not copy the dictionary because
+ * tools may inspect 'sys.modules["__main__"]' for variables defined in the code
+ * where using a copy of 'globals()' causes code execution
+ * to leave the main namespace untouched. see: T51444
+ *
+ * This leaves us with the problem of variables being included,
+ * currently this is worked around using 'dict.__del__' it's ugly but works.
+ */
{
const char *pystring =
- "ns = globals().copy()\n"
- "with open(__file__, 'rb') as f: exec(compile(f.read(), __file__, 'exec'), ns)";
+ "with open(__file__, 'rb') as f:"
+ "exec(compile(f.read(), __file__, 'exec'), globals().__delitem__('f') or globals())";
fclose(fp);
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index bfd23af257b..e368e8871f3 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -1709,10 +1709,10 @@ static PyObject *Matrix_lerp(MatrixObject *self, PyObject *args)
/* TODO, different sized matrix */
if (self->num_col == 4 && self->num_row == 4) {
- blend_m4_m4m4((float (*)[4])mat, (float (*)[4])self->matrix, (float (*)[4])mat2->matrix, fac);
+ interp_m4_m4m4((float (*)[4])mat, (float (*)[4])self->matrix, (float (*)[4])mat2->matrix, fac);
}
else if (self->num_col == 3 && self->num_row == 3) {
- blend_m3_m3m3((float (*)[3])mat, (float (*)[3])self->matrix, (float (*)[3])mat2->matrix, fac);
+ interp_m3_m3m3((float (*)[3])mat, (float (*)[3])self->matrix, (float (*)[3])mat2->matrix, fac);
}
else {
PyErr_SetString(PyExc_ValueError,
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 6d0cbb365b4..7a34f8bcb69 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -1087,16 +1087,16 @@ elseif(APPLE)
# python
if(WITH_PYTHON AND NOT WITH_PYTHON_FRAMEWORK)
add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python
- COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/python/"
- COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/python/"
- COMMAND ${CMAKE_COMMAND} -E chdir "${CMAKE_CURRENT_BINARY_DIR}/python/"
+ OUTPUT ${PYTHON_EXTRACT_DIR}
+ COMMAND ${CMAKE_COMMAND} -E remove_directory "${PYTHON_EXTRACT_DIR}/"
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${PYTHON_EXTRACT_DIR}/"
+ COMMAND ${CMAKE_COMMAND} -E chdir "${PYTHON_EXTRACT_DIR}/"
${CMAKE_COMMAND} -E tar xzfv "${LIBDIR}/release/${PYTHON_ZIP}"
DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
# copy extracted python files
install_dir(
- ${CMAKE_CURRENT_BINARY_DIR}/python
+ ${PYTHON_EXTRACT_DIR}
\${PLAYER_TARGETDIR_VER}
)
endif()