Commit Graph

67189 Commits

Author SHA1 Message Date
Sybren A. Stüvel
8fe3f47596 Alembic: more lenient check on absence of sheer & homogeneous scaling
Checking precise values of floats is not a good idea.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
a9504580b3 Alembic: simplified conditional statements 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
997ff4bdc4 Alembic import: nicer progress updates 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
d1696622b7 Alembic import: fixed bug where local matrix from Alembic was used as object matrix
Also renamed AbcObjectReader::readObjectMatrix to
setupObjectTransform, as it does more than just reading the object
matrix; it also sets up an object constraint if the Alembic Xform is
animated.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
818ee188e7 Alembic import: separated reading matrix and getting the appropriate Xform object
Also added a bit better error reporting, instead of silently ignoring
invalid Alembic data.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
e4367ccb78 Alembic import: be more lenient towards unknown object types.
Alembic is an interchange and caching format, that can contain custom
object schemas. Blender shouldn't crash (because of failing asserts) just
because it doesn't know such an object type.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
aba7759992 Alembic: don't call object.getFullName() multiple times. 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
2c688bac19 Alembic: Renamed parent_map to reader_map
It's a mapping from full path of an Alembic object to an AbcObjectReader*.
The fact that at some point it is used to construct parent-child relations
doesn't matter.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
152ec791ad Alembic: use typedefs to make it easier to handle maps/vectors 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
85672d29f2 Alembic: more const-ness 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
02d6df80aa Alembic: fixed importer
The importer was guessing whether an Alembic IXform object was part of a
child object, or should be represented as an Empty in Blender. By reversing
the order in which objects are visited, the children can now claim their
parent as part of the same object (so IPolyMesh claims its parent IXform
as part of the same Blender object). This results in much less guesswork.

I've also removed similar guesswork from the code that sets parent pointers,
by simply searching for the parent in a hierarchical way, instead of trying
to predict (again) which IXforms were turned into empties.

Also, visit_object() now actually visits the object -- previously it only
visited its children, and assumed the object it was called on was already
handled by a previous call.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
76ca6ed26e Alembic: prevent a couple of unnecessary multiplications 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
e0bf97d8b4 Alembic: be more explicit in y-up versus z-up variables. 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
06c25ace7b Alembic: removed a lot of unnecessary & duplicate code from abc_util.cc
create_transform_matrix(float[4][4]) did mostly the same as
create_transform_matrix(Object *, float[4][4]), but more elegant.
However, the former has some inconsistencies with the latter (which
are now merged and made explicit, turned out one was for z-up→y-up
while the other was for y-up→z-up), and was renamed to
copy_m44_axis_swap(...) to convey its purpose more clearly.

Furthermore, "loc" has been renamed to "trans", as matrices don't
store locations but translations; and more variables now have a src_
or dst_ prefix to denote whether they contain a matrix/vector in the
source or destination axis orientation.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
1c3b6e042a Alembic: added note 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
b0967e9d42 Alembic: allow copy_{z,y}up_from_{y,z}up() to be called with yup=zup
This allows in-place conversion between z-up and y-up, by passing the
same variable to both arguments.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
00e0a94b3c Alembic: import empties under their own name in Alembic, not their parent's
Before this commit something strange happened, as the m_data_name of
an inherit data-less object was used.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
cbe0709db2 Alembic: Don't compute world matrix when it's not necessary. 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
62a47f9660 Alembic: cleaned up hack in AbcObjectReader::read_matrix() 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
347a4956a0 Alembic: added some clarification 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
c0ec0a19da Alembic: added some getter functions to help debug prints etc. 2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
5f23f5b516 Alembic: do not presume to predict the parent name
AbcExporter::createTransformWriter() tries to predict the parent Xform
name, but if it cannot be found has multiple ways of creating it, possibly
under a different name than originally searched for.
2017-04-06 16:04:31 +02:00
Sybren A. Stüvel
56cfd3d5a7 Alembic: Removed AbcTransformWriter::m_parent
It was set, but never read anywhere.
2017-04-06 16:03:59 +02:00
Sergey Sharybin
ae76a90593 Buildbot: Correct previous release
Seems CMake is not happy about changing compiler from script.
2017-04-06 11:39:06 +02:00
Sergey Sharybin
97300a3beb Buildbot: Force build environment to use latest GCC 2017-04-06 11:21:07 +02:00
Campbell Barton
f74b4a010d Cleanup: function naming for manipulator
Rename 'stats_*' to 'protectflag_to_drawflags_*' (was too vague).
Also remove NULL check from gimbal_axis
2017-04-06 12:26:07 +10:00
Campbell Barton
5e3b6e951b Cleanup: minor changes to transform-manipulator
Match stats_editbone & stats_pchan behavior to avoid confusion.
2017-04-06 12:02:32 +10:00
lazydodo
7ae9d092d0 Fix alembic build error with MSVC 2017-04-05 10:59:29 -06:00
Sergey Sharybin
f921442a44 Depsghraph: Remove unused function 2017-04-05 15:36:17 +02:00
Sergey Sharybin
52029e689c Cycles: Fix race condition in attributes creation during SVM compilation 2017-04-05 14:57:54 +02:00
Sergey Sharybin
3ce30823ff Cycles: Add utility class to simplify scoped spin locks 2017-04-05 14:57:34 +02:00
Sergey Sharybin
424901ad7b Cycles: Guard global write access in SVM compilation code 2017-04-05 14:21:49 +02:00
Sergey Sharybin
e4c5441286 Locales: Some optimization work
Mainly visible for MSVC debug builds and gives about 2x speedup.
2017-04-05 11:25:58 +02:00
Bastien Montagne
8647d5af90 InstallDeps: Raise minimal & official version of OIIO to 1.7.13.
As requested by @sergey.
2017-04-05 09:26:41 +02:00
Kévin Dietrich
6d55dcf4dd Alembic: addition of a simple logging class.
The idea is to have a system where we properly log error messages and
let the users know that errors occured redirecting them to the console
for explanations. This is only implemented for the exporter since the
importer already has similar functionalities; however they shall
ultimately be unified in some way.

