Commit Graph

60617 Commits

Author SHA1 Message Date
Campbell Barton
d6ebf72f9f Fix for building with OpenSubdiv 2015-07-24 17:11:50 +10:00
Campbell Barton
dc6153453a Cleanup: comments (remove outdated & update) 2015-07-24 16:59:39 +10:00
Martijn Berger
7f32601159 PyAPI: update bgl to OpenGL 3.3
Adds (currently unused) deprecated option
so we can remove support for older API versions.
2015-07-24 16:48:40 +10:00
Campbell Barton
07fa1b49d9 parenthisize macro args to avoid errors 2015-07-24 15:53:52 +10:00
Joshua Leung
8d237503c5 Compile Fix: setenv() is not defined for mingw either 2015-07-24 15:08:43 +12:00
Joshua Leung
20d516dc35 Fix: Autokeying of buttons doesn't work on NLA Strip properties 2015-07-24 14:20:16 +12:00
Joshua Leung
15cb94c65a Fix: NLA Strip properties cannot be keyframed if Visual Keying/Only Needed options are enabled 2015-07-24 14:20:15 +12:00
Campbell Barton
ea3dae74d8 Cleanup: remove redundant __doc__ from bgl 2015-07-24 09:45:25 +10:00
Campbell Barton
3b362950e9 Cleanup: move defines inside bgl C source
- remove number-of-args arg from BGL_Wrap.
- use doxy groups.
2015-07-24 09:35:39 +10:00
Antony Riakiotakis
b8481f4683 Minor cleanup - use integers for counters. 2015-07-23 23:21:19 +02:00
Antony Riakiotakis
0c0db92d7a Sculpt Tiling Feature
Adds 3D-Tiling options to the sculpt tool. This is very similar to the
symmetry options in the sense that it replicates the strokes. For tiling
this replication happens with a linear offset to fill the whole object
along one or more axis.
This allows to create geometry that can be tiled seamless. One use case
is the creation of tileable textures by sculpting high resolution
geometry and then rendering it with an orthographic camera to create
maps for diffuse, normal, etc

Notes:

Patch by Tilman Blumhagen with minor changes (move tile flags to paint
symmetry flags).

After some feedback from artists, leaving tiling value to constant
offset, though I suspect that some method that uses the object
bounding box dynamically might be good to have too. It can
be added later though :)

Thanks a lot for the patch!

Patch: D1426
2015-07-23 22:52:27 +02:00
Campbell Barton
36630b7e85 Fix memory leaks mesh w/ mesh remapping 2015-07-24 05:04:33 +10:00
Antony Riakiotakis
d47e565598 Subsurf: Optimize edge drawing, now it uses VBOs.
Also the refactor exposed an error where we requested too much
memory from the video memory in general for all mesh types.

Now we are back to normal :)
2015-07-23 20:02:57 +02:00
Sybren A. Stüvel
b3ac7c07ff Added NlaStrip.fcurves.find(data_path, array_index=0)
This is the same as D1427 / 89e5c756665c1e7e622ddbd5deece0dda4ce7724
except for NlaStrip.fcurves instead of Action.fcurves. It makes finding
a specific fcurve in Python much easier, as you don't need a Python-side
loop any more.

Reviewers: aligorith

Reviewed By: aligorith

Differential Revision: https://developer.blender.org/D1430
2015-07-23 15:38:25 +02:00
Tamito Kajiyama
0e2bbd0904 Freestyle: Fix for round/square stroke caps causing line thinning.
This is a regression introduced in rBce729677db3e and rBb408d8af31c9.

