Blender Git Commits

Blender Git commits from all branches.

Page: 1836 / 2888

February 24, 2017, 15:40 (GMT)
Innitial commit: Snap system - Adds Clip Plan support and simulates occlusion

The main alterations here were made in the transform_snap_object.c file.
The main change add the "clip plans" of the `rv3d->clip` to bypass the snap to unseen elements. This solution continues to take advantage of the BVH.

Since we can use clip planes, we can now simulate occlusion (ie ignore what is behind a face), first a raycast is made to get the normal and coordinates of the polygon of the hit. Then a plane is created just behind the polygon, thus ignoring everything that is behind it when a snap is made for vertex or edge.

This is not the ideal occlusion solution, but it is already a good step to get the perfect occlusion test.

In addition to this change other changes were made:

Now snap_to is a flag that can indicate whether the snap is made for one, two or all elements at the same time (this will not change much for the user, the only operator using mixed snap is the ruler) ;
if the object is in wireframe mode or Bounding Box, they are ignored in snap to face (good idea?);
use the BVHTree of looptris to snap vertices and edges (saves memory);
February 24, 2017, 15:35 (GMT)
Alembic: simplified conditional statements
February 24, 2017, 15:35 (GMT)
Alembic import: nicer progress updates
February 24, 2017, 15:35 (GMT)
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.
February 24, 2017, 15:35 (GMT)
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.
February 24, 2017, 15:35 (GMT)
Alembic import: don't crash on instances

Importing instances (i.e. Alembic objects that reference instance
sources rather than contain data for themselves) isn't supported yet, but
with this change at least it doesn't crash Blender.
February 24, 2017, 15:35 (GMT)
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.
February 24, 2017, 15:35 (GMT)
Alembic: don't call object.getFullName() multiple times.
February 24, 2017, 15:35 (GMT)
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.
February 24, 2017, 15:35 (GMT)
Alembic: use typedefs to make it easier to handle maps/vectors
February 24, 2017, 15:35 (GMT)
Alembic: more const-ness
February 24, 2017, 15:35 (GMT)
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.
February 24, 2017, 15:35 (GMT)
Alembic: prevent a couple of unnecessary multiplications
February 24, 2017, 15:35 (GMT)
Alembic: be more explicit in y-up versus z-up variables.
February 24, 2017, 15:35 (GMT)
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.
February 24, 2017, 15:35 (GMT)
Alembic: added note
February 24, 2017, 15:35 (GMT)
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.
February 24, 2017, 15:35 (GMT)
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.
February 24, 2017, 15:35 (GMT)
Alembic: Don't compute world matrix when it's not necessary.
February 24, 2017, 15:35 (GMT)
Alembic: cleaned up hack in AbcObjectReader::read_matrix()
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021