Commit Graph

67442 Commits

Author SHA1 Message Date
Campbell Barton
97c9c6a3f3 Fix T51149: Joining curves allows 2D curves in 3D 2017-04-15 16:55:08 +10:00
Germano Cavalcante
00ad259939 Object.raycast: error in previous commit
This is taking longer than I expected.
2017-04-15 02:31:33 -03:00
Germano Cavalcante
34ea8058b9 Fix: Object.raycast: error to free treedata 2017-04-15 02:24:04 -03:00
Germano Cavalcante
97d2f63bfe Object.raycast: Also test distance from BoundBox
If `isect_ray_aabb_v3_simple` provides this information, why not take advantage of it?
2017-04-15 01:31:24 -03:00
Germano Cavalcante
480473f1f1 Object.raycast: Test the hit on the BoundBox first
This avoids the unnecessary creation of bvhtree, which can be highly inefficient in some cases
(for example: in the `operator_modal_view3d_raycast.py` template)
2017-04-15 00:44:05 -03:00
Jens Verwiebe
718fb3167d Fix Player stubs (tm) 2017-04-15 01:09:44 +02:00
e280c70aa9 Fix T51216: SSAO attenuation not being scale invariant.
Unfortunately this does break compatibility in that the viewport will look a
bit different depending on the settings, but the old behavior was simply not
usable for higher distances.
2017-04-15 00:43:22 +02:00
Sybren A. Stüvel
5fa4f397c2 Alembic import: fixed dupligroup export when the dupli-empty has a parent 2017-04-14 18:20:28 +02:00
Sybren A. Stüvel
4d117f2fd2 Alembic export: fixed flattened dupligroup import 2017-04-14 18:20:28 +02:00
Alexander Romanov
78b5d66af8 Object Info node support for GLSL mode and the internal render
Object Info node can be useful to give some variation to a single material assigned to multiple instances. This patch adds support for Viewport and BI.

{F499530}

Example: {F499528}

Reviewers: merwin, brecht, dfelinto

Reviewed By: brecht

Subscribers: duarteframos, fclem, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov

Differential Revision: https://developer.blender.org/D2425
2017-04-14 18:15:57 +03:00
6fc7521ade Fix T49429: incorrect Blender internal viewport border render with DrawPixels method. 2017-04-14 16:26:10 +02:00
Sybren A. Stüvel
e12c311002 Alembic import: greatly improved curve/hair import performance
The U-resolution of the imported curves was kept at the default value
of 12, which is way too high for imported hair. We export hair at a
fairly high resolution already, so it's not needed to subdivide even
further when importing.

Of course this may have an impact on other curves that do require this
U-resolution to be higher. In that case the resolution can be
increased after importing.

I removed the default nu->orderu = num_verts, as that allowed every
point to influence the entire spline, which was more expensive for the
CPU, and unlikely to be needed. The orderu computations had off-by-one
errors in the curve importer, which are now also fixed. The correct
values are:

    - Linear: orderu = 2
    - Quadratic: orderu = 3
    - Cubic: orderu = 4

These values are also what is stored in the Alembic file for curves of
type kVariableOrder, according to the reference Maya exporter
maya/AbcExport/MayaNurbsCurveWriter.cpp, function
MayaNurbsCurveWriter::write(), in the Alembic source code.

The result is a frame rate increase of roughly 100x (tested with one
100-hair test on one machine, so take with grain of salt).
2017-04-14 15:26:45 +02:00
Sybren A. Stüvel
6af131fa5c Added simple unittests for Alembic exporter
This test checks that a set of cubes are exported with the correct
transform, both with flatten=True and flatten=False.

This commit also adds an easy to use superclass for upcoming Alembic
unit tests.
2017-04-14 12:54:20 +02:00
Campbell Barton
0b55b8cc6a Cleanup: triple quotes for docstrings 2017-04-14 20:01:43 +10:00
Campbell Barton
6a8a679037 BLF: avoid glyph cache use-after free
Causes crash if the font size isn't set after clearing (see T51200)
2017-04-14 19:54:09 +10:00
Sergey Sharybin
7cfabcef5c Buildbot: Fix typos 2017-04-14 10:03:51 +02:00
Sergey Sharybin
b354c15805 Buildbot: Attempt to fix CUDA compilation on OSX
Stupid toolkit is really fragile about CLang version.
2017-04-14 10:01:28 +02:00
Aaron Carlisle
ac880b67c3 UI: Add/Improve a few tooltips
See T51061
2017-04-13 18:07:50 -04:00
Sybren A. Stüvel
3906e5939a Alembic export: unified code of exploreTransform and exploreObject. 2017-04-13 16:34:37 +02:00
Sybren A. Stüvel
ebb3045114 Alembic export: added support for writing dupli-groups
This supports our common character animation workflow, where a character,
its rig, and the custom bone shapes are all part of a group. This group
is then linked into the scene, the rig is proxified and animated. Such
a group can now be exported. Use "Renderable objects only" to prevent
writing the custom bone shapes to the Alembic file.
2017-04-13 16:34:37 +02:00
Luca Rood
0a032ce83b Fix Surface Deform crash with missing or freed DM 2017-04-13 15:40:50 +02:00
Sergey Sharybin
360cf8393a Cycles: Make vectorized types constructor from register explicit
This is not a cheap operation which we dont' want to happen silently.
2017-04-13 15:08:00 +02:00
Sergey Sharybin
e6392458d3 Cycles: Remove unused function
It was quite wrong actually by doing some __m128 to flaot4 round trips.
2017-04-13 15:08:00 +02:00
Sybren A. Stüvel
0706b908db Alembic import: fixed off-by-one error in start/end frame
static_cast<int> truncates, so a computed end frame of 99.999999999998
would result in 99, instead of the correct 100.
2017-04-13 14:50:02 +02:00
Sergey Sharybin
575d6415fb Task scheduler: Fix typo in TLS for pools created from non-main thread
Did a mistake which started to use same TLS for all threads for such pools.