RoundCapShader and SquareCapsShader had to remove (almost) overlapping
stroke vertices to avoid sudden thinning of line thickness.  For instance,
the test .blend file from https://developer.blender.org/T36425#231460
suffered from the reported line thinning (although T36425 was originally
caused by a different bug).
2015-07-23 20:29:23 +09:00
Sergey Sharybin
6ee2f79f33 Cycles: Previous commit broke compilation on Windows
Apparently MSVC doesn't have setenv() function.
2015-07-23 12:53:23 +05:00
Sergey Sharybin
1788293a01 Fix T45381: Crash Blender 2.75 in Win7 x64 AMD card
Previous fix didn't work well enough because on Windows Python has different
environment than Blender ans setting variables in there made no effect from
Blender point of view.
2015-07-23 12:10:38 +02:00
Campbell Barton
cc5d48e8dd Use looptri for sampling UV's in smoke.c
D1424 by @scorpion81
2015-07-23 20:08:26 +10:00
Sergey Sharybin
253f416a36 Fix regression of custom nodes not triggering material preview re-render
Issue was introduced in b0df196.It's not the nicest ever solution but it's
quite close to be as nice as we can do it with current custom nodes and
notifier system design.
2015-07-23 11:50:13 +02:00
Sergey Sharybin
08fbc303e1 Cycles: Resolve compilation error of avx2 kernel with certain compilers
It was redefined macro happening with Clang 3.6 here.
2015-07-23 11:48:54 +02:00
Sergey Sharybin
4be7fb7651 ImBuf: Fix OpenExr leaking memory when reading file with IB_test flag 2015-07-23 09:11:26 +02:00
Campbell Barton
b6cf4f777d Use looptri for smoke collisions & particle edit 2015-07-23 17:07:14 +10:00
Campbell Barton
5c98848895 Use looptri for RNA BVH functions 2015-07-23 15:40:47 +10:00
Campbell Barton
6aabc1bde4 Cleanup; duplicate header 2015-07-23 15:40:47 +10:00
Campbell Barton
0a249f9853 Cleanup: arg names 2015-07-23 15:17:26 +10:00
Campbell Barton
abbd82a504 Use looptri for mesh remapping 2015-07-23 15:10:12 +10:00
Campbell Barton
8155d25d39 Utility function to get poly -> looptri mapping 2015-07-23 15:08:27 +10:00
Campbell Barton
60822ec183 Use looptri for BVH raycast (simple cases) 2015-07-23 14:41:09 +10:00
Campbell Barton
717046ad2a Use looptri for volume snapping 2015-07-23 14:41:09 +10:00
Campbell Barton
748899a50a Missed adding BVH callbacks in recent commit 2015-07-23 14:41:09 +10:00
Campbell Barton
0bf2b207e2 Add missing break checking for tangents 2015-07-23 11:51:03 +10:00
Campbell Barton
368bd34573 Mesh Deform: support for ngons when binding
Weights were calculated using tessellation data, giving slightly uneven weighting.
Now only use tessellation for ray-cast but weight the influences from the original polygons.

Also cache arrays from derived-mesh, they we're called each intersection.
2015-07-23 11:30:47 +10:00
Antony Riakiotakis
0b7d0f913d Fix weight painting + mask not drawing in latest master.
Same issue as vertex painting - though one might wonder if we really
need to set material on such occasions.
2015-07-22 16:58:18 +02:00
Antony Riakiotakis
0795f62ddf GPU debug: Only flush stderr if needed. 2015-07-22 13:57:57 +02:00
Campbell Barton
5983280b4f Use looptri for MeshDeform modifier 2015-07-22 21:40:45 +10:00
Campbell Barton
b604d5ade0 Add bvhtree_from_mesh_looptri utility function 2015-07-22 21:40:45 +10:00
Campbell Barton
b305041ce6 Add DM_get_looptri_array utility function 2015-07-22 21:40:41 +10:00
Campbell Barton
a6f00bb75c Use doxy sections in bvhutils 2015-07-22 21:32:14 +10:00
Campbell Barton
df41f7bf4f Use const for BVH mesh arrays 2015-07-22 21:32:14 +10:00
Campbell Barton
f9a6780dc6 Cleanup: use struct for storing callback data 2015-07-22 21:32:14 +10:00
Sergey Sharybin
75d1723518 OpenSubdiv: Optimize speed of topology refiner construction
Now the conversion code uses mesh element mapping to speed up lookups.
Gives really nice speed improvement here, but the cost is higher memory
usage during refiner construction.

