Commit Graph

53331 Commits

Author SHA1 Message Date
Brecht Van Lommel
bd03e4cfe8 Cycles volume: detect homogeneous volume automatically in common cases.
In practice this means that if you don't connect a texture to your volume nodes
it will figure that out and render the node faster, rather than you having to
specify it manually.

Main weakness is custom OSL nodes where we have to assume it is heterogeneous
because we don't know what kind of data the node accesses.
2014-04-03 22:13:05 +02:00
Sv. Lockal
ab32a1807d Cycles: SSE optimization for Voronoi cells texture
Gives 5-6% speedup for Caterpillar_PatazStudio.blend.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D419
2014-04-03 23:35:10 +04:00
Sv. Lockal
c019ae5ea3 I18N: add missing lines
Reviewed By: mont29

Differential Revision: https://developer.blender.org/D328
2014-04-03 22:49:27 +04:00
Sv. Lockal
e7c2578576 Cycles: avoid 1.0f/(1.0f/x) divisions, which msvc (only) can't optimize.
This makes bmw scene in msvc 12 builds 6% faster.
It also gives a minor speedup for SSE hair in all compilers.
2014-04-03 22:08:53 +04:00
Brecht Van Lommel
5e5ec4c138 Fix T39577: cycles issue mixing anisotropic BSDFs with branched path tracer. 2014-04-03 15:59:39 +02:00
Sergey Sharybin
0102d57c1d Slide mask spline segment to define it's curvature
This actually implements the idea used in Gimp which is grabbing
an arbitrary point on the spline and dragging it, ensuring spline
goes over this point. This is really useful way to tweak spline
curvature.

Currently only affects on a closest handle, meaning no weighting
on changes for both handles which are adjacent to the same segment
will happen just yet,

Another limitation is that currently such a slide is a big jumpy
when you start sliding. This is because projection is not used
to calculate u value because projection used to fail a lot for
me here and didn't find a nice solution for this yet. But this is
to be improved for sure!
2014-04-03 18:20:17 +06:00
Campbell Barton
0ebade55fc Fix T37509: regression in smart-uv island orientation 2014-04-03 22:03:53 +11:00
Campbell Barton
5770d691bb Optimize BLI_convexhull_aabb_fit_hull_2d, avoid atan2, sin, cos
add utility functions for using a 2d unit vector as a rotation matrix
mul_v2_v2_cw & mul_v2_v2_ccw
2014-04-03 21:47:03 +11:00
Campbell Barton
51abc2becd Fix for T39537 wasn't complete, buttons in popups remained unset. 2014-04-03 20:49:40 +11:00
Campbell Barton
d5ce2b5466 Fix T39567: simple deform modifier error 2014-04-03 18:57:37 +11:00
Bastien Montagne
0e3e4c90b1 Fix build for BSD (broken by own 35747ee3d5).
Reported by Shane Ambler, thanks!
2014-04-03 09:21:05 +02:00
Campbell Barton
9bbb30bf03 Fix T39245: Crash when dynamic topology is enabled
Redundant decrement was crashing for systems which didnt optimize it out.
2014-04-03 17:13:31 +11:00
Campbell Barton
5873160242 Code cleanup: strict flags for bmesh_log 2014-04-03 17:13:31 +11:00
Tamito Kajiyama
75c0ced840 Freestyle: Fix for debug information about sweep line intersection detection.
Vertices of two edges were swapped by mistake.  Also fixed indentation and added
a couple of debug prints to make it easier to visualize the lines using Matlab.
2014-04-03 14:59:19 +09:00
Antony Riakiotakis
c6d85407d4 Forgotten to add this on last commit. This would cause dyntopo to always
refresh all its nodes if show diffuse was on.
2014-04-03 04:03:46 +03:00
Campbell Barton
dd54b721c6 Add load_ui to WM_OT_read_homefile
Useful for implementing templates.

Patch D423 by Gaia Clary
2014-04-03 11:29:45 +11:00
Campbell Barton
726628518d WM: expose file loading operator property init functions 2014-04-03 11:04:02 +11:00
Campbell Barton
b2b4f2c033 Code cleanup: use BKE_BIT_TEST_SET to set flags 2014-04-03 10:45:08 +11:00
Campbell Barton
f38331adef Code cleanup: style 2014-04-03 09:24:09 +11:00
Antony Riakiotakis
03bd418d16 Fix T39517,
Issue here is that "show diffuse" option does not respect its intended
purpose which is to be used only for masking.

There are a couple of caveats here:

Dyntopo and multires -always- have mask data enabled, and thus as soon
as one goes to dyntopo mode or adds a multires modifier he would get the
default grey color instead.

