Commit Graph

87524 Commits

Author SHA1 Message Date
754ecd61aa DRW: Change Procedural function to use a GPUBatch
This is in order to have VAO handled by thoses batches instead of using a
common VAO. Even if the VAO has no importance in these case using a batch
will help when transitioning to Vulkan.
2019-05-14 10:57:03 +02:00
8406fabc87 Eevee: Replace DRW_shgroup_empty_tri_batch_create by procedural calls 2019-05-14 10:57:03 +02:00
201ebc78e8 Mesh Batch Cache: Fix use of uninitialized variable 2019-05-14 10:57:03 +02:00
b27492d078 DRW: Make Instance count not a pointer
Goal is still to simplify the draw manager.
2019-05-14 10:57:03 +02:00
cf8109d2aa Cleanup: Eevee: Make planar downsampling not use instance drawing 2019-05-14 10:57:03 +02:00
ad0e95688d Cleanup: DRW: Remove pointers to materials 2019-05-14 10:57:03 +02:00
2d28df783a GPU: Move Material index to nodetree evaluation
This removes the need to pass the Material* all over the place in the draw
manager. Cleanup comming right after.
2019-05-14 10:57:03 +02:00
642c8010b2 DRW: Remove ModelViewMatrix and ModelViewMatrixInverse 2019-05-14 10:57:03 +02:00
b13e0568d3 GPU: Remove ModelViewMatrix and ModelViewMatrixInverse usage 2019-05-14 10:57:03 +02:00
49a7031caa Fix T64588: some new theme preferences not saving 2019-05-14 10:42:53 +02:00
153c144053 Fix T64339: Crash with UV sculpt after undo 2019-05-14 17:05:02 +10:00
1f891bbc2c Keymap: add option for tilde key preference
Since the view menu is redundant for people with a numpad,
add a preference for it to switch between gizmos instead.
2019-05-14 15:19:50 +10:00
9c9081d9ef Preferences: file menu item to temporarily load factory settings
It's common to load factory settings as a test without wanting to
overwrite your own settings on exit.
2019-05-14 12:37:07 +10:00
34da7f8fdd Preferences: set dirty flag when dragging 2019-05-14 11:15:38 +10:00
8fe5a28635 Fix property update setting dirty flag 2019-05-14 11:12:02 +10:00
a5b5bd2c24 Fix missing preference dirty tagging
Tagging dirty was failing for UI scale, line width, hinting & others.

Checking for an update function means all update functions
need to tag preferences as dirty.

Since this check was added to prevent the active section marking the
preferences as dirty, only exclude this property.
2019-05-14 10:25:55 +10:00
36a33b8c82 UI: grey out 'Revert' when preferences aren't dirty 2019-05-14 10:25:55 +10:00
f070bdd7c9 Fix T63802: textured lights not working with OSL 2019-05-14 00:40:25 +02:00
2ff7494e6d Fix T64561: wrong colorspace for Cycles displacement nodes 2019-05-13 23:40:45 +02:00
1428435a9a Fix compiler warning with OpenGL icon textures 2019-05-13 23:30:23 +02:00
1de990651f Fix T64292: world missing from outliner Scenes view 2019-05-13 22:37:45 +02:00
cac0e604e7 Fix T64297: edit light energy not working for Eevee, when nodes exist
Simplify code now that Cycles also has energy outside nodes.
2019-05-13 22:32:50 +02:00
e2fdbf7599 Fix T64407: crash adding workspace after appending datablock
The files operator property should not be remembered for next
operator executions, gives unexpected effects when using the
operator again.
2019-05-13 22:20:49 +02:00
164fafdcb0 make.bat: add option for enabling the OpenGL based tests. 2019-05-13 14:08:27 -06:00
27d097e92d Python API: expose conversion between tweaked NLA strip and scene time.
This is necessary to correctly do low-level keyframe manipulation
in tweak mode, and the logic is complex enough that re-implementing
it in Python is impractical.
2019-05-13 22:09:42 +03:00
c6f975e3e5 Better support for (mirrored) bbone scaling in pose mode
since own rB5d9d32fd1fa3 (mirror bbone scaling in editmode)
- bbone scaling in posemode was missing immediate updates
- bbone scaling in posemode could crash

This now properly supports mirroring in posemode as well.
note: for bbone scaling, I made both X-Axis-Mirror options (editmode
option as well as posemode option) valid.

Fixes T64091

Reviewers: brecht

Maniphest Tasks: T64091

Differential Revision: https://developer.blender.org/D4851
2019-05-13 20:04:32 +02:00
0264d8390f Apply Pose as Rest Pose: implement an Only Selected bones option.
The most difficult part is handling parent-child relations correctly:
when a parent is applied, the children should be moved accordingly,
and when applying a child, it should not include transformation from
unapplied parents. All this requires walking bones as a tree, instead
of a flat list.

