Commit Graph

59269 Commits

Author SHA1 Message Date
Brecht Van Lommel
3102bf2889 Merge branch 'master' into blender2.8 2018-02-14 15:16:50 +01:00
Brecht Van Lommel
f6107af4cf Cycles: change Index output of Hair and Particle Info to Random, in 0..1 range.
These are used for randomization, so it's convenient if the index is already
hashed and consistent with the Object Info node.
2018-02-14 14:55:46 +01:00
Brecht Van Lommel
618bc6c679 GPU: use alpha blend that works for drawing to transparent buffer.
It's unlikely to ever be intentional to square the source alpha, as happens
with glBlendFunc, so this changes the blending throughout the code.
2018-02-14 14:00:57 +01:00
Brecht Van Lommel
7028a11db9 GPU: don't use multisample for entire window, only for offscreen 3D viewport.
Now that the new 3D viewport draws to a multisample offscreen buffer, there is
no good reason anymore to create an entire multisample window and pay the
performance/memory cost for other regions that don't need it.

GL_MULTISAMPLE now only gets enabled for offscreen buffers, so we don't need
to check for it throughout the UI code anymore.

Differential Revision: https://developer.blender.org/D3062
2018-02-14 14:00:48 +01:00
Brecht Van Lommel
8049ad21b0 Fix incorrect RNA path to view_render settings. 2018-02-14 13:31:37 +01:00
Brecht Van Lommel
3851033a06 Code cleanup: simplify subwindow code. 2018-02-14 12:31:13 +01:00
Sergey Sharybin
c8e661706f Particles: Avoid multiple function declarations in multiple places
This makes it really hard to spot errors when function signature changes.
2018-02-14 11:52:58 +01:00
Sergey Sharybin
8003059646 Particles: Cleanup, remove trailign whitespace 2018-02-14 11:46:33 +01:00
Sergey Sharybin
1c34825b4f Hair child: Use clamp function to clamp curve evaluation
Avoids redundant calls to the curve evaluation.
2018-02-14 11:42:09 +01:00
Sergey Sharybin
c09e4ae08a Math utils: Add clamping functions 2018-02-14 11:21:27 +01:00
Campbell Barton
769c9a2363 Object Mode: remove Scene.obedit
This means we can support having the same scene in different windows
with different edit-objects.
2018-02-14 08:49:20 +11:00
Brecht Van Lommel
6e040b045a GPU: add offscreen buffer drawing utility functions. 2018-02-13 20:02:31 +01:00
Brecht Van Lommel
e9b1163162 Code cleanup: stop using rectangle textures in window draw, simplify code. 2018-02-13 20:02:31 +01:00
Brecht Van Lommel
afb213f876 Code cleanup: fix incorrect reading of GL scissor coordinates.
These are often the same as the viewport, but not always.
2018-02-13 20:02:31 +01:00
Brecht Van Lommel
96a2807e73 Code cleanup: remove unneeded gla* 2D drawing functions. 2018-02-13 20:02:31 +01:00
Brecht Van Lommel
ff2d1edcd4 Fix blenderplayer build. 2018-02-13 20:02:31 +01:00
Campbell Barton
b330804ff3 Merge branch 'master' into blender2.8 2018-02-14 01:06:41 +11:00
Campbell Barton
9fb1f9c5cd Add ED_object_editmode_exit_ex
Allow exiting editmode from non-active scene.
2018-02-14 00:39:39 +11:00
Sergey Sharybin
37f65e9dc4 Cycles: Implement index output for hair node
This is like the only way to add variety to hair which is created
using simple children. Used here for the hair.

Maybe not ideal, but the time will show.
2018-02-13 14:20:47 +01:00
Campbell Barton
cd517c002f Object Mode: remove Scene.obedit for RNA 2018-02-13 21:06:51 +11:00
Campbell Barton
8234f24838 Object Mode: Loop over objects for ED_editors_exit
We could loop over active objects but this ensures don't miss any
and avoids complicated context checks.
2018-02-13 21:00:26 +11:00
Campbell Barton
c8597a465f Object Mode: remove Scene.obedit
Add ED_screen_window_find, BKE_workspace_edit_object
2018-02-13 20:55:12 +11:00
Campbell Barton
754d3a2fe6 Object Mode: remove Scene.obedit for 3D View 2018-02-13 19:44:21 +11:00
Campbell Barton
d8992192e5 Object Mode: pass edit-object to outliner drawing
Also add 'OBEDIT_FROM_EVAL_CTX' macro.
2018-02-13 18:45:35 +11:00
Campbell Barton
2c6d079a90 Object Mode: pass edit-object to UV API 2018-02-13 18:29:49 +11:00
Campbell Barton
dacc6d4b02 Object Mode: remove Scene.obedit in draw manager
Part of larger change to remove this variable entirely.
2018-02-13 18:15:47 +11:00
Ines Almeida
d640ce40aa (Nodes) Display image name if any in the Cycles Image and Environment Texture node title 2018-02-13 00:58:26 +01:00
Brecht Van Lommel
b37dff9239 Fix part of T53080: don't use current scene world for icon previews.
This can be very slow if it contains a big texture, and it's not
necessarily setup in a useful way anyway, and materials can be used
in multiple scenes.
2018-02-12 20:39:40 +01:00
Campbell Barton
147c24aeeb Fix T54032: Adding torus test fails
rna_LayerObjects_active_object_update used wrong viewlayer.

