Commit Graph

66905 Commits

Author SHA1 Message Date
Sergey Sharybin
8794a43b68 Cycles: Make MESA compiler more happy
While this compiler is not officially supported yet, getting it to work is
a nice thing because more and more AMD cards will fall under MESA driver.

It's also nice to use explicit comparison with NULL, which makes it more
clear whether variable is a boolean or pointer. Even Rust enforces this!

Patch by Ian Bruce with own modifications.
2017-03-13 09:57:25 +01:00
Campbell Barton
e8021f5e3b UI: expose mesh conversion in apply menu
The mesh convert operator can 'freeze' a mesh
(WYSIWYG, modifiers, shape keys etc).
However its not very obvious that the way to perform this
operation is to convert a mesh to a mesh.

Expose this as 'Visual Geometry to Mesh' in the 'Apply' menu,
since this is where users might expect to see it.
2017-03-13 07:33:24 +11:00
Campbell Barton
10404e3e56 Comments: minor clarification 2017-03-13 07:18:28 +11:00
Gaia Clary
b759d3c9c5 fix T50923: Inconsistent default values and wrong order of parameters in api call 2017-03-12 20:31:51 +01:00
Aaron Carlisle
18ed060bc3 Fix T50930 Typo in 'jpeg2k_codec' description 2017-03-12 13:56:25 -04:00
Campbell Barton
6521307dcd BMesh: rename cryptic functions
Use expanded names for bmesh primitive operations
(urmv jvke semv jfke).

Use 'bmesh_kernel_' prefix,
these functions aren't intended for wide use so favor readability.

Remove BM_face_vert_separate,
it wasn't used and only skipped step of finding correct loop of face.
2017-03-13 04:39:20 +11:00
Campbell Barton
f28376d8d9 Cleanup: style 2017-03-13 04:39:20 +11:00
Julian Eisel
8ca11f5b72 UI: Always open enum-search popups with empty search string
It might be useful to keep the search string stored in some cases, but
in most it's not useful but confusing. Especially if the string is taken
from a menu showing a different enum.
2017-03-12 18:14:43 +01:00
3f94836922 Fix T50788: blender startup crash on macOS with some types of volumes available. 2017-03-12 18:03:15 +01:00
68ca973f7f Fix T50628: gray out cycles device menu when no device configured only for GPU Compute. 2017-03-12 18:00:17 +01:00
raa
76015f98ae Fix icon alignment for pie buttons 2017-03-11 22:34:09 +03:00
Campbell Barton
bcc8c04db4 Cleanup: code style & cmake 2017-03-12 02:47:53 +11:00
Germano Cavalcante
98045648ab Add support for Objects in Drive variable Rotational Difference
Thus it is according to the Manual
https://docs.blender.org/manual/en/dev/animation/drivers/drivers_panel.html#driver-variables
2017-03-11 10:43:23 -03:00
Campbell Barton
304315d181 BMesh: Fix BM_face_loop_separate_multi
When the loop region passed in had no loops to edge-split from,
it was assumed nothing needed to be done.

This ignored the case where loops share a vertex
without any shared edges.

Now BM_face_loop_separate_multi behaves like BM_face_loop_separate.

Fixed error where faces remained connected by verts in BM_mesh_separate_faces.
2017-03-11 23:26:44 +11:00
Campbell Barton
ce155ad2f6 Correct recent bmesh separate addition
- Was setting flag incorrectly to avoid re-use.
- Check edge has loops before accessing.
2017-03-11 23:26:13 +11:00
Mai Lavelle
96868a3941 Fix T50888: Numeric overflow in split kernel state buffer size calculation
Overflow led to the state buffer being too small and the split kernel to
get stuck doing nothing forever.
2017-03-11 05:39:28 -05:00
Campbell Barton
5afe4c787f BMesh: add BM_mesh_separate_faces
Fast-path for bmesh split operator which duplicates and deletes.
Use when only separating faces, currently used by the intersect tool.
2017-03-11 20:50:32 +11:00
Campbell Barton
5be8adf8c0 Makefile: set tab width=4 2017-03-11 20:48:12 +11:00
f667593b6a Fix text and icon positioning issue on high DPI, after recent changes in 32c5f3d. 2017-03-11 04:47:22 +01:00
2d3c44389a Fix OpenCL warnings about doubles on some platforms. 2017-03-11 00:55:23 +01:00
Joshua Leung
c374e9f1f5 Breakdowner - Constrain Transform and Axis
This commit adds new features to the breakdowner, giving animators more
control over what gets interpolated by the breakdowner. Specifically:

   "Just as G R S let you move rotate scale, and then X Y Z let you do that
   in one desired axis, when using the Breakdower it would be great to be
   able to add GRS and XYZ to constrain what transform / axis is being
   breakdowned."