Reviewers: sybren, dfelinto

Differential Revision: https://developer.blender.org/D2541
2017-04-05 04:56:38 +02:00
Campbell Barton
411e7abe94 Cleanup: redundant casts 2017-04-05 01:08:19 +10:00
Bastien Montagne
9170e49250 Fix missing protection of RNA_pointer_as_string() against NULL pointers.
Odd that issue was never reached before? Looks like it hit in
datablock_idprops branch though...
2017-04-04 16:04:13 +02:00
Sergey Sharybin
92aeb84fde Cycles: Tag shaders for update after the threading part is over
This avoids write access happening in non-atomic manner in
Shader::tag_update which modifies the global managers. Even
for 1 byte data types it's quite dangerous.
2017-04-04 15:43:12 +02:00
Sergey Sharybin
7b149bfde6 Depsgraph: Use atomic operation to tag the changed ID 2017-04-04 15:43:12 +02:00
Sergey Sharybin
5ce95df2c6 Cycles: Fix uninitialized memory access when comparing curve mapping nodes
The issue is coming from the fact that float3 is actually 16 bytes aligned
data type and the "padding" was not initialized. This caused memcmp() to
access non-initialized memory.
2017-04-04 15:43:12 +02:00
Sybren A. Stüvel
a63a31dd12 install_deps: removed leftover compile_HDF5 command
It was a leftover from when Alembic with HDF5 was still officially
supported.
2017-04-04 14:50:58 +02:00
Sybren A. Stüvel
8a60d84327 Bumped Alembic library version to 1.7.1
This provides us with a clearer API (so I don't have to use const_cast<>
in upcoming code). It also allows layering of different Alembic files,
so you can have a base file and load a separate file containing overrides.

Verbally approved by Dr. Sergey.
2017-04-04 12:55:38 +02:00
Sergey Sharybin
ffac92e385 Buildbot: Update master config 2017-04-04 12:52:54 +02:00
Sybren A. Stüvel
b93ddfd8ac Alembic: force ALEMBIC_LIB_USES_BOOST=ON when not using C++11
Alembic requires one of ALEMBIC_LIB_USES_BOOST, ALEMBIC_LIB_USES_TR1, or
C++11, and silently defaults to the latter if the former two are OFF.

Before this change, Alembic was only built without C++11 of OpenEXR
was built at the same time. This dependency was both unnecessary and
undocumented.
2017-04-04 12:41:44 +02:00
Sergey Sharybin
ca5ccf5cd4 Task: Remove non-atomic pool suspended flag assignment
This was done some lines above by atomic fetch and and.
2017-04-04 12:32:15 +02:00
Sergey Sharybin
4f7eb3ad12 Buildbot: Update master config 2017-04-04 12:15:35 +02:00
Sergey Sharybin
728f75c6a7 Buildbot: Some more twqeaks to master config 2017-04-03 15:51:31 +02:00
Sergey Sharybin
e741804ce3 Buildbot: Update bundled vetrsion of server configuration 2017-04-03 15:36:52 +02:00
Sergey Sharybin
cc93a66e71 Buildbot: SPecial branch trickery for linux slaves 2017-04-03 15:04:16 +02:00
Sergey Sharybin
2aa0215ec5 Point all submodules to master branch
This way it should be safe to use `git submodule update --remote`.
2017-04-03 14:54:51 +02:00