Regression in 345c6298e9
2018-02-12 19:39:52 +11:00
Campbell Barton
bbb2fa14c8 Merge branch 'master' into blender2.8 2018-02-12 17:57:53 +11:00
Campbell Barton
657396be08 Error in last commit, disable cycles when not enabled
Would only disable when loading old preferences.
2018-02-12 17:56:14 +11:00
Campbell Barton
2c3d4f7e65 Merge branch 'master' into blender2.8 2018-02-12 17:39:58 +11:00
Campbell Barton
53431a560e Disable cycles when WITH_CYCLES=OFF 2018-02-12 17:37:39 +11:00
Campbell Barton
fc97e120f6 BKE_addon: new/free/ensure functions 2018-02-12 17:24:18 +11:00
Brecht Van Lommel
832f7a6648 Merge branch 'master' into blender2.8 2018-02-09 20:36:59 +01:00
Dalai Felinto
5216eaec1d Eevee: Film filter default to 1.5 instead of 1.0
Cycles already uses 1.5 as default. BI original 1.0 filter doesn't look good for
Eevee. The ideal scenario would be for both Cycles AND Eevee to use the same DNA
setting.

But for now it is nice to at least have Eevee renders to look better by default.

Note: This handles doversion for 2.7x files only. Files previously created in
2.8 need to be manually corrected.
2018-02-09 17:16:36 -02:00
Brecht Van Lommel
a6968e87f1 Cycles: add random walk subsurface scattering to Principled BSDF.
Differential Revision: https://developer.blender.org/D3054
2018-02-09 19:58:42 +01:00
Brecht Van Lommel
0df9b2c715 Cycles: random walk subsurface scattering.
It is basically brute force volume scattering within the mesh, but part
of the SSS code for faster performance. The main difference with actual
volume scattering is that we assume the boundaries are diffuse and that
all lighting is coming through this boundary from outside the volume.

This gives much more accurate results for thin features and low density.
Some challenges remain however:

* Significantly more noisy than BSSRDF. Adding Dwivedi sampling may help
  here, but it's unclear still how much it helps in real world cases.
* Due to this being a volumetric method, geometry like eyes or mouth can
  darken the skin on the outside. We may be able to reduce this effect,
  or users can compensate for it by reducing the scattering radius in
  such areas.
* Sharp corners are quite bright. This matches actual volume rendering
  and results in some other renderers, but maybe not so much real world
  objects.

Differential Revision: https://developer.blender.org/D3054
2018-02-09 19:58:33 +01:00
Bastien Montagne
7978306cbb Merge branch 'master' into blender2.8 2018-02-09 17:24:23 +01:00
Bastien Montagne
3ab5ef7b4f Fix (unreported) error on freeing timers which customdata pointer shall not be freed.
Looks like there was no way to avoid that so far, since
WM_event_add_timer_notifier can set mere int-in-pointer there, this can
cause issues. So added mere flags system to wmTimer to allow
controlling this.
2018-02-09 17:23:35 +01:00
Bastien Montagne
7e3e542aab Merge branch 'master' into blender2.8 2018-02-09 16:26:05 +01:00
Bastien Montagne
ea9099473a Fix (unreported) crash when duplicating a FileBrowser window in preview draw mode.
We did not clear preview or smoothscroll timers pointers in copy code...
2018-02-09 16:15:42 +01:00
Bastien Montagne
be4ebb7fa6 Merge branch 'master' into blender2.8 2018-02-09 14:27:32 +01:00
Bastien Montagne
97597ed600 Doc: attempt to document RNA's FunctionFlag.
Tired of searching through code to find which is what, and how to use it
in the C callback, everytime I need anot-so-common option...
2018-02-09 13:34:18 +01:00
Campbell Barton
5db950e860 Cleanup: use workspace for object_mode when possible 2018-02-09 22:14:39 +11:00
Dalai Felinto
25074be697 Fix collection syncing when creating new collections from the outliner
We were not passing a scene collection parent to the BKE_collection_add
function, which in turn made syncing not work.

Right now we:
* Explicitly pass the master collection in this case
* Fallback to the master collection in other cases

With unittest.
2018-02-09 09:05:27 -02:00
Campbell Barton
37e53ca5f3 Missed opencollada edit in recent changes 2018-02-09 20:25:32 +11:00
Sergey Sharybin
07ccb8b97c Fix crash with font on curve
Was a mistake from recent texspace changes.

Reported by Pablo here in the studio!
2018-02-09 10:14:08 +01:00
Campbell Barton
32287212f5 Cleanup: pass eval_ctx to sculpt_init_session
Matches vertex paint mode
2018-02-09 17:46:46 +11:00
Campbell Barton
9b9861578d Merge branch 'master' into blender2.8 2018-02-09 13:56:49 +11:00