As requested here:
https://rightclickselect.com/p/animation/csbbbc/breakdowner-constrain-transform-and-axis


Notes:
* In addition to G/R/S, there's also B (Bendy Bone settings and C (custom properties)
* Pressing G/R/S/B/C or X/Y/Z again will turn these constraints off again
2017-03-11 11:53:45 +13:00
Germano Cavalcante
b6713dcbe5 rBa81ea408367abe2f33b351ff6dcc6b09170fd088 "object" -> "target" 2017-03-10 13:54:06 -03:00
Germano Cavalcante
a81ea40836 fix T50899: Even though the Shrinkwrap options hide the possibility of using a non-mesh target, you can still circumvent this... Causing Crash 2017-03-10 13:51:04 -03:00
Campbell Barton
103ae04fbc Correct glPixelTransfer function 2017-03-11 03:03:47 +11:00
Bastien Montagne
15eb83c8b3 Fix T50900: Text-Blocks created from "Edit Source" have zero users. 2017-03-10 15:43:33 +01:00
Bastien Montagne
9d6acc34a1 Fix useless allocation of edge_vectors in threaded case of loop split generation. 2017-03-10 15:43:33 +01:00
Sergey Sharybin
59fd21296a Cycles: Cleanup, extra semicolon and space 2017-03-10 15:38:30 +01:00
raa
17b3097205 Adjust kmi header 2017-03-10 15:10:40 +03:00
Campbell Barton
6038583909 Cleanup: struct flags for select picking 2017-03-10 21:47:43 +11:00
Campbell Barton
3dbb560331 Cleanup: rename drawObjectSelect
After adding draw_object_select, noticed a similar name.
Rename drawObjectSelect to draw_object_selected_outline.
2017-03-10 21:27:33 +11:00
Campbell Barton
12e681909f Fix T47690: Connected PET w/ individual origins
- Connectivity length was overwritten by distance to closest selected.
- Vertices used the 'island' center of the closest vertex,
  even if it wasn't connected.

Now optionally keep track of the original index of used as the closest
connected distance.

To support this needed to add optional support for islands of 1 vertex.
2017-03-10 20:27:23 +11:00
Mai Lavelle
4a2cde3f0e Cycles: Enable SSS and volumes for CUDA and Nvidia OpenCL split kernel 2017-03-10 02:09:41 -05:00
Joshua Leung
17689f8bb6 Fix T50904: Imprecise timeline frame selection using mouse
The changes introduced in rB3e628eefa9f55fac7b0faaec4fd4392c2de6b20e
made the non-subframe frame change behaviour less intuitive, by always
truncating downwards, instead of rounding to the nearest frame instead.
This made the UI a lot less forgiving of pointing precision errors
(for example, as a result of hand shake, or using a tablet on a highres scren)

