Backport revisions for blender-rc2

f95817c, b0708dd, 2b7ff6d, 1d982ea, 781de74,
871a8eb, db750b9, 6d4f062, f325ddb, 31e15b5,
be55327.
This commit is contained in:
Sergey Sharybin 2014-06-16 14:45:17 +06:00
parent 169c95b8cc
commit 6d11896841
19 changed files with 56 additions and 29 deletions

View file

@ -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()

View file

@ -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)

View file

@ -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:

View file

@ -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)
{

View file

@ -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);
}

View file

@ -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/>

View file

@ -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>

@ -1 +1 @@
Subproject commit cb1967cc63a6d2d75d2b59cdf91c5f5645285aea
Subproject commit f3d1f8127094dc64eb889e41792fd4c2d877d5bb

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 865 KiB

After

Width:  |  Height:  |  Size: 870 KiB

Before After
Before After

@ -1 +1 @@
Subproject commit c50944e808d6c74148237e85866e893628f0fee6
Subproject commit 9948cd6025f29fad12eaf6d3b0e738dfb2b50d4a

@ -1 +1 @@
Subproject commit 31545d25c9cb41d271a3f3ef84d327708572290e
Subproject commit 0bd307ae8cc7746b433c0baf9be13dc662b47f08

2
scons

@ -1 +1 @@
Subproject commit 2d6ebcb23909058b846aa232ecb2fee497924cf8
Subproject commit 1ec93106c40fab0c339d09c7ed9897c85ddf3da5

View file

@ -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",

View file

@ -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);
}

View file

@ -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

View file

@ -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);

View file

@ -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)

View file

@ -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);