Matcaps would break when nodes asked for a diffuse material color (this
was broken before too). Solved by adding global material state for when
matcaps are enabled. Also matcaps don't always played well with VBOs
off.

Added a few more missing updates for mask operators to notify
show_diffuse property as changed. This was also needed on rebuilding
dyntopo pbvh.

Also make zero mask color duller again after artist feedback.
2014-04-03 00:39:42 +03:00
Brecht Van Lommel
a58814acf5 Fix T39525: cycles volume render difference between branched/non-branched path. 2014-04-02 20:51:29 +02:00
Brecht Van Lommel
7ed9d1b402 Fix T39523: cycles cache BVH not working correct with deformation motion blur. 2014-04-02 20:51:29 +02:00
Antony Riakiotakis
8c730b1059 Fix T39520, show diffuse not working in dyntopo.
Was marked as a todo in the code.

This does not yet take care of correct display for multi material
meshes, since it would need correct separation of faces during pbvh
creation. Instead we just take material of first face in node and assume
that the rest faces have the same. This will create some funky effects
if one attempts to sculpt in this way.

Note: This does not yet address T39517
2014-04-02 18:56:19 +03:00
Antony Riakiotakis
6785e45951 Undoing masks in dyntopo leaked memory 2014-04-02 18:25:03 +03:00
Antony Riakiotakis
965e5039f5 Refactor to recent matcap built-ins to not use the built in system.
Those variables would get declared on fragment shader level and since we
use reserved opengl variables, some compilers would throw an error
(NVIDIA allows, some ATI compilers may break). Instead, use a separate
opengl built-in category especially for them. This works on NVIDIA, and
will wait for tests of this commit from ATI users.
2014-04-02 15:08:04 +03:00
Sergey Sharybin
26b2645d62 Implement fame sliding from IE's cache line 2014-04-02 17:59:10 +06:00
Bastien Montagne
9caf702941 UI: Tweak last commit for UIList and image scopes' grip size.
Sorry, forgot the --hold arg to last arc land, wanted to check this before pushing... :/
2014-04-02 13:22:12 +02:00
Bastien Montagne
9b3bd5582b Replace resize code of image scopes by use of new GRIP button.
This deduplicates/simplifies some code. Also cleanup up a bit scopes UI code!

Use new GRIP button for uiList grab-resize.

This allows us to greatly simplifies the code, and get rid of a few hacks in uiList event handling!

Note autosize mode of uiList is now trigered by any value of list_grip below a given threshold, rather than the fixed zero value...

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D343
2014-04-02 13:09:43 +02:00
Bastien Montagne
4faef1e10c Add drag-resize to uiTemplatePreview (mat/tex/etc. preview widget).
This is done by adding a new button type, GRIP, similar to other numbuttons
(scroll, slider, ...), which here controls the preview height.

Then, we add a new DNA struct to be able to save that height in Blend files
(note I choose not to use Panel struct for this, because we would then have the
same limitation we used to have with uiLists, only one preview per panel
and no preview outside panel).

This implies a change to template_preview UI RNA/py API (each preview needs an ID),
but this is backward compatible, as by default datablock type will be used if no ID is
given (which means e.g. all material previews with no ID will have same height).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D342
2014-04-02 13:03:11 +02:00
Sergey Sharybin
11ee2d8b97 implement cache line for image editor
It works exactly the same as a cache line in movie clip editor.
2014-04-02 16:54:30 +06:00
Bastien Montagne
6cd717e0a3 Fix T39521: Render with two Blender processes on same computer: compression issues?
We need to salt temp exr filenames with pid, else several instances of Blender rendering
the same scene on same machine and using "Save Buffers" option would use the same files!
2014-04-02 11:59:43 +02:00
Bastien Montagne
35747ee3d5 Rename "BLI_cpu.h" to "BLI_system.h" and add to it BLI_getpid() helper.
There is not much sense to have a whole BLI file just to check SSE2 on CPUs...
So idea is to rename it to more generic "BLI_system", and add to it more system-related
utils, like e.g. an include helper for getpid(), which allows to hide unix/windows
internals from rest of the code...

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D439
2014-04-02 11:59:43 +02:00
Kevin Dietrich
cb7cfd3ab6 Cycles: add dedicated UV Map node, easier to find and has convenient auto complete.
Fixes T37954.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D230
2014-04-02 11:53:44 +02:00
Lukas Tönne
288147334c Fix T39547: Toggling render passes on active scene does not update
render layer nodes in a pinned tree from different scene.

The way these updates work is a nasty legacy hack:
https://developer.blender.org/diffusion/B/browse/master/source/blender/nodes/composite/node_composite_tree.c$277