This commit restores the old behaviour in this case only (subframe inspection
isn't affected by these changes)
2017-03-10 15:07:17 +13:00
Campbell Barton
62cc226101 3D View: x-ray support for depth picking
Selection loop would draw the selection ignoring xray.
Now draw in a separate pass after clearing the depth buffer,
as with regular drawing.

Also disable depth sorting,
caller can sort the hit-list by depth if needed.
2017-03-10 05:00:49 +11:00
Hristo Gueorguiev
9de9f25b24 Cycles: add single program debug option for split kernel
Single program generally compiles kernels faster (2-3 times), loads faster,
takes less drive space (2-3 times), and reduces the number of cached kernels.
2017-03-09 17:09:37 +01:00
Hristo Gueorguiev
06c051363b Cycles: split kernel_shadow_blocked to AO & DL parts
Reduces memory allocation for split kernel.

This allows for faster rendering due to bigger global size,
specially when GPU memory is limited.

Perfromance results:

                         R9 290 total render time
                        Before    After   Change
BMW                      4:37      4:34   -1.1 %
Classroom               14:43     14:30   -1.5 %
Fishy Cat               11:20     11:04   -2.4 %
Koro                    12:11     12:04   -1.0 %
Pabellon Barcelona      22:01     20:44   -5.8 %
Pabellon Barcelona(*)   15:32     15:09   -2.5 %

(*) without glossy connected to volume
2017-03-09 17:09:37 +01:00
Hristo Gueorguiev
e8b5a5bf5b Cycles: Speedup transparent shadows in split kernel
This commit enables record-all transparent shadows rays.

Perfromance results:

               R9 290 render time (without synchronization), seconds
                        Before    After   Change
BMW                      261.5    262.5   +0.4 %
Classroom                869.6    867.3   -0.3 %
Fishy Cat                657.4    639.8   -2.7 %
Koro                    1909.8    692.8  -63.7 %
Pabellon Barcelona      1633.3   1238.0  -24.2 %
Pabellon Barcelona(*)   1158.1    903.8  -22.0 %

(*) without glossy connected to volume
2017-03-09 17:09:37 +01:00
Hristo Gueorguiev
57e26627c4 Cycles: SSS and Volume rendering in split kernel
Decoupled ray marching is not supported yet.

Transparent shadows are always enabled for volume rendering.

Changes in kernel/bvh and kernel/geom are from Sergey.
This simiplifies code significantly, and prepares it for
record-all transparent shadow function in split kernel.
2017-03-09 17:09:37 +01:00
Dalai Felinto
6c942db30d Remove (ifdef) draw_documentation from text_draw.c
This was no longer supported.
2017-03-09 17:02:35 +01:00
Campbell Barton
88e8e7a074 3D View: wrap GPU_select cache calls
Avoids including GPU_select and makes it more clear that the cache is
needed for view3d_opengl_select calls.

Also use typed enum for select mode.
2017-03-09 20:47:37 +11:00
Campbell Barton
4ab322fdd2 3D View: use cache for armature select 2017-03-09 09:25:33 +11:00
Mai Lavelle
c837bd5ea5 Cycles: Fix CUDA build error for some compilers
Needed to include `util_types.h` before using `uint`.
2017-03-08 16:44:43 -05:00
Campbell Barton
45b764e95b 3D View: new nethod of opengl selection
Intended to replace legacy GL_SELECT, without the limitations of
sample queries which can't access depth information.

This commit adds VIEW3D_SELECT_PICK_NEAREST and VIEW3D_SELECT_PICK_ALL
which access the depth buffers to detect whats under the pointer,
so initial selection is always the closest item.

The performance of this method depends a lot on the OpenGL
implementations glReadPixels.

Since reading depth can be slow, buffers are cached for object picking
so selecting re-uses depth data, performing 1 draw instead of 3
(for 24, 18, 10 px regions, picking with many items under the pointer).

Occlusion queries draw twice when picking nearest,
so worst case 6x draw calls per selection.

Even with these improvements occlusion queries is faster on AMD hardware.

Depth selection is disabled by default, toggle option under select method.
May enable by default if this works well on different hardware.

Reviewed as D2543
2017-03-09 06:22:02 +11:00
Sergey Sharybin
817e975dee Fix T50849: Transparent background produces artifacts in this compositing setup
The issue was caused by sometimes negative color returned by the filter node.

Seems to be caused by precision issues. Don't see any reason why we would want
negative colors in output. Those only causing issues later on.
2017-03-08 15:56:50 +01:00
Sergey Sharybin
97c4c2689f Cycles: Make it more obvious message which initialization failed 2017-03-08 13:57:21 +01:00
Sergey Sharybin
05dfe9c318 Fix T49603: Blender/Cycles 2.78 CUDA error on Jetson-TX1~
Patch by Bruno d'Arcangeli (@arcangeli), thanks!
2017-03-08 13:38:01 +01:00
Campbell Barton
c24d045a23 OpenGL Select: integer rect for passing region 2017-03-08 23:23:39 +11:00
Campbell Barton
9af0c8b00a Cleanup: replace short -> int for selection hits 2017-03-08 23:23:39 +11:00
Campbell Barton
6f3f891c58 Rename BLI_rct*_init_pt_size -> radius 2017-03-08 23:23:39 +11:00
Sergey Sharybin
75cb4850f0 Cycles: Use 1-based line number for #line directives
AMD CPU platform was complaining about #line 0 directives in the code.
2017-03-08 12:45:18 +01:00