Limitation: Applying bones with non-uniform scaling without also applying
children will distort non-rest posing on said children for reasons related
to T54159 (basically, non-uniform scale plus rotation creates shear, and
Blender matrix decomposition utilities don't have tools to deal with it).

Reviewers: campbellbarton, brecht, mont29

Differential Revision: https://developer.blender.org/D3775
2019-05-13 19:17:53 +03:00
93cabce3a1 I18n Disambiguation: "Shift".
Give WM context to the shortcut, since this is more specific meaning
than usual 'shifting' one...

Part of T43295.
2019-05-13 17:58:25 +02:00
17e172b6c1 I18n Disambiguation: One more case of 'Root' falloff without 'Curve' context.
Part of T43295.
2019-05-13 17:58:25 +02:00
6ec096facf I18n Disambiguation: "Add" in menu labels.
This one is usually a verb/action one in menus' labels,
hence we give it the Operator default context.

Part of T43295.
2019-05-13 17:58:25 +02:00
9ed8f8a968 Fix T63325: Drivers freezing input value
Not sure why driver would be affecting on the behavior, the actual
issue was caused by lack of proper relations built for lamps and
cameras.
2019-05-13 17:55:28 +02:00
1c1e3de015 Fix T64387: Crash with driver copy/paste
Was missing copy-on-write tag since lamp itself has no geometry or
transform.

Now tagging for animation, and taking care of special case in the
dependency graph.
2019-05-13 16:46:07 +02:00
8f71a84496 Cycles/Eevee: add Emission and Alpha inputs to Principled BSDF
This makes it easier to set up materials with emission and transparency.
Importers/exporters and add-ons are recommended to now use these rather than
creating separate transparent BSDF and emission nodes.
2019-05-13 15:56:11 +02:00
21854575a4 Cycles/Eevee: unify light strength and color
Cycles lights now use strength and color properties of the light outside
of the shading nodes, just like Eevee. The shading nodes then act as a
multiplier on this, and become optional unless textures, fallof or other
effects are desired.

Backwards compatibility is not exact, as we can't be sure which renderer
the .blend was designed for or even if it was designed for a single one.

If the render engine in the active scene is set to Cycles, lights are
converted to ensure overall light strength remains the same, and removing
unnecessary shader node setups that only included a single emission node.

If the engine is set to Eevee, we increase strength to remove the automatic
100x multiplier that was there to match Cycles.

Differential Revision: https://developer.blender.org/D4588
2019-05-13 15:56:10 +02:00
7ad802cf3a Cycles/Eevee: unified and improved texture image color space handling
Cycles now uses the color space on the image datablock, and uses OpenColorIO
to convert to scene linear as needed. Byte images do not take extra memory,
they are compressed in scene linear + sRGB transfer function which in common
cases is a no-op.

Eevee and workbench were changed to work similar. Float images are stored as
scene linear. Byte images are compressed as scene linear + sRGB and stored in
a GL_SRGB8_ALPHA8 texture. From the GLSL shader side this means they are read
as scene linear, simplifying the code and taking advantage of hardware support.

Further, OpenGL image textures are now all stored with premultiplied alpha.
Eevee texture sampling looks a little different now because interpolation
happens premultiplied and in scene linear space.

Overlays and grease pencil work in sRGB space so those now have an extra
conversion to sRGB after reading from image textures. This is not particularly
elegant but as long as engines use different conventions, one or the other
needs to do conversion.

This change breaks compatibility for cases where multiple image texture nodes
were using the same image with different color space node settings. However it
gives more predictable behavior for baking and texture painting if save, load
and image editing operations have a single color space to handle.

Differential Revision: https://developer.blender.org/D4807
2019-05-13 15:56:10 +02:00
e9d2ec46c4 Tests: disable DoF in Eevee tests for now, it adds blurring with default values 2019-05-13 15:56:10 +02:00
3ad962d069 Depsgraph: Use for_render flag for curves from depsgraph
Fixes issue with Eevee always using viewport curve resolution.
2019-05-13 15:24:43 +02:00
b03b8c3576 Curve: Remove duplicated and confusing argument
Curve function had two arguments:

- for_render, which was originally supposed to be used to control
  whether viewport or render visibility for modifiers is to be
  used.

- use_render_resolution, which sounds like it is supposed to control
  whether viewport or render resolution for curves is to be used.

What is totally confusing is that those arguments were used
interchangeably: sometimes use_render_resolution would control
modifiers visibility.

This commit makes it so there is one single argument for this.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4850
2019-05-13 15:06:50 +02:00
f49feccaa3 Preferences: set dirty when editing quick favourites menu 2019-05-13 22:28:43 +10:00
86650b01d8 UI: Don't display markers in driver editor 2019-05-13 11:55:53 +02:00
44fc8aa221 Fix T64403: crash sampling coloring in texture paint mode 2019-05-13 11:50:21 +02:00
5cd6ffad09 Fix T64041: Vertex Sharp not working.
Broken in rB0ac3d5f7db67 last year...
2019-05-13 11:49:58 +02:00
b5ae049013 UI: rename Load Preferences to Revert 2019-05-13 19:48:42 +10:00
76bf9b766c Fix T64120: Dynamic Paint Doesn't Recalculate Normals with Smooth Shading.
For wome reason, tag to mark normals as needing recompute was commented
out instead of updated to new system, during conversion of DynaPaint
code for 2.8 new evaluation stack... Trivial fix.
2019-05-13 11:38:35 +02:00
9361fea99f RNA: disable undo on OperatorProperties and its subclasses.
Since these are temporary properties, changing them shouldn't cause
undo pushes. There already is a flag to disable that, but since each
operator inherits its own properties from the base, RNA define code
also had to be changed to allow inheriting the flag.
2019-05-13 12:36:54 +03:00
8cdf76fad9 Fix unintended autosaving of preferences in a few cases
* Dirty flag was not cleared on load
* Navigating tabs should not cause save
* Background mode should not autosave (for e.g. render farms and tests)
2019-05-13 10:57:05 +02:00
d2efdaa26c Python API: expose preferences.is_dirty 2019-05-13 10:57:00 +02:00
8cb1de83fc cleanup: typo in comment 2019-05-13 10:14:41 +02:00
422be98c47 Fix T64427: WITH_HEADLESS build option 2019-05-13 17:42:21 +10:00
e61531cb0e Fix T64461: Sub-panels allow pinning 2019-05-13 16:53:40 +10:00