Also added some extra asserts to help catching the bugs.
2017-04-13 13:34:07 +02:00
Bastien Montagne
544df54f3c Fix Blenderplayer (c) 2017-04-13 12:36:19 +02:00
Alexander Romanov
f5bc8ad4ce Add red alert in UI controls for datablock pointer properties 2017-04-13 12:59:04 +03:00
Alexander Romanov
a7b3047cef Datablock ID Properties
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.

In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.

Original author: @artfunkel

Alexander (Blend4Web Team)

Reviewers: brecht, artfunkel, mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne

Maniphest Tasks: T37754

Differential Revision: https://developer.blender.org/D113
2017-04-13 12:33:05 +03:00
Sergey Sharybin
f90a243d9c Cycles: Header cleanup in BVH: move self header to be the first one
This makes us more sure that header files are more self-sufficient.
2017-04-13 11:28:02 +02:00
Sergey Sharybin
0097f9b298 Cycles: Split BVH implementations into separate files 2017-04-13 10:55:46 +02:00
Sergey Sharybin
c8548871ac Cycles: Use more explicit and commonly used names for BVH structures
This renames BinaryBVH to BVH2 and QBVH to BVH8. There is no user measurable
difference, but allows us to add more types of BVH trees such as BVH8.
2017-04-13 10:29:14 +02:00
Sergey Sharybin
ed5c3121f5 Task scheduler: Prevent race condition for the pools created from non-main thread
We can not re-use anything for such pools, because we will know nothing about whether
the main thread is sleeping or not. So we identify such threads as 0, but we don't
use main thread's TLS.

This fixes dead-locks and crashes reported by Luca when doing playblasts.
2017-04-12 18:20:17 +02:00
Sybren A. Stüvel
699a3e2498 Fix T50227: Alembic uv export/load issue
Previously only a CD_MLOOPUV custom data layer was created. Now we also
create the accompanying CD_MTEXPOLY layer too.
2017-04-12 16:33:47 +02:00
Sergey Sharybin
6b815ae55d Fix T51184: Crash of Blender when I try to join an object with one that has booleans modifiers 2017-04-12 16:12:50 +02:00
Sybren A. Stüvel
642728b339 Alembic export: fixed exporting as "flat"
This exports all objects in world coordinates without parenting.
2017-04-12 12:21:08 +02:00
Sybren A. Stüvel
de3c98d62b Alembic export: removed superfluous export_object() check.
The exploreTransform() function already does this check, and the check
isn't necessary when the object type isn't exported anyway.
2017-04-12 12:21:00 +02:00
Campbell Barton
4560f0b007 Cleanup: use lowercase gpu prefix for static funcs
This was mostly followed already.
2017-04-12 20:19:55 +10:00
Sergey Sharybin
c29bc61829 Color management: Avoid memory copy into same buffer 2017-04-12 10:23:38 +02:00
Campbell Barton
0ebe08af34 Docs: minor improvement to code example 2017-04-12 14:21:59 +10:00
raa
31bdb31ecf Fix: width of UILayout.prop_enum() buttons 2017-04-11 13:25:46 +03:00
Mai Lavelle
d097c72f81 Cycles: Only calculate global size of split kernel once to avoid changes
Global size depends on memory usage which might change during rendering.
Havent seen it happen but seems possible that this could cause the global
size to be different than what was used for allocating buffers.
2017-04-11 03:26:18 -04:00
Mai Lavelle
1e6038a426 Cycles: Implement automatic global size for CUDA split kernel
Not sure this is the best way to do things for CUDA but its much better than
being unimplemented.
2017-04-11 03:11:18 -04:00
Campbell Barton
3722da3b4e Cleanup: quiet harmless but annoying overflow
Caused asan to print warnings generating RNA
2017-04-11 11:49:21 +10:00
Campbell Barton
532b2786e2 Remove redundant glColor call 2017-04-11 10:47:00 +10:00
Lukas Stockner
ef816f9cff Cycles: Fix the AO replacement option in the split kernel
Currently the code for it was inside the hair-specific part, so it wouldn't be enabled in hairless renders.
2017-04-11 01:07:49 +02:00
Aaron Carlisle
8b0fbb909b UI: Add missing UV tools in the UV/Image Editor Window > Tools tab
Original Author: @xrg
Changes By @blendify

Image of patch: {F284237}
2017-04-10 18:37:03 -04:00
Aaron Carlisle
8ac7510a4d UI: Do not put walk navigation settings inside an if statement
The issue here is that the preferences are still used because both can be accessed from the 3D View, view menu. In the future, it is likely that the old mode will be removed (maybe 2.8?) but for now we want to keep both operational.

Differential revision: https://developer.blender.org/D2320
2017-04-10 17:44:03 -04:00
Bastien Montagne
2ad1124372 Fix stereoscopic camera volume drawing.
Not sure how we got to that point, but code was drawing twice one side
of the camera volume, and not at all another side!
2017-04-10 17:31:39 +02:00
Sergey Sharybin
c8e764ccbf Cycles: Fix race condition in shader attribute for real now
Ended up moving lock in the more centralized space since multiple shaders
can access this map.
2017-04-10 16:53:01 +02:00
Bastien Montagne
fd203a0933 GPencil 2D drawing code: minor optimization.
Do not recompute both points's 2D coordinates for each segments, we can
copy over from previous one... Does not gives any measurable speedup off
hands, though.
2017-04-10 16:30:05 +02:00