Merge branch 'master' into blender2.8
This commit is contained in:
commit
0c43567a5a
|
@ -25,7 +25,8 @@
|
|||
ARGS=$( \
|
||||
getopt \
|
||||
-o s:i:t:h \
|
||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,with-all,with-opencollada,\
|
||||
--long source:,install:,tmp:,info:,threads:,help,show-deps,no-sudo,no-build,no-confirm,use-cxx11,\
|
||||
with-all,with-opencollada,\
|
||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,\
|
||||
force-all,force-python,force-numpy,force-boost,\
|
||||
force-ocio,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
||||
|
@ -103,6 +104,11 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
|||
--no-confirm
|
||||
Disable any interaction with user (suitable for automated run).
|
||||
|
||||
--use-cxx11
|
||||
Build all libraries in cpp11 'mode' (will be mandatory soon in blender2.8 branch).
|
||||
NOTE: If your compiler is gcc-6.0 or above, you probably *want* to enable this option (since it's default
|
||||
standard starting from this version).
|
||||
|
||||
--with-all
|
||||
By default, a number of optional and not-so-often needed libraries are not installed.
|
||||
This option will try to install them, at the cost of potential conflicts (depending on
|
||||
|
@ -281,6 +287,7 @@ SUDO="sudo"
|
|||
|
||||
NO_BUILD=false
|
||||
NO_CONFIRM=false
|
||||
USE_CXX11=false
|
||||
|
||||
PYTHON_VERSION="3.5.1"
|
||||
PYTHON_VERSION_MIN="3.5"
|
||||
|
@ -492,6 +499,9 @@ while true; do
|
|||
--no-confirm)
|
||||
NO_CONFIRM=true; shift; continue
|
||||
;;
|
||||
--use-cxx11)
|
||||
USE_CXX11=true; shift; continue
|
||||
;;
|
||||
--with-all)
|
||||
WITH_ALL=true; shift; continue
|
||||
;;
|
||||
|
@ -766,7 +776,18 @@ OPENCOLLADA_REPO_BRANCH="master"
|
|||
|
||||
FFMPEG_SOURCE=( "http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2" )
|
||||
|
||||
CXXFLAGS_BACK=$CXXFLAGS
|
||||
if [ "$USE_CXX11" = true ]; then
|
||||
WARNING "You are trying to use c++11, this *should* go smoothely with any very recent distribution
|
||||
However, if you are experiencing linking errors (also when building Blender itself), please try the following:
|
||||
* Re-run this script with `--build-all --force-all` options.
|
||||
* Ensure your gcc version is at the very least 4.8, if possible you should really rather use gcc-5.1 or above.
|
||||
|
||||
Please note that until the transition to C++11-built libraries if completed in your distribution, situation will
|
||||
remain fuzzy and incompatibilities may happen..."
|
||||
CXXFLAGS="$CXXFLAGS -std=c++11"
|
||||
export CXXFLAGS
|
||||
fi
|
||||
|
||||
#### Show Dependencies ####
|
||||
|
||||
|
@ -779,7 +800,7 @@ Those libraries should be available as packages in all recent distributions (opt
|
|||
* libjpeg, libpng, libtiff, [libopenjpeg], [libopenal].
|
||||
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
|
||||
* libsqlite3, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp.
|
||||
* libsdl1.2, libglew, libglewmx.\""
|
||||
* libsdl1.2, libglew, [libglewmx].\""
|
||||
|
||||
DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES:
|
||||
|
||||
|
@ -953,7 +974,7 @@ prepare_opt() {
|
|||
|
||||
# Check whether the current package needs to be recompiled, based on a dummy file containing a magic number in its name...
|
||||
magic_compile_check() {
|
||||
if [ -f $INST/.$1-magiccheck-$2 ]; then
|
||||
if [ -f $INST/.$1-magiccheck-$2-$USE_CXX11 ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
@ -962,7 +983,7 @@ magic_compile_check() {
|
|||
|
||||
magic_compile_set() {
|
||||
rm -f $INST/.$1-magiccheck-*
|
||||
touch $INST/.$1-magiccheck-$2
|
||||
touch $INST/.$1-magiccheck-$2-$USE_CXX11
|
||||
}
|
||||
|
||||
# Note: should clean nicely in $INST, but not in $SRC, when we switch to a new version of a lib...
|
||||
|
@ -1622,6 +1643,10 @@ compile_OIIO() {
|
|||
# fi
|
||||
cmake_d="$cmake_d -D USE_OCIO=OFF"
|
||||
|
||||
if [ "$USE_CXX11" = true ]; then
|
||||
cmake_d="$cmake_d -D OIIO_BUILD_CPP11=ON"
|
||||
fi
|
||||
|
||||
if file /bin/cp | grep -q '32-bit'; then
|
||||
cflags="-fPIC -m32 -march=i686"
|
||||
else
|
||||
|
@ -2562,8 +2587,9 @@ install_DEB() {
|
|||
git libfreetype6-dev libx11-dev flex bison libtbb-dev libxxf86vm-dev \
|
||||
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
|
||||
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV \
|
||||
libopenal-dev libglew-dev libglewmx-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
|
||||
libopenal-dev libglew-dev yasm $THEORA_DEV $VORBIS_DEV $OGG_DEV \
|
||||
libsdl1.2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev"
|
||||
# libglewmx-dev (broken in deb testing currently...)
|
||||
|
||||
OPENJPEG_USE=true
|
||||
VORBIS_USE=true
|
||||
|
@ -4164,6 +4190,12 @@ print_info() {
|
|||
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES*"
|
||||
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC*"
|
||||
|
||||
if [ "$USE_CXX11" = true ]; then
|
||||
_1="-D WITH_CXX11=ON"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
fi
|
||||
|
||||
_1="-D WITH_CODEC_SNDFILE=ON"
|
||||
PRINT " $_1"
|
||||
_buildargs="$_buildargs $_1"
|
||||
|
@ -4327,3 +4359,6 @@ PRINT ""
|
|||
# Switch back to user language.
|
||||
LANG=LANG_BACK
|
||||
export LANG
|
||||
|
||||
CXXFLAGS=$CXXFLAGS_BACK
|
||||
export CXXFLAGS
|
||||
|
|
|
@ -2368,14 +2368,9 @@ Mesh *BKE_mesh_new_from_object(
|
|||
if (tmpcu->mat) {
|
||||
for (i = tmpcu->totcol; i-- > 0; ) {
|
||||
/* are we an object material or data based? */
|
||||
if (ob->matbits[i] && i >= ob->totcol) {
|
||||
tmpmesh->mat[i] = NULL;
|
||||
}
|
||||
else {
|
||||
tmpmesh->mat[i] = ob->matbits[i] ? ob->mat[i] : tmpcu->mat[i];
|
||||
}
|
||||
tmpmesh->mat[i] = give_current_material(ob, i + 1);
|
||||
|
||||
if ((ob->matbits[i] || do_mat_id_data_us) && tmpmesh->mat[i]) {
|
||||
if (((ob->matbits && ob->matbits[i]) || do_mat_id_data_us) && tmpmesh->mat[i]) {
|
||||
id_us_plus(&tmpmesh->mat[i]->id);
|
||||
}
|
||||
}
|
||||
|
@ -2392,14 +2387,9 @@ Mesh *BKE_mesh_new_from_object(
|
|||
if (tmpmb->mat) {
|
||||
for (i = tmpmb->totcol; i-- > 0; ) {
|
||||
/* are we an object material or data based? */
|
||||
if (ob->matbits[i] && i >= ob->totcol) {
|
||||
tmpmesh->mat[i] = NULL;
|
||||
}
|
||||
else {
|
||||
tmpmesh->mat[i] = ob->matbits[i] ? ob->mat[i] : tmpmb->mat[i];
|
||||
}
|
||||
tmpmesh->mat[i] = give_current_material(ob, i + 1);
|
||||
|
||||
if ((ob->matbits[i] || do_mat_id_data_us) && tmpmesh->mat[i]) {
|
||||
if (((ob->matbits[i] && ob->matbits) || do_mat_id_data_us) && tmpmesh->mat[i]) {
|
||||
id_us_plus(&tmpmesh->mat[i]->id);
|
||||
}
|
||||
}
|
||||
|
@ -2417,14 +2407,9 @@ Mesh *BKE_mesh_new_from_object(
|
|||
if (origmesh->mat) {
|
||||
for (i = origmesh->totcol; i-- > 0; ) {
|
||||
/* are we an object material or data based? */
|
||||
if (ob->matbits[i] && i >= ob->totcol) {
|
||||
tmpmesh->mat[i] = NULL;
|
||||
}
|
||||
else {
|
||||
tmpmesh->mat[i] = ob->matbits[i] ? ob->mat[i] : origmesh->mat[i];
|
||||
}
|
||||
tmpmesh->mat[i] = give_current_material(ob, i + 1);
|
||||
|
||||
if ((ob->matbits[i] || do_mat_id_data_us) && tmpmesh->mat[i]) {
|
||||
if (((ob->matbits && ob->matbits[i]) || do_mat_id_data_us) && tmpmesh->mat[i]) {
|
||||
id_us_plus(&tmpmesh->mat[i]->id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -860,7 +860,7 @@ static void write_result_func(TaskPool * __restrict pool,
|
|||
const int cfra = task_data->cfra;
|
||||
bool ok;
|
||||
/* Don't attempt to write if we've got an error. */
|
||||
if (!oglrender->pool_ok || G.is_break) {
|
||||
if (!oglrender->pool_ok) {
|
||||
RE_FreeRenderResult(rr);
|
||||
BLI_mutex_lock(&oglrender->task_mutex);
|
||||
oglrender->num_scheduled_frames--;
|
||||
|
@ -1051,6 +1051,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, const wmEvent
|
|||
switch (event->type) {
|
||||
case ESCKEY:
|
||||
/* cancel */
|
||||
oglrender->pool_ok = false; /* Flag pool for cancel. */
|
||||
screen_opengl_render_end(C, op->customdata);
|
||||
return OPERATOR_FINISHED;
|
||||
case TIMER:
|
||||
|
|
|
@ -592,6 +592,54 @@ void VIEW3D_OT_camera_to_view_selected(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
static void sync_viewport_camera_smoothview(bContext *C, View3D *v3d, Object *ob, const int smooth_viewtx)
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
for (bScreen *screen = bmain->screen.first; screen != NULL; screen = screen->id.next) {
|
||||
for (ScrArea *area = screen->areabase.first; area != NULL; area = area->next) {
|
||||
for (SpaceLink *space_link = area->spacedata.first; space_link != NULL; space_link = space_link->next) {
|
||||
if (space_link->spacetype == SPACE_VIEW3D) {
|
||||
View3D *other_v3d = (View3D *)space_link;
|
||||
if (other_v3d == v3d) {
|
||||
continue;
|
||||
}
|
||||
if (other_v3d->camera == ob) {
|
||||
continue;
|
||||
}
|
||||
if (v3d->scenelock) {
|
||||
ListBase *lb = (space_link == area->spacedata.first)
|
||||
? &area->regionbase
|
||||
: &space_link->regionbase;
|
||||
for (ARegion *other_ar = lb->first; other_ar != NULL; other_ar = other_ar->next) {
|
||||
if (other_ar->regiontype == RGN_TYPE_WINDOW) {
|
||||
if (other_ar->regiondata) {
|
||||
RegionView3D *other_rv3d = other_ar->regiondata;
|
||||
if (other_rv3d->persp == RV3D_CAMOB) {
|
||||
Object *other_camera_old = other_v3d->camera;
|
||||
other_v3d->camera = ob;
|
||||
ED_view3d_lastview_store(other_rv3d);
|
||||
ED_view3d_smooth_view(
|
||||
C, other_v3d, other_ar, smooth_viewtx,
|
||||
&(const V3D_SmoothParams) {
|
||||
.camera_old = other_camera_old,
|
||||
.camera = other_v3d->camera,
|
||||
.ofs = other_rv3d->ofs,
|
||||
.quat = other_rv3d->viewquat,
|
||||
.dist = &other_rv3d->dist,
|
||||
.lens = &other_v3d->lens});
|
||||
}
|
||||
else {
|
||||
other_v3d->camera = ob;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int view3d_setobjectascamera_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
|
@ -628,6 +676,7 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *op)
|
|||
}
|
||||
|
||||
if (v3d->scenelock) {
|
||||
sync_viewport_camera_smoothview(C, v3d, ob, smooth_viewtx);
|
||||
WM_event_add_notifier(C, NC_SCENE, scene);
|
||||
}
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, scene);
|
||||
|
|
|
@ -452,6 +452,15 @@ EnumPropertyItem *rna_TransformOrientation_itemf(bContext *C, PointerRNA *ptr, P
|
|||
}
|
||||
|
||||
/* Space 3D View */
|
||||
static void rna_SpaceView3D_camera_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
{
|
||||
View3D *v3d = (View3D *)(ptr->data);
|
||||
if (v3d->scenelock) {
|
||||
scene->camera = v3d->camera;
|
||||
BKE_screen_view3d_main_sync(&bmain->screen, scene);
|
||||
}
|
||||
}
|
||||
|
||||
static void rna_SpaceView3D_lock_camera_and_layers_set(PointerRNA *ptr, int value)
|
||||
{
|
||||
View3D *v3d = (View3D *)(ptr->data);
|
||||
|
@ -2358,7 +2367,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
|
|||
RNA_def_property_pointer_sdna(prop, NULL, "camera");
|
||||
RNA_def_property_ui_text(prop, "Camera",
|
||||
"Active camera used in this view (when unlocked from the scene's active camera)");
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_camera_update");
|
||||
|
||||
/* render border */
|
||||
prop = RNA_def_property(srna, "use_render_border", PROP_BOOLEAN, PROP_NONE);
|
||||
|
|
Loading…
Reference in New Issue