This function is called //very frequently// by the get_from_context
method. However, this does not get called for pinned node trees, so
when showing a different scene's compositing nodes in the editor they
may not get updated correctly.

Now moved this update call out of get_from_context so it happens in any
case. Will be called no more frequently than before (on every redraw).
Eventually the depsgraph should handle this more precisely, it's just a
simple ID dependency anyway ...
2014-04-02 11:04:09 +02:00
Sergey Sharybin
eed3974d11 Fix T39545: "Track selected markers", does not stop at end of video
Issue was cauzed by some weird clamping of current frame. Not sure
why it was here at the first point -- it's from the day0 of movie
clip datablock.
2014-04-02 14:11:35 +06:00
Campbell Barton
def5999f9b UI: support for dragging popups title area 2014-04-02 18:43:53 +11:00
Campbell Barton
442f2df736 Code cleanup: avoid redundant lookups for subwindows 2014-04-02 17:33:20 +11:00
Campbell Barton
1d9e0c373d Fix for BLI_rng_shuffle_array noted by mont29 2014-04-02 10:09:48 +11:00
Campbell Barton
da4b90a331 Code cleanup: use uint64_t for BLI_rand 2014-04-02 09:58:27 +11:00
Antony Riakiotakis
e60b18d51d Dyntopo: Delete OpenGL buffers of nodes that do not have any more
triangles.

It is possible to end up with such nodes using brushes in aggressive
collapse mode. Those nodes should normally be cleaned up, since they can
never be actually reused (adding more geometry to a node requires the
node having some geometry to begin with) but until we support dynamic
nodes, better delete those to avoid binding graphics driver resources.

If such zero elements buffers were used, GL error out of memory would be
reported.
2014-04-02 01:41:14 +03:00
Campbell Barton
0a112efcf7 Fix for building with MSVC2008 2014-04-02 09:16:47 +11:00
Campbell Barton
dc5fe5d25f Fix bpy.so linking on Mac OS X
D345 from Aleksandr Derbenev
2014-04-02 09:03:01 +11:00
Antony Riakiotakis
7c513f5913 Fix some redrawing and possibly other issues in dyntopo:
When node face gets deleted, added or exchanged, the nodes should update
their draw buffers, normals and bounding boxes. This was not being done
before so there were graphical glitches apparent, especially in collapse
mode.
2014-04-02 00:57:33 +03:00
Jens Verwiebe
16537a8f89 Sculpt: the thread controls where unintentianlly greyed out along with capabilities.has_gravity condition 2014-04-01 22:52:10 +02:00
Campbell Barton
747ba571a1 Fix T39550: polygons.active has bad default 2014-04-02 06:40:39 +11:00
Antony Riakiotakis
bfe29e0ef7 Revert 7955cb78d it causes GPU_pbvh_buffers_diffuse_changed to always
return false, causing update of all pbvh nodes all the time.
2014-04-01 20:17:23 +03:00
Antony Riakiotakis
3ed49a810d Make matcaps suck less
This commit does various changes for matcaps:

One is taking advantage of drawing with pbvh (which would only happen
with dyntopo previously) and drawing with partial redraw during
sculpting.

The second one is support for masks. To make this work in the special
case of multires, which uses flat shading, I use the only available flat
shaded builtins in OpenGL 2.0 which are color and secondary color.

Abusing colors in that way is also essential for flat shading to work if
we are to use pbvh draw in multires, since it is the color that is being
interpolated flatly, not the normal (which can only interpolated
smoothly). The pbvh drawing code for multires used last triangle
element's normal to compute the shading which would only produce smooth
results. This could change if we did the shading in the vertex shader
for flat shaded primitives, but this is more complex and makes it harder
to have one shader to rule the mole.

Also increased the brightness of the default diffuse color for
sculpting. This should be useful since artists like to tweak the
lighting settings and it will give them the full dynamic range of the
lights, but also it helps with correct brightness of sculpted matcaps.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D435
2014-04-01 19:27:13 +03:00
Harshit Mehta
ad7980a51a Image and clip editor: change zoom step to end up at powers of two.
When you press zoom 3 times you will now get 2:1, 4:1, 8:1, etc. Fixes T36916.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D409
2014-04-01 18:00:14 +02:00
Grigory Revzin
420da872a6 Fix T39378: Revert, Recover Last Session and Load Factory Settings have no prompt.
Now they do, to make it harder to accidentally press them and lose work.

Reviewed By: brecht, carter2422

Differential Revision: https://developer.blender.org/D440
2014-04-01 18:00:07 +02:00
Sergey Sharybin
e21a7b32f9 Fix T39546: blender crash on open recent file, when tracking is still in progress 2014-04-01 18:43:49 +06:00