On the dragon scene here topology refiner construction time goes down
from 5 seconds to around 0.01.

It's possible to reduce the memory footprint by allocating mapping in
stages (don't allocate all of them at once, but do it on demand only
and free them after they're not needed anymore).
2015-07-22 12:51:10 +02:00
Sergey Sharybin
461340525e OpenSubdiv: Resolve crash when trying to do weight mcol 2015-07-22 12:01:38 +02:00
Bastien Montagne
945f32e66d Fix crash with recent refactor of customdata writing.
Caused by own rBff3d535bc2a6309 - since we now only write the exact amount of layers
needed to store saved customdata, we have to adjust CustomData->maxlayer too.

Otherwise, on next read, customdata code believes it has more layers allocated than
actual number.

Issue reported by Campbell over IRC, thanks.
2015-07-22 11:58:18 +02:00
Campbell Barton
cf6002737d Don't make Python classes of StructRNA on startup
This gives small start time speedup, classes are lazy loaded instead.

Keep existing behavior in debug builds to catch any errors early.
2015-07-22 19:51:03 +10:00
Sergey Sharybin
3dd8f287e1 Render preview: Make preview render database lazily loaded
Gives about 5-10% of startup time improvement here.
2015-07-22 11:25:21 +02:00
Sybren A. Stüvel
ec8b7edf53 Fix: solved issue with "make doc_py"
The error was "ValueError: Function <function normal_at_I0D at 0x7f2aad1feb70>
has keyword-only arguments or annotations, use getfullargspec() API which can
support them", and was first seen in eeeb845d33e81afbc8ed127e6ab4ae7b18472a54
2015-07-22 10:31:31 +02:00
Sergey Sharybin
e3461a02ac Fix T43779: Cycles texture interpolation issues
That was basically not an issue with interpolation, but rather missing wrapping
options and periodic wrapping was always used.

It's still a bit questionable why certain graphics cards were doing clamping in
the file from the report, that's not something what is expected to happen from
the settings of textures being passed to GPU. In any case this issue i still
didn't manage to reproduce on any of the available GPUs, might be something
related on driver glitch or so.

In any case CPU now should behave just fine, rest of the issues we'll need to be
able to reproduce first.
2015-07-21 22:13:25 +02:00
Sergey Sharybin
f2c54df625 Cycles: Expose image image extension mapping to the image manager
Currently only two mappings are supported by API, which is Repeat (old behavior)
and new Clip behavior. Internally this extension is being converted to periodic
flag which was already supported but wasn't exposed.

There's no support for OpenCL yet because of the way how we pack images into a
single texture.

Those settings are not exposed to UI or anywhere else and there should be no
functional changes so far.
2015-07-21 21:58:19 +02:00
Sergey Sharybin
dc3563ff48 Cycles: Implement camera zoom motion blur
Works totally similar to camera motion blur and majority of the changes are
related on just passing extra arguments to sync() functions.

Couple of things still to look into:

- Motion pass will not include motion caused by the zoom.
- Only perspective cameras are supported currently.
- Motion is being interpolated on projected coordinates, which might give
  different results from constructing projection matrix from interpolated
  field of view.

  This could be good enough for us, but we need to consider improving this
  at some point.

Reviewers: juicyfruit, dingto

Reviewed By: dingto

Differential Revision: https://developer.blender.org/D1383
2015-07-21 17:40:03 +02:00
Antony Riakiotakis
1df42798d4 Try to remap buffer before rejecting.
I suspect code here can be cleaned up but for now try this.
Alternatively we can check for errors around buffer allocation
but this needs bigger changes.
2015-07-21 16:41:13 +02:00