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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-06-16 12:45:17 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-06-16 13:17:21 +0400
commit6d118968415866922d696bf8804659bbdad755dd (patch)
treefe0bd709a6d98fdc4668e8ebcc5d73965338de40
parent169c95b8cc43e32f52a6ce92edc44db0ef3b5a81 (diff)
Backport revisions for blender-rc2
f95817c, b0708dd, 2b7ff6d, 1d982ea, 781de74, 871a8eb, db750b9, 6d4f062, f325ddb, 31e15b5, be55327.
-rw-r--r--build_files/cmake/buildinfo.cmake4
-rw-r--r--build_files/cmake/macros.cmake2
-rw-r--r--build_files/scons/tools/Blender.py3
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm2
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp2
-rw-r--r--release/darwin/codesigning_rules_blender.plist2
-rw-r--r--release/darwin/codesigning_rules_player.plist2
m---------release/datafiles/locale0
-rw-r--r--release/datafiles/splash.pngbin252414 -> 254208 bytes
-rw-r--r--release/datafiles/splash_2x.pngbin886004 -> 890649 bytes
m---------release/scripts/addons0
m---------release/scripts/addons_contrib0
m---------scons0
-rw-r--r--source/blender/editors/object/object_bake_api.c13
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c2
-rw-r--r--source/blender/editors/transform/transform_snap.c5
-rw-r--r--source/blender/render/extern/include/RE_bake.h2
-rw-r--r--source/blender/render/intern/source/bake_api.c36
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
19 files changed, 52 insertions, 25 deletions
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake
index c1d21c413dc..3660b3e5f2e 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -85,6 +85,10 @@ if(EXISTS ${SOURCE_DIR}/.git)
endif()
endif()
+ if(MY_WC_BRANCH MATCHES "^blender-v")
+ set(MY_WC_BRANCH "master")
+ endif()
+
unset(_git_below_check)
endif()
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 772ff6d7596..bdd38837604 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -1006,7 +1006,7 @@ macro(msgfmt_simple
OUTPUT ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/msgfmt ${_file_from} ${_file_to}
- DEPENDS msgfmt)
+ DEPENDS msgfmt ${_file_from})
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 621a85a2d91..ee35586814d 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -457,6 +457,9 @@ def buildinfo(lenv, build_type):
unpushed_log = os.popen('git log --oneline @{u}..').read().strip()
has_local_changes = unpushed_log != ''
+ if build_branch.startswith('blender-v'):
+ build_branch = 'master'
+
if has_local_changes:
build_branch += ' (modified)'
else:
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index b7b1079844e..2e372d7c995 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1087,7 +1087,7 @@ GHOST_TUns8 GHOST_SystemCocoa::handleQuitRequest()
//Check open windows if some changes are not saved
if (m_windowManager->getAnyModifiedState())
{
- int shouldQuit = NSRunAlertPanel(@"Exit Blender", @"Some changes have not been saved.\nDo you really want to quit ?",
+ int shouldQuit = NSRunAlertPanel(@"Exit Blender", @"Some changes have not been saved.\nDo you really want to quit?",
@"Cancel", @"Quit Anyway", nil);
if (shouldQuit == NSAlertAlternateReturn)
{
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index b58dccf9fd3..9615f83b7f7 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1435,6 +1435,6 @@ int GHOST_SystemWin32::toggleConsole(int action)
int GHOST_SystemWin32::confirmQuit(GHOST_IWindow *window) const
{
- return (MessageBox(window ? ((GHOST_WindowWin32 *)window)->getHWND() : 0, "Some changes have not been saved.\nDo you really want to quit ?",
+ return (MessageBox(window ? ((GHOST_WindowWin32 *)window)->getHWND() : 0, "Some changes have not been saved.\nDo you really want to quit?",
"Exit Blender", MB_OKCANCEL | MB_ICONWARNING | MB_TOPMOST) == IDOK);
}
diff --git a/release/darwin/codesigning_rules_blender.plist b/release/darwin/codesigning_rules_blender.plist
index aa5580dd322..5e6198e8ce7 100644
--- a/release/darwin/codesigning_rules_blender.plist
+++ b/release/darwin/codesigning_rules_blender.plist
@@ -5,7 +5,7 @@
<key>rules</key>
<dict>
<!-- Exclude datafiles, python and scripts -->
- <key>^MacOS/2.70</key>
+ <key>^MacOS/2.71</key>
<false/>
<key>^Resources/</key>
<true/>
diff --git a/release/darwin/codesigning_rules_player.plist b/release/darwin/codesigning_rules_player.plist
index ff154df7b49..acbdab20db9 100644
--- a/release/darwin/codesigning_rules_player.plist
+++ b/release/darwin/codesigning_rules_player.plist
@@ -5,7 +5,7 @@
<key>rules</key>
<dict>
<!-- Exclude datafiles, python and scripts -->
- <key>^MacOS/2.70</key>
+ <key>^MacOS/2.71</key>
<false/>
<!-- Exclude Resources for placing game.blend and own icons -->
<key>^Resources/</key>
diff --git a/release/datafiles/locale b/release/datafiles/locale
-Subproject cb1967cc63a6d2d75d2b59cdf91c5f5645285ae
+Subproject f3d1f8127094dc64eb889e41792fd4c2d877d5b
diff --git a/release/datafiles/splash.png b/release/datafiles/splash.png
index aa2b6348e79..451273728f2 100644
--- a/release/datafiles/splash.png
+++ b/release/datafiles/splash.png
Binary files differ
diff --git a/release/datafiles/splash_2x.png b/release/datafiles/splash_2x.png
index 32ef1aa45eb..758178be298 100644
--- a/release/datafiles/splash_2x.png
+++ b/release/datafiles/splash_2x.png
Binary files differ
diff --git a/release/scripts/addons b/release/scripts/addons
-Subproject c50944e808d6c74148237e85866e893628f0fee
+Subproject 9948cd6025f29fad12eaf6d3b0e738dfb2b50d4
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
-Subproject 31545d25c9cb41d271a3f3ef84d327708572290
+Subproject 0bd307ae8cc7746b433c0baf9be13dc662b47f0
diff --git a/scons b/scons
-Subproject 2d6ebcb23909058b846aa232ecb2fee497924cf
+Subproject 1ec93106c40fab0c339d09c7ed9897c85ddf3da
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index de709a4f03d..cdb23b23f7d 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -738,9 +738,12 @@ static int bake(
ob_low->restrictflag |= OB_RESTRICT_RENDER;
/* populate the pixel arrays with the corresponding face data for each high poly object */
- RE_bake_pixels_populate_from_objects(
- me_low, pixel_array_low, highpoly, tot_highpoly, num_pixels, ob_cage != NULL,
- cage_extrusion, ob_low->obmat, (ob_cage ? ob_cage->obmat : ob_low->obmat), me_cage);
+ if (!RE_bake_pixels_populate_from_objects(
+ me_low, pixel_array_low, highpoly, tot_highpoly, num_pixels, ob_cage != NULL,
+ cage_extrusion, ob_low->obmat, (ob_cage ? ob_cage->obmat : ob_low->obmat), me_cage)) {
+ BKE_report(reports, RPT_ERROR, "Error handling selected objects");
+ goto cleanup;
+ }
/* the baking itself */
for (i = 0; i < tot_highpoly; i++) {
@@ -1264,8 +1267,8 @@ void OBJECT_OT_bake(wmOperatorType *ot)
"Extends the baked result as a post process filter", 0, 64);
RNA_def_boolean(ot->srna, "use_selected_to_active", false, "Selected to Active",
"Bake shading on the surface of selected objects to the active object");
- RNA_def_float(ot->srna, "cage_extrusion", 0.0, 0.0, 1.0, "Cage Extrusion",
- "Distance to use for the inward ray cast when using selected to active", 0.0, 1.0);
+ RNA_def_float(ot->srna, "cage_extrusion", 0.0f, 0.0f, FLT_MAX, "Cage Extrusion",
+ "Distance to use for the inward ray cast when using selected to active", 0.0f, 1.0f);
RNA_def_string(ot->srna, "cage_object", NULL, MAX_NAME, "Cage Object",
"Object to use as cage, instead of calculating the cage from the active object with cage extrusion");
RNA_def_enum(ot->srna, "normal_space", normal_space_items, R_BAKE_SPACE_TANGENT, "Normal Space",
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index ef99e8d873c..eb40df8e37d 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -815,7 +815,7 @@ void view3d_winmatrix_set(ARegion *ar, View3D *v3d, rctf *rect)
rect->ymax /= (float)ar->winy;
rect->ymax = y1 + rect->ymax * (y2 - y1);
- if (is_ortho) wmOrtho(rect->xmin, rect->xmax, rect->ymin, rect->ymax, -clipend, clipend);
+ if (is_ortho) wmOrtho(rect->xmin, rect->xmax, rect->ymin, rect->ymax, clipsta, clipend);
else wmFrustum(rect->xmin, rect->xmax, rect->ymin, rect->ymax, clipsta, clipend);
}
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 2da6b92c9d0..67a68a3fd9c 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -507,6 +507,7 @@ static void initSnappingMode(TransInfo *t)
if (t->tsnap.applySnap != NULL && // A snapping function actually exist
(obedit != NULL && ELEM5(obedit->type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE, OB_MBALL)) ) // Temporary limited to edit mode meshes, armature, curves, mballs
{
+ BoundBox *bb_init;
/* Exclude editmesh if using proportional edit */
if ((obedit->type == OB_MESH) && (t->flag & T_PROP_EDIT)) {
t->tsnap.modeSelect = SNAP_NOT_OBEDIT;
@@ -517,7 +518,9 @@ static void initSnappingMode(TransInfo *t)
/* store the original bounding box -
* we could slightly increase the size in screen space but leaving as TODO */
- t->tsnap.BB_init = *BKE_object_boundbox_get(obedit);
+ bb_init = BKE_object_boundbox_get(obedit);
+ if (bb_init)
+ t->tsnap.BB_init = *bb_init;
}
/* Particles edit mode*/
else if (t->tsnap.applySnap != NULL && // A snapping function actually exist
diff --git a/source/blender/render/extern/include/RE_bake.h b/source/blender/render/extern/include/RE_bake.h
index 4727aef460e..961ca3fdd6d 100644
--- a/source/blender/render/extern/include/RE_bake.h
+++ b/source/blender/render/extern/include/RE_bake.h
@@ -80,7 +80,7 @@ bool RE_bake_internal(
struct Render *re, struct Object *object, const BakePixel pixel_array[],
const int num_pixels, const int depth, const ScenePassType pass_type, float result[]);
-void RE_bake_pixels_populate_from_objects(
+bool RE_bake_pixels_populate_from_objects(
struct Mesh *me_low, BakePixel pixel_array_from[],
BakeHighPolyData highpoly[], const int tot_highpoly, const int num_pixels, const bool is_custom_cage,
const float cage_extrusion, float mat_low[4][4], float mat_cage[4][4], struct Mesh *me_cage);
diff --git a/source/blender/render/intern/source/bake_api.c b/source/blender/render/intern/source/bake_api.c
index 3de39378fad..713f7b8f808 100644
--- a/source/blender/render/intern/source/bake_api.c
+++ b/source/blender/render/intern/source/bake_api.c
@@ -299,7 +299,9 @@ static bool cast_ray_highpoly(
normalize_v3(dir_high);
/* cast ray */
- BLI_bvhtree_ray_cast(treeData[i].tree, co_high, dir_high, 0.0f, &hits[i], treeData[i].raycast_callback, &treeData[i]);
+ if (treeData[i].tree) {
+ BLI_bvhtree_ray_cast(treeData[i].tree, co_high, dir_high, 0.0f, &hits[i], treeData[i].raycast_callback, &treeData[i]);
+ }
if (hits[i].index != -1) {
/* cull backface */
@@ -434,7 +436,7 @@ static void mesh_calc_tri_tessface(
BLI_assert(p_id < me->totface * 2);
}
-void RE_bake_pixels_populate_from_objects(
+bool RE_bake_pixels_populate_from_objects(
struct Mesh *me_low, BakePixel pixel_array_from[],
BakeHighPolyData highpoly[], const int tot_highpoly, const int num_pixels, const bool is_custom_cage,
const float cage_extrusion, float mat_low[4][4], float mat_cage[4][4], struct Mesh *me_cage)
@@ -444,6 +446,7 @@ void RE_bake_pixels_populate_from_objects(
float u, v;
float imat_low [4][4];
bool is_cage = me_cage != NULL;
+ bool result = true;
DerivedMesh *dm_low = NULL;
DerivedMesh **dm_highpoly;
@@ -455,10 +458,10 @@ void RE_bake_pixels_populate_from_objects(
TriTessFace **tris_high;
/* assume all lowpoly tessfaces can be quads */
- tris_high = MEM_mallocN(sizeof(TriTessFace *) * tot_highpoly, "MVerts Highpoly Mesh Array");
+ tris_high = MEM_callocN(sizeof(TriTessFace *) * tot_highpoly, "MVerts Highpoly Mesh Array");
/* assume all highpoly tessfaces are triangles */
- dm_highpoly = MEM_mallocN(sizeof(DerivedMesh *) * tot_highpoly, "Highpoly Derived Meshes");
+ dm_highpoly = MEM_callocN(sizeof(DerivedMesh *) * tot_highpoly, "Highpoly Derived Meshes");
treeData = MEM_callocN(sizeof(BVHTreeFromMesh) * tot_highpoly, "Highpoly BVH Trees");
if (!is_cage) {
@@ -486,12 +489,15 @@ void RE_bake_pixels_populate_from_objects(
dm_highpoly[i] = CDDM_from_mesh(highpoly[i].me);
- /* Create a bvh-tree for each highpoly object */
- bvhtree_from_mesh_faces(&treeData[i], dm_highpoly[i], 0.0, 2, 6);
+ if (dm_highpoly[i]->getNumTessFaces(dm_highpoly[i]) != 0) {
+ /* Create a bvh-tree for each highpoly object */
+ bvhtree_from_mesh_faces(&treeData[i], dm_highpoly[i], 0.0, 2, 6);
- if (&treeData[i].tree == NULL) {
- printf("Baking: Out of memory\n");
- goto cleanup;
+ if (treeData[i].tree == NULL) {
+ printf("Baking: out of memory while creating BHVTree for object \"%s\"\n", highpoly[i].ob->id.name + 2);
+ result = false;
+ goto cleanup;
+ }
}
}
@@ -537,8 +543,14 @@ void RE_bake_pixels_populate_from_objects(
cleanup:
for (i = 0; i < tot_highpoly; i++) {
free_bvhtree_from_mesh(&treeData[i]);
- dm_highpoly[i]->release(dm_highpoly[i]);
- MEM_freeN(tris_high[i]);
+
+ if (dm_highpoly[i]) {
+ dm_highpoly[i]->release(dm_highpoly[i]);
+ }
+
+ if (tris_high[i]) {
+ MEM_freeN(tris_high[i]);
+ }
}
MEM_freeN(tris_high);
@@ -554,6 +566,8 @@ cleanup:
if (tris_cage) {
MEM_freeN(tris_cage);
}
+
+ return result;
}
static void bake_differentials(BakeDataZSpan *bd, const float *uv1, const float *uv2, const float *uv3)
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 6261f1d271f..968d0fced65 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1835,7 +1835,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
int y = 242 + (4 * UI_DPI_WINDOW_FAC);
int w = 240;
- const char *version_suffix = "Release Candidate";
+ const char *version_suffix = "Release Candidate 2";
/* hack to have text draw 'text_sel' */
uiBlockSetEmboss(block, UI_EMBOSSN);