Commit Graph

87193 Commits

Author SHA1 Message Date
Lukas Stockner
dba4684f82 Cycles: add colorspace manager class and utilities based on OpenColorIO
This is the groundwork for supporting loading image textures with arbitrary
color spaces through OpenColorIO.

Initial patch by Lukas, completed by Brecht.

Differential Revision: https://developer.blender.org/D3491
2019-05-03 15:42:49 +02:00
Brecht Van Lommel
fadb6f3466 Cleanup: refactor Cycles OSL texture handling
This adds our own OSL texture handle, that has info for OIIO textures or our
own custom texture types. A filename to handle hash map is used for lookups.
This is efficient because it happens at OSL compile time, because the optimizer
can figure out constant strings and replace them with texture handles.
2019-05-03 15:36:20 +02:00
Brecht Van Lommel
08a44d2981 Cleanup: refactor passing of OSL kernel globals for upcoming changes 2019-05-03 15:36:20 +02:00
Jacques Lucke
45ad6cd5a7 UI: Pass color id into view2d text drawing 2019-05-03 15:10:37 +02:00
William Reynish
938ceb1508 Industry Compat Keymap: Fix box selecting keys in the Graph Editor
It was not selecting the handles, causing a skewed offset when transforming
2019-05-03 14:35:44 +02:00
Harley Acheson
66a5df82b5 Fix missiong collection move line in outliner after recent changes
Differential Revision: https://developer.blender.org/D4781
2019-05-03 14:19:48 +02:00
William Reynish
d242ee4af6 ICK: Missed one line in last commit 2019-05-03 13:55:01 +02:00
William Reynish
0ed97e6fab Industry Compat Keymap: Fix Return key in the File Browser
Return was set to Rename in all editors. Now set it per editor and exclude File Browser
2019-05-03 13:53:41 +02:00
Jacques Lucke
fa59346c13 Refactor: Support arbitrary y offset for channel list
At first you could think that this refactor would not be
necessary, because `ACHANNEL_FIRST` exists already.
It contained the small y offset that all channels had.

Unfortunately, a lot of code assumed that
`ACHANNEL_FIRST = -ACHANNEL_HEIGHT`, making the
define pretty much useless. This refactor fixes that
for the action and nla editor.

As a nice side effect, this patch fixes channel box select.
Before there was always have a half-channel offset.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4783
2019-05-03 13:05:03 +02:00
Sergey Sharybin
b5eb6548d1 Depsgraph: Remove filtering API
This was an attempt to speed up motion path calculation, which didn't
really work in real world animation files, where animators already
hide and disable all the heavy collections. Filtering approach also
doesn't allow to have multiple frames evaluated in multiple threads
easily.

Filtering also adds extra complexity on keeping the graph in a correct
and consistent state.

Fixes T64057: Blender crash when use motion paths
2019-05-03 12:42:05 +02:00
William Reynish
ec474291a7 Industry Compat Keymap: Set Tab to use Add Search in node editors
More useful than operator search here, and more like some other apps.
2019-05-03 12:08:01 +02:00
William Reynish
ab80244460 Industry Compat Keymap: Use Alt-key navigation in the Image Editor
Was missing this by mistake
2019-05-03 11:41:56 +02:00
William Reynish
4879ffb885 UI: Display panel tweaks
- Use Display As rather than Draw Type, following naming conventions
  - Rename Advanced subpanel to Stretching, since that more accurately describes what it's for
2019-05-03 10:26:24 +02:00
Campbell Barton
41a63556cf Revert "Cleanup: add semicolon after PyObject_VAR_HEAD"
This reverts commit a01bcfa636.

This causes MSVC2019 build to fail with error C2059

Unfortunately this means we have to put up with bad formatting
in Python structs.
2019-05-03 18:09:52 +10:00
William Reynish
688c7240be UI: Add Annotate tool to Sculpt and Paint mode toolbars
Users have requested to have the Annotate tool added to Sculpt Mode. It can be useful for annotating while sculpting.

  - Remove Measure tool from the tools_annotate group
  - Add Measure tool to object and edit mode toolbar
  - Add Annotate tools to Sculpt and Paint modes

Differential Revision: https://developer.blender.org/D4785
2019-05-03 09:41:34 +02:00
Campbell Barton
0d2e7f2106 Fix T59474: Crash assign shortcuts 2019-05-03 17:08:47 +10:00
Campbell Barton
fbd366713e Fix active tool side-bar redrawing on tool change 2019-05-03 14:15:38 +10:00
Campbell Barton
4a3a0e3ef5 Fix tool header message subscriber 2019-05-03 13:59:58 +10:00
Campbell Barton
70682d11b8 Cleanup: replace RGN_ALIGN_ENUM_MASK
This was only used once, other checks were masking out
RGN_SPLIT_PREV which isn't future proof (if other flags are added).

Add RGN_ALIGN_ENUM_FROM_MASK macro, use it everywhere we need to
check the alignment enum.
2019-05-03 13:04:37 +10:00
Campbell Barton
a01bcfa636 Cleanup: add semicolon after PyObject_VAR_HEAD
clang-format doesn't expand macros,
add semicolon to prevent misleading formatting.
2019-05-03 12:43:18 +10:00
Campbell Barton
b8226a3ae1 Cleanup: warnings
Quiet extra-semi-stmt & missing-variable-declarations
2019-05-03 12:43:02 +10:00
Campbell Barton
a677cdab56 Defaults: disable developer extras
Was enabled by accident when updating startup.blend.
2019-05-03 12:19:18 +10:00
Campbell Barton
2c0db07eed DNA: remove unused 'osa' member
Also correct unused flag comment, use doxy cross references.
2019-05-03 12:07:25 +10:00
William Reynish
b331515d2e Industry Compat Kerymap: Add Pick Shortest Path to keymap
Use Ctrl-Shift-Click for this.
2019-05-02 19:03:15 +02:00
Sergey Sharybin
cdf68af12e Fix T64072: DynamicPaint: Bake failed: Canvas mesh not updated
Baking is to happen form within an evaluated scene.
2019-05-02 17:46:54 +02:00
Clément Foucault
95e052f830 Fix T63997 Weird z-fight during weight paint
PBVH drawing was used even in weightpaint/vertexpaint because both uses
the sculpt session.
2019-05-02 16:51:45 +02:00
Clément Foucault
102daed1f2 Cleanup: Draw Manager: remove DRW_state_invert_facing 2019-05-02 16:51:45 +02:00
William Reynish
8ae6effa91 Industry Compat Keymap: Suppurt MMB for translating nodes
Consistent with 3D View and animation editors.
2019-05-02 16:28:13 +02:00
Antonioya
f8bed5ccdc GPencil: New API to remove grease pencil material settings
This is required for some add-ons

Example use:
ma = bpy.data.materials[0]
# create settings
bpy.data.materials.create_gpencil_data(ma)
# remove settings
bpy.data.materials.remove_gpencil_data(ma)

Related to T63707
2019-05-02 16:27:12 +02:00
Jeroen Bakker
b52a0c78af Workbench,EEVEE: Viewport Render Samples
- Add `render_aa` and `viewport_aa` sampling setting for workbench. 0
   samples means no AA, 1 sample uses FXAA and more samples will use
   TAA.
   The viewport `gpu_viewport_quality` can still limit viewport anti-aliasing
   method.
 - Use TAA when rendering images. (this used to be CPU based FSAA)
 - Removed `R_OSA` related settings.

Reviewers: fclem, brecht

Maniphest Tasks: T60847

Differential Revision: https://developer.blender.org/D4773
2019-05-02 16:19:12 +02:00
William Reynish
76193106d2 Industry Compat Keymap: Sequencer and NLA
Same changes as for Dopesheet and Graph editor:

  - Dragging in empty area starts a box selection
  - Hold Shift to expand or Ctrl to remove
  - LMB Dragging on keyframe moves key
  - MMB Dragging anywhere moves selection
2019-05-02 16:18:23 +02:00
Brecht Van Lommel
ffaf91b5fc Pose slide / relax: fix various issues
* Fix operator adjust settings not working.
* Fix modal operator not working when invoked from search menu.
* Fix tagging to be correct for new depsgraph.
* Fix pose relax doing nothing when start and end frames match
  even if the current frame value is different.
* Remove odd 0.3..0.7 limit in adjust operator settings panel.
2019-05-02 16:03:39 +02:00
Sergey Sharybin
51347be24e Fix T64059: Crash in shader when using other object's texture space
Can not use evaluated datablock to localize since that could point to
another evaluated datablock, which can not become part of another
dependency graph.

The original code needed to have unkeyed changes preserved, but now
we do have a flush of animation to an active dependency graph, so this
code is not needed anymore.
2019-05-02 15:55:29 +02:00
William Reynish
ae21dfc236 Industry Compat Keymap: Tweak keymap for Graph Editor and Dopesheet
- Dragging in empty area starts a box selection
  - Hold Shift to expand or Ctrl to remove
  - LMB Dragging on keyframe moves key
  - MMB Dragging anywhere moves selection
2019-05-02 15:54:48 +02:00
Alexander Gavrilov
2c5ee7418c Fix T63697: correct stuck R_NO_CAMERA_SWITCH in scene->r.mode.
This flag becomes stuck in certain situations, causing the marker
camera switch feature to not work.

To fix old files with the problem, clear the flag on file load.

Also, the line that is supposed to clear it has wrong bit math,
causing seq_render_scene_strip to effectively toggle the flag on or
off every time it's run, instead of restoring to original state.

The flag and code were added in 001789d733 by @campbellbarton.
2019-05-02 16:31:11 +03:00
Jeroen Bakker
5ec7987949 DrawManager: External Engine Depth Buffer
Only draw the depth buffer when overlays are enabled and scene
or view has changed.

When using Cycles in the viewport for every viewport draw call
the depth buffer was renewed. Draw calls happened when a sample
was finished or the status report was updated.

This could waist some CPU/GPU cycles. This change will check when
the depth buffer needs to be updated or when the last known depth
buffer could be reused.

Reviewers: brecht, fclem

Maniphest Tasks: T63525

Differential Revision: https://developer.blender.org/D4775
2019-05-02 15:10:43 +02:00
Pablo Vazquez
9fa0e58fea UI: Open 'Passes' panel by default in Cycles.
This panel is arguably the most important in the ViewLayer properties, so
the concept of "1 panel open per context" doesn't work. Especially since
the first panel (View Layer) contains only two settings.

This also registers the Passes panels before filter/override so it's sorted in the same way as EEVEE.
2019-05-02 14:37:43 +02:00
Pablo Vazquez
1d8531e3db UI: Open 'Passes' panel by default in EEVEE.
This panel is arguably the most important in the ViewLayer properties, so
the concept of "1 panel open per context" doesn't work. Especially since
the first panel (View Layer) contains only two settings.
2019-05-02 14:37:43 +02:00
Clément Foucault
7f366c048a Fix T63435 Incorrect fresnel and normals for hair strands on EEVEE 2019-05-02 14:32:41 +02:00
William Reynish
a914765221 UI: rename 'Remove Doubles' to 'Merge by Distance'
Also add into the "Merge" menu.
2019-05-02 21:57:24 +10:00
Alexander Gavrilov
6047653ec0 Fix T63904: Remove Animation should remove empty actions from objects. 2019-05-02 14:56:25 +03:00
Jacques Lucke
667af6cf41 Refactor grid and scale indicator text drawing
This affects the timeline, dopesheet, graph editor, sequencer,
clip editor and nla editor.

Removed structs and enums: `V2D_ARG_DUMMY`, `eView2D_Units`,
`eView2D_Clamp`, `eView2D_Gridlines`, `View2DGrid`.

A main goal of this refactor is to get rid of the very generic
`View2DGrid` struct. The drawing code became very complex
because there were many different combinations of settings.

This refactor implements a different approach.
Instead of one very generic API, there are many slighly
different functions that do exactly, what we need in the
different editors. Only very little code is duplicated,
because the API functions compose some shared low level code.

This structure makes the code much easier to debug and change,
because every function has much fewer responsibilities.

Additionally, this refactor fixes some long standing bugs.
E.g. when `Show Seconds` is enabled, you zoom in and pan the view.
Or that the step size between displayed frame numbers was
always `>= 2`, no matter how close you zoom in.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4776
2019-05-02 12:00:12 +02:00
Campbell Barton
5b14b56542 Cleanup: typos in comments 2019-05-02 18:25:36 +10:00
Campbell Barton
22c293f6d6 Cleanup: outdated comments, unused define 2019-05-02 18:25:36 +10:00
Antonioya
8c478bb915 GPencil: Add API property to check annotations
This new property allows to check if the current datablock is an annotation or is used in a grease pencil object.

This property is required for some Add-ons.
2019-05-02 10:08:59 +02:00
Sergey Sharybin
2b88ed30cc Cleanup: Comments
A spelling issues introduced in 5a43406e1b. From quick look the
sequencer seems to be the only special boy. But the change is a bit
too big to carefully re-read for exact spelling mistakes.
2019-05-02 09:53:11 +02:00
Campbell Barton
6fb51ece54 Workspace: remove global active tool
This was needed for a global top-bar to show a single tool,
no longer needed now the top-bar is per-space.
2019-05-02 17:02:05 +10:00
Campbell Barton
38e34a12ac Fix T57099: Parenting between armatures crashes
Multi-object selection allowed to parent edit-bones across armatures
(which isn't supported).
2019-05-02 13:46:57 +10:00
Campbell Barton
65f739a700 UI: expose vertex merge as menu
Avoids a pop-up after the first click.
2019-05-02 11:59:12 +10:00
Campbell Barton
c4962d9303 Cleanup: use WM_keymap_item_* prefix 2019-05-02 11:45